SPONSORS:






User Tag List

Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Feb 2003
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    variable not defined error.

    Hi,
    There one thing I dont get in SILk. Its with the varibles. Can someone please help me understand,
    why do i get a varibale not defined error message in my script, for using a varibale whihc is very much defined in the header file.

  2. #2
    Senior Member
    Join Date
    Nov 1999
    Location
    Eagle, ID,USA
    Posts
    1,035
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: variable not defined error.

    If you define a variable within a function in your include file, it is local to that function only. If you define it outside of a function, then it is global and can be used anywhere.

    ------------------
    Have you ever noticed? Anybody going slower than you is an idiot, and anyone going faster than you is a maniac.

  3. #3
    Junior Member
    Join Date
    Feb 2003
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: variable not defined error.

    I dont have any functions defined in my header file. All i have is bunch of classes declared. More over, I also tried just copying the declaration of the particular object ( Winodw BrowserChild xxxx) directly into the script file. Still no good.

  4. #4
    Senior Member
    Join Date
    Nov 1999
    Location
    Eagle, ID,USA
    Posts
    1,035
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: variable not defined error.

    Why don't you post a simple example of your include file and how your trying to access a variable within a script. remember to use CODE and /CODE enclosed in [] for formatting purposes

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


    [This message has been edited by TonyM (edited 04-01-2003).]
    Have you ever noticed? Anybody going slower than you is an idiot, and anyone going faster than you is a maniac.

  5. #5
    Junior Member
    Join Date
    Feb 2003
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: variable not defined error.

    I have attached the excerpt of the header file.(header.doc). window BrowserChild CoBrowseService this is the declaration in the header file and this is how i am access it from with in a test case.
    "if(CoBrowseService******.Exists(30))"...
    This is what i had initially got while i was recording the test case.

  6. #6
    Senior Member
    Join Date
    Nov 1999
    Location
    Eagle, ID,USA
    Posts
    1,035
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: variable not defined error.

    You shouldn't have the if statement enclosed in quotes. I noticed that you are showing a tab or a few spaces between CoBrowseService and Exists(30). You should not have any space. In your script file, try adding the following:

    use "header.inc"

    ------------------
    Have you ever noticed? Anybody going slower than you is an idiot, and anyone going faster than you is a maniac.

 

 

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 09:15 AM.

Copyright BetaSoft Inc.