Is it possible to add datarows from cocoa to an Applescript DataSource?
Is it possible to add datarows from cocoa to an Applescript DataSource?
- Subject: Is it possible to add datarows from cocoa to an Applescript DataSource?
- From: Sovande Ulv <email@hidden>
- Date: Wed, 12 Apr 2006 04:37:32 +0200
I am trying to use spotlight from Applescript. To achieve this I have
created a cocoa method in a category of NSApplication which perform
the actual spotlight search via the cocoa API.
I script the user interface via Applescript Studio and use a table
view to display the result from the spotlight search. To avoid
allocating and copy unnecessary in Applescript I had hoped that it
was possible to add data rows directly from cocoa to the Applescript
data source. That way, the call from AppleScript would be very
simple, like so (instead of copying data from a returned array);
set update views of theDataSource to false
call method "doSpotligthSearch:toDataSource:" with parameters
{aQuery, theDataSource}
set update views of theDataSource to true
However this seems harder than I thought, the Applescript data source
is an instance of ASKDataSource and I cannot find any documentation
for this class anywhere. Why in .. does apple not expose this API?
Does anyone know if it is possible to update an AppleScript data
source at all from cocoa? Either by using some non-documented methods
of ASKDataSource or using other hacks?
I just started a couple of days ago with Applescript and cocoa and
haven't had time to look at everything yet. Maybe there are some
reflection like API in cocoa/ObjC that could be used to inspect
ASKDataSource?
Appreciate any help on this.
with regards
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden