Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    GeModalDialog::AskClose gets called twice

    SDK Help
    0
    5
    389
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            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

            1 Reply Last reply Reply Quote 0
            • H
              Helper
              last edited by

              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

              1 Reply Last reply Reply Quote 0
              • First post
                Last post