java me - navigationClick() problem for more then one item on Blackberry -
i have listfield , objectchoicefield.
in navigationclick method, how figure out 1 selected?
in navigationclick() method:
field field = getfieldwithfocus(); if (field instanceof listfield) // returns false if (field instanceof objectchoicefield) // returns false if (field == mylistfield) // returns false if (field == myobjectchoicefield) // returns false
the navigationclick() method should fire object attached to, unlike fieldchangelistener can attached more 1 field, , changed field passed parameter. if want debug can use system.out.println(field.tostring()) , should give class name of being clicked. also, may want try using getleafwithfocus() in case getfieldwithfocus() returning manager of field has focus.
Comments
Post a Comment