SPONSORS:






User Tag List

Results 1 to 7 of 7
  1. #1
    Senior Member
    Join Date
    Mar 2000
    Location
    pisctaway, NJ USA
    Posts
    188
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: JavaJFCPopupMenu cannot be recognized when it extends beyond its parent\'s boundaries

    Dont ask, just do it...
    try maximing the window and see if the problem still exists.

    next try maximized and CLICK EVERY coordinate on the button and see WHEN the popup is found. something like:
    for every y on button
    for every x on button
    button.click(1,{x,y}) //click the x,y
    if mypop.exists(2)
    print(x)


    if this is too confusing, I found that the popup is only found when clicking certain coord on the button while the window is maximized.
    tony

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

  2. #2
    Senior Member
    Join Date
    Jun 2000
    Location
    Chicago, IL USA
    Posts
    383
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    JavaJFCPopupMenu cannot be recognized when it extends beyond its parent\'s boundaries

    Several people have written here about JavaJFCPopupMenu recognition problems.

    I have not had any problems UNTIL I run into a contextual PopUpMenu which extends beyond the boundaries of its parent window. (by as little as one pixel)

    When this happens, SilkTest does not recognize the menu as a menu anymore.
    It sees it as an empty Windows DialogBox.
    It is just like what SilkTest sees in a Java application when the Java Extension is not on.

    I have turned off the Agent's "OPT_VERIFY_COORD" and all the other options, with no effect.
    I have tried to map the DialogBox to a JavaJFCPopupMenu, with no luck.

    Is there some SilkTest "trick" that I need to know to recognize this menu consistently ?
    ------------------
    Rob Kapteyn

    [This message has been edited by RobKapteyn (edited 04-19-2001).]
    Rob Kapteyn, CSTE
    RobKapteyn@gmail.com

  3. #3
    Senior Member
    Join Date
    Jun 2000
    Location
    Chicago, IL USA
    Posts
    383
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: JavaJFCPopupMenu cannot be recognized when it extends beyond its parent\'s boundaries

    At first I thought that maximizing the window might solve the problem.
    It doesn't.

    Even with the window maximized, Swing draws the menu to extend off of the bottom of the screen, and the same problem appears.

    Thanks for you tip regarding click positions -- I will try it out.
    Only thing is -- I am invoking the popup from the cell of a JavaJFCTable -- not a button.
    ------------------
    Rob Kapteyn

    [This message has been edited by RobKapteyn (edited 04-20-2001).]
    Rob Kapteyn, CSTE
    RobKapteyn@gmail.com

  4. #4
    Senior Member
    Join Date
    Mar 2000
    Location
    pisctaway, NJ USA
    Posts
    188
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: JavaJFCPopupMenu cannot be recognized when it extends beyond its parent\'s boundaries

    Most popups come up AFTER you release the button. Try right PRESSING on the object, then RELEASING the button on the window.

    I dont have the code with me, but look for stuff with pressmouse and release mouse, basically the application usually draws the popup wherever the mouse is when you release.
    tony


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

  5. #5
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: JavaJFCPopupMenu cannot be recognized when it extends beyond its parent\'s boundaries

    I know AWT is this way, and believe SWING is also, but if you pressmouse on one pixel of a button and releasemouse on another pixel, it will not activate the associated action.

    I could be all wet on this, but I believe that is the case, so if your mouse is moving, and you press and release while "swiping" across a Java button, you won't be seen as actually having clicked that button.

    I'm not sure what you mean by pressing the mouse on the object and releasing on the window, but this is what came to my mind. Can you clarify?

  6. #6
    Mel
    Mel is offline
    Junior Member
    Join Date
    Mar 2001
    Location
    San Jose, CA, USA
    Posts
    28
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: JavaJFCPopupMenu cannot be recognized when it extends beyond its parent\'s boundaries

    RobKapteyn,

    Have you finaly figure out a nice solution for this problem??

    I'm facing the exact same at this point: A popup menu comes up when I right click on an item in a TreeView. If the item happens to be at the bottom of the window and I invoke the popup menu, it is not recognized appropriatly, as it is partly outside the parent window.

    Anyone wants to share an extra thought on this?



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

  7. #7
    Senior Member
    Join Date
    Jun 2000
    Location
    Chicago, IL USA
    Posts
    383
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: JavaJFCPopupMenu cannot be recognized when it extends beyond its parent\'s boundaries

    I wrote a really complicated custom class to deal with this. The first time the menu object is accessed, it maximizes the window it is in and creates a struct containing the complete menu contents. (it can be different for each user)

    Then, when it invokes the popup in the future, it looks for one of two things (1) a recognizable menu, or (2) a captionless window with the tag: "~ActiveApp/[DialogBox]".

    Case (1) is simple. In case (2), the pick() method does a GetSize() on the DialogBox and uses the saved menu info to do a bitmap navigation within the box.

    It is amazingly robust. Unfortunately, my code is very specific to our weird menu.


    ------------------
    Rob Kapteyn

    [This message has been edited by RobKapteyn (edited 11-08-2001).]
    Rob Kapteyn, CSTE
    RobKapteyn@gmail.com

 

 

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 12:45 AM.

Copyright BetaSoft Inc.