Hichem-elAbassi / j4me

Automatically exported from code.google.com/p/j4me
0 stars 0 forks source link

Components do not show/hide correctly #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add a Label in the constructor
2. Call lbl.show( false )  <-- This won't keep
3. Later call lbl.show( true )

What is the expected output? What do you see instead?
The label should be visible, but it is not.

Please use labels and text to provide additional information.
Seen in version 1.0.2.

Original issue reported on code.google.com by deanbro...@gmail.com on 14 Mar 2008 at 3:28

GoogleCodeExporter commented 9 years ago
This is caused by the Dialog class using show to say whether a particular 
component
is on the screen or not.  In reality it needs some other mechanism since
show()/hide() should be reserved for the user.

There is another hidden bug in that.  Anytime a component is removed or hidden
Dialog.invalide(), .calculateLayout(), .paint(), etc. will not work.  
Everything in
Dialog needs to account for this.

Original comment by deanbro...@gmail.com on 15 Apr 2008 at 12:59

GoogleCodeExporter commented 9 years ago
Actually this was kind of an invalid issue.  The Dialog.show() method's name was
misleading so it has been renamed to .visible().

DeviceScreen.show() has different, and proper, functionality.  The .visible() 
method
is a way to notify the component to setup or clean up resources.

Original comment by deanbro...@gmail.com on 9 May 2008 at 12:10