Hybrid View

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User PhiLho's Avatar
    Join Date
    Nov 2011
    Location
    Near Paris, France
    Posts
    139
    Vote Rating
    1
    PhiLho is on a distinguished road

      0  

    Post Obsolete Dialog JavaDoc

    Obsolete Dialog JavaDoc


    The JavaDoc example for Dialog seems outdated (in Beta 2):
    Code:
     Dialog d = new Dialog();
     d.setHeading("Exit Warning!");
     d.addText("Do you wish to save before exiting?");
     d.setBodyStyle("fontWeight:bold;padding:13px;");
     d.setSize(300, 100);
     d.setHideOnButtonClick(true);
     d.setButtons(Dialog.YESNOCANCEL);
     d.show();
    Apparently, we use now setHeadingText() and setSize() takes strings instead. And setButtons() became setPredefinedButtons(). Oh, and addText doesn't seem to exist. Apparently one have to add widgets to this container. The Explorer Demo shows good code, fortunately (I used it before checking the JavaDoc...).
    Just a heads up... I suppose you will revise the whole JavaDoc before going GA, anyway.

  2. #2
    Sencha User
    Join Date
    Nov 2011
    Posts
    10
    Vote Rating
    0
    Tony Stuart is on a distinguished road

      0  

    Default


    Thanks for the heads-up.

    You're right, while we are in the beta phase it's a good idea to use the examples in the Explorer demo.

    We are in the process of updating the JavaDoc for the v3 GA. Here's an updated example for Dialog:

    Code:
    Dialog d = new Dialog();
    d.setHeadingText("Exit Warning!");
    d.add(new HTML("Do you wish to save before exiting?"));
    d.setBodyStyle("fontWeight:bold;padding:13px;");
    d.setPixelSize(300, 100);
    d.setHideOnButtonClick(true);
    d.setPredefinedButtons(PredefinedButton.YES, PredefinedButton.NO, PredefinedButton.CANCEL);
    d.show();

Thread Participants: 1

Tags for this Thread