SPONSORS:






User Tag List

Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Jun 2000
    Location
    CA
    Posts
    56
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Pass parameters on AppState

    I am attempting to create an AppState but I need to pass parameters and didn't realize this is not doable.

    The thing is I want my appstate to be when the application is already launched. But the thing is, the application can be launched by 2 possible scenarios one where the login dialog appears (this requires login credentials - my parameters) and the 2nd where the application is launched automatically.

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

  2. #2
    Senior Member
    Join Date
    Jul 2001
    Location
    Elizabeth, CO, USA
    Posts
    653
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pass parameters on AppState

    Unfortunately, you're right: you can't pass arguments to application states. At least not in the traditional sense that we have about passing arguments.

    However, the application state can capture the same arguments that are passed to the testcase. And there's no rule that the testcase has to actually do anything with those arguments. That is, they can be there just for the application state.

    Look up GetTestcaseArgs, a function that'll return the arguments that were passed to the testcase. You can call this from inside your application state.

    Another option is to make some global variable a flag that the application state uses.

    Good luck.

    - Dave


    ------------------
    Amelior Technology
    dreed@ameliortech.com
    WaltzingRhino.com
    A concerned Borland customer, a fly in the ointment, a wrench in the works.

  3. #3
    Member
    Join Date
    Nov 2000
    Location
    Dublin, Ireland
    Posts
    47
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pass parameters on AppState

    I think that your main window must be visible by the end of the DefaultBaseState which is called before your own application states. Which brings you to a chicken/egg situation if you want to use your appstate to allow you to login as different users.

    I got around this problem by making the invoke method of my main window read login credentials from a text file.

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

 

 

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

Copyright BetaSoft Inc.