SPONSORS:






User Tag List

Results 1 to 6 of 6
  1. #1
    Senior Member
    Join Date
    Oct 1999
    Location
    Tyngsborough, MA
    Posts
    211
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    class properties, user defined class

    I've defined a class...
    How do I use these properties when I declare a window of this class? It appears that I have to declare the properties all over again inside the object declaration, i.e.
    Is there a concept of instantiation that I'm missing somewhere. It seems that methods are inherited by the object but not the properties. Am I wrong?

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


    [This message has been edited by BrianCarroll (edited 07-10-2001).]

  2. #2
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: class properties, user defined class

    winclass DataCenter myClass

    myClass.sUserName="id"
    myClass.sPassword="pass"

    I am not too fond about properties.
    I thought you could just use normal public variable to reach the same result(passing, receiving data)

    You use property usually if you want to use verify-property stuff.

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

  3. #3
    Member
    Join Date
    Jun 2001
    Location
    Berkeley, CA, USA
    Posts
    67
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: class properties, user defined class

    There is a mistake in the way you set up your properties.

    Properties do not store values internally. The Get statements and Set stements you set up will overflow the stack.

    You need to define variables to hold the values associated with each property. Based on what you are doing, it might be better to just refer to the variables themselves.

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

  4. #4
    Senior Member
    Join Date
    Oct 1999
    Location
    Tyngsborough, MA
    Posts
    211
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: class properties, user defined class

    Bruce, you are correct. Guess I was getting too fancy there. I changed it to just have some string variables rather than properties.

    thanks for both replies.

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

  5. #5
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: class properties, user defined class

    good eye Bruce :

    It's a recursive call to the property. It will run out of memory fast. This remainds me about the size of the string in Silk which is damn small, be careful when storing stuff.

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


    [This message has been edited by GodKnows (edited 07-11-2001).]

  6. #6
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: class properties, user defined class

    Yep! There are numerous places in Silk where you are limited to 256 characters in a string. That is a glaring oversight, and I can't imagine any testers in this forum letting a flaw like that get out the door!! ;-)

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

 

 

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

Copyright BetaSoft Inc.