Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTGWT-1929 in 3.1 beta.
  1. #1
    Sencha Premium Member
    Join Date
    Dec 2011
    Posts
    34
    Vote Rating
    0
    MarcT is on a distinguished road

      0  

    Default PredefinedButton should be easier to use

    PredefinedButton should be easier to use


    I like the PredefinedButton idea; it makes creating DialogBoxes really easy and powerful. But I don't see an easy way to handle clicks on them. The Dialog example uses a "HideHandler", then just spits out the text of the button, which isn't a real practical example. It would be nice if there was something similar to the "getHideButton" function that returned the PredefinedButton enum (I'm used to GetDialogResult() in WinForms). Obviously that won't work if I add my own buttons, but if you're going to give us handy built-ins, it should be dead easy to use them.

    Is there a way to use them that I'm just missing? And if so, could you add it to the Dialog example?

    Right now, I'm just comparing the text against "Yes" or "OK", etc, which is terrible from an i18n perspective.

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,716
    Vote Rating
    87
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    Thanks for the feedback - the PredefinedButton enum is new in 3, and combined with the change from the event structure used in 2.x, this piece got lost in the shuffle. I'm moving this thread to the bugs forum, and filing an issue, we'll update this when we have made a change.

    There is some room to work around this though - you've already remarked that getHideButton() yields the button pressed, but there are some other places you might hook into this:

    Dialog.onButtonPressed might be overridden, to let you know that a button has been selected, and you can then check using getText(PredefinedButton) what the text of the button is, for the current locale. This allows you to decide based on the button (and perhaps other criteria) whether or not to cause the popup to be dismissed.

    Window.hide(TextButton) is another option - the same getText(PredefinedButton) method could be used to get the text, and just calling super.hide would let it continue with hiding the dialog.

  3. #3
    Sencha Premium Member
    Join Date
    Dec 2011
    Posts
    34
    Vote Rating
    0
    MarcT is on a distinguished road

      0  

    Default


    Thanks, Colin, both for creating a bug and providing a safer workaround.

  4. #4
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,716
    Vote Rating
    87
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    This has been fixed as part of other api breaking (but improving) changes in GXT 3.1. From the new javadocs in Dialog, how you can use this:

    Code:
     *   display.getDialog().addDialogHideHandler(new DialogHideHandler() {
     *     {@literal @}Override
     *     public void onDialogHide(DialogHideEvent event) {
     *       // Invoke event.getHideButton() and take action based on value of returned enum
     *     }
     *   });

Thread Participants: 1

Tags for this Thread