GeModalDialog::AskClose gets called twice



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 17/06/2007 at 04:04, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   10.102 
    Platform:   Windows  ;   
    Language(s) :     C++  ;

    ---------
    Hi there!
    Does anybody know why AskClose is called twice for a GeModalDialog?

    I've searched the forums for AskClose but the only thing that came up where two threads concerning the same thing, but more than a year old and I didn't want to resurrect those, especially as they were concerning C4D 9.5.
    In those two threads the poster also mentioned that AskClose was called when the user pressed Cancel instead of OK, but that doesn't happen for me. The only thing is that AskClose seems to be called twice when the user presses OK.
    I've worked around this using two Bool variables (m_AskCloseHandled and m_AskCloseResult) which I set to false when the dialog is opened and set according to the outcome of the first AskClose call (m_AskCloseHandled always is true after the first call, m_AskCloseResult will contain the result), but that's just a workaround and I'd really like to know why AskClose is called twice and if there's a way to use it properly without a workaround.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 18/06/2007 at 10:05, xxxxxxxx wrote:

    I've noticed this too (in COFFEE as well). Wen confronted by code where it might hurt to run the close routine twice, I've done as you with a boolean.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 18/06/2007 at 15:26, xxxxxxxx wrote:

    Yes, that's a simple workaround for the problem.
    But I would be interested to know why this problem occurs in the first place and if there is a way to prevent it.
    Still, it is interesting that this also happens in Coffee.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 19/06/2007 at 00:20, xxxxxxxx wrote:

    I have asked the developers why it gets called twice. I let you know when I get the answer.

    cheers,
    Matthias



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 19/06/2007 at 01:08, xxxxxxxx wrote:

    thx


Log in to reply