SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Jan 2003
    Posts
    13
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Index Tags keep changing on Dynamic GUI\'s

    I'm having a really annoying problem that i cannot figure out. In our gui, we have panels that contain button and other components. At runtime, the user can add more of these panels (that contain other controls) and remove them at will. When these panels are created, a reference is stored in a global silktest variable. However, as more panels are added and removed the path (because of their index) keeps changing and the references that i have stored to those panels become invalid and i can nbo longer get to them. I should mention that i do not have these panels declared anywhere, so their tags become the nearest piece of static text (which would be the same for every panel hence the indexing).

    Does anyone know of a way to uniquely identify these panels so that references to them do not have to change as other componenets are addded and removed???

    Thanks in advance.


    Aleem

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

  2. #2
    Member
    Join Date
    Aug 2002
    Location
    Durham, NC USA
    Posts
    60
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Index Tags keep changing on Dynamic GUI\'s

    The easiest way: Instead of a single global variable, could you ask for a list of indices to all the active panels? Then, when new panels were created, the program could dynamically update all of the existing panels, and so could you. (I assume we're talking Window IDs here?) The list could be a semicolon-delimited string, maybe, and you could use GetField () to parse it.

    Considering the above, I'm not sure what you mean about the nearest static text. If you are using multitags, just make them plain old tags and use only the text tag. If it's just that Silk can't distinguish which text is nearest very well, that is a different problem...

    The medium way: A thing I did in a similar situation was use keyboard movements/commands. This may not work for your application, but I'm not sure from the description.

    The hardest way: Since your icons will most likely be the same size on all resolutions, you can capture bitmaps of places you expect the buttons to be and compare them to known images. I've got a few routines to help that, so let me know if you're interested in that route. Be aware that it's probably less resistant to change in the long run.

    Finally, the easy way: if you have some control over the programmers , can you ask for the dynamic panels to be created as, say, dialog boxes with unique names? I'm thinking of something similar to the way it looks in XV, GIMP, Photoshop... Then you could just check Exists ().

    Anyhow, hope this helps. Good luck!

    -TC
    --
    Tim Crone
    Broadcom

  3. #3
    Junior Member
    Join Date
    Nov 2002
    Posts
    21
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Index Tags keep changing on Dynamic GUI\'s

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>I'm having a really annoying problem that i cannot figure out. In our gui, we have panels that contain button and other components. At runtime, the user can add more of these panels (that contain other controls) and remove them at will. When these panels are created, a reference is stored in a global silktest variable. However, as more panels are added and removed the path (because of their index) keeps changing and the references that i have stored to those panels become invalid and i can nbo longer get to them. I should mention that i do not have these panels declared anywhere, so their tags become the nearest piece of static text (which would be the same for every panel hence the indexing).
    Does anyone know of a way to uniquely identify these panels so that references to them do not have to change as other componenets are addded and removed???<HR></BLOCKQUOTE>

    I think I had a similar problem: only one window with different layouts of buttons changing at runtime. If some of theses buttons have no "caption" it will use the "prior text" and since their "index" is changing at runtime, silktest will not identify the button we were expecting.

    I solved this problem by declaring a window for each different layouts of button. I used tags with the /.. syntax in order to make each of these window unique. You will have to do some handcode though because the recorder won't work with tags using the /.. syntax.

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

  4. #4
    Junior Member
    Join Date
    Jan 2003
    Posts
    13
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Index Tags keep changing on Dynamic GUI\'s

    I do a similar thing, in that I keep references to these window objects in some global variables. But when the tag changes, as you mentioned, these references change.
    Now, silktest identifies objects by it's path (i.e MainWin.panel.viewport.button) and tag but what if this path changes? Is there are way to keep a reference to these objects that is independent of path and tag (i.e having a reference in java to a JavaJFC Button, it's location doesn't matter)?


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

 

 

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 07:14 PM.

Copyright BetaSoft Inc.