Problem in the logic of the program

Hey

In my application, I have a labelfield which is clickable.

When I click it another screen gets opened and after completing certain tasks the current screen gets closed and I am moved to the screen even have labelfield.

But this time I changed the name of the labelfield and now when I click the field label another screen becomes open.

Suppose that it's my screen1 having the Label1 label

Text1 = "Label1".

Label1 = new LabelField (text1, LabelField.FOCUSSABLE)

{

protected boolean navigationClick (int status, int time)
{

If (Text1.Equals ("Label1")

{

UiApplication.getUiApplication.pushScreen (new MyScreen1());

}

Another yew (text1.equals ("Label2"))

{

UiApplication.getUiApplicatio.pushScreen (new MyScreen2());

}

Returns true;

}

};

MyScreen1 is change the Labelfield as Label2 name.

MyScreen1()

{

Screen1.Label1.SetText ("Label2");

}

The problem is when I click Label1, MyScreen1 is opened and he changed the name of the labelField.

But when I click Label2 again MyScreen1 gets open

You said:

"In MyScreen1 is change the Labelfield as Label2 name.

MyScreen1()

{

Screen1.Label1.SetText ("Label2");

}"

Then your test:

"if (text1.equals ("Label1")"

makes no sense, you should test the current label, for example:

"if (label1.getText () .equals ("Label1")"

But what good is having the screen 1 do this.  You could do this in your original example screen:

"if (text1.equals ("Label1")

{

Text1 = Label2;

Label1.SetText (Text1);

UiApplication.getUiApplication.pushScreen (new MyScreen1());

}"

Tags: BlackBerry Developers

Similar Questions

Maybe you are looking for

  • Manuale foto

    Hello I have a question, I want to sync a few photos on my iPhone from my mac Book Pro, but I do not understand the application of the photo of my Mac Book Pro, there is a manual of this app? Thank you all. Nicola

  • Closing open applications?

    I note that appear when you double-click the Home button applications that are open.  Them is rather than having to hit on any fly by each of them individually to fill a quick way to close them all? Thank you.

  • Linksys E2000 together at 5 GHz stops transmitting SSID and becomes undetectable to 5 Ghz AC580

    Bought a USB wireless adapter dual band AC 580 today and set the channel to "5G" only mode I put my E2000 (firmware 1.0.04)is) to 5 GHz, made sure the SSID broadcast is turned on. The wireless adapter appears as a peripheral AE6000 in windows 8.1. Ve

  • captransf.jar for egate-cyberflex 32K?

    HelloI'm looking for the captransf.jar file to generate a transformed PAC file. But the download URL http://www.trusted-logic.fr/down.php and http://www.trusted-logic.com/down.php do not work.Can anyone help?Thanks in advanceOliver

  • can I integrate a url as iframe into APEX

    I'm trying to create a page:There is a dynamic in the when list on the left sidebar, click on the list, it shows the url in the right area iframe.Anyone have idea?