SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Oct 1999
    Location
    Pleasanton, CA, USA
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    window instance\'s method not called

    Hi all,

    Given the following: Pick File>Exit on a dirty Notepad; Notepad opens a 'Do you want to save the changes?' messagebox. I want to click 'no', closing the messagebox and exiting Notepad.

    I added a close method to the out-of-the-box MessageBox definition:

    window MessageBoxClass MessageBox

    The following code works just fine:

    MessageBox.SetActive()
    MessageBox.Close()


    If, however, I reference the messagebox by a variable, then Silk does recogize the dialog as an instance of MessageBox, but does not call the window instance method, MessageBox.Close(). Rather, the class method,MoveableWin.Close(), as found in winclass.inc, is called. This fails.

    To generate that variable reference, I do:

    I expect to layer in a SetTrap() later, but hoped to get something like the above working first.

    Thanks in advance,
    Ryan

  2. #2
    AJ
    AJ is offline
    Moderator AJ's Avatar
    Join Date
    Jun 1999
    Location
    San Jose, CA
    Posts
    1,691
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: window instance\'s method not called

    I guess I'm not getting you right, I tried your code and it works for me?

    What exactly are you trying to perform?

    I'm guessing you want to close MessageBoxes as they appear? and would like to set traps for them?

    I do not understand what you mean by passing the MessageBox class as variable? It should be OK as well.

    Thanks...

    ------------------
    AJ Alhait
    BetaSoft Inc.
    AJ Alhait
    BetaSoft Inc.

  3. #3
    Junior Member
    Join Date
    Oct 1999
    Location
    Pleasanton, CA, USA
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: window instance\'s method not called

    Hi AJ,

    Assuming I add Close() to the window
    instance
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>
    window MessageBoxClass MessageBox
    <HR></BLOCKQUOTE>
    If I have a 'dirty' notepad with an open child messagebox, my previous code
    winds up calling MoveableWin.Close(), not MessageBox.Close().

    Debugger displays Notepad's 'Do you want to save the changes?' messagebox as
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>
    Notepad.DialogBox("Notepad|$MessageBox")
    <HR></BLOCKQUOTE>

    Thank you for your time and help!
    Ryan

  4. #4
    Junior Member
    Join Date
    Aug 1999
    Location
    mt view, Ca
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: window instance\'s method not called

    RyanM,
    I think you may be getting too generic in your call to the close() method. As defined in 4Test, MessageBoxClass is derived from DialogBox, a member of MoveableWin. I think you need to be more explicit in calling the close for your dirty notepad window. With the above inheritance the MoveableWin close()should work, and for AJ it does. Do you just "want" to close from MessageBox to be called or is the window actually not closing?
    -Len
    Len Jagelski
    Automation Engineer
    Lotus, cc:Mail

 

 

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

Copyright BetaSoft Inc.