SPONSORS:






User Tag List

Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Nov 2000
    Location
    Ulm, DE
    Posts
    82
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Items in a Treeview

    Whenever I try to click/select items containing a "/" in their name like ("blabla/blabla") in a treeview, silktest returns an errors message with "Item not found", because it's trying to look for the item in a deeper level (due to the "/" in the item name) and can't find it.

    How do I go around this problem? Is there a way to tell silktest to ignore the "/" in the item name? An How?

    Thanks for your help and happy new Year
    Silverter - A guru was once a beginner

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

    Re: Items in a Treeview

    Not directly. It is a major issue for us too. You can TRY substituting the '/' for a '?' but it does not work consistantly for us.
    The easiest work around is to expand every item in tree by using the "#n" and some recursion. Then do a getContents (since getContents only returns items expanded) on the tree and then find the location of the item you want since getContents is a LIST (ie. you will be using "#n" to select your item).

    Hope this helps...Call tech support I believe they will give you a similar work around, or tell you to upgrade to newer version which will break something else.

    Anthony

  3. #3
    Member
    Join Date
    Nov 2000
    Location
    Ulm, DE
    Posts
    82
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Items in a Treeview

    Thanks alot for your reply, your workaround actually works for me. I thought it could be easier, but it works at last, with your workaround. Thanks

    Serge.
    Silverter - A guru was once a beginner

  4. #4
    Senior Member
    Join Date
    Aug 1999
    Location
    San Diego, CA USA
    Posts
    219
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Items in a Treeview

    I had the same problem and I took the same approach of using GetContents, ..., then using #n to select the item.


    Then I ran into the problem of being able to indicate multiple levels in the string, being that I can't reliably use the slash. My solution got pretty complicated. The basic approach is to use a backslash to indicate levels then I have common functions that actually do all the work so I could keep the code details centralized. That paid off big time just a few weeks ago when upgraded to 5.0.3.2 and discovered that GetContents now includes the top-level tree node in the return values for each branch of the tree.

    Once I had this all figured out I extended the TreeView class and its Select statement to complete the implementation. So if someone does use a treeview.Select statement directly all will work fine for them and they won't even be aware that all this work-around stuff is actually taking place.

  5. #5
    Member
    Join Date
    Jun 2000
    Location
    CA
    Posts
    56
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Items in a Treeview

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by pcostigan:

    Once I had this all figured out I extended the TreeView class and its Select statement to complete the implementation. So if someone does use a treeview.Select statement directly all will work fine for them and they won't even be aware that all this work-around stuff is actually taking place.
    <HR></BLOCKQUOTE>

    if it's not asking to much, is it possible to post the treeview class you created. i have a similar problem and it's driving me insane finding workarounds. i don't want to reinvent the wheel if a solution is available. thanks in advance.


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

  6. #6
    Senior Member
    Join Date
    Oct 2000
    Location
    Laurel, Maryland, USA
    Posts
    204
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Items in a Treeview

    While this may be a little different, it may help. This is a class that Segue support sent me for a similar problem:

    ------------------
    Atlee
    Atlee

  7. #7
    Member
    Join Date
    May 2001
    Location
    Rochester, NY, USA
    Posts
    61
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Items in a Treeview

    I have a similar issue, but I think that instead of the node not being found because of the '/' in the path, the node is not found because the tree has not been expanded yet, and the node does not yet exist in memory (the tree class is OLETreeView, which dynamically creates the nodes as the parent node is expanded). The solution that we have found is to parse the path out and select each level node independantly. As we select each node in the path, we expand it - this displays the children, thus they can be selected and expanded until the final node is reached. I don't like to expand the entire tree, because some of our trees have thousands of nodes, thus taking quite awhile to expand fully.

    Hope this helps,
    Steve

    ------------------
    Steven P. Blunt
    Software Automation Technical Lead
    NASG Sales Force Productivity
    Steven P. Blunt
    Software Automation Technical Lead
    NASG Sales Force Productivity

 

 

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 02:17 AM.

Copyright BetaSoft Inc.