SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Member
    Join Date
    Aug 2004
    Location
    India
    Posts
    95
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Multiple Windows

    Our application is HMI/SCADA based. In that, same windows will pop-up depend no of items selected. However the caption of the window will chage depend upon the items selected. In short the no of windows pop-up will vary during the runtime.

    In this scenario, how to SetActive of any particular window and invoke its properties, as there will be only one declaration? Give your suggestion.

    Hope the above description takes you to the right problem I am adressiing.

    Thanks & Regards,

    Kishore V.

  2. #2
    Super Member
    Join Date
    Jul 2001
    Location
    Earth
    Posts
    1,882
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Multiple Windows

    you may want to write a function that will figure out which window popped up that you can call to determine which window should be set active.

  3. #3
    Member
    Join Date
    Aug 2004
    Location
    India
    Posts
    95
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Multiple Windows

    Thanks for the response. But what about the declaration of the all the windows and how can I refer the different windows to call them in the function.

    This is because more than one window can pop-up simultaneously and not one by one with sufficient time delay.

    Regards,

    Kishore v.

  4. #4
    Junior Member
    Join Date
    Nov 2004
    Location
    pune
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Multiple Windows

    Hi !

    U can use one file for all the window declerations eg:- Decleration.inc
    where all the window decleration will be clubed togather so tht while identifying an object will be easy & will be reusable throughout the project.

    We follow the same mtd.

    We hv a decleration.inc where all the window decleration for all the windows is clubed so it becomes easy to identify & it becomes reusable i.e Global decleration.

    Thnx !

    I hope it ll solve ur problem.
    nanu

  5. #5
    Member
    Join Date
    Aug 2004
    Location
    India
    Posts
    95
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Multiple Windows

    Mr. Monil,

    This is the basic practises followed by most of the companies. The question is explicitily referrring to one particular windows, whose instance may vary at the runtime. However there will be one declaration for one typical windows. How the other instances of windows are accessed.

    Hope you got the question.

    Thanks,

    Kishore V.

  6. #6
    Senior Member
    Join Date
    Feb 2004
    Location
    Mumbai,India
    Posts
    201
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Multiple Windows

    Can you get the number of items selected? If yes, then you can predict the tag of the window. Or else, does its Caption have a common part and then the rest is according to the selection?
    Then you could use wildcard characters.
    However, if more than one windows popup, on what will this depend? As in fopr a particular no of selections, can more than one window load?
    Regards,
    Siddharth.

  7. #7
    Senior Member
    Join Date
    Aug 2003
    Location
    NY
    Posts
    708
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Multiple Windows

    Hi Kishore,

    If the caption of the window depends on the item selected, you can refer to the window as

    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">ParentWindowIfAny.DialogBox(&quot;*{it emname}*&quot.SetActive()</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">I am assuming the class of your window to be a Dialogbox.

    HTH

    Thanks and Regards,
    Harshil

  8. #8
    Member
    Join Date
    Aug 2004
    Location
    India
    Posts
    95
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Multiple Windows

    Hello Harshil,

    After a long time I have tried your suggestion. But this didn't work. My window (dialog boxes/Child Win) caption may be

    Sine
    Cosine
    Square
    Ramp
    etc..

    At a time there are chances that more than one window of same type will pop-up,but only the difference will be their Captions,color of the background, Font color,size etc.These will be set in the Testcase and Pass/Fail of the Testcases will be decided by getting these properties and checking against the Set values.So my query would be

    1. How to call each window programatically in the Testcase to get the properties of the dialog box with single declaration.

    2. How to find the no. of windows in the display?

    Hope you got my query.

    Regards,

    Kishore V.

  9. #9
    Super Member
    Join Date
    Jul 2003
    Location
    Boulder, CO
    Posts
    1,276
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Multiple Windows

    I would suggest something like this:

    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">window DialogBox MultiDialog
    multitag &quot;Sine&quot;
    &quot;Cosine&quot;
    &quot;Square&quot;
    &quot;Ramp&quot;
    parent SomeParent
    ...
    STRING thisTag = &quot;&quot;
    if MultiDialog.Exists(15)
    thisTag = MultiDialog.GetTag()
    switch thisTag
    case &quot;Sine&quot;
    (do other verification, etc)
    case &quot;Cosine&quot;
    (do other verification, etc)
    case &quot;Square&quot;
    (do other verification, etc)
    case &quot;Ramp&quot;
    (do other verification, etc)</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">This will allow you to refer to all the dialogs with one declaration to set active, then break out what you want to do with each. This may not work if there are more than one MultiDialog's at a time. In that case I would suggest using DeskTop.GetActive().GetTag() to get the dialog on top and process them one at a time.
    Chris R Mead

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

  10. #10
    Senior Member
    Join Date
    Aug 2003
    Location
    NY
    Posts
    708
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Multiple Windows

    Originally posted by kishorevenki:
    My window (dialog boxes/Child Win) caption may be

    Sine
    Cosine
    Square
    Ramp
    etc..

    At a time there are chances that more than one window of same type will pop-up,but only the difference will be their Captions,color of the background, Font color,size etc.These will be set in the Testcase and Pass/Fail of the Testcases will be decided by getting these properties and checking against the Set values.So my query would be

    1. How to call each window programatically in the Testcase to get the properties of the dialog box with single declaration.
    <font size="2" face="Verdana, Arial, Helvetica"></font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">String itemname
    for each itemname in lsItems
    ParentWindowIfAny.DialogBox(&quot;*{itemname}*&quo t.SetActive()
    // Compare the properties with the static list that you have prepared and log errors as and when applicable. using ParentWindowIfAny.DialogBox(&quot;*{itemname}*&quo t.GetCaption() and other properties.</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">This should work.
    Originally posted by kishorevenki:

    2. How to find the no. of windows in the display?

    Hope you got my query.

    <font size="2" face="Verdana, Arial, Helvetica">In the loop that I posted above, you can increment a counter which would finally contain the number of windows that exist or have popped up.

    I am not sure whether I have understood your query correctly or not. However, if you could post your declarations, it might help more to understand.

    Besides, it would also be helpful if you could post the code what you tried to do with the suggestions that do not work.

    Thanks and Regards,
    Harshil

 

 
Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 8.82%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin 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:20 PM.

Copyright BetaSoft Inc.