This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creation and Event linkage (JavaME CLDC 1.1 MIDP 2.0)

 
Vinicius Souza
Ranch Hand
Posts: 70
1
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!

 
Walter Gabrielsen Iii
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Vinicius Souza
Ranch Hand
Posts: 70
1
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic