Recent Widgets


Register for DashboardWidgets

Recent Forums Posts

Partners


iCompositions

MacDesktops.net

RSS Showcase
RSS Comments
RSS Forums

Post new topic   Reply to topic Posted in: Widget Development

Created widgetplugin/bundle, now what? where to put it?

Author Message
wish1267



Joined: 12 Jan 2010
Posts: 4

Posted: Tue Jan 12, 2010 - 12:28 pm    Post subject: Created widgetplugin/bundle, now what? where to put it? Reply with quote

I followed sample code to create a bundle that I changed to a widgetplugin extension via the build config. So I have that file, now where do I put it so my java/html can see it?

I gave it a name:
- (void) windowScriptObjectAvailable:(WebScriptObject *) windowScriptObject
{
[windowScriptObject setValue:self forKey:@"testPlugin"];
NSLog(@"Done");
}

But in JavaScript it doesn't see it and my "Alerts"/NSLog calls don't go to the console. I guess JavaScript doesn't see my object (widgetplugin) yet, so how do i make it see it?

In my HTML file I have this:
<html>
<head>
<script language="JavaScript">

function someFunction()
{
alert("inside some function");//this runs in Safari, nothing below runs after.
if (testPlugin)
{
var temp = testPlugin.hello();
alert(temp);
}
alert("End some function");
}

</script>
</head>
<body>
<input type="button" size="20" VALUE = "some Function" onClick="someFunction()">

</body>
</html>

Where do I put it? What am I doing wrong?

Thanks.
View user's profile Send private message Send e-mail Widgets
wish1267



Joined: 12 Jan 2010
Posts: 4

Posted: Tue Jan 12, 2010 - 3:12 pm    Post subject: Reply with quote

Figured it out. Created a new project with DashCode, clicked on Widget Attributes and have begun development this way. It works fine.
View user's profile Send private message Send e-mail Widgets
Post new topic   Reply to topic

 
Powered by phpBB © 2001, 2002 phpBB Group