Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Developer
PCaceres
Posts: 20
Registered: 02-07-2012
My Carrier: Movistar
Accepted Solution

THIS A EVENT OF A BUTTONFIELD?

private ButtonField btnCalc = new ButtonField("=")

{

public void run() -- WARNING: NEVER IS USED LOCALLY

{

 my cod is here!

}

};

 

The btnCalc is called in the constructor with Add(btnCalc);. But, I don´t know why the void run is not called!.. Help please.

 

 

 

 

 

Please use plain text.
Developer
RexDoug
Posts: 4,649
Registered: 07-21-2008

Re: THIS A EVENT OF A BUTTONFIELD?

I have no idea what you are doing here.

 

If you want to capture the button event, you attach a field listener to it. You listener is called when the button is clicked.

 

 

Please use plain text.
Developer
PCaceres
Posts: 20
Registered: 02-07-2012
My Carrier: Movistar

Re: THIS A EVENT OF A BUTTONFIELD?

And how attach a field listener? :smileyfrustrated:

Please use plain text.
Developer
arkadyz
Posts: 2,146
Registered: 07-08-2009
My Carrier: various

Re: THIS A EVENT OF A BUTTONFIELD?

setChangeListener - each Field has this method.

----------------------------------------------------------
please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!
Please use plain text.