Forums Register Login

Creation and Event linkage (JavaME CLDC 1.1 MIDP 2.0)

+Pie Number of slices to send: Send
Hi people!
Lets me try to explain whats my problem:
Ive make this interface below:

In a Form I implements this interface because I need a CustomButtom class called CommandButtom Ive created call this methods when that methods occurs on the buttom.
See bellow:

You see? I need to call this events so my form will do some action. Ive a private variable called "listener" thats a reference to the Form. Do you undestand ? Its so difficult explain a thing like tha when your first language is not english hehheeh. Thanks in advance!

+Pie Number of slices to send: Send
Do you use this method?

javax.microedition.lcdui.Item.notifyStateChanged()

javax.microedition.lcdui.CustomItem:

Finally, subclasses are responsible for calling Item.notifyStateChanged() to trigger notification of listeners that the CustomItem's value has changed.

 
+Pie Number of slices to send: Send
 

Walter Gabrielsen Iii wrote:Do you use this method?

javax.microedition.lcdui.Item.notifyStateChanged()

javax.microedition.lcdui.CustomItem:

Finally, subclasses are responsible for calling Item.notifyStateChanged() to trigger notification of listeners that the CustomItem's value has changed.


Thanks for helping! My solution for this problema was:
An interface:

And a method call to the Form who implemented the interface:

That's it!
Thanks!
Proudly marching to the beat of a different kettle of fish... while reading this tiny ad
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1426 times.
Similar Threads
CustomItem not working on Nokia XpressMusic smartphone
CustomItem : Label dont Expand
Hierarchies, inheritance, polymorphism and interfaces
Hierachies and inheritance
Creating Arrow Icon Help
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 01:47:50.