Drag and Drop from Desktop

Jan Schenkel janschenkel at yahoo.com
Fri Nov 12 13:07:36 EST 2004


--- Rob Cozens <rcozens at pon.net> wrote:
> Hi Jan,
> 
> >Since Apple released System 7, AppleEvents have
> been
> >used for these purposes : the Finder will launch
> the
> >application, and send an appleEvent of type "odoc"
> and
> >class "aevt" -- so you can use that information
> within
> >Revolution.
> 
> I built a standalone including an appleEvent
> handler, and
> 
> * The standalone will only respond to a drop when
> the file dropped is 
> a Rev stack: dropping any other file/folder on the
> icon just causes 
> the Finder to reposition the item dragged.
> 
> * If I drop a Rev stack on the icon, that stack is
> opened, and I get 
> NO appleEvents reported by the standalone until I
> press cmd-Q.
> 
> * The $1 parameter is empty.
> 
> BTW, I've been dragging my feet about upgrading, and
> am running Ver 
> 2.1.2 on OSX.  Might some of my problems go away in
> a more recent 
> release?
> 

Hi Rob,

I forgot that you need to change the standalone so
that it accepts any file dropped onto it.

On MacOS9 you use ResEdit and add FREF resources:
- file type "****" (four stars) means you can drop any
type onto your application
- file type "fold" means you can drop a folder onto
your application
- file type "disk" means you can drop an disk icon
onto your application
You will also have to tinker the BNDL resource and add
the above types in the 'Type' column.
Hint: open DropStuff with ResEdit, so you can see how
it handles this sort of thing.

On MacOSX you have to change the Info.plist file that
is contained in your app bundle -- but I'm not quite
sure how to do that.

Jan Schenkel.

=====
Join us at the European Revolution Conference
November 14-16, MALTA. ~ http://TechieTours.com/Rev/

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)


		
__________________________________ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com 
 



More information about the use-livecode mailing list