09-01-2008 11:50 AM
Hi,
I'm using BrowserContent to write a custom browser. Apparently the individual fields are usually
being handled appropriately as I get menu options appropriate for the field like "getlink" or image
specific stuff. But, it isn't clear to be how to investigate the field type and contents to make
my own features like copying the text or links or source html to a clipboard etc.
What can I do with these fields in terms of class determination and manipulation?
Is the best that I can do to go through the component package and do "if instanceof " or
otherwise try to cast into various things or is there a simpler way? Presumably there is
an underlying instance of XMLParser for rendering html. Do I have anyway to access this?
Thanks.
09-01-2008 02:43 PM
If I execute this code,
BrowserContent bc=m_app.this_page();
if ( bc==null) return;
String cname= bc.getClass().getName();
dshow("name is "+cname);
I get something called HTMLBrowserContent for the page I'm viewing but it doesn't appear in allclasses AFAIK
as it is in apps.internal.browser which doesn't exist in my documentation. Comments?
Further, this test seems to fail leaving me out of ideas. Thanks
if ( bc instanceof Manager)
{
Thanks.
09-02-2008 12:12 PM
The browser fields do not provide any APIs for directly accessing the content that is being rendered (HTML, etc...).
Classes and methods that are not listed in the JavaDocs should not be used by third party applications. These are internal and could change at any time. Using them can also trigger the '3' key signing requirement (an internal RIM key) and result with an application that can not be run on a real BlackBerry.