I'm working with the BrowserFieldDemo (JDE 7.1.0) and on the event Event.EVENT_BROWSER_CONTENT_CHANGED, a BrowserContent object is retrieved with
(BrowserContent) browserContentChangedEvent.getSource();
My question is: can I get a BrowserField instance from the event information?
I think the problem is that you're using the old
BrowserFieldDemo. This code has been around for a long time (since way before 7.1), and uses code that's quite a bit more complex than what's been required since BB OS 5.0.If you want to work directly with net.rim.device.api.browser.field2.BrowserField, then you should check out the
BrowserField2Demo.In Eclipse, goto BlackBerry -> Import -> BlackBerry Samples -> BrowserField2Demo.
If you then use the newer
BrowserField, you can attach a BrowserFieldListener, which will get called back during normal browser events, similar to the method you mentioned from the oldBrowserFieldDemo. In all those callbacks, you'll see that you do get passed a true instance ofBrowserField, as you wanted.