[PYTHONMAC-SIG] Drag & Drop ?

Steven D. Majewski sdm7g@virginia.edu
Tue, 5 Nov 1996 17:10:08 -0500 (EST)


On Fri, 1 Nov 1996, Jack Jansen wrote:
 
> This is simple. Just give your applet a BNDL resource containing (at
> least) the types of files you're willing to handle (use '****' to
> handle any file, 'fldr' for folders, etc, see Inside Mac for
> details). Dropping a file on your applet will give you the filename in
> sys.argv. EditPythonPrefs uses this (and I think that one of the
> examples in the Demo folder explains this too, but I will check).
 
Thanks -- I flailed away at trying to patch the BNDL resources with
ResEdit for a while, before I reread part of Inside Mac to try to
figure out what I was missing. I saw the note about how the BNDL
info is loaded into the file catalog, and the problem appeared
to be that it was ignoring the edited info once the original info
was loaded into the catalog. 
  I tried modifying the resource in the applet template file before
I got around to searching thru the source and documentation and 
found that what I needed to do was create a .rsrc file with the 
same name as my app with the extra resources to be added. 
  
 
 Gee Jack -- It really works nicely once I read the instructions! :-> 

[ Maybe I'll write up the steps for an example and post it to one
 of the comp.sys.mac groups to show off how easy the drag and drop is. ] 

---|  Steven D. Majewski   (804-982-0831)  <sdm7g@Virginia.EDU>  |---
---|  Department of Molecular Physiology and Biological Physics  |---
---|  University of Virginia             Health Sciences Center  |---
---|  P.O. Box 10011            Charlottesville, VA  22906-0011  |---
         By doing just a little every day, you can gradually 
                let the task completely overwhelm you.


=================
PYTHONMAC-SIG  - SIG on Python for the Apple Macintosh

send messages to: pythonmac-sig@python.org
administrivia to: pythonmac-sig-request@python.org
=================