SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Nov 2001
    Location
    Hyderabad, AP, India
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Typecasting to Window datatype

    Can anyone tell me how to typecast a string datatype to a Window datatype? I keep getting Incompatible datatypes when I try typecasting using the regular typecasting method, i.e.,
    window wObject = [WINDOW]sData
    (I know this isn't allowed, still I gave it a try)

    I'm extracting the sData variable from an Excel sheet which has been set to Text format. The column from which this value is being extracted is a general column and can't be formatted to any specific type.

    So can anyone suggest a reasonable solution?

    ------------------
    vinu
    Pravin
    Pravin Menon
    Menon
    vinu
    Pravin
    Pravin Menon
    Menon

  2. #2
    Wil
    Wil is offline
    Junior Member
    Join Date
    Feb 2001
    Location
    Burlington, Ontario, Canada
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Typecasting to Window datatype

    Try using the @ Operator,
    WINDOW wObject = @sData

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

  3. #3
    Junior Member
    Join Date
    Nov 2001
    Location
    Hyderabad, AP, India
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Typecasting to Window datatype

    Hi Wil,
    Thanks for the suggestion. However, even that didn't help. Whenever I tried using
    WINDOW wObject = @sData, where sData = "SystemErrors",
    I got the following error:
    'Variable SystemErrors is not defined'.

    Does this mean that I need to first declare the window? (Here, I'm trying to verify an error dialog that gets dynamically generated, and so am not declaring it!) What do you suggest?

    Regards,
    Pravin Menon
    vinu
    Pravin
    Pravin Menon
    Menon

  4. #4
    Senior Member
    Join Date
    Aug 1999
    Location
    Cambridge, UK
    Posts
    470
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Typecasting to Window datatype

    If you don't have the window already declared, then you'll have to look into the dark arts of dynamic instantiation of objects in silktest. Read up on this in the a couple of articles on the segue website: http://customers.segue.com/protected...emsley_toc.htm and http://customers.segue.com/protected...sefler_toc.htm - with the techniques described here, you could probably manage something suitable. Though you might also decide that it's overkill for just one dynamically generated error dialog.

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

 

 

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 12:25 PM.

Copyright BetaSoft Inc.