Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problems with the display MIDP.

 
Sebastian Green
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the deal, Im currently in an other class in the application and want to get back to my MainMIDlet. So I want the display to be focused on MainMIDlet.java from InputForm.java. But I cant get it to work. I tried several commands like

Im always getting compileing errors can someone help me?
 
Jason Fox
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Instead of using repeated calls to Display's static getDisplay(MIDlet) method (don't forget the capital 'D', but I'm sure thats not the problem), have you tried something like this:

Hope this helps.
[ May 06, 2004: Message edited by: Jason Fox ]
[ May 06, 2004: Message edited by: Jason Fox ]
 
Sebastian Green
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the advice but your sugestion is based on calling on the display from the MIDlet class (class Blah extends MIDlet {). Bu I want to call the dispaly from the form class (InputForm extends Form {). Any other sugestion?
 
Jason Fox
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could pass in the Form from your mainMidlet class (as well as the MIDlet itself, either through public variables, get/set methods, etc,etc,etc) and then use the method
.
To be a little more precise:

Of course, this is a pretty simple example.
[ May 06, 2004: Message edited by: Jason Fox ]
 
Sebastian Green
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your time Jason Fox, I solved it by passing a Form and Display from the main MIDlet to my Formclass. Once I was done with all other method I just asked Display to set focused (setCurrent()) on Form I passed. Thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic