hey, . sorry for that..
..my problem is i want to have subcommands of the command "NewMessageCmd"..in j2me..
here's the code:
public void commandAction(Command cmd,Displayable displayable){
if(displayable == ScheduledList){
else if(cmd == NewMessageCmd)// in this section if true,and if possible i want to have subcommands
//"TextMessageCmd" for creating sms...
//"MultimessageCmd" for creating mms...
//"EmailCmd"for emails...
// help plz, i dont know the code for creating subcommands in j2me,
// did you get it clear... plz help,
{
// dont know what to write
}
}
}
New Message --
-Text Message
-Multimedia
-Emai
thanks in advance..
1. There is a forum for J2ME, you should have posted there: http://forum.java.sun.com/forum.jspa?forumID=76
2. Use code tags.
3. >else if(cmd == NewMessageCmd) // in this section if true,and if possible i want to have subcommands
Where's the if for this?
4. You want to make something like a menu right? If you select NewMessageCmd under ScheduledList, you should get 3 more options?
As far as I know, you can't have 'subcommands', there's no such thing. You will have to programmatically add new commands to this List or display another Form/List with those specific commands.
if(displayable == ScheduledList){
if(cmd == NewMessageCmd) // in this section if true,and if possible i want to have subcommands
//"TextMessageCmd" for creating sms...
//"MultimessageCmd" for creating mms...
//"EmailCmd" for emails...
// help plz, i dont know the code for creating subcommands in j2me,
// did you get it clear... plz help,
{
// dont know what to write
//try this:
ScheduledList.addCommand(TextMessageCmd);
ScheduledList.addCommand(MultimessageCmd);
ScheduledList.addCommand(EmailCmd);
//these commands should be made earlier; for this code
//and you'll have to work out logic for when they should be removed from the list using removeCommand() otherwise once you add them, they'll stick around till you exit or rebuild the List
}
}
ha?isnt this the j2me forum..hehe, sori, i'm lost..
ahm, else if ?.. i forgot to remove the "else",..coz there is an if before it..i just chose the part that i want to explain...
thanks anyway for your comment..
yeah,want that kind of style,,a menu and a submenu commands..
thanks for the info. ..
thanks a lot again for helping.!!!. i appreaciate it so much...THANKS.
...
"got sick for about 1 week,so late reply..sori"
-Mark-