dashboard widget plugin internal method calls
dashboard widget plugin internal method calls
- Subject: dashboard widget plugin internal method calls
- From: Jaime Magiera <email@hidden>
- Date: Thu, 10 May 2007 18:55:02 -0400
Hi -- different project now,
I'm writing a dashboard widget plugin. The calls back and forth
between the javascript and plugin all work fine. However, I just
noticed that internal calls like [self aStringVariable] in the bound
class don't return the variable value. Instead, it returns the name
of the method which is called next in the Javascript (!?) For
example, in the plugin...
-(void) methodCalledFromJavascript
{
NSLog(@"This is the value %@", [self aStringVariable]);
}
-(NSString *) aStringVariable
{
aStringVariable;
}
-(void) methodCalledFromJavascriptAfterTheInitialMethodCall
{
// do something
}
---------
<javascript>
MyWidgetPlugin.methodCalledFromJavascript();
MyWidgetPlugin. methodCalledFromJavascriptAfterTheInitialMethodCall()
</javascript>
--------
The NSLog of first call within the plugin returns...
"methodCalledFromJavascriptAfterTheInitialMethod" // not the value of
aStringVariable
--------
So, I guess the question is a conceptual one: Is the bound class only
for communication between the plugin and the javascript, with the
need for additional classes/objects for any transactions internal to
the plug-in.... or am I more confused than necessary...
:)
Jaime Magiera
Sensory Research Network
http://www.sensoryresearch.net
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden