SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Sep 2000
    Posts
    31
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Redefining a method

    I am trying to redefine the click method for the HtmlImage class as follows:

    winclass HtmlImage : HtmlImage
    Click()
    // new code here

    and am getting the message :
    window class HtmlImage is already defined in htmlpage.inc.
    Does anyone know why?

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

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

    Re: Redefining a method

    For something that already has a definition you need to work on the original definition otherwise it's ambiguous(Which one is Silk suppose to use).

    You can derive a class from anywin then refine the method you want.

    You can also take the risk and edit silk's original .inc files.

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

  3. #3
    Member
    Join Date
    Sep 2000
    Posts
    31
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Redefining a method

    yet winclass TextField : Textfield
    works! why?

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

  4. #4
    Member
    Join Date
    Oct 2001
    Posts
    93
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Redefining a method

    Kelonski

    This is just the way Silk was created. I've never worked out exactly why it is but I think it is something to do with the way partner.exe was written to handle MFC window classes. The standard classes (TextField, etc) are built in and so allow the classes to be redefined. The HTML classes however are seen as user defined classes by SilkTest so cannot be redefined.

    What you can do is create a new class as follows
    winclass myHtmlImage : HtmlImage
    This will inherit from HtmlImage and when you record window declarations, all images will be recorded as myHtmlImage.

    Paul

    ------------------
    Paul Tucker
    Merit AT
    www.merit-at.com

  5. #5
    Member
    Join Date
    Sep 2000
    Posts
    31
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Redefining a method

    Paul,
    THANK YOU for that clarification. Now I don't have to go nuts thinking its something that I am doing wrong.

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

 

 

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 03:59 AM.

Copyright BetaSoft Inc.