Dialog box in the paint method

I have an IllegalStackSizeException when I try to display a dialog box in the paint method.

Here is an example:

[Edit] Welcome to the forums! [/ Edit]

Do you really need that Dialog.inform there? It's a very bad idea to have one any initiated interaction in paint, because it is called at unpredictable times. Worse still is the idea to execution of the painting of the block .

If you absolutely, desperately need some user interface action will be initiated by paint (and frankly, you don't want to do), put it in invokeLater. Even if the painting is performed on the EventThread, you must leave the BB frame finish his current job, then come back and do something new.

Dialog.Inform is a nice debugging tool, but it has its limits. You simply press one.

Tags: BlackBerry Developers

Similar Questions

  • Dialog box States: the document is not valid. The xml index file is missing. What should I do?

    Tried to open a file of numbers. Dialog box shows: the invalid document___is. The xml index file is missing. I can retrieve this file? Suggestions?

    Yes, all you have to do is probably make sure you run the version of numbers which is located in your main Applications folder and open the document with this version.  Probably, you try to open it with the old version of numbers.

    SG

  • OfficeJet 3830: dialog box for the scanner

    Just replaced an Officejet 6500 with an Officejet 3830.  The 6500 had a dialog box analysis from the top of the office, which showed levels of ink and scanner options.  The new 3830 seems not to have this.  Is there a way to get this dialog box for the the 3830?

    Hello

    Please install the software and driver from the CD that came with your printer to your computer.

    Kind regards.

  • File dialog box cut the default name

    Hi all

    I recently migrated from LV2011 to LV2012 and I have a problem with the dialog file Express vi. It seems, that in LV2012 the Windows dialog box that appears after invoking the file dialog box, adjust the default name to 14 characters (or rather the chain moves to the left so the first x characters are hidden). Please see screenshot attached screen and VI. It's OK in LV2011 (have tested the same code yesterday on another PC with LV2011). Is there a solution or the solution? This is a minor bug, but given that my application is distributed to a customer who pays it mind rather

    Thank you for your reply, Andrew!

    Your VI not exactly help me with my code, but it helped me to find the path . Unfortunately, when I used your VI, the behavior was exactly the same as with the file dialog box. But I noticed that it works only when I select 'create' to the function input terminal (with "create or replace" or something else I've known the cutting chain).

    Then I tried to override the setting of file express VI dialog box of 'New or existing' on 'New' with this setting, the file dialog box works very well (and there seems to be no difference between 'New or existing' and 'New').

    This problem is solved, thank you once more!

  • How can I get a "Détails" view - as the default - when you download a file, in the dialog box "enter the name of the file to save on...» » ?

    When I get an attachment to an email (using Zimbra Imail, Firefox, Windows XP Pro) and I click on it and select 'Download', I get the dialog box "enter the name of the file to save on...» "(because I already have the option"always ask me where to save files. "But the view of default file always in a 'list '. At least recently. I don't remember it always does this. In any case, I want the value default to a 'Détails' view, in ascending order, I can find then things so much faster that way. (I often use the 'Update' tab to bring up, the latest version of a file.) I know that I can go to the Menu 'view' icon and select 'Détails', but whenever I go in a sub-folder in this dialog box, I have to do this all over again and it wastes a lot of time and attention.

    I did some research on the internet but have not found a way to solve this problem.

    Try this:

    a. open my documents, press the alt key.

    b. click on Tools. Click on folder options.

    c. click on the view tab and select Reset and check records.

  • Whenever I have check the regional settings to enable the Arabic language (from right to left), I get a dialog box insert the CD I did not!

    Hi Srinivas

    I have the same problem, my company is located in Singapore and I ' am assigned to Saudi Arabia, and I need enable the Arabic language (from right to left).  Whenever I have check the box in the locale, I get a dialog box insert the CD I did not!

    Now, is there a link I can use to download this file, preferably through your site (to not be deceived by the other download sites) even if its price?

    Thank you

    Sammi

    http://support.Microsoft.com/kb/821080

    You need your XP OS CD it can work if you borrow one.

  • My Wi - Fi Protected Setup Wizard connection dialog box in the Intel PROSet /Wireless connection utility won't let me get caught in the password for my BigPond router.

    Dialog box of connection Wi - Fi Protected Setup Wizard in the Intel PROSet /Wireless connection utility

    My Wi - Fi Protected Setup Wizard connection dialog box in the Intel PROSet /Wireless connection utility won't let me get caught in the password for my BigPond router. He let me just plug in numbers not letters. Can someone tell me how to work around this problem?

    Hello

    This can happen if the configuration of the router is configured to accept the password in numbers. You can get in touch with Bigpond support for more information on this.

    Technical assistance to BigPond

  • Problem with the Paint method

    Hello guys,.

    I develop a map-like application,

    the screen contains key components of towing,

    -on the upper part is an ObjectChoiceField where the user can select a card

    - and below which is on the plan that the user has selected

    The problem is that I use the paint method to allow the user at the image of pain, what causes my ObjectChoiceField to disappear. Any help? Please be easy on me, I'm totally new

    Example Code:

    private static final int HORZ_SCROLL_FACTOR   = 10;
        private static final int VERT_SCROLL_FACTOR = 10;
        int left = 0;
        int top = 0;
        int maxLeft = 0;
        int maxTop = 0;
    
        final String choices[] = {"3", "4", "5", "6", "23"};
        private ObjectChoiceField choiceField;
    
        private BitmapField imageOutputField;
        Bitmap bitmap;
    
        public NetworkingMainScreen() {
    
            setTitle("AUC Maps");
            imageOutputField = new BitmapField();
            choiceField = new ObjectChoiceField("Pick a Map:", choices)
            {
                protected void fieldChangeNotify(int context)
                {
                    getURL();
                }
            };
    
            add(choiceField); // doesn't appear
            add(new SeparatorField()); // doesn't appear
    
            add(new LabelField("Map retrieved:")); //doesn't appear
            add(imageOutputField);
    
        }
    
        protected void paint(Graphics graphics) {
            if (bitmap != null) {
                graphics.drawBitmap(0, 110, imageOutputField.getBitmapWidth(), imageOutputField.getBitmapHeight(),
                        bitmap, left, top);
            }
        }
    

    You try to create a screen where you can move an image larger than the screen?

    Try this:

    http://supportforums.BlackBerry.com/T5/Java-development/create-a-scrollable-image-field/TA-p/444955

    Have the user choose the card before arriving at the screen or use more menu items.

    The moving image field must focus to work properly. This scrolling while being able to focus on the ObjectChoiceField image will be delicate.

  • Dialog box of the file in the application that is running in window 7 shows all of the UNC path

    HELP PLZ!

    We use the file dialog box to open the folder of the disk file network hard. Window XP showed the path UNC path, but when we run our application (developed in vba) on window 7, full unc path has been established instead of only last name of the folder.
    example of... UNC path \\abcd\abb\abfolder in window XP file dialog shows "abfolder" and then if we see in looking in then hierarchical set of path can be seen
    but the file in window 7 dialog box shows all the way "\\abcd\abb\abfolde" as it is...
    Please suggest if some way where we can display in the file dialog box in the window 7 same folder in UNC path that showed before in XP.
    Hi Gary,

    Thanks for posting your question in the Microsoft Community forums.

    I see from the description of the problem, you have a problem with an application developed in Visual Basics for Applications running.

    The question you posted would be better suited in Visual Basics for Applications MSDN Forums. I would post the query in the link below.
    Hope this information helps you. If you need additional help or information on Windows, I'll be happy to help you. We, at tender Microsoft to excellence.
  • Dynamic buffers / Dialog Box with the context Menu (or list box)

    Hi people,

    I did experiment with stamps dynaimc for awhile and I got pretty far with this topic. I can not make it work are the context menus (or list boxes) in dialog boxes. The context menu is displayed correctly in the dialog box, but there is no content even though its meaning. The javascript of the definition of content looks like:

    It corresponds to a group of Popup in the PDF file named 'Test '.

    popupGroup: 'Test ',.

    listItems:

    [

    {popupItems:}

    {

    The list of items of the context menu, positive number indicates the default selection

    'Test 1': + 1,.

    'Test 2':-1.

    'Test 3':-1.

    "Test 4":-1,.

    'Test 5':-1

    }

    }

    ]

    You have no idea what's wrong with the code above?

    I did a quick check of your code, and there is a problem with an exception that is thrown in this line: return Collab.user;

    If you take this point, the code works correctly. Why do you use the Collab object?

  • Cannot process the request because a modal dialog box or the alert is active

    I can't work for the life of me why I get this message when "cannot process the request because a modal dialog box or the alert is active. I simplified my code to reproduce the problem.

    All I want to do is have a dialog box that allows me to edit items on the page... But it does not seem to allow it. I must be missing something simple.

    var selection = app.activeDocument.selection[0];
    
    dialog = new Window('dialog');
    
    var button = dialog.add('button', undefined, 'Resize');
    
      button.onClick = function() {
    
      selection.geometricBounds = [0, 0, 10, 10];
    
    };
    
    dialog.show();
    

    If you use 'dialogue', then you must leave the modal state to interact with the app was done by closing the dialog box.

    var w = new Window('dialog');
    var v = w.add ('edittext');
    var b = w.add('button');
    b.onClick = function(){
        w.close(1);
    }
    if (w.show()==1) alert (v.text);
    

    Or switch to modal MOM like brother suggested dialog boxes...

    Loïc

    Ozalto | Productivity-oriented - Loïc Aigon

  • Leave the dialog box change the text display/display

    I have a dialog box that is created with some text objects attached to its buttons. The user can make choices for each one, press OK, and asked of their choice. What I would like is for the buttons to the user in the text, so that they can see it in the context as they decide (that's the only reason why they are buttons; otherwise, they would be static text). I know how to handle this with a palette, but I wonder if there is a way to do it with a dialog box. With the help of a palette for all this seems unfair; I really don't want users to be able to make changes to the document, while the palette is open, and I don't want to change anything in the document until the user clicks OK. It is a dialogue with a palette as oddity, really.

    The problem is that. showText() and setting the activePage throw them the error "Cannot process the request because a modal dialog box or the alert is active." I tried to adjust the dialog box to .the = false or .visible = false, but it has no effect. Is it just impossible? This feature, change the view but not the content, seems to live in a grey zone between the way in which the work of dialog boxes and palettes of way work, so I don't know if I'm just a useless way. Any idea would be appreciated.

    Here's a code example to illustrate what I'm doing:

    #target indesign
    
    
    main();
    
    
    function main(){
        if (app.documents.length == 0){createTestDoc();}
        runDialog();
    }
    
    
    function createTestDoc(){
        //create a test document
        var myDocPre = app.documentPresets.add({name: "testPre", createPrimaryTextFrame: true, pagesPerDocument: 5});
        var myDoc = app.documents.add(true, myDocPre);
        var myPSty = myDoc.paragraphStyles.add({name: "newPageSty", startParagraph: StartParagraph.NEXT_PAGE});
        var myCSty = myDoc.characterStyles.add({name: "CSty", underline: true});
    
    
        myDoc.textFrames[0].contents = "1\r2\r3\r4\r5";
        myDoc.textFrames[0].texts.everyItem().appliedParagraphStyle = myPSty;
    
    
        app.findTextPreferences = app.changeTextPreferences = NothingEnum.NOTHING;
        app.findTextPreferences.findWhat = "^9";
        app.changeTextPreferences.appliedCharacterStyle = myCSty;
        myDoc.changeText();
    
    
        myDocPre.remove();
    }
    
    
    function runDialog(){
        //find text with a particular character style and send that text to my dialog creation function.
        var myDoc = app.activeDocument;
        var myCSty = myDoc.characterStyles.itemByName("CSty");
        if (myCSty.isValid){
            app.findTextPreferences = app.changeTextPreferences = NothingEnum.NOTHING;
            app.findTextPreferences.appliedCharacterStyle = myCSty;
            var myResults = myDoc.findText();
            myDialog(myResults);
        }
    }
    
    
    function myDialog(textRngs){
        //create the dialog.
        var myWin = new Window("dialog", "Test Dialog", undefined);
        var mainGroup = myWin.add("group");
        mainGroup.orientation = "column";
        //each text range gets a row.
        for (var i = 0; i < textRngs.length; i++){
            var myTextRng = textRngs[i];
            var myRow = mainGroup.add("group");
            myRow.orientation = "row";
            var myBut = myRow.add("button", undefined, myTextRng.contents);
            //attaches the text object to the button.
            myBut.targetObject = myTextRng;
            //does nothing - just a reminder that the actual dialog will do something at the end based on the info entered.
            myRow.add("editText");
            
            myBut.onClick = function(){
                //this is what I do when I want this functionality within a palette. Selects the text so that it can be seen in context.
                if (!(this.targetObject.hasOwnProperty("select") && this.targetObject.hasOwnProperty("showText"))) {}
                else{
                    this.targetObject.showText();
                    this.targetObject.select();
                    
                    //OR
                    //tried this as an alternative, but setting myWin.visible does nothing.
                    //myWin.visible = false;
                    //myDoc.layoutWindows[0].activePage = this.targetObject.parentTextFrames[0].parentPage;
                    //myWin.visible = true;
                }
            }        
        }
        var OKGrp = myWin.add("group");
        var OKBut = OKGrp.add("button", undefined, "OK");
        
        OKBut.onClick = function(){
            //do something
            myWin.close();
        }
        myWin.show();
    }
    

    You have no choice: If you want the script to interact with the text that you will need to use a palette.

    P.

  • How to make or force the Save dialog box for the link pop-up in Dreamweaver

    How do or force the Save dialog box for the pop-up link in Dreamweaver, legally?

    I looked on google how to and what is the code for this but all the answers are to use php or javascript code and paste it into "Web page editor" and edit with your file name. I wonder what the 'legal' way to do that using Dreamweaver options for getting to this: when I click on my link to the image on my Web page, I created, pop-up "save under" dialog box, then the visitor of my site for can save file that my site wish to offer for download.

    It is very easy to just a link certain file (in my case is png image) and open in a new page in the browser, but I want to save as dialog window appears and then visitor on my site to save my png file or not.

    Help!

    You will need to use a script.  If your server supports PHP, this will do what you want. Change filename & path to point to your download folder.  SaveAs download.php.

    Place a link on your page parent download.php file.

    
    

    Nancy O.
    ALT-Web Design & Publishing
    Web | Graphics | Print | Media specialists
    http://ALT-Web.com/
    http://Twitter.com/ALTWEB

  • Delete the "Missing fonts" dialog box during the execution of JavaScript

    Hello

    I develop a script (in JavaScript) which allows to convert all the InDesign files in a directory specified for PDF files. I'm running into a problem when I run the script because all InDesign files have missing links / fonts.  Therefore, a "Missing fonts" dialog box opens after each InDesign file opens.  I believe that because this dialog box is open, I get the error:

    "cannot process the request because a modal dialog box or the alert is active.

    Again, I'm assuming that my script does not work because the dialog box open "missing fonts.

    Is it possible to remove all the instructions of the user?  I've read some things about the levels of user interaction, however I have not found a way to settle this with JavaScript.

    I'd appreciate any help.

    Thank you!

    Hey!

    Try this:

    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
    

    and on the finish to put this:

    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;
    

    --

    tomaxxi

    http://indisnip.WordPress.com/

  • Dialog box erases the part of the screen at the end

    Hi all

    I'm having a problem using the curve 8830 Simulator and JDE 4.2.1 when you close the dialog boxes. When I close a message of dialogue in my application to the fence, the dialog box clears a rectangle of the screen that is proportional to the size of the dialog box. In other words, if I drew pictures in the background bitmap, they are deleted (and I think that fields are left unaffected). This seems to occur only with the help of the 8830 and does not occur when you use, say, the 8520 Simulator (which has a more recent OS). There are possible solutions to this problem? Thanks in advance!

    I'm basically calls the help dialog box:

    for example...

    int response = Dialog.ask (Dialog.D_YES_NO, "do you think the screen to clear the background", Dialog.YES);

    if(Response == Dialog.no) {}
    ...
    } else {}

    ...

    }

    It is by reading a similar thread, give to think it can help, "If you do not pushModal() with the GLOBAL flag is set, then please try this first.", but there is no clear example of implementing exactly this...

    Thanks again

    Detect the onFocus() or onExposed() event in your screen and you call invalidate().

    This will precipitate paint this over.

Maybe you are looking for

  • MacBook Pro 15 "end 2013 too slow performance

    Hello world My macbook pro 15 "end 2013 me294, Core i7 haswell 2.3 Ghz, 16 GB Ram, SSD PCI 256 GB, GT 750 m & Iris Pro. Geek of multicore benchmarks is too less to another macbook even type (me 294). It's my macbook: multi-core on 6000 landmarks http

  • Installation of Skype

    Yes, it's a "non-windows" - regarding the issue, but I hope that someone here knows or uses Skype and can answer this fundamental question. A new version can be installed on an older version or the previous version must be uninstalled manually first?

  • BlackBerry Smartphone password keeper

    My replacement phone password keeper leaves me not so much that it's not accept my old password even those that I just restored all the data of the DM, but I made no change!

  • Bridge does not open after the last update CC. (June 2016)

    I posted this on another discussion and then noticed that it was several years old.Bridge icon appears and then immediately crashes with problem report "Adobe Bridge CC quit unexpectedly".I started having this problem after upgrading to the latest cr

  • Lose the morning after the Transaction.rollback)

    I have a strange problem which arises after I performed a restore via a Cancel button.  I have a poplist triggering a PPR which calls the setter attributes VO method that calls one of the methods of the AM to provide a default value for another attri