SPONSORS:






User Tag List

Results 1 to 9 of 9
  1. #1
    Junior Member
    Join Date
    Oct 2000
    Location
    ca,sunny wale,USA
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Anytype to window conversion

    Hi,
    Is there anyway that I can convert an anytype variable to a window???
    Eg:
    I am getting a string value from a database and putting it in a record into an Anytype field,in a method that expects this record, I wish to convert this Anytype field to a window so that I can check whether it has a focus or not???

    sample code:
    w4 is a window
    temp is boolean
    e1 is the record and sResult is the Anytype Field.
    [ ] w4 = @(e1.sResult)
    [ ] temp = w4.isActive()

    doesn't get the w4 variable set at all....

    Any Ideas????

    ------------------
    Purnima
    Purnima

  2. #2
    Guest

    Re: Anytype to window conversion

    Try

    w4=@(e1).@(sResult)

  3. #3
    Junior Member
    Join Date
    Oct 2000
    Location
    ca,sunny wale,USA
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Anytype to window conversion

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by John Burross:
    Try

    w4=@(e1).@(sResult)
    <HR></BLOCKQUOTE>


    Doesn't work john...
    Gives errors..

    Purnima

  4. #4
    Junior Member
    Join Date
    Oct 2000
    Location
    ca,sunny wale,USA
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Anytype to window conversion

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by John Burross:
    Try

    w4=@(e1).@(sResult)
    <HR></BLOCKQUOTE>


    Doesn't work john...
    Gives errors..

    Purnima

  5. #5
    Guest

    Re: Anytype to window conversion

    Here is the situation. If you are converting a STRING value to a WINDOW value, you must convert each piece. Therefore if you have a variable s = "Window.SubWindow.SubSubWindow" and you want to convert it to a WINDOW variable w, then you must convert each of the three pieces individually. Here is a bit of code that will do that for you.


  6. #6
    Junior Member
    Join Date
    Jul 1999
    Location
    Campbell, CA
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Anytype to window conversion

    The reason w4 doesn't get set to anything is because e1.sResult is because you need to include the window that the field in found in.

    try
    w4 = YourWindow.@(e1.sResult)


  7. #7
    Junior Member
    Join Date
    Oct 2000
    Location
    ca,sunny wale,USA
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Anytype to window conversion

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by John Burross:
    Here is the situation. If you are converting a STRING value to a WINDOW value, you must convert each piece. Therefore if you have a variable s = "Window.SubWindow.SubSubWindow" and you want to convert it to a WINDOW variable w, then you must convert each of the three pieces individually. Here is a bit of code that will do that for you.

    <HR></BLOCKQUOTE>

    Thanks John....that works...




    ------------------
    Purnima
    Purnima

  8. #8
    Member
    Join Date
    Dec 1999
    Location
    Seattle, WA
    Posts
    64
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Anytype to window conversion

    another save by the reference operator!

    ------------------
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>It doesn't matter if I go to heaven or to hell, I have friends in both places.<HR></BLOCKQUOTE>
    <BLOCKQUOTE]<font size=1 face=Verdana, Arial, Helvetica]quote:</font]<HR]It doesn't matter if I go to heaven or to hell, I have friends in both places.<HR]</BLOCKQUOTE]

  9. #9
    New Member
    Join Date
    Aug 2001
    Location
    San Diego, CA
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Anytype to window conversion

    Awesome!

    This thread is over 2 years old but helped me solve a problem I had with needing to convert a string to window no matter how many levels. Great, simple code!

    Many thanks to you John Burross!!

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

 

 

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:17 AM.

Copyright BetaSoft Inc.