The narrow question dialog box...

Hi, I have problem attempts to display a user dialogue until the app close because no SDCard in simulation/gear, when I use this code in the homescreen class

if( ! SDCard ){
errorDialog("no SD Card Exiting ...");
system.Exit(0);
}

public static void errorDialog(final String message) {
        UiApplication.getUiApplication().invokeLater(new Runnable() {
            public void run() {
                Dialog.inform(message);
            }
        });
    }

just soft close and no display of the dialog box.

I don't know what to do...

Unfortunately, I think that the problem here is perhaps the position of this control in your startup.

I have applications that do this kind of check on startup.  But instead of trying to use a dialog in the way that you are, they actually start the Application and press an error to the user screen.  When this form is closed, the Application ends.  If the Application starts as normal, it enters the dispatcher of events as usual, it just display another screen to the normal start screen.  This means that the approach of a normal startup create a UiApplication and pushing a screen is used.

I suspect that you are trying to make this review as part of your treatment of main() and it will not work because your Application does not exist or has not entered the event dispatcher.

Tags: BlackBerry Developers

Similar Questions

  • question of remote server in the site Configuration dialog box.

    Hello

    I received client ftp information so that I can connect to its server to download files.

    The new CS5 box installation site is a bit different (hard)...

    I set up the folder on my desktop to download and set up the site (directions).

    Problem: under the "Servers" tab, there name address remote connection and tests... mine has two lines of info.

    The top one is my ftp from my personal site.

    Below, it is the only one that I created just to get the download and I gave her a false name.

    I have to remove the top? Because when I go to download it downloads files in my personal site - not customers. Or, should I uncheck "remote" from the top and activate at the bottom.

    I don't want to affect my site at all. Please explain how this new method works... How can I control + choose what server I want content to download from.

    I mean, if I had to remove this dialog box mine, then switch back to the my site dialog box, my connection to the remote server are deleted as well?

    Thank you!

    Too bad. I have it.

    I hesitated to experiment, but it seems that you can select a "remote" at the same time, so all I had to do was click on the customer.

  • Completely disable the "Untrusted connection" dialog box

    I am a professional developer stuck behind a proxy at work. The behavior of this power of Attorney causes the SSL connection attempts get a certificate signed by my company, not the web site I try to connect to. I have no control over the proxy, so change this behaviour is out of the question.

    I need to use Firefox for a number of things and am generally fine adding exceptions for sites that I want to connect. However, some sites like github.com loading resources many other areas via SSL (CDN, Google Analytics, Gravatar, etc.). For these sites, I try to add exceptions in order to allow the company a signed, cert but I can only add to github.com, not any other sites, so even after adding an exception I'm brought back in the right to the page "this connection is untrusted". No matter how many times I try to grant a waiver, I never really get to github.com.

    Other browsers on my system are administered remotely and seem to be configured to automatically trust signed certs society. I need to know how to manually configure Firefox to always trust these certificates OR never shows me the unreliable connection dialog box and just maybe show red in the address bar when he does not trust the site cert.

    Apparently in OS X, there are at the level of the authorities of certification system. I don't know why it does not use Firefox, but I was able to export the CA company and import it in Firefox. Finally solved my problem.

  • Can not enter wildcard (*) in the file selection dialog box when opening a file

    It's something I've not seen before. I posted this question in the forum Autodesk AutoCad LT five days ago, but I got no answer at all. Because I'm not sure whether it is a Windows or a problem with Autocad, I thought I'll try to post here, too.

    On one of our AutoCad workstations, when you open a drawing, we cannot enter a wildcard character (*) in the file selection dialog box to help unravel the drawings.

    In other words, say there are 10 versions of a drawing with the number 5008. I should be able to enter the 5008 * and just see these ten designs. On this computer, when I try to type an asterisk (*), I get this error message: invalid character. The following characters are not allowed in file names: \ /: *? "<>

    Now, I know that they are not allowed... but I don't mean to create a file name. I'm just trying to classify them. On our other RTE Autocad workstations, the wildcard character works fine.  What's up with this one? Y at - it a setting or a variable that controls this?

    Thanks - Kevin

    Hello

    ·         The problem occurs with any other application?

    It may be some setting in Auto CAD, which raises the question, and its best you seek help from experts in DAO automatic.

    Diana
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Showing the full path of the file in the Save as dialog box

    I'm a relatively new for MAC OS and I took the habit of intelligent services on Microsoft file manipulation, in particular to the Save as dialog box. Who has a little smart "arrows" and "buttons" allowing you to ask around the system of files easily, but I faced something else in the MAC operating system.

    Finally, I was able to pass on the path of file bar in the Finder (basically, that nice, small bar with the name of folders/sub-sub-sub-folders you can switch to and it shows "where you are both in the file system"), but I don't miss the Save as dialog box. I tried to find it in the settings to turn it on, scoured the internet, talked with experts at Apple, also called the central phone number, but I couldn't learn all solutions to get the bar path of file under tension to the Save as dialog box.

    And believe me, it's very annoying, when you create a file structure when you register under ' week/Tuesday/XY client Documents/work/approvals/journal/2016/August/2nd /' a file and for the recording of the version changed the same file under the same path, but not to not only return to the file a subfolder creation there AB of the customer, I have to click again through the whole lot.

    The arrows 'story' don't help because when I click on the it puts me directly to record under the folder where I have the last recorded the previous file, or help click on the drop-down above, where records are listed because I could never find the subfolder where I want to go back to there.

    Are there solutions to get the path of file under tension to the Save dialog box under?

    Or is there a plan to get it in the new version of the operating system?

    It is the same on the open file dialog box...

    ..., and I don't want to keep a Finder opens just to copy..., on the way to the record, which was the same effort and has been even more professional!

    I would like to just turn this simple file path bar,..., even that which is available in the Finder!

    Any ideas would be appreciated, thanks for sharing your thoughts in advance, Ian

    Imre of Glen Waverley wrote:

    Are there solutions to get the path of file under tension to the Save dialog box under?

    Or is there a plan to get it in the new version of the operating system?

    It is the same on the open file dialog box...

    1 NO.

    2. we are all just users here and have no info about Apple's plans.

    If you do not want to let Apple know your feelings, you can send your comments here.

    http://www.Apple.com/feedback/

  • Use the own user dialog box

    Hello

    I want to use my own user dialog box at startup of the user interface. This dialog gets the user to a database of information and I'm not logging in twice.

    Is it possible, where can I disable the standard dialog box, where I should put my dialog box and what data should I send to TS.

    Using TS3.0 and LV8.2.1.

    schwede greetings

    Schwede-

    If you want to change the user login dialog box when you start TestStand, what you want to do is to change the sequence of LoginLogout in the sequence FrontEndCallbacks.seq file. Before editing, I recommend that you copy the folder \Components\NI\Callbacks\FrontEnd \Components\User\Callbacks in the Directory. Then, modify the files there. You want to replace the steps of connection and disconnection of the sequence of LoginLogout with your own steps that display your own personal dialog box.

    I hope this helps.

  • In XP, when you try to open any file, get the "Open with" dialog box

    After a virus infection that I cleaned up, I now have the 'open with' dialog box popping up whenever I want to open a file.  I tried a restore of the system, but to no avail.  What do you suggest to me.  Thank you

    Hello

    Try the methods listed in the section below and check if that helps.
    How to change or choose the program that starts when you double-click a file in Windows XP
    http://support.Microsoft.com/kb/307859

    I hope this helps.

  • I can't find 'save to desktop' in the Save as dialog box to an Excel on Win7

    In fact I do not see how to save any kind of file on my desktop with Win 7 and MS Office 2007 Pro.

    The game, February 3, 2011 15:44:39 + 0000, Maryriver wrote:

    I have not posted in forum excel because this problem occurs in all my MS Office 2007 Pro programs.  When I follow your suggested steps:

    "Open Excel > click on the Office button > Save As > close from the top left, click MORE > see icon on the desktop now? ' > click on the desktop.

    There is that no more save it as only includes orders for the economy in several formats, but the dialog box that opens shows not the desktop as the destination to save in.  The only affected destinations are;  models, Favorites, libraies, residential, computer group, WIN7C and network.  I explored all the and can not find any "desktop."

    Desktop is not listed under Favorites on the left side of the Save as
    dialog box? Simply click on it.

    But note that I strongly recommend against save data files in the
    desktop computer. My recommendation is that you put nothing else that shortcuts on
    the desktop computer. There are two things wrong to put the real files it:

    1. one day probably will remove you a real file, thinking that you were
    just remove a shortcut.

    2. you you cluttering up the desktop with too many files, making it difficult
    to find what you are looking for.

    You have to put your files Excel (and other real data files) in the
    Documents folder. If you have some of these files you want
    access often, put shortcuts to these files on the desktop.

    Ken Blake (MS-MVP)

  • Remote Desktop area is missing the 'Remote' tab in the System Properties dialog box window?

    Remote Desktop area is missing the 'Remote' tab in the System Properties dialog box window? I can not set up or add users. Remote assistance is the ONLY settings and options that I see. It is a brand new OEM Vista Home Premium X 64 installation with all updates (SP2). That's the problem since it was first started.

    I'm sorry, but it is not possible to access Vista Home Premium via Remote Desktop.  To do this, you need Vista Business or Vista Ultimate.

  • The System Configuration dialog box; Vista OS: Is it possible to resize the dialog box? If this is not the case, why not plan such an option please?

    Windows Vista; The System Configuration dialog box; dialog resize.

    You can not, this is a dialog box and is not scheduled to be resizable.
     
    --
    ..
    --
    "hyperluckylink" wrote in message
    News: 054b 0592 - 5a9a - 4 c 69-af57-39f8d626f1be...
    > Windows Vista; The System Configuration dialog box; dialog resize.
     
     
  • The open file dialog box does not show up on Windows 7

    My first installation of Win 7 32 bit on my systemeverything was end of work, but after some time all of a sudden all the program that I opened in Windows 7 which has an and save as dialog box or try to download an attachment in mail. the open file dialog box will appear, so I can't be able to open, save, and download any file, it seems that the open a file dialog box is disabled somehow, but I can't be able to find the exact cause of this problem so I need help very badly as soon as possible. So please help and answer...

    Hello Bharat Bhushan Wadhwa,

    Below, I've added a link where other users have had this problem.  There are a few steps to try troubleshooting.  Please let us know status.

    Microsoft Answers:

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-windows_programs/the-open-file-or-browse-for-file-dialog-box-doesn ' t/50f452f7-f73b-4ad5-8887-b8bb361f07b9

    Thank you

  • Native of filebrowse using and the cascading Save dialog box

    In my application I need to open file and file save dialog box when a specific button is clicked. I looked at the docs of stunts, but I found that the native options. Tried the native alert dialog, change of filebrowse dialog type. It displays well on Simulator, but could not get any output file that will be used in the Qt code.

    I pass these parameters

    int * num = NULL;

    char * folder [1024];
    dialog_update (alert_dialog);

    to dialog_event_get_filebrowse_filepaths(event,file,num), but it always returns BPS_FAILURE.

    In addition, access_shared is present in the bar-descriptor

    Here is my code:

    //slot function
    void App::fileOpen(){
        //===========================
            dialog_instance_t alert_dialog = 0;
    
            bps_initialize();
    
            dialog_request_events(0);    //0 indicates that all events are requested
    
            if (dialog_create_filebrowse(&alert_dialog) != BPS_SUCCESS) {
                        fprintf(stderr, "Failed to create alert dialog.");
                        return ;
                }
                const char* extensions[] = {"*.*","*.jpg","*.jpeg","*.mp3","*.wav","*.mp4","*.txt","*.doc","*.pdf"};
                int items = 9;
                if(dialog_set_filebrowse_filter(alert_dialog, extensions,items) != BPS_SUCCESS){
                    fprintf(stderr, "Failed to set alert dialog message text.");
                            dialog_destroy(alert_dialog);
                           alert_dialog = 0;
                           return ;
                }
               if( dialog_set_filebrowse_multiselect(alert_dialog,FALSE)!=BPS_SUCCESS){
                   fprintf(stderr, "Failed to set alert dialog message text.");
                                dialog_destroy(alert_dialog);
                               alert_dialog = 0;
                               return ;
               }
    
            if (dialog_show(alert_dialog) != BPS_SUCCESS) {
                fprintf(stderr, "Failed to show alert dialog.");
                dialog_destroy(alert_dialog);
                alert_dialog = 0;
                return ;
            }
    
            int shutdown =0;
            while (!shutdown) {
                bps_event_t *event = NULL;
                bps_get_event(&event, -1);    // -1 means that the function waits
                                              // for an event before returning
    
                if (event) {
                    if (bps_event_get_domain(event) == dialog_get_domain()) {
    
                        int selectedIndex =
                            dialog_event_get_selected_index(event);
                        const char* label =
                            dialog_event_get_selected_label(event);
                        const char* context =
                            dialog_event_get_selected_context(event);
    
                        char **fileArray[]={};
                        int *numFiles = NULL;
                       //
                              if(selectedIndex == 0){
           shutdown = 1;//user press the cancel button on dialog; close the dialog
       }
       else if(selectedIndex == 1){
           if(dialog_event_get_filebrowse_filepaths(event,file,num)!=BPS_SUCCESS){
           fprintf(stderr,"File open fail");
       }
       else{
    
    //debug purposes
           fprintf(stderr,"File array: %d/n",sizeof(file)*1024);
               fprintf(stderr,"Num files: %n",num);
               //fprintf(stderr,"Files int: %d",files);
       }
    
       }
                    }
                }
            }
    
            if (alert_dialog) {
                dialog_destroy(alert_dialog);
            }
            //===========================
    }
    

    Native Subforums have no useful information on this subject. Any help is greatly appreciated

    Hello again, here's the example as promised.

    To use the native filebrowse dialog box, the native code must run in its own thread to prevent the user interface in the Cascades to block. This is achieved by encapsulating all the dialog box code in a class derived from QThread.  The class I wrote is called FileBrowseDialog

    FileBrowseDialog.hpp

    #ifndef FILEBROWSEDIALOG_HPP_
    #define FILEBROWSEDIALOG_HPP_
    
    #include 
    #include 
    #include 
    
    /*
     * The file browse dialog displays a dialog to browse and select
     * files from shared folders on the system.
     */
    class FileBrowseDialog : public QThread
    {
        Q_OBJECT
    
        /*
         * QML property to allow multiple selection
         */
        Q_PROPERTY(bool multiselect READ getMultiSelect WRITE setMultiSelect)
    
        /*
         * QML property to read the selected filenames
         */
        Q_PROPERTY(QVariant filepaths READ getFilePaths)
    
        /*
         * QML property to set or get the file filters. This is an
         * list array variant.
         */
        Q_PROPERTY(QVariant filters READ getFilters WRITE setFilters)
    public:
        /*
         * Ctor and Dtor
         */
        FileBrowseDialog(QObject* parent = 0);
        virtual ~FileBrowseDialog();
    
        /*
         * Exposed to QML to start the run loop which creates and displays the dialog.
         * The dialog is shown until a button is clicked.
         */
        Q_INVOKABLE void show();
    
    public:
        /*
         * Getter for the selected filenames QML property
         */
        QVariant getFilePaths() const;
    
        /*
         * Setter and Getter for the filters QML property
         */
        QVariant getFilters() const;
        void setFilters(QVariant const& value);
    
        /*
         * Getter and Setter for the multiselect QML property
         */
        bool getMultiSelect() const;
        void setMultiSelect(bool value);
    
    signals:
        /*
         * Signal emitted when the OK button has been clicked on the browse dialog
         * The OK button is not enabled unless a file is selected
         */
        void selectionCompleted();
    
        /*
         * Signal emitted when the cancel button has been clicked on the browse dialog
         */
        void selectionCancelled();
    
    protected:
        /*
         * Implements the run loop. Dialog stays open until a button is clicked.
         */
        virtual void run();
    
    protected:
        dialog_instance_t m_dialog;
        bool m_multiSelect;
        QVariantList m_filePaths;
        QVariantList m_filters;
    };
    
    #endif /* FILEBROWSEDIALOG_HPP_ */
    

    FileBrowseDialog.cpp

    #include "FileBrowseDialog.hpp"
    #include 
    #include 
    
    FileBrowseDialog::FileBrowseDialog(QObject* parent)
        : QThread(parent)
        , m_multiSelect(false)
    {
        m_filters.push_back(QString("*.*"));
    }
    
    FileBrowseDialog::~FileBrowseDialog()
    {
    }
    
    void FileBrowseDialog::show()
    {
        if (!isRunning())
        {
            m_filePaths.clear();
            start();
        }
    }
    
    QVariant FileBrowseDialog::getFilePaths() const
    {
        return m_filePaths;
    }
    
    bool FileBrowseDialog::getMultiSelect() const
    {
        return m_multiSelect;
    }
    
    void FileBrowseDialog::setMultiSelect(bool value)
    {
        m_multiSelect = value;
    }
    
    QVariant FileBrowseDialog::getFilters() const
    {
        return m_filters;
    }
    
    void FileBrowseDialog::setFilters(QVariant const& value)
    {
        m_filters = value.toList();
        qDebug() << "filter count: " << m_filters.count();
    }
    
    void FileBrowseDialog::run()
    {
        bps_initialize();
    
        //request all dialog events
        dialog_request_events(0);
        if (dialog_create_filebrowse(&m_dialog) != BPS_SUCCESS)
        {
            qDebug() << "Failed to create file browse dialog.";
            emit selectionCancelled();
            return;
        }
    
        //set the selection filters
        if (m_filters.count() > 0)
        {
            char** ext = (char**)new char[m_filters.count()*sizeof(char*)];
            int i = 0;
            for (QVariantList::iterator it = m_filters.begin(); it != m_filters.end(); ++it, ++i)
            {
                QString filter = it->toString();
                if (!filter.trimmed().isEmpty())
                {
                    int length = (filter.length() + 1) * sizeof(char);
                    ext[i] = new char[length];
                    strncpy(ext[i], filter.toAscii(), length);
                }
            }
            if (dialog_set_filebrowse_filter(m_dialog, (const char**)ext, m_filters.count()) != BPS_SUCCESS)
            {
                qDebug() << "unable to set file browse dialog extensions";
            }
            for (i = 0; i < m_filters.count(); i++)
            {
                delete ext[i];
            }
            delete ext;
        }
    
        if (dialog_show(m_dialog) != BPS_SUCCESS)
        {
            qDebug() << "Failed to show file browse dialog.";
            dialog_destroy(m_dialog);
            m_dialog = 0;
            emit selectionCancelled();
            return;
        }
    
        bool shutdown = false;
        while (!shutdown)
        {
            bps_event_t* event = NULL;
            bps_get_event(&event, -1);    // -1 means that the function waits
            // for an event before returning
    
            if (event)
            {
                if (bps_event_get_domain(event) == dialog_get_domain())
                {
                    //0=ok, 1=cancel
                    int selectedIndex = dialog_event_get_selected_index(event);
    
                    if (selectedIndex == 1)
                    {
                        int count;
                        char** filepaths;
                        if (BPS_SUCCESS == dialog_event_get_filebrowse_filepaths(event, &filepaths, &count))
                        {
                            for (int i = 0; i < count; i++)
                            {
                                qDebug() << "selected file: " << filepaths[i];
                                m_filePaths.push_back(QString(filepaths[i]));
                            }
                            bps_free(filepaths);
                        }
                        emit selectionCompleted();
                    }
                    else
                    {
                        emit selectionCancelled();
                    }
    
                    qDebug() << "Got file browse dialog click";
                    shutdown = true;
                }
            }
        }
    
        if (m_dialog)
        {
            dialog_destroy(m_dialog);
        }
    }
    

    This class derives from QObject (by QThread) which means that it can be used by QML when it exposes properties and signals. The FileBrowseDialog class has 3 properties

    -multiple selection: a Boolean flag indicating if single or multiple selection is allowed

    -filepaths: a read only value that returns the list of files selected

    -Filters: a read/write value is where you can specify one or more filters to file (for example, ".doc", "*.jpg") etc.

    The next part is how you call the FileBrowseDialog through the QML. To do this, we must inform the QML of the FileBrowseDialog page. This is done in the App class via the qmlregistertype code.

    App.cpp

    #include 
    #include 
    #include 
    
    #include "app.hpp"
    #include "FileBrowseDialog.hpp"
    
    using namespace bb::cascades;
    
    App::App()
    {
        qmlRegisterType("Dialog.FileBrowse", 1, 0, "FileBrowseDialog");
        QmlDocument *qml = QmlDocument::create("main.qml");
        qml->setContextProperty("cs", this);
    
        AbstractPane *root = qml->createRootNode();
        Application::setScene(root);
    }
    

    The QML is now ready to be able to use the FileBrowseDialog. The example below is a page complete qml which has a button and a label. When we click on the FileBrowseDialog button is open, and all selected files will appear in the label.

    Main.QML

    import bb.cascades 1.0
    import Dialog.FileBrowse 1.0
    
    Page {
        content: Container {
            Label { id: filebrowseDialogLabel }
            Button {
                text : "File Browse Dialog"
                onClicked: {
                    filebrowseDialog.show();
                }
            }
            attachedObjects: [
                FileBrowseDialog {
                    id: filebrowseDialog
                    multiselect : true
                    filters : ["*.doc","*.jpg","*.txt"]
                    onSelectionCompleted: {
                        if(filebrowseDialog.filepaths.length>0)
                            filebrowseDialogLabel.text = filebrowseDialog.filepaths[0];
                        else
                            filebrowseDialogLabel.text = "no file selected";
                    }
                    onSelectionCancelled: {
                        filebrowseDialogLabel.text = "file browse dialog was cancelled";
                    }
                }
            ]
        }
    }
    

    And it's pretty much just invoke the native dialog file navigation in stunts. Please note save the file would follow a similar model, but I found that this dialog box was not particularly useful because it displays only a simple dialogbox with a text file name entry.

    See you soon

    Swann

  • How can I add a program to the "open with" dialog box?

    I tried to "change program" and then passed to the program but it does not appear in the box or associate with the file extension?

    Hello

    These should help:

    How to add a program to 'Open with' in Vista and Windows 7
    http://www.Vistax64.com/tutorials/126340-open-add-program.html

    How to add any Application in the Windows desktop right-click Menu
    http://www.howtogeek.com/HOWTO/Windows-Vista/add-any-application-to-the-desktop-right-click-menu-in-Vista/

    Record the programs with the open with dialog box
    http://WindowsXP.MVPs.org/openwithadd.htm

    I hope this helps.

  • The "Windows features" dialog box is empty in Windows 7

    When I click on turn on or off Windows features in the programs and features Control Panel, the Windows features dialog box is empty, no functionality is displayed. What should I do?

    Thank you buddy, but sfc.exe/scannow not worked and I faced another error! (windows resource protection could not start the repair service).

    Finally, I found the solution:
    (1) If you receive the error "Registry space" low, set the size limit of the registry to "unlimited":
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
    Key: RegistrySizeLimit
    Type: REG_DWORD
    Value: 0xffffff (4294967295)
    (2) restart
    (3) as administrator, open a command prompt and run "SFC/scannow". The command should complete successfully and when errors have been detected, they should be corrected.
    Follow the steps and good luck!
  • I try to print, get the error message "Please enable setting"Enable bidirectional communication"in the printer properties dialog box.

    When I tried to print I got the message (please turn on the setting "enable bidirectional Communication" in the printer properties dialog box ") but I need to know how to do this.

    On the start menu, menu on the side right should be a button devices and printers, which will bring you to the page printers. There you can find your printer and right click on it and select Properties. This would be the place to enable two-way communication, but beyond that, I can't help you as I don't know what would the Properties window for your printer.

Maybe you are looking for