SPONSORS:






User Tag List

Results 1 to 8 of 8
  1. #1
    Senior Member
    Join Date
    Dec 2001
    Location
    Bozeman, MT, USA
    Posts
    265
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    too many levels of inheritance

    I am inheriting BrowserChild into MyBrowserChild. BrowserChild inherits from AnyWin. I try to use an object from anywin but it doesnt think it exists.

    I had to make a custom class based off BrowserChild so I could overload SetActive()

    Here is my problem, CloseBox isnt recognized without me mapping it here. Is there a known issue with inheriting a from a class which inherits it from another class??

    ------------------
    Ryan McCullough
    Accelrys Inc.
    ryan@accelrys.com
    Ryan McCullough
    RightNow Tech. Inc.

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

    Re: too many levels of inheritance

    Why not just replace SetActive() and Close() in the base class??


    You may also want to check out "method not defined" in the online help index for related information.

    John



    [This message has been edited by John J. Miller (edited 11-12-2002).]

  3. #3
    Senior Member
    Join Date
    Dec 2001
    Location
    Bozeman, MT, USA
    Posts
    265
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: too many levels of inheritance

    we dont want a custom browser.inc file that has to be placed on every silk machine each time we burn(image off pqdi) them.

    My point is why doesnt it work. I have class A B and C. C has CloseBox defined. B inherits from C and A inherits from B. So theoretically A should contain all methods and properties from both B and C right?? So why do methods in C not work in A??

    ------------------
    Ryan McCullough
    Accelrys Inc.
    ryan@accelrys.com
    Ryan McCullough
    RightNow Tech. Inc.

  4. #4
    Senior Member
    Join Date
    Oct 2001
    Location
    NC, United States
    Posts
    148
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: too many levels of inheritance

    i am not too sure,let me know though
    Play around with the "scope resolution operator - ::" this should help reference parent methods -- Browser.CloseBox::Click() maybe! or derived::click()

    ------------------
    -gram

    [This message has been edited by gram (edited 11-14-2002).]
    -gram

  5. #5
    Junior Member
    Join Date
    Sep 2002
    Location
    Oxford, U.K.
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: too many levels of inheritance

    I'm not very sure what you're trying to say, but I think you're saying that without the "CustomWin CloseBox" declaration you can't use it, therefore you can't close the window using CloseBox.Click()?

    If this is correct, here's your problem: AnyWin doesn't have the window part CloseBox; MoveableWin does. Also worth noticing is that MoveableWin class has a Close() method. From what I've gathered from the ST reference, BrowserChild should be the *part* of your browser which displays HTML, and not the entire browser window. The entire browser window should be a "Browser."

    Correct me if I'm wrong.

    ------------------
    Acceptance testing: an unsuccessful attempt to find bugs.
    Real computer scientists don't program in assembler. They don't write in anything less portable than a number two pencil.

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

    Re: too many levels of inheritance

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by rmccullough:
    we dont want a custom browser.inc file that has to be placed on every silk machine each time we burn(image off pqdi) them.
    <HR></BLOCKQUOTE>

    You wouldn't. The supplied code block can be placed in any common file - it doesn't require modifying browser.inc. It's only usable once however with certain classes. But the problem appears to lie elsewhere...

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>
    So why do methods in C not work in A??
    <HR></BLOCKQUOTE>

    It works as you've specified (Using IE 5.5). Try this:



    John


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

  7. #7
    Senior Member
    Join Date
    Dec 2001
    Location
    Bozeman, MT, USA
    Posts
    265
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: too many levels of inheritance

    I think I figured out my problem and it was operator error. Browser inherits from MoveableWin, BrowserChild does not. I am inheriting my custom class from BrowserChild, not Browser so it does not and should not contain the CloseBox definition.

    My bad, sorry for wasting everyones time.

    Quick Q john, how come most of your code samples have a C style syntax to them with a

    Just curious. Does all that work in silk 5.5.3 hf1?

    ------------------
    Ryan McCullough
    Accelrys Inc.
    ryan@accelrys.com
    Ryan McCullough
    RightNow Tech. Inc.

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

    Re: too many levels of inheritance

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Quick Q john, how come most of your code samples have a C style syntax to them Just curious. Does all that work in silk 5.5.3 hf1?
    <HR></BLOCKQUOTE>

    I use standard 4Test almost exclusively. I s'pose I could translate it to Visual form for those that prefer it (but how to know that?). IIRC, you can just copy/paste into Silk and convert to visual mode in the Edit menu.

    I use Main() because these are standalone quick-n-dirty test files.

    The example works with 5.5.3 SP 3 and 6.0.

    BTW, thanks for posing some challenging questions.

    John


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


    [This message has been edited by John J. Miller (edited 11-18-2002).]

 

 

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:46 PM.

Copyright BetaSoft Inc.