Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2005

Tip: Looking for answers? Try searching our database.

Problem with deleteAll() method of Form object. (J2ME)

Thread view: 
Alejandro Rodríguez González - 16 Jun 2005 13:02 GMT
Hello,

In first place, sorry for my english :-)

I'm developing a J2ME application. One of the class of this applications
extends Canvas and implements CommandListener. In this class, i have a
Form object like this:

Form pantalla = new Form("Contacto");

I add to this form some Command and TextField, and later, i want to
delete all items of the Form, and i use pantalla.deleteAll();

The problem is, that this method, sometimes delete all the elements of
the form, but, in other times, don't do it. Concretely, the Command
items, don't delete. Why? Exists other way to delete this Command?

Thanks.
Remon van Vliet - 16 Jun 2005 13:16 GMT
Displayable.removeCommand()

Remon van Vliet

> Hello,
>
[quoted text clipped - 14 lines]
>
> Thanks.
Alejandro Rodríguez González - 16 Jun 2005 13:21 GMT
True, very thanks :-)
Remon van Vliet - 16 Jun 2005 16:50 GMT
No problem ;)
> True, very thanks :-)
Darryl Pierce - 26 Jun 2005 15:23 GMT
> The problem is, that this method, sometimes delete all the elements of
> the form, but, in other times, don't do it. Concretely, the Command
> items, don't delete. Why?

Because Form.deleteAll() removes all instances of
javax.microedition.lcdui.Item from the Form (as the API documentation
says). javax.microedition.lcdui.Command objects are not Items so they
are not removed.

> Exists other way to delete this Command?

javax.microedition.lcdui.Form.remove(Command)

Signature

Darryl L. Pierce <mcpierce@gmail.com>
Visit my homepage: http://mcpierce.multiply.com
"By doubting we come to inquiry, through inquiry truth." - Peter Abelard



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.