• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Obj-C from JavaScript, Google Map event listeners in a WebView.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Obj-C from JavaScript, Google Map event listeners in a WebView.


  • Subject: Obj-C from JavaScript, Google Map event listeners in a WebView.
  • From: Erik Sjödin <email@hidden>
  • Date: Mon, 16 Jan 2006 18:13:29 +0100

Hi!

I'm trying to execute a objective c method called "test" from a
JavaScript in a WebView. The code compiles fine but "test" is not
executed when the JavaScript is executed in the WebView.

I'm also trying to get google maps event listeners to work in my
WebView, I've tried both GEvent.addListener and GEvent.bind without
succes. My gmap loads fine in the WebView otherwise and the listeners
work in Safari...

Any Ideas?

----- objective c code:

- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame {

id win = [webView windowScriptObject];

// alloc an instance of the mapManager class
MapManager *mapManager = [[MapManager alloc] init];

// publish mapManager to webView
[win setValue:mapManager forKey:@"gMapManager"];

}

------ javascript code:

<script type="text/javascript">

// exc. obj-c method
if (gMapManager) { gMapManager.test(); }

</script>

thanks! // erik
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Obj-C from JavaScript, Google Map event listeners in a WebView.
      • From: "Theodore H. Smith" <email@hidden>
  • Prev by Date: Re: "Modal" Window
  • Next by Date: Re: Sync Services: role of client type
  • Previous by thread: Re: NSButton not responding to mouseEntered: ?
  • Next by thread: Re: Obj-C from JavaScript, Google Map event listeners in a WebView.
  • Index(es):
    • Date
    • Thread