Recent Widgets


Register for DashboardWidgets

Recent Forums Posts

Partners


iCompositions

MacDesktops.net

RSS Showcase
RSS Comments
RSS Forums

This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. Posted in: Widget Development

Widget<->Plugin<-App-> Communication

Author Message
macrophyllum



Joined: 10 Feb 2005
Posts: 9
Location: Putney, VT

Posted: Tue Mar 08, 2005 - 8:51 am    Post subject: Widget<->Plugin<-App-> Communication Reply with quote

I am working on widget that will work in conjunction with a stand alone app. I basically want to use the plugin to push and pull data from the main app. The data will be displayed and manipulated in the widget.

My question is this: what is the best way to do the interapp communication?
I am ruling out AppleScript because my main app is not scriptable, I am also thinking that I will rule out NSDistributedNotifications because I basically want my JavaScript object to be able to call things like, "getArrayOfObjects" and have it return an array, which isn't possible with distributed notifications (at least I don't thing).

So as I see it, my options are distribued objects or a plugin architecture. I am familiar with DO so maybe that is the say to go, not sure if a plugin would be better.

Any thoughts/comments?
View user's profile Send private message Send e-mail Visit poster's website Widgets
blurry
Quality Control


Joined: 03 Feb 2005
Posts: 33
Location: UK

Posted: Tue Mar 15, 2005 - 11:20 am    Post subject: Reply with quote

Unfortunately, I don't think anyone here is going to be able to help.

It's not because we don't want to, or don't posess the knowledge, but it's a public board and in-depth discussion of Dashboard would be in violation of the NDA that ADC members like myself have with Apple.

Doesn't look like you'll have long to wait, though - most Mac news sites are reporting that Tiger will ship at the beginning of April. Very Happy

George.
_________________
If your only tool is a hammer, everything looks like a nail
View user's profile Send private message Send e-mail Widgets
iremembercliford



Joined: 27 Mar 2005
Posts: 32

Posted: Thu Mar 31, 2005 - 12:54 am    Post subject: Reply with quote

Read here

But I would suggest either using a file as an intermediary, or distributednotifications. Just use the plugin to format the javascript function. Within the plugin (a bundle) you have complete freedom in Cocoa to do whatever you want. For my own particular uses, I have a database setup, and I can access the database from both the application and widget simultanously. To prevent deadlock or database corruption, I put a lock while writing to the file. Even that, though, seems overkill since you obviously cannot use both applications simultanously.

Edited link that was breaking the forum layout. - Jeremy
View user's profile Send private message Send e-mail Widgets
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.

 
Powered by phpBB © 2001, 2002 phpBB Group