Re: Add Droplet functionality to Applet...
Re: Add Droplet functionality to Applet...
- Subject: Re: Add Droplet functionality to Applet...
- From: Kerry Hazelgren <email@hidden>
- Date: Mon, 5 Jan 2004 22:41:03 -0700
One more thing that you need to be aware of is the supported document
types. A droplet application by default supports documents with the
extension and type "****", representing any and all documents.
This entry actually gets put into the Info.plist file for the
application, which the system reads and determines which documents to
hilite when dragged over the dock icon. If the drop is completed, the
system then sends the documents to the application to be opened, that
is, they are passed to the "on open" handler in a Studio app.
If you start out with a project that is not an AppleScript Droplet,
this document type entry will not exist for your project. You will
need to add it, or customize it to support the document types you
really want. Look in Project>Edit Active Target 'Foo', then click on
Document Types under Info.plist entries. Copy the entry from a droplet
project, if necessary.
Kerry Hazelgren
Dratz, dratz, DRATZ! I was sure your advice was right on the money,
Tim
(thanks), something I had definitely missed. But alas, still no worky.
This is really driving me nuts - something so seemingly simple taking
a day
to figure out. At this point it would be easier to just start a new
droplet
(that I know will work) and copy over all my code, but I don't know
how to
move my MainMenu.nib file over to a new project with all the hook-ups
being
correct (don9t' want to redesign it). <end venting>
I turned this on as described, recompiled, and no go (I figured you
meant
'not'). Then I turned it off, deleted the 'on open' and 'on idle'
handlers
I had created prior, saved everything, then went back and turned on the
'open' and the 'idle' knowing that it would auto-enter the code it
wants
into my script, and added the inside code so it all looks like this
now:
on open theObject
display dialog "theObject: " & theObject as string
processUpdates(these_items)
end open
-- I assume I don't need this, but put it here just in case it was
-- required (a desparate effort) since the Assistant sets you up with
one
-- when creating a droplet.
on idle theObject
display dialog "I am idle"
end idle
on processUpdates(theFilePath)
display dialog "I'm updating --> theFilePath = " & theFilePath as
string
end processUpdates
I saved everything and even did a 'Clean All Targets'. Despite all of
this,
I cannot drag a file onto the newly compiled applet and have it
highlight
(indicating it will launch with that item). The icon doesn't show the
down
arrow either. The only thing I can think of is that I created this
original project in Xcode 1.x or that the 'on launch' causes some sort
of
conflict?
Something I notice too is that instead of 'on open these_items' as I'm
quite
use to seeing, Xcode enters it as 'on open theObject'. If I could get
it
running, I could figure out the differences.
FYI - I'm on Panther 10.3.1 using AS 1.9.3 and Xcode v1.1.
Matt
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.