Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamically reset the DOM?



What kind of object is scriptObject?

Consider this note from http://developer.apple.com/documentation/ AppleApplications/Reference/Dashboard_Ref/Plugin/ chapter_5_section_1.html

Note: The objects you expose to JavaScript using this technique may conform to the WebScripting interface of Web Kit, which is available in Mac OS X version 10.4. The Web Kit uses the methods of this interface to allow you to control which methods you expose from your Objective-C class. For more information, see Using Objective-C From JavaScript in Cocoa User Experience Documentation.


To test if an invalid argument is your problem, change cocoacalling to take no arguments and issue a simple alert and see if it executes.
Geoff


It seems OK, I added NSLog to both methods:

2005-12-02 13:26:08.000 DTRoot[19607] setJSInWebView: <HTML><HEAD><TITLE> </TITLE><SCRIPT type="text/javascript"><!-- function cocoacalling(scrObject) { scrObject.Score = 1000; document.write('cocoacalling'); return scrObject.Score;}// --></ SCRIPT></HEAD><BODY style="border: 0; margin: 0; padding: 0">loaded from -awakeFromNib</BODY></HTML>
2005-12-02 13:26:08.010 DTRoot[19607] windowScriptObjectAvailable
2005-12-02 13:26:08.016 DTRoot[19607] didFinishLoadForFrame
2005-12-02 13:26:08.016 DTRoot[19607] didFinishLoadForFrame: <HTML><HEAD><TITLE> </TITLE><SCRIPT type="text/javascript"><!-- function cocoacalling(scrObject) { scrObject.Score = 1000; document.write('cocoacalling'); return scrObject.Score;}// --></ SCRIPT></HEAD><BODY style="border: 0; margin: 0; padding: 0">loaded from -awakeFromNib</BODY></HTML>
2005-12-02 13:26:08.016 DataTypeRoot[19607] (null) result


Michael
--
Michael Hanna
email@hidden
iChat: michaelkhanna(AIM)


_______________________________________________ Do not post admin requests to the list. They will be ignored. Webkitsdk-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webkitsdk-dev/email@hidden

This email sent to email@hidden
References: 
 >Dynamically reset the DOM? (From: Michael Hanna <email@hidden>)
 >Re: Dynamically reset the DOM? (From: Geoffrey Garen <email@hidden>)
 >Re: Dynamically reset the DOM? (From: Michael Hanna <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.