SPONSORS:






User Tag List

Results 1 to 3 of 3
  1. #1
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    parent statement as a variable?

    Silk 5.0.3.1

    I've created a number of dynamic instances of JavaMainWins based on a common class. I want to address various dialogs in this class directly - as in: dialog.action() - without having to insert their declarations within their actual parent window which results in the more common command structure window.dialog.action(). The former approach is operationally much cleaner given Java's flat structure (and it reduces maintanance); the latter is too wordy.

    Unfortunately Silk's parent statement does not accept a variable or function and complains with either "not a window" (even when it is) or "syntax error".

    I'm inclined at this time to go ahead and create a dummy parent window, just to satify each dialog's parent statement, then use a window variable pointing to the dummy to allow the syntax I want.

    Anybody tried something similar? Any risks with doing it this way?

    Thanks,

    John


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

  2. #2
    Junior Member
    Join Date
    Jun 2001
    Location
    Tampa, FL, USA
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: parent statement as a variable?

    The parent statement is not absolutely necessary. An alternative is to use the ActiveApp statement in your tag. An example of this is:
    window MessageBoxClass MessageBox
    &nbsp&nbsptag "~ActiveApp/[DialogBox]$MessageBox"

    this is fairly effective, however, I have experienced some problems with this if your trying to use a multitag and the ActiveApp statement.
    Hope this helps.


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

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

    Re: parent statement as a variable?

    In automation we have to look at things that are not so obvious...

    If I understand the issue, you want to support multiple parents that have the same children without having to duplicate code.

    Quickest approach is the dummy method.
    Or as the other person suggested, you can declare the parent DIRECTLY in the tag, try using a function or variable in that string..."ParentName/"Child Tag" Look in the online for examples of that, search for activeapp keyword.

    The other way is to simply make the PARENT with a tag that is dynamic--the tag statement accepts variables and functions, so something like

    Hope this has helped.
    Tony

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

 

 

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:13 PM.

Copyright BetaSoft Inc.