Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 20
Registered: ‎02-07-2012
My Device: Blackberry Curve 8520
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.

 

 

 

 

 

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

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.

 

 

Developer
Posts: 20
Registered: ‎02-07-2012
My Device: Blackberry Curve 8520
My Carrier: Movistar

Re: THIS A EVENT OF A BUTTONFIELD?

And how attach a field listener? Smiley Frustrated

Developer
Posts: 2,268
Registered: ‎07-08-2009
My Device: various
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!