• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Is it possible to add datarows from cocoa to an Applescript DataSource?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: Tue, 11 Apr 2006 11:42:27 +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. Maybe there are some java reflection type API in cocoa 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
  • Prev by Date: Re: Distributed Objects - setting protocol crashing GCC 4.0
  • Next by Date: Re: Distributed Objects - setting protocol crashing GCC 4.0
  • Previous by thread: Re: SLOW -[NSFileManager directoryContentsAtPath:matchingExtension:options:keepExtension:]
  • Next by thread: Is it possible to add datarows from cocoa to an Applescript DataSource?
  • Index(es):
    • Date
    • Thread