multiple j2me commandAction methods in different classes not responding

79 views Asked by At

Im a noob to j2me. I have an app. where I would like to use multiple commandAction() methods in each class. For example one form belongs to one class which uses a commandAction method to go to a list, which is in another class, whereby the list in the different class has another commandAction method to jump to another form. I tried running the application, but it seems the only responsive commandAction method is the one in the first form. Can j2me use multiple commandAction methods in different classes on the same app, or do I have to use the same method for the whole app, because that too may cause an error if the method is too big? P.S. I tried using one commandAction method for the entire app, and it works, but if I try use the method on different classes, nothing happens, as though the commandlistener has not been set, yet it has?

1

There are 1 answers

0
Telmo Pimentel Mota On

You called setCommandListener only once. When you change which class is presented remember to call setCommandListener again pointing to it.