SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Jan 2003
    Location
    Caribou, ME, USA
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Silk unable to see window that is a child of another class

    Perhaps someone can lend a hand here...

    I've left some code out here that isn't relevant (or at least I don't think it is) just to keep things simple. It's hard enough cramming all this into the tiny "Message" window! <g>

    When I call the Close() method of the child class (which is directly inherited from the parent class), I get a "Window not found" error. However, as you can see, the window exists in memory because I can get properties from it (and the values are what I expect).

    I've tried not instantiating the parent class, but that doesn't do it. I've tried playing with the tags and that doesn't do it. I've tried everything I can think of, but nothing seems to work. I'm obviously missing something. Any help out there?

    -Greg

    [This message has been edited by gmajor and he STILL can't figure out how to put CR/LF characters inside UBB CODE blocks!(edited 02-07-2003).]

    [This message has been edited by gmajor (edited 02-07-2003).]
    Greg
    ATX II, LLC
    You wrote [i]what</I] in 4Test?!?

  2. #2
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Silk unable to see window that is a child of another class

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by gmajor:
    Perhaps someone can lend a hand here...
    <HR></BLOCKQUOTE>


    These things sure are messy... :-)

    It appears that you've inadvertently left out an instance declaration in your example for SpecialHelp. Without it we can't trace the problem to its source.

    Dynamically created instances will react identically to a declaration-file defined one only if everything is lined up correctly.

    The problem and its cure will most likely reveal itself if you look very closely at the tags. Mangle just one tag in the parent.child chain and Silk won't find a match.


    John


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

  3. #3
    Member
    Join Date
    Jan 2003
    Location
    Caribou, ME, USA
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Silk unable to see window that is a child of another class

    John,

    I'm not entirely certain I understand what you mean. SpecialHelp is instantiated in CAboutDialog.inc (line 6) as a member of the CAboutDialog class, isn't it? Are you saying I have to instantiate it before I can declare it as a member of a class?

    I'm also not sure what you mean by "dynamically created instances" and "declaration file" instances. Every instantiation in my example is done inside an INC file. Do you mean the difference between an instantiation that occurs within a winclass (re: CAboutDialog.inc line 6) and an instantiation that occurs at the "top" level (re: CSupport.inc line 14)?

    We're creating a new class that inherits CHelpWindow because we have a need to override the Show() method. I've added some comments to my original code to help keep things clear (for me as much as anyone).

    -Greg

    ------------------
    Greg
    ATX II, LLC
    You wrote [i]what</I] in 4Test?!?

  4. #4
    Member
    Join Date
    Jan 2003
    Location
    Caribou, ME, USA
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Silk unable to see window that is a child of another class

    Oh, and you haven't SEEN messy yet! Wait 'til I REALLY get going! &lt;g&gt;

    Seriously though, these are a small part of a much larger 4Test/AUT framework modeled via UML and designed for long-term maintainability. One small piece like this doesn't look very graceful, but the whole thing comes together.

    Well...

    At least it does on paper. I'm still weeding my way through 4Test's OO implementation. You know... no private methods, no true constructors (although you can fake it), "private" fields that are visible outside of a class, no "static" keyword and so on and so forth.

    Don't get me wrong, though! Sure, I grumble about these things, but the simple truth is that there's no other automated testing tool that can even begin to do what we want to do.

    I'll choke down $2,000 agents, lousy electronic documentation and an IDE that blows up when you turn on Autocomplete just to be able to HAVE the kinds of problems like I'm running into now. 4Test is the only language that can do what we want as fast as we want to do it.

    I guess I'm just a sucker for punishment, eh? &lt;g&gt;

    -Greg

    ------------------
    Greg
    ATX II, LLC
    You wrote [i]what</I] in 4Test?!?

  5. #5
    Member
    Join Date
    Jan 2003
    Location
    Caribou, ME, USA
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Silk unable to see window that is a child of another class

    Well, it appears Segue has something to say on this matter. Apparently what I'm trying to do (if I understand what they're saying) can't be done. At least not in the way I'm trying to do it.

    Segue says that you cannot extend a class in the same library set in which it was originally declared. 4Test defines the following distinct sets of code libraries...

    1. Declarations loaded by startup files, such as winclass.inc
    2. Declarations associated with runtime compiler constants.
    3. Declarations in files pointed to by Options/Runtime/UseFiles.
    4. Declarations in the testscript being executed, including any include files it explicitly includes by a "use" statement.

    Obviously, all of my code falls under #4. In order to do what I want to do, I would have to define the base class somewhere in #1-#3. Of course, this isn't necessarily a "clean" solution, but it may be the best option. I think I understand why 4Test works this way, but that doesn't make it any less of a pain.

    -Greg
    Greg
    ATX II, LLC
    You wrote [i]what</I] in 4Test?!?

 

 

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 05:38 PM.

Copyright BetaSoft Inc.