Warning Dialogues - cannot capture the button clicks

Now that I can finally connect to the Simulator with the debugger, I can come back and work on my app!

I'm trying to be on the QNX Dialogue class... specifially the AlertDialogue, that I will use for the warning of use of data like most of you...

I looked at the example code, but for some reason, I can't click on the events of the Dialogue...

Here is my code:

package com.content.modal{  import flash.display.Sprite;  import flash.events.Event;    import flash.events.MouseEvent;

 import qnx.dialog.AlertDialog;    import qnx.dialog.DialogSize; import qnx.display.IowWindow; import qnx.events.DialogEvent;

  public class AirtimeUsageModal extends Sprite {

       private var alert:AlertDialog;

      public function AirtimeUsageModal()       {         init();       }

       private function init():void      {         alert=new AlertDialog();          alert.title="MY TITLE";           alert.message="MY BLURB HERE.";           alert.addButton("Quit");          alert.addButton("Acknowledge");           alert.dialogSize=DialogSize.SIZE_SMALL;           alert.addEventListener(DialogEvent.DIALOG_BUTTON_CLICKED, alertButtonClicked);            alert.show(IowWindow.getAirWindow().group);

      }

       private function alertButtonClicked(e:DialogEvent):void       {         trace("Button Clicked Index: " + e.target.selectedIndex);         trace("Button properties Object"+e.target.getItemAt(e.target.selectedIndex));         trace("e.responseBtn" + e.responseBtn);

         if (e.responseBtn == "Quit")          {             quitApp();            }         else if (e.responseBtn == "Acknowledge")          {             this.dispatchEvent(new Event("startApp"));            }     }

       private function quitApp():void       {         stage.nativeWindow.close();       }

   }}

My problem is that I can't capture the click event... my tracks in alertButtonClicked never fire... When I click on a modal button disappears... And I get this in the output:

Response of dialogue show null null
Receipt of RESPONSE from the server: @control 1
BaseDialogService.receiveResponse

Any ideas what's happening here?

This is a known bug. Please use EVENT. SELECT a workaround until this has been resolved.

Tags: BlackBerry Developers

Similar Questions

  • Cannot configure the buttons on the tablet on Portege M750

    Cannot configure the buttons on the tablet on my M750, where I can donload the drivers to be able to configure them.

    When I touch the botton nothing happens.

    Do you have XP or Vista installed?

    Have you installed Windows yourself using a version of Windows?

  • My Satellite A300 cannot recognize the buttons at the top of the page

    I + re-inistalled windows vista and installed everything. They work fine except the buttons that are located above the keyboard. I know that I can verify their status in all programs > Toshiba > utilities > Toshiba Assist, but the problem is that the my notebook cannot recognize the buttons.

    I installed all the software for each hardware but still cannot use the buttons...
    What should I do?

    Have you used the recovery disk when you installed Vista?

    If this isn't the case, you must download and install the Package of added value, which can be downloaded from the Web from Toshiba site in the section support/drivers.

  • How do to capture the mouse click or drag the engine near the PF_Param_POINT

    Hi guys.

    I tried to re-captured the event click or drag near the PF_Param_POINT but I could not.

    PF_Param_POINT seems to catch my event drag near the object point.

    Using the debugger, I watched if PF_Event_DO_CLICK occurs or no such action of drag,

    no event of PF_Event_DO_CLICK were issued.

    Once my user interface of the custom controls located near the control point UI (less than 5px?),

    the user can move them forever.

    Instead of draggin my UIs custom, control point user interface are trained.

    At present, the only solution is to CANCEL the move of my custom user interface operation.

    Does anyone know how to avoid such a situation?

    Hi daichi.

    the problem is that the interface of AE has a priority higher on interface of plug-in.

    He intercepted events drag both drew on the interface of the plug-in on the paper.

    the only solution I know is:

    def.ui_flags = PF_PUI_DISABLED;

    Suites. ParamUtilsSuite1()-> PF_UpdateParamUI (in_data-> effect_ref, paramIndex, &def);)

    This will cause the point param be unselectable, and therefore will not intercept click and drag orders.
    You can set this flag selectively when the cursor is close to your custom control, or when the cursor is inside the window of the model.
    (it's what I do in my plug-ins)
    :-)
  • My printer shows the photo capture light and warning lights up but the buttons respond at all

    When I turn it on the caution light and capture photo light are turn on but the buttons respond at all.  It's a .elp of Brother DCP - 135 c.!

    Hello

    Check with the support of brother, their documentation online and drivers. OEM brother is responsible
    for the proper functioning of the printer and their drivers provided.

    Good luck, you need to update or reinstall the latest driver.

    Brother - DCP-135<-- uk="">
    http://welcome.solutions.brother.com/BSC/public/EU/GB/en/model_top/colormfc/dcp135c_eu_as.html?reg=EU&c=GB&lang=en&prod=dcp135c_eu_as

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • Cannot use the button fastening PR as a requisition

    Hi all,

    Good afternoon

    I'm having a problem about the attachment in the order form.

    Currently for the end user cannot click / use this button when creating PR.

    But in my account Oracle, the button can be used.

    I think if theres necessary installation on behalf of users?

    Or what configurations do I need to check the access to his PC?

    Can someone help me on this problem.

    PR attachment.png

    Thank you very much!

    Kind regards

    Gerard

    Gerard,

    Did you work? If so, please close the thread by checking the useful and correct answer.

    See you soon

    AJ

  • Slides of CP9 KC - cannot add the button

    All of a sudden, I can't add a button to a slide check knowledge. Yesterday, I was doing, but today cannot.

    When I click the icon "Interactions", the first three elements (button, click box, Drag and Drop) are grey. Only 'Training Interaction' is available.

    My typical solution is, create the item in another page, then copy and paste it. But this page even let me not paste anything.

    Already tried rebooting the computer and Captivate.

    Does anyone else have this problem?

    Thanks in advance,

    Dan

    Plano, TX

    Hello

    To the best of my knowledge, a KC slide is nothing more than a typical Question except for the configuration of the notation or another slide. And Captivate never allowed adding things like buttons to these kinds of slides.

    Is it possible that you're wrong about the possibility to add a button to a higher? If you were, it would be the kind of a bug.

    See you soon... Rick

  • Cannot configure FolderLink that cannot find the button options to connect... How?

    I'm here at the top of the Firefox window, "click the Firefox button click Options
    Click the menu button, then choose Options
    Click the attachments button, and then click Outbound. "
    'Options' is not an option that I can find.
    Whaat? Doo... Do next?

    For Thunderbird, click Tools(press F10 or alt to the unhide) > > Options > > Attachments > > outbound tab and click the Add button

  • Cannot press the button of waking sleep

    Recently, I found that the sleep/wake button doesn't spring back after having been pressed. For now, the switch always turn on and turn off the phone.  But I'm worried it will soon stop or start doing its function without my intervention.  This happened with my old iPhone 4.  He ceased to work together.  And I see a similar problem with the 5.  Got this over 6 in December 2014. No more guarantee.  Anyone seeing this problem on the iphone 6 more?

    Even without a warranty, Apple will look on the phone. The United States, at least, Apple stores will do a few very basic repairs. You may be charged. If they cannot fix the phone, you most likely would be offered one off replacement warranty at about half the cost of a new phone.

  • Avoid the button clicks duplicated in the structure of the event

    Hello

    I have an apparently easy problem that I can't solve. I enclose a VI that illustrates my problem.

    My problem is this: when an event runs, the OK button is disabled, but if the user clicked the event is pending, and when the process is finished, another will start immediately. The only reason why I turn off the button is to avoid this queuing event. The mechanical action of the button is set to the switch until release (so that the button just get after that I have let go of it).

    How can I avoid this?

    Thank you!

    First of all, your mechanical action seems wrong.  By releasing latch and then move the button in the case of the event.  Currently, you use the switch to exit which is contagious stocks on the top and to the bottom of the query.

    Second, do not check the box that says 'Lock Front Panel until the end of the matter for this event'.  Notice that it has parentheses that say "reporter treatment of the actions of the user" which means he waits until the case ends (the date at which the button was reactivated).  You are basically defeating the entire purpose of the deactivation of the control because defer you the intervention of the user until the button has been reactivated.

  • Change the color of the text on the button click

    Hi, how I would change the text with color while the application is running?

    For example, when the user clicks a button, how can I change the color of the editfield with already inserted text?

    I realize that I could add the editifled with different colors, but I was wondering if there is a way to do this without adding new editfield - like refreshing the editfield with different text color.

    Help is very appreciated!

    First, create your own custom class that extends EditField.

    It can be as simple as this:

    public class MyEditField extends EditField {
      private int _color = Color.BLACK;
    
      public void setFontColor(int color) {
        _color = color;
        invalidate();
      }
    
      protected void paint(Graphics g) {
        int prevColor = g.getColor();
        g.setColor(_color);
        super.paint(g);
        g.setColor(prevColor);
      }
    }
    

    Once you have this class, you can use it like this:

    final MyEditField textEntryArea = new MyEditField(...); // any EditField constructor can be used
    
    ...
    FieldChangeListener buttonListener = new FieldChangeListener() {
      public void fieldChanged(Field field, int context) {
        if (field == setToRedButton) {
          textEntryArea.setFontColor(Color.RED);
        } else if (field == setToBlueButton) {
          textEntryArea.setFontColor(Color.BLUE);
        }
        // etc.
      }
    };
    ...
    setToRedButton.setChangeListener(buttonListener);
    setToBlueButton.setChangeListener(buttonListener);
    ...
    

    Edit: fixed a few typos.

  • Disable a button until all the buttons clicked

    Hello

    I have a menu of 7 buttons on a slide that launch the .xml files from 'Success show script' and show the checkmark. I've got this works well, but I want the button 7, certificate, remain disabled until all 6 user buttons were clicked in order any.

    I wrote various advanced conditional actions, and I can't do things.

    I created 6 variables called topic1, topic2, topic3, etc., defaults to 0.

    The cert of the Action set to move to the slide but I was testing just the IF statement, it does not jump to slide either haha.

    What I'm doing wrong!

    Thanks for advance-METZ

    cap1.pngcap2.pngcap3.png

    Yes, I explained that the first decision should look like in my previous answer.

    First decision "always."

    IF 1 is equal to 1

    Assign Topic1 with 1

    Show... or open a URL of what you wanted to do with the standard action

    Second decision ' CheckComplete

    IF Topic1 is equal to 1 AND

    Topic2 is equal to 1 AND

    ...

    7 turn on the you will need to disable start with, since you say that you do not leave the slide, this can be done with the action on enter

  • Cannot get the buttons to start the animation of edge

    Hi all.

    I have a simple animation I want to deposit in the form of an article from indesign that I use for an ipad app. The problem is the buttons. I can't make it work at all with the animation.

    I need essentially a button so that the animation will start and also to show a cross (close) button and then once the close button is clicked, reverse the animation back out of the page.  I tried all sorts of ways via the animation Panel and Panel of buttons but can not even animation to come and even less to show hidden until the outbreak of the close button.  All the other buttons in the other articles are very well during the video release, url etc but no animation... I'm obviously something very wrong?

    Really appreciate any help with this as its hold on my life :-)

    Thank you very much

    GAV

    You mentioned the Animation Panel, which is a red flag. Native animations are not supported in DPS. Create your animation using another tool, such as Adobe Edge.

  • Want to keep track of the button clicks

    Hi, I'm new to Flash and I use CS4.

    What I want to do is to collect a user's comments, and whenever they click a button of some, in this case the button YES, I would like a number added to the var such as partition ++. In this way, I can use a case statement at the end to guide the user to the right product.

    However, my code does not work, so if someone could take a look, I would be grateful.

    Thank you

    var score:Number = 0;
    var score_txt:TextField = new TextField();
    score_txt.x = 150;
    score_txt.y = 125;
    score_txt.width = 100;
    addChild (score_txt);
    
    yes1_btn.addEventListener(MouseEvent.CLICK, yes1);
    function yes1(event:MouseEvent):void {
         soundControl1 = sound1.play();
        gotoAndStop(6);
    }
    
    if (yes1){
         score++
    }
    score_txt.text =  + score +  " total score"
    

    Try to move the lines after the function in the function, even if you don't need the conditional...

    function yes1(event:MouseEvent):void {}
    soundControl1 = sound1.play ();
    gotoAndStop (6);

    Note ++;

    score_txt. Text = + mark + "total score".
    }

  • SOLVED: Cannot change the button text


    I have a text entry box that requires the user to enter a specific phone number. After you enter the correct phone number, they click on a search button to go to the next slide. For the text entry area, I have the option "Display button" selected. I want to change the text of the search, rather than submit, say, button, but nothing happens when I double-click on the button. No matter what happens when I click with the right button and select Properties.

    Using Captivate, I should be able to change the text of the button, but it won't let me. Any ideas?

    Apparently, it's still a "undocumented features" of Captivate. To resolve this problem, I deleted the original text entry box and then inserted a new. This time, using the same options, I was able to change the text of the button. Go figure.

Maybe you are looking for