| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
In my webview: - (void) webView: (WebView*) webView windowScriptObjectAvailable: (WebScriptObject*) windowScriptObject { [windowScriptObject setValue: [KanjiData new] forKey: @"KanjiData"]; } KanjiData is defined as: @interface KanjiData : NSObject { } - (NSString*) test; @end @implementation KanjiData - (NSString*) test { NSLog(@"test called"); return @"Test"; } ... The JS of the webview's HTML: var data = ""> window.alert(data); window.alert(data.test); prints out (I've routed the alert function to NSLog()): 2005-10-04 15:01:16.263 App[1112] > <KanjiData: 0x372320> 2005-10-04 15:01:16.311 App[1112] > undefined The KanjiData object as reflected to the JS is the KanjiData object's address. data.test() wasn't working so I wanted to see if the reflected function was callable, and I guess it isn't. ? Anybody got a simple JS -> ObjC test case I can look at? |
_______________________________________________ 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
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.