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: Getting flash WebScriptObject from objective-C



Ooops, it was obvious; I didn't track it down far enough to find that every DOMHTMLElement is a WebScriptObject. As Emily Litella says, "Never mind".

On Oct 20, 2006, at 3:14 PM, Rudi Sherry wrote:

I have an application that creates a WebView. In that webview is an HTML document with a body with one object: a flash object.

The flash object shows correctly in the WebView, and now I'm trying to java-script it from Objective C.

I can't seem to get to the Flash WebScriptObject, though. I have the window's webScriptObject (call it wso, and it's [ myWebView windowScriptObject ] ). I has a name and an ID, both "SWFObject".

I have tried everything I know to get to that object, but I can't see to. Everything returns and object of type WebUndefined, or nil. I can't find anything on the web about getting webscriptobjects by ID or name, or getting array values from javascript arrays.

I know it's the first child of the body (since I'm in control of the HTML), but how do I get that?

[ wso evaluateWebScript: @"document.body.children.length" ] returns NSCFNumber with intValue of 1, but:
[ wso evaluateWebScript: @"document.body.children[0]" ] returns nil



I'm sure there is something simple I'm missing, but I can't figure it out. Any help would be appreciated.


Thanks,
Rudi

_______________________________________________
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/rsherry% 40adobe.com


This email sent to email@hidden

_______________________________________________ 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: 
 >Getting flash WebScriptObject from objective-C (From: Rudi Sherry <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.