×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Mar 2010
    Posts
    136

    How to explain commandAction?

    Code:
    public void commandAction(Command c, Displayable d) {
    		Mainform mainform=(Mainform)d;
    commandAction(Command c, Displayable d)means that a command event has occurred on Displayable d.

    If we want to use the items of the mainform such as TextFields and DateFields, we have to typecast the displayable d to Mainform.

    If I have to explain that part to others, can I explain like that?

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: How to explain commandAction?

    It means that Command "c" has been sent from Displayable "d".

    You might or might not want to typecast "d", depending on how you want to use it. You only need to cast it if you want to use specific methods.

    Graham.

Similar Threads

  1. Airtime yes/no, commandAction()
    By Schpacko in forum Mobile Java General
    Replies: 4
    Last Post: 2009-09-30, 10:46
  2. Recycling in commandAction()
    By vineetbillorey in forum Mobile Java General
    Replies: 2
    Last Post: 2009-04-15, 13:47
  3. CommandAction on the 7390
    By LadyArachnia in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2007-08-29, 14:36
  4. Help me how to use commandAction()
    By asana in forum Mobile Java General
    Replies: 1
    Last Post: 2004-01-25, 09:14
  5. Use keyPressedEvent together with commandAction
    By enpar in forum Mobile Java General
    Replies: 1
    Last Post: 2003-02-13, 06:54

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×