How can I use objects in a static method

Hello everyone, I have a problem, I need to show objects such as labelfield in a screen, and there is no problem, but, when I call a static method (due to the process that are made) I call a static method, I use a screen like this:

static display;

And when I print I use screen.add (object);

But in the screeen nothing happens, please, can you help me?

OK, if you use a static method ot locate your screen, so that you can reference your screen from the Thread.

This is not, in my opinion, a good way to do what you're trying to do.

As an alternative, pass a reference to your screen to your feed.  Say your current Thread it looks like:

SerializableAttribute public class MyTherad extends Thread {}

Variables of your Thread

public MyTherad() {}

your constructor for Thread stuff

}

public void run() {}

What is your wire actuallly

MyScreen.update (...); To update your screen

}

}

and start you by doing this:

AThread MyThread = new MyThread();

aThread.start ();

You can change it to something like:

SerializableAttribute public class MyTherad extends Thread {}

Variables of your Thread

MyScreen myscreen = null;

public MyTherad (MyScreen myscreen) {}

your constructor for Thread stuff

this.myScreen = myScreen;

}

public void run() {}

What is your wire actuallly

myScreen.update (...); To update your screen

}

}

and start you doing this in your MyScreen:

AThread MyThread = new MyThread (this);

aThread.start ();

Now you Thread has a revference on the screen, it will update and can update the non-static version.  This will do a lot of things much easier.

I hope this helps.

Edit:

I see that I was in change when arkadyz posted what is pretty much exactly the same solution!

Tags: BlackBerry Developers

Similar Questions

  • How can I use SQL to check the Version of Oracle Forms and object of the request?

    Hi all:

    How can I use SQL to check the Version of Oracle Forms and object of the request?





    Concerning
    Terry

    Terry,

    See the following threads/docs for the version of forms.

    How to find the developer version
    Re: How to find the developer version

    Note: 466890.1 - Script to find the Apache, Java, Jinitiator, version of forms and details of the JVM for Oracle E-Business Suite 11i
    Note: 392793.1 - how to get Forms Oracle Oracle Applications 11i Command Line Version
    Note: 468311.1 - Script to find the Apache, Java, JRE, Forms for Oracle E-Business Suite R12 version

    What purpose are you talking?

    Thank you
    Hussein

  • Please how can I use a value in a table of the adf in an actionListener to a button I created in a popup and thanks

    Please how can I use a value in a table of the adf in an actionListener to a button I created in a popup and thanks

    What is your version of JDev?

    Actually your question is not clear to me, but as I understand, it is you the table in the page and you have popup inside this popup you have the button you need when you click on the button to read the value of the selected table row. In the listener action button, so if you can get the current row of the table and after that you can get any attribute of the line as:

    DCIteratorBinding iter = (DCIteratorBinding) BindingContext.getCurrent().getCurrentBindingsEntry().get("TableIteratorName"); // from pageDef.
    Row r = iter.getCurrentRow();
    Object value1 = r.getAttribute("attribute1");
    Object value2 = r.getAttribute("attribute2");
    
  • How can I use my photo albums as screensaver with Apple TV 4th gen

    How can I use a photo album that I created as a screensaver on the generation of Apple TV 4 because it is not an option in this sense?

    What follows is the Apple TV 4 user guide...

    Screensavers

    Apple TV displays a screen saver when it remains inactive for a predefined number of minutes.

    Air screensaver shows beautiful videos of slow motion of the places of the world, upload to an online server, making the screen saver more engaging and dynamic. For the antenna, you can control how many times Apple TV check and download new videos.

    Change the frequency of aerial screensaver download. In settings, go to general > screen saver and select Download New Videos, and then select an option.

    Return by using Apple TV. When the screen saver is active, press the contact surface to get to some app have been previously using.

    Choose a different screen saver. In settings, go to general > screen saver and select the Type. Then select the screen saver you want to use.

    Select the photos to display. Many of the screen saver options display a slide show of photos - it can include photos provided by Apple, or your own collection stored in iCloud. To choose which photos are used, in the settings, go to general > screen saver and select the Type. Then choose one of the types of screensaver-photographers.

    If you choose my Photos, the Photos app opens. Follow the instructions to put photos as screensaver.

    Set the screensaver time-out. In settings, go to general > screen saver and select the setting starts after, and then specify a number of minutes. This indicates to the Apple TV to start the screen saver automatically if the unit has been idle for the specified time.

    Activate the screen saver immediately. Press the Home button to go to the home screen (if it isn't already), and then press the button twice.

  • How can I use Windows on the Mac desktop?

    How can I use Windows on MAC desktop products?  OS X El Capitan

    You can install it in BootCamp or virtual VMWare, Parallels or VirtualBox machine

  • How can I use my watch to snap the shutter on my iPhone?

    How can I use my watch to snap the shutter on my iPhone?

    Click here > https://help.apple.com/watch/

    Then click on: Remote Camera on the left.

    You'll see instructions.

  • How can I use firefox to open the public sybercafe.

    How can I use firefox in open public sybercafe.and what precautions should be taken.

    Hi, you can use the Firefox private - browsing Mode navigate the web without saving the information on the sites you visit

    The incognito on Firefox for Android

  • How can I use my instore credit for a movie

    How can I use my instore credit for a movie

    Hello R Larson,

    I see that you are wanting to use a store credit for a movie. I'll be happy for you have said in the right direction. First of all, let's see if we can find out if the credit is a credit of iTunes gift card or a credit from the Apple Store. This article will help you determine what may be:

    What kind of card do I? -Apple Support

    If credit is iTunes, you can just check your balance using the instructions found in the section below and use to either rent or buy a movie to display:

    See your credit balance - Apple Support iTunes

    If the store is an Apple Store Gift card credit, you would not be able to use iTunes to watch a movie.

    I hope this helps. See you soon!

  • How can we use this page Windows Genuine?

    How can we use this page once the developers of Firefox has removed the option "Enable Java"?

    Now, I downloaded this tool to check if the Windows Genuine or not! But kept getting the error message during the installation of the application.

    This is not sound/look like a problem of firefox at all, but could be a problem with the integrity of your windows system (perhaps related to malicious software): http://support.microsoft.com/kb/2617842/en-us

  • How can I use my PC speakers to hear my phone iphone 6s calls?

    How can I use my PC speakers to hear my phone iPhone 6s calls?

    If your 'PC' was a Mac, you can use the continuity.  But if your PC is a Windows PC, you're out of luck.

    Continuity allows you to connect your iPhone, iPad, iPod touch and Mac - Apple Support

  • I bought an iphone 4 on ebay but it's locked, icloud so I am not able to use it, and the previous owner is available to remove the device from their account: How can I use the appliance?

    I bought an iphone 4 on ebay but it's locked, icloud so I am not able to use it, and the previous owner is available to remove the device from their account: How can I use the appliance?

    You can not. Try to return the unit and get your money back. There is absolutely no way for you to unlock the device,

  • How can I use a few icons on the personal bar

    I would like to see all my favorites... so, how can I use only the icons and not the text on my bookmarks bar?

  • How can I use Office Update without the Office CD?

    How can I use Office Update without the Office CD? On the microsoft Web site, I clicked the options which mean that I would not need the CD (which was not provided with the laptop), but poartway through the service pack update, I get a request for the Office 2000 Professional CD.

    Any suggestions?

    Hello

    Did you mean an office or a note?
    As far as I know the a Note is part of the recovery Image and the CD is not supplied with the unit. In addition, Toshiba units are not delivered with the Office 2000 software.

    However, have you checked to aid either in Word update function?

    You will find an option called verification of updates
    http://Office.Microsoft.com/en-us/officeupdate/default.aspx

    Good bye

  • How can I use bluetooth on my Satellite C850-B906

    Please help me. How can I use bluetooth on my Satellite C850-B906. I can't find on the bottom of the search, and even in the PC device, bluetooth is not there. This laptop has bluetooth according to its specifications. (Bluetooth / WiFi (802.11B/G/N).)

    Good response will be highly appreciated.

    Thanks in advance!

    Hello

    I m not sure but I think you've got your laptop computer without an operating system preinstalled.
    The question is: which OS you have installed and that you have installed all the drivers needed, including BT (Toshiba BT stack) software?

  • What is SSD and how can I use it or not?

    Could someone tell me, what is SSD and how can I use it or not? because my friend told me that my laptop has SSD drive.

    Hi Jabbar73,

    Thanks for your post, I'm happy to help you.

    SSD stands for Solid State Drive. Here's the Wikipedia definition. SSD drive.

    Now, for what is in your system go to the Start button and click on run

    Type msinfo32 , and go to the section components storage disc.

    Lists the disks that you have in your system.

Maybe you are looking for

  • my tablet is slow

    Hello!! I have a hp slate tablet 7 and I am satisfied.But his "slow". Even when I open it, it takes about 60sc for launch! (it wasn't like this when I bought it). Any help?

  • I ran Malwarebytes on my MSE and now I get the error code 0 x 80508007

    Malwarebytes on my MSE I ran Malwarebytes on my MSE and now I get the error code 0 x 80508007

  • Reinstall Officejet6500 709n

    Hello want to reinstall my printer - (as I had to restart the computer), it won't go wireless more and I don't have my installation CD - can someone give me the link - beeing try some... but without success Thanks in advance

  • HP Pavilion DV6-6c35dx: HP Pavilion DV6 secondary hard drive?

    The HP Pavilion DV6-6c35dx is able to accommodate two independent hard drives? I want to use an SSD as my main drive for the OS and most of the programs and the current drive as files storage. Is this possible?

  • HP Envy 120 do not print

    My printer HP Envy 120 is not printed correctly. The printer accepts the job, pages come out of the printer, but the only thing that appears on the page's hyperlinks. I tried printing from three different computers and printed various documents Micro