CLAS cast trying to get the user interface Application

Greetings

I've been running my code fine on version 5 simulators. I just bought a bold 9900 and my program did not reach this issue. So I got the sumilator (running 7.0) and I make a ClassExceptionCast on the next call

UiApplication.getUiApplication () .invokeLater (new Runnable() {}
public void run() {}

It is actually on the call to

UiApplication.getUiApplication ().

I thought that maybe thay it was null and I was trying to compensate for it so I went

UiApplication request = UiApplication.getUiApplication ();

And still got the class cast exception here.

Any ideas as to what I might hurt?

It throws exception just make this object obj = UiApplication.getUiApplication (); I did as you suggested and just do a static global to the application when the application starts, however, that even returned a null value. So what I had to do was pass the instance of the application to my application main screen (the one that receives the reminder of the listener, finally) and call from there. It could not be static - it had to be a member of the class.

Tags: BlackBerry Developers

Similar Questions

  • How can I get the user interface in af:SelectManyShuttle

    Hi all

    I downloaded the screenshot of the user interface I have to build using af: selectManyShuttle in the URL below.


    http://www.freeimagehosting.NET/a5f7c


    Can you get it someone please let me know how I can achieve this or is this still possible using ADF.

    The more important thing to realize in the user interface is icon next to each list of items under certain conditions.

    Thank you
    Rajesh

    Published by: Rajesh on August 8, 2011 12:05

    As far as I know, there is NO direct support for hierarchical select several shuttles.
    But you can create a custom hierarchical select many shuttle tree/tree-tables on both sides and having some features/custom buttons to add/remove items.

    If you use tables of the tree, you should be able to place the icon.

    Thank you
    Nini

  • The user interface in the new version of PS (CC 2014) is too large to work with.

    I can't use PS CC 2014 now because the interface is too great to work with on my screen. I adjusted the 8.1 Windows/text to 100% and 125%. None of these worked. I uninstalled the program, and again transferred, this also did not work. I tried to adjust the user interface settings under the tab "Interface" of small tiny default preferences and even the large because none of these changes had no effect on the size of the user interface. If this problem cannot be solved in a short time so I'll have to find the PS CS6 version and download that. I'm already an hour late in trying to solve this problem. Suggestions are welcomed and appreciated.

    In the preferences at the bottom of the list is a tab for "experimental features". There is a default parameter, ' scale IU 200% for screens high densities (windows only) "uncheck this box, closing off PS, open PS and everything should be back to normal. Good luck.

  • where can I get the source code for the shell of the user interface

    Hi all
    I use Jdeveloper 11.1.2.3.0 shell and UI.
    I want to show a custom message to the user when it tries to close a tab that contains unsaved data.
    I found this thread {message identifier: = 10782288}
    I tried to extract the contents of the oracle-page-templates file - ext.jar, but I find only the .class files not .java files.
    So, where can I get the source code for the shell of the user interface, or someone has a better solution?

    Hello

    Try this link http://www.oracle.com/technetwork/developer-tools/adf/uishellsrc-1612278.zip

    Frank

  • How to get TS::SequenceContextPtr to customize the user interface

    I want the file of the custom, user interface sequence value therefore need to take stock of the TS:equenceContextPtr, anyone know how to get this point.

    Is there a reason that UIMessages are not enough?

    Just off the top of my head, here are a few concerns with the not not using UIMessages:

    1. How the user interface is unknown when the file of the sequence is developed to set the value.  Without an event or some sort of synchronization you can do exactly that.  UIMessages not only to ensure the right information, but they help also with synchronization.

    2. The engine does not know this information, and view of execution manager knows that the information for the current execution it is linked to (which changes throughout the life of a series of tests).  Basically, recall of front end, model, and other factors may spawn short executions briefly related to the Manager view of execution.  So if you take the context of the sequence of the current run is perhaps not the right one.

    3. Writing a user interface will be couple the user interface to your specific sequence file.  At this point, you can use the network variables or global variables or global queues as well.  It might even be better options.

    The situation you describe is exactly why the UIMessages were created.  Maybe you can help me understand why you are set on the use of pointers, you already have?  There might be a better solution for your case if I'm misunderstanding you.

    Thank you

  • How to get an array of integers to user in the User Interface

    Hi all. I'm not a very experienced user of the CVI. I have almost exclusively coding in LabVIEW but have a client who wants all of their work in the CVI.

    I've been very fruitful so far (set up a Modbus API from scratch that supports all types of connection) but am confused on how I can get the integer multiples of the user without limiting the number of integers I can get. Essentially, I need to be able to get an array of integers to the user.

    General information, I am building a user interface to test my Modbus API. There are Modbus functions to 'Write multiple registers' and 'write multiple coils. I want the user to be able to enter all the values they want to write in one command.

    What is the best way to get an array of integers through the user interface?

    The easiest way is probably to allow user input in a textbox control numbers: items can be separated by spaces, commas, or even a line break (using ctrl + Enter). You will then need to extract the string from the TextBox and analyzed for numeric values using any non-digit character as a separator: strspn (string, '0123456789'); can be used for this.

    More complex, another possibility is to use a table control to receive user input: you Dresses an empty table with a reasonable number of roews, or you need some codes to add new lines as long as the user fills all those already existing. On the other hand, it will be easier since data recovery in a simple statement, you will all return values: GetTableCellRangeVals (panelHandle, PANEL_TABLE, VAL_TABLE_COLUMN_RANGE (1), table, VAL_COLUMN_MAJOR);

  • Get speech recognition error message could not start because the configuration of the language is not supported, the language must match the language of the user interface

    I am running Windows 7 Ultimate 32 bit, when I run speech recognition it fails and the following message appears,

    Voice recognition couldn't start because the configuration of the language is not supported, the language must match the language of the user interface.

    I tried to change the language, then back to British English, but the problem is still there, I'd appreciate any help with this problem

    Is there a solution to this problem yet?

  • Help - LI running, but get Apache2 Ubuntu default page while trying to access the Web interface of log insight

    Hello

    I installed the Log Insight 2.5 VM via vCenter Server ESXi 5, 5. I was able to deploy the virtual computer successfully and you can see the network through VAPP Options settings. (Attached picture - TIME settings).

    Question:

    Unable to access LI web Interface. While trying to access the Web interface, I get 'Apache2 Ubuntu by default Page' (img attachment). Insight of the newspaper runs and opens the web application on port 80.

    Newspapers, controlled far-

    status of /etc/init.d/loginsight

    Open a session running Insight

    Attached image Loginsight2-DURATION - file /storage/core/loginsight/var/runtime.log

    # sh li - cassandra.sh - status

    SH: li-cassandra-sh: not found

    Check if the tcp 80 port is open through the netstat command. Yes, it is open.

    Telnet on port 80, it says connection and crashes. Image attached - telnet-LI

    Able to ping the IP address successfully.

    How can I check http logs on console LI?

    I would really appreciate response to this soon. I'm working on installation LI for more than a week and struggling to get through this way.

    Thank you

    Radhika

    I believe that you with the configuration, but I tell you that the configured IP address and the IP you hit in your browser are not still the same IP, Log Insight does not work on Ubuntu, so you hit another system. To prove this, connect you to the console of the Insight newspaper and run:

    # cat/etc/SuSE - release

    SUSE Linux Enterprise Server 11 (x86_64)

    VERSION = 11

    PATCHLEVEL = 2

    You will see that you are running SuSE to see a Ubuntu screen tells me that you have an IP address duplicate in your environment and you hit a node that is not an Insight newspaper. I hope this helps!

  • WIN8 registers touch but no reaction from the user interface?

    Anyone having problems with Win8 button when your fingers are clearly registered (Windows gives this feedback from the spherical ripple effect) but the user interface under your finger does nothing? No not the button and so on.

    I live it with some Chrome for example, with the small button tab when it is near the top edge of the screen.

    If I drag the window to the center of the screen, I have no problem with getting keys recorded. Hit the button new little tab gives no trouble.

    When user interface elements are close to the edge, no reaction, even if the wave indicator appears.

    Cannot know if it is a driver or a HW problem. I use X220T.

    Example screenshot

    May be a problem with Chrome, in fact. Tried with Firefox and the new tab button is a lot easier to hit. ---> will give Chrome devs a hint

    EDIT: what you know! The new beta version has already dealt with this issue:

    https://www.Google.com/chrome/browser/beta.html

  • Flatten to a string to send arbitrary objects by messages from the user interface?

    Hi people,

    I am trying to send arbitrary data by messages from the user interface defined by the user to my labview interface. Something funny happens then: if I send the data through the message of ui, it seems I have something strange. There is only one character or nothing in the message of the user interface that reached my reminder.

    It seems that flatten channel also creates control characters that are interpreted by NI TestStand and Labview not as members of the chain, and for this reason I only get incomplete data. within the action of testand, which creates the flattened data, I put a dialog box to display the string data, and it seems that at least up to 255 (ascii) characters are used.

    Is there something like uuencode/uudecode to avoid this problem?

    Thanks in advance

    Okidoki, found.

    His «binary"produced by «Flatten the string» string Apparently I thought, the LabVIEW data type is incompatible with the API of TestStand from LabVIEW. In conclusion I would classify this as a bug (sorry people, at least there should be documentation) API for LabVIEW TestStand 2014.

    As a solution, I use flatten it in XML, which is a printable and human readable 'normal' string.

    It was trial and error, and I'm not enjoying this.

  • Impressive transformation slow due to the updating of the user interface

    Hello

    I feel a huge slow down in my test as engine

    I update the display after each test. It consists of a rather

    "simple table" with a subtle change of color and bold

    to indicate the failure or success of the test:

    I have also tried several things to determine what routine was

    make the program almost crawling like a snail, here's my

    results:

    No UI refresh: 0m48s (same as Teststand with no updates of the user interface)

    The discount but no page table switch: 1m06s

    Bay of refreshment and switch page: 1m26s

    There are 314 tests, up to 314 redraw and possibly

    switch page 314 to reposition the view. Which gives the

    following user interface refresh costs:

    Update of the table: 18 years/314 = 57ms (replacing just a single line, Center to top)

    Switch to page: 20 s/314 = 64ms (bottom right corner)

    Is this really the case? Is there a way to make the refresh of the user interface

    faster? Create two separate loops/threads, one to make

    the test, one for updating the UI asynchronously?

    I understood for an overall picture about different

    widgets, but here I'm 'just' display of channels...

    David Koch

    Well, multi-listbox control is a problem if your change causes access to the muliple property node. For each property node LabVIEW normally does a refresh of the user interface which is very quickly. Fortunately, there is a fairly easy way to fix this.

    Use a node of property for the current VI (just drop a property node and change its class type VI Server-> VI reference) to get the reference of the Panel. Then use another property node connected to your reference of the Panel and select update from the Panel to postpone. Set this value to true before your Listbox (and any other updated user interface) and set the value to false then.

  • Headless Application Crash when closing the user interface

    For some reason, my application without head started crashing whenever the user interface is closed. Here is the stack trace that I get headless application when I close the user interface:

    Thread [1] (STOPPED) (Suspended : Signal : SIGSEGV:Segmentation fault)
        QHostAddressPrivate::clear() at qhostaddress.cpp:293 0x1822926c
        QAbstractSocket::disconnectFromHostImplementation() at qabstractsocket.cpp:2,714 0x18243466
        qt_static_metacall() at moc_qabstractsocket.cpp:154 0x18245fa8
        QAbstractSocket::qt_static_metacall() at moc_qabstractsocket.cpp:140 0x18245fa8
        QMetaMethod::invoke() at qmetaobject.cpp:1,664 0x196a47d8
        QMetaObject::invokeMethod() at qmetaobject.cpp:1,179 0x196a6334
        invokeMethod() at qobjectdefs.h:418 0x182421e0
        QAbstractSocket::disconnectFromHost() at qabstractsocket.cpp:2,609 0x182421e0
        QAbstractSocketPrivate::canReadNotification() at qabstractsocket.cpp:634 0x18244974
        QAbstractSocketEngine::readNotification() at qabstractsocketengine.cpp:168 0x18237a60
        event() at qnativesocketengine.cpp:1,159 0x1824aeba
        QReadNotifier::event() at qnativesocketengine.cpp:1,156 0x1824aeba
        QCoreApplicationPrivate::notify_helper() at qcoreapplication.cpp:1,083 0x1969e00e
        QCoreApplication::notifyInternal() at qcoreapplication.cpp:953 0x1969de60
        sendEvent() at qcoreapplication.h:231 0x196c379e
        QEventDispatcherUNIX::activateSocketNotifiers() at qeventdispatcher_unix.cpp:894 0x196c379e
        QEventDispatcherUNIXPrivate::doSelect() at qeventdispatcher_unix.cpp:291 0x196c4042
        QEventDispatcherUNIX::processEvents() at qeventdispatcher_unix.cpp:936 0x196c42f0
        QEventLoop::processEvents() at qeventloop.cpp:149 0x1969cace
        QEventLoop::exec() at qeventloop.cpp:204 0x1969cd28
        QCoreApplication::exec() at qcoreapplication.cpp:1,225 0x196a0eda
        main() at main.cpp:39 0x10659de4
    

    Now, you will see the entire track, with the exception of the entrance of main(), seems to be part of the loop of events or other system libraries. Anyone happen to know what is happening here or be willing to help?

    Thanks in advance!

    Well, I found a solution for the bug here. I was using sockets to communicate between my headless and requests for benefits and in my slot look for disconnect events in my application without a head, I got this code:

    void disconnected()
    {
        ...
        _socket->close();
        delete _socket;
        ...
    }
    

    I then changed this slot to look something like this, that solved my problem:

    void disconnected()
    {
        ...
        _socket->close();
        _socket->deleteLater();
        ...
    }
    

    My guess is that I tried to remove the plug while he was still waiting to be delivered to her events. Using deleteLater(), the event loop is responsible for the removal of the plug once all the events have been delivered, preventing the application from crashing.

  • Background image on the User Interface

    I'm trying to place a background behind my screen of the application image. So instead of the usual white, there would be a "background.png". I am following this thread with the blackberry API set

    http://supportforums.BlackBerry.com/T5/Java-development/drawing-bitmap-in-mainScreen-background/m-p/...

    So far, I tried to apply it within my own application, with the code to start as follows:

    final class UserInterfaceScreen extends MainScreen {
        HorizontalFieldManager _fieldManagerTop;
        VerticalFieldManager _fieldManagerMiddle;
        HorizontalFieldManager _fieldManagerBottom;
        BitmapField _bitmap;
        Bitmap _canadaImage, _ukImage, _usImage, _backgroundBitmap, _fieldBitmap;
        LabelField _label;
        BasicEditField _input;
        String _canadaCapital, _ukCapital, _usCapital, _capital;
        int displayed = 0;
    
        public UserInterfaceScreen() {
            super();
            LabelField title = new LabelField("User Interface Sample",
                    LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
            setTitle(title);
    
            HorizontalFieldManager _horizontalFieldManager = new HorizontalFieldManager(HorizontalFieldManager.USE_ALL_WIDTH | HorizontalFieldManager.USE_ALL_HEIGHT){
    
                //Override the paint method to draw the background image.
                public void paint(Graphics graphics)
                {
                    //Draw the background image and then call paint.
                    graphics.drawBitmap(0, 0, 640, 900, _backgroundBitmap, 0, 0); //240
                    super.paint(graphics);
                }            
    
            };
            _backgroundBitmap = Bitmap.getBitmapResource("background.png");
            _fieldManagerTop = new HorizontalFieldManager();
            _fieldManagerMiddle = new VerticalFieldManager();
            _fieldManagerBottom = new HorizontalFieldManager();
    
                add(_horizontalFieldManager);
                add(_fieldManagerTop);
                add(new SeparatorField());
                add(_fieldManagerMiddle);
                add(new SeparatorField());
                add(_fieldManagerBottom);
    

    Basically, I'm trying to combine the thread above with the user interface tutorial.

    http://supportforums.BlackBerry.com/T5/Java-development/user-interface/Ta-p/442781

    The question is when I run the code, I just get the background image, none of the other content is displayed in the foreground. I am this approach correctly?

    I'm not sure the solution you received one will work - it may well do, but the approach is different from what I do.  I based my image of background processing around comments in this article:

    http://supportforums.BlackBerry.com/T5/Java-development/MainScreen-explained/Ta-p/606644

    But if you look at what you said your screen, you will see why you don't see all your real fields.

    The first thing that you add to your screen is as follows:

    HorizontalFieldManager _horizontalFieldManager = HorizontalFieldManager(HorizontalFieldManager.USE_ALL_WIDTH | nouveau HorizontalFieldManager.USE_ALL_HEIGHT) {}

    You said this Manager to use the full height and width.  Then what place is left for any other Manager/field.

    You only add this option to provide abackground.  So actually, to do this, you must you add all your fields and managers in this HFM.  Otherwise that will expose after this one (which, as noted way they have no space to display in). I think you'll see something, if you replace this:

    Add (_horizontalFieldManager);
    Add (_fieldManagerTop);
    Add (new SeparatorField());
    Add (_fieldManagerMiddle);
    Add (new SeparatorField());
    Add (_fieldManagerBottom);

    with

    Add (_horizontalFieldManager);
    _horizontalFieldManager.Add (_fieldManagerTop);
    _horizontalFieldManager.Add (new SeparatorField());
    _horizontalFieldManager.Add (_fieldManagerMiddle);
    _horizontalFieldManager.Add (new SeparatorField());
    _horizontalFieldManager.Add (_fieldManagerBottom);

    But it probably won't be good, so you should follow the advice given in the previous Post or see the KB article.

  • create the user interface for script tabs

    Hey guys. I'm new to the script for the AE. I'm trying to create a user interface that has different functions in different tabs, so that, according to article your you get different options. Is this possible? If Yes, are there examples or tutorials that I can follow? all resources at all would be great. Thanks in advance.

    I actually have a set of three videos is dedicated to ExtendScript GUI which will publish in about five weeks. It will show how to create and fill panels with tabs and much more. It may not be soon enough for your current task however. I would like to make a post here that has some basic commands to help you get started in general.

    http://forums.Adobe.com/message/3973071#3973071

  • Interact with the user interface components

    I'm trying to find a GOOD way to interact with the external classes user interface components. For example, that you have a 'controller' class that needs to access the view of the user interface in some way (define a label text or something else). The controller class does not do anything, it discusses only the logic of what should be the case. Currently, it is created by my top-level class when the program starts. He listens to some events occur and needs to update/interact with the user interface or the State of the application depending on what events are. I do not seem to be a way for this controller class to easily access the UI component that I need to get my hands on.

    I'm trying to do to reduce the size of a file of mxml WindowedApplication growing (LOOK cool but that is not important) and take part of the logic of the application of this file.

    It's complicated by the fact that the label is in a State that does not have the status of 'base' (so it is not a child, or even a subsidiary child of the main class at boot time) and by the fact that it is not yet near a high school component. (If that were the case, I could probably just pass the label object in the constructor for the outdoor classroom.)

    In other words, I can't just call getChild ("labelName") on my 'main' request object because it is buried nested inside OTHER components. I don't think I like the idea to browse all components and sous-composants recursively looking for the component that my outer class trying to ask. I thought about other ideas, but I don't like any of them enough to try them, eh.

    I'm at the point now about where I come to the conclusion that my fundamental design strategy is wrong, or Flex just not allowing complex applications where the GUI components can interact with external classes relatively pain-free. I'm not convinced that "Flex cannot do', I'm looking for advice on some great Flex application in all design patterns.

    Where do you put this kind of control logic, and what happens when it starts to overflow and become so large that you need to break in other files?

    Found a solution, I think that's what I've been looking for:

    http://labs.Adobe.com/wiki/index.php/Cairngorm

Maybe you are looking for