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

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -