Skip to main content

Command Menu Issue

12 replies [Last post]
bardubitzki
Offline
Joined: 2003-11-02
Points: 0

Hi there,

In a separate thread I'm reading continuously from a stream over the network and painting images onto a container in a form without blocking the EDT. This works well.

The problem is that the form has a number of commands attached to it. If I click the right soft key to open the command menu the MIDlet exists right away and no exceptions are dumped to the stack trace..

Is there anything I can do to avoid this issue?

Thanks.
Stephan

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kirui
Offline
Joined: 2011-03-28
Points: 0

bardubitzki wrote:
Hi there,

In a separate thread I'm reading continuously from a stream over the network and painting images onto a container in a form without blocking the EDT. This works well.

The problem is that the form has a number of commands attached to it. If I click the right soft key to open the command menu the MIDlet exists right away and no exceptions are dumped to the stack trace..

Is there anything I can do to avoid this issue?

Thanks.
Stephan

This is a totally unrelated to the question you asked but I am having problems downloading images from the internet,would you mind sharing how you achieved that?

bardubitzki
Offline
Joined: 2003-11-02
Points: 0

Hi Chen,

> Proguard 3.7 who comes by default with NB6.1 is buggy with LWUIT –
> download version 4.x and replace the Proguard version in NB - under > 6.0 install dir>\mobility8\external\proguard and try again.

Apparently, NB doesn't find the new Proguard version by just replacing it.
There must be some config or property within NB, but I can't find it.

Do you have some info on that?

Thanks,
Stephan

bardubitzki
Offline
Joined: 2003-11-02
Points: 0

Ok, it seems to work if you give the Proguard 4.2 versions .jar file the name of the 3.7 version and restart NB.

Stephan

bardubitzki
Offline
Joined: 2003-11-02
Points: 0

Hi Shai,

something is fishy with the command menu. I'm using NetBeans 6.1, when I set obfuscation to level 0 and run the MIDlet the menu behavior is as expected. If I set obfuscation level to 9, clean, build and run the MIDlet I have that wired behavior again. That is: pressing the right soft key MIDlet exits right away.

Any ideas?

Thanks.
Stephan

chen

Hi Stephan,
Proguard 3.7 who comes by default with NB6.1 is buggy with LWUIT –
download version 4.x and replace the Proguard version in NB - under 6.0 install dir>\mobility8\external\proguard and try again.

Regards,
Chen

lwuit-users@mobileandembedded.org wrote:
> Hi Shai,
>
> something is fishy with the command menu. I'm using NetBeans 6.1, when I set obfuscation to level 0 and run the MIDlet the menu behavior is as expected. If I set obfuscation level to 9, clean, build and run the MIDlet I have that wired behavior again. That is: pressing the right soft key MIDlet exits right away.
>
> Any ideas?
>
> Thanks.
> Stephan
> [Message sent by forum member 'bardubitzki' (bardubitzki)]
>
> http://forums.java.net/jive/thread.jspa?messageID=279031
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

Qunhuan Mei

Never thought the obfuscator could be the problem source. Your message has saved my day, Chen!

BTW - are you States based - noticed the message arrived at 8am London time. What time was there in States - health is important! :-)

-----Original Message-----
From: Chen.Fishbein@Sun.COM [mailto:Chen.Fishbein@Sun.COM]
Sent: 09 June 2008 08:02
To: users@lwuit.dev.java.net
Subject: Re: Command Menu Issue

Hi Stephan,
Proguard 3.7 who comes by default with NB6.1 is buggy with LWUIT –
download version 4.x and replace the Proguard version in NB - under 6.0 install dir>\mobility8\external\proguard and try again.

Regards,
Chen

lwuit-users@mobileandembedded.org wrote:
> Hi Shai,
>
> something is fishy with the command menu. I'm using NetBeans 6.1, when I set obfuscation to level 0 and run the MIDlet the menu behavior is as expected. If I set obfuscation level to 9, clean, build and run the MIDlet I have that wired behavior again. That is: pressing the right soft key MIDlet exits right away.
>
> Any ideas?
>
> Thanks.
> Stephan
> [Message sent by forum member 'bardubitzki' (bardubitzki)]
>
> http://forums.java.net/jive/thread.jspa?messageID=279031
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

chen

Qunhuan Mei wrote:
> Never thought the obfuscator could be the problem source. Your message has saved my day, Chen!
>
Glad to help
> BTW - are you States based - noticed the message arrived at 8am London time. What time was there in States - health is important! :-)
>
Actually we are based in israel (although it's holiday now ;-) )
> -----Original Message-----
> From: Chen.Fishbein@Sun.COM [mailto:Chen.Fishbein@Sun.COM]
> Sent: 09 June 2008 08:02
> To: users@lwuit.dev.java.net
> Subject: Re: Command Menu Issue
>
> Hi Stephan,
> Proguard 3.7 who comes by default with NB6.1 is buggy with LWUIT –
> download version 4.x and replace the Proguard version in NB - under > 6.0 install dir>\mobility8\external\proguard and try again.
>
> Regards,
> Chen
>
>
>
> lwuit-users@mobileandembedded.org wrote:
>
>> Hi Shai,
>>
>> something is fishy with the command menu. I'm using NetBeans 6.1, when I set obfuscation to level 0 and run the MIDlet the menu behavior is as expected. If I set obfuscation level to 9, clean, build and run the MIDlet I have that wired behavior again. That is: pressing the right soft key MIDlet exits right away.
>>
>> Any ideas?
>>
>> Thanks.
>> Stephan
>> [Message sent by forum member 'bardubitzki' (bardubitzki)]
>>
>> http://forums.java.net/jive/thread.jspa?messageID=279031
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
>> For additional commands, e-mail: users-help@lwuit.dev.java.net
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

Stephan Bardubitzki

Hi Chen,



> Proguard 3.7 who comes by default with NB6.1 is buggy with LWUIT –
> > download version 4.x and replace the Proguard version in NB - under > > 6.0 install dir>\mobility8\external\proguard and try again.

Apparently, NB doesn't find the new Proguard version by just replacing it.
There must be some config within NB but I can't find it.

Do you have some info on that?

Thanks,
Stephan

On Mon, 2008-06-09 at 13:30 +0300, chen wrote:

> Qunhuan Mei wrote:
> > Never thought the obfuscator could be the problem source. Your message has saved my day, Chen!
> >
> Glad to help
> > BTW - are you States based - noticed the message arrived at 8am London time. What time was there in States - health is important! :-)
> >
> Actually we are based in israel (although it's holiday now ;-) )
> > -----Original Message-----
> > From: Chen.Fishbein@Sun.COM [mailto:Chen.Fishbein@Sun.COM]
> > Sent: 09 June 2008 08:02
> > To: users@lwuit.dev.java.net
> > Subject: Re: Command Menu Issue
> >
> > Hi Stephan,
> > Proguard 3.7 who comes by default with NB6.1 is buggy with LWUIT –
> > download version 4.x and replace the Proguard version in NB - under > > 6.0 install dir>\mobility8\external\proguard and try again.
> >
> > Regards,
> > Chen
> >
> >
> >
> > lwuit-users@mobileandembedded.org wrote:
> >
> >> Hi Shai,
> >>
> >> something is fishy with the command menu. I'm using NetBeans 6.1, when I set obfuscation to level 0 and run the MIDlet the menu behavior is as expected. If I set obfuscation level to 9, clean, build and run the MIDlet I have that wired behavior again. That is: pressing the right soft key MIDlet exits right away.
> >>
> >> Any ideas?
> >>
> >> Thanks.
> >> Stephan
> >> [Message sent by forum member 'bardubitzki' (bardubitzki)]
> >>
> >> http://forums.java.net/jive/thread.jspa?messageID=279031
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> >> For additional commands, e-mail: users-help@lwuit.dev.java.net
> >>
> >>
> >>
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> > For additional commands, e-mail: users-help@lwuit.dev.java.net
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>
> --------------------------------
> Spam/Virus scanning by CanIt Pro
>
> For more information see
> http://www.kgbinternet.com/SpamFilter.htm
>
> To control your spam filter, log in at
> http://filter.kgbinternet.com
[att1.html]

bardubitzki
Offline
Joined: 2003-11-02
Points: 0

Hi Shai,

> I'm not exactly clear on how you can read an image
> and paint it in a
> separate thread?
> I'm assuming you download the image and do something
> like
> "label.setIcon(myImageCreatedOnOtherThread);"

Sorry, can't say much about how this is done, because it is a commercial app I'm transferring from MIDP-2 to LWUIT. It is a live video stream, however, with the new code drop the menu problem has vanished and many of the other issues I had in the past are resolved too.

I'm also happy that I can use the resource editor now on Ubuntu.

Great job guys!!!

Thanks,
Stephan

vprise
Offline
Joined: 2003-11-07
Points: 0

> Sorry, can't say much about how this is done, because
> it is a commercial app I'm transferring from MIDP-2
> to LWUIT. It is a live video stream, however, with
> the new code drop the menu problem has vanished and
> many of the other issues I had in the past are
> resolved too.

Great to hear!

You know that Chen is collecting screenshots and application highlights for the featured applications section in the LWUIT website... Please feel free to send such pictures with description about the application to lwuit@sun.com

Thanks,
Shai.

Shai Almog

Hi Stephan,
I'm not exactly clear on how you can read an image and paint it in a
separate thread?
I'm assuming you download the image and do something like
"label.setIcon(myImageCreatedOnOtherThread);"

This should be perfectly legal for most cases, it probably shouldn't
affect the menu. Are you adding or removing commands in a separate
thread?
To check the current thread you can use Display.getInstance().isEdt().

Are you working with a simulator or an emulator?

It is possible that the exit command in your application is invoked
incorrectly instead of the menu feature, check that this isn't the
case using printouts.

Chen will upload a new drop today, it would be great if you can test
with that to see if the issue is resolved.

As a side note, you should be aware that some devices (including Sony
Ericsson) have issues with network download during UI updates. These
are generally not the crashing type, they would just stop painting
causing the application to freeze while downloading. There isn't much
you can do in such devices since they ignore thread priorities and
the networking thread is often native so you have very little control.

Shai.

> Hi there,
>
> In a separate thread I'm reading continuously from a stream over
> the network and painting images onto a container in a form without
> blocking the EDT. This works well.
>
> The problem is that the form has a number of commands attached to
> it. If I click the right soft key to open the command menu the
> MIDlet exists right away and no exceptions are dumped to the stack
> trace..
>
> Is there anything I can do to avoid this issue?
>
> Thanks.
> Stephan
> [Message sent by forum member 'bardubitzki' (bardubitzki)]
>
> http://forums.java.net/jive/thread.jspa?messageID=278465
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

bardubitzki
Offline
Joined: 2003-11-02
Points: 0

Hi Shai,

thanks for your quick response. I will wait for the code drop and try again.

Also, thanks for your comments on network issues with SE, is much appreciated.

Regards,
Stephan