SPONSORS:






User Tag List

Results 1 to 7 of 7
  1. #1
    Senior Member
    Join Date
    Nov 2001
    Location
    UK, Oxford
    Posts
    150
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Another problem with JavaJFCPageList

    JVM 1.3... Applet

    I have a dialog box containing a tabbed pane with 2 tabs.
    Each tab has a checkbox on it.
    Let's call them A and B.
    Naturally, when declaring this dialog box, I merged two declarations so as capture both tabs.

    Results of OKing the dialog:
    A is checked and B is checked: light goes red
    A is checked and B is unchecked: light goes Amber
    A is unchecked and B is checked: light goes Blue
    both unchecked : light flashes orange

    This all works fine... and then I write a test for it in 4Test:
    I make Silk Test open the dialog and check both checkboxes, A first and then B.
    I make Silk Test OK the dialog (expecting red).
    I get Blue.
    Silktest ends the test, reporting the error.

    I quadruple check this and then amend the test so the dialog is not 'OK'ed.
    I run the test and when it has completed I check the state of both checkboxes.
    Notably, A is unchecked.

    My conclusion is that ST does not retain state between tab selects.
    Oh dear...!#@&*$
    Any thoughts...?


    ------------------
    Tempus fugit, Carpe Diem, et al

  2. #2
    Junior Member
    Join Date
    Jan 2002
    Location
    Santa Clara, Ca. USA
    Posts
    22
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Another problem with JavaJFCPageList

    The program logic as described sounds fine, it may be helpful to post the code. How are you checking the boxes and then verifying the state? There are various methods, check(), SetState(), GetState(), Toggle (), IsChecked (), VerifyValue (). One thought - the checkbox may toggle? Did you try reversing the order? Where is the light? In the dialogbox? On a tab? Which? -Len

    ------------------

  3. #3
    Senior Member
    Join Date
    Jun 2000
    Location
    Sunyyvale CA USA
    Posts
    422
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Another problem with JavaJFCPageList

    Question is do u have two check boxes and indicator in same frame or different tabs? Paste yr code

    ------------------
    Sree
    Sree

  4. #4
    Senior Member
    Join Date
    Nov 2001
    Location
    UK, Oxford
    Posts
    150
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Another problem with JavaJFCPageList

    OK, the 'light' scenario is just a simplified example for clarity's sake.

    Let's say I have a ActivateLightDialog class.
    It has a method activateLight.(see below)
    I invoke the dialog, create an instance of the ActivateLightDialog class and call the activateLight method which checks my preferred options, then closes the dialog by pressing 'OK' button.
    At this point my hypothetical light does whatever it should.


    void activateLight( boolean A optional, boolean B optional)

    //default is unchecked
    if A == null
    A = false
    if A
    getTabbedPane().Select("APane")
    getACheckbox().SetState(A)
    if B == null
    B = false
    if B
    getTabbedPane().Select("BPane")
    getBCheckbox().SetState(B)
    this.OK()

    I have tried using the Check method instead of SetState and this makes no difference.
    The point is that when 'OK' is clicked the only visible tab is BPane, and the state of APane somehow becomes unchecked (if it had been checked).
    Perhaps this has something to do with Swing's
    lightweight component model, and Silk Test inability to cope with some areas of this...?
    At any rate, if you manually repeated the test, it all works fine.
    I have attached a declaration of ActivateLightDialog extrapolated from the original.

    ------------------
    Tempus fugit, Carpe Diem, et al

  5. #5
    Senior Member
    Join Date
    Nov 2001
    Location
    UK, Oxford
    Posts
    150
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Another problem with JavaJFCPageList

    indent test
    indent test

    ------------------
    Tempus fugit, Carpe Diem, et al

  6. #6
    Senior Member
    Join Date
    Nov 2001
    Location
    UK, Oxford
    Posts
    150
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Another problem with JavaJFCPageList

    I repeat method with indentation


    void activateLight( boolean A optional, boolean B optional)

    //default is unchecked
    if A == null
    A = false
    if A
    getTabbedPane().Select("APane")
    getACheckbox().SetState(A)
    if B == null
    B = false
    if B
    getTabbedPane().Select("BPane")
    getBCheckbox().SetState(B)
    this.OK()


    ------------------
    Tempus fugit, Carpe Diem, et al

  7. #7
    Senior Member
    Join Date
    Nov 2001
    Location
    UK, Oxford
    Posts
    150
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Another problem with JavaJFCPageList

    <pre>indent test
    indent test
    ident test
    </pre>


    ------------------
    Tempus fugit, Carpe Diem, et al

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 09:21 PM.

Copyright BetaSoft Inc.