ModalDialog weirdness



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

    On 28/02/2008 at 16:39, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   R9-R10 
    Platform:   Windows  ; Mac  ;  Mac OSX  ; 
    Language(s) :     C++  ;

    ---------
    If I do it this way, it works:

    > // Add Runtimes until user is done \> //\*---------------------------------------------------------------------------\* \> Bool IPPDialog::AddMoreRuntimes() \> //\*---------------------------------------------------------------------------\* \> { \>      Filename               libFr =     Filename(GeLoadString(IPPRTF_LIBRARIES_FR)); \>      Filename               libEn =     Filename("libraries"); \>      for (;;) \>      { \>           if (!runtimePath.FileSelect(0L, GE_DIRECTORY, &GeLoadString;(IPPS_SELECTRUNTIME))) return FALSE; \>           if (!GeFExist(runtimePath, TRUE)) \>           { \>                if (!QuestionDialog(GeLoadString(IPPS_NOTPOSER)+"\n"+GeLoadString(IPPS_NOTPOSERCONTINUE))) return FALSE; \>                continue; \>           } \>           // v1.7.7 \>           // Verify that Folder has "libraries" folder within - language-sensitive - English, French \>           if          (GeFExist(runtimePath+libEn, TRUE)) \>           { \>                // Verify more deeply as real Runtime - check for library folders \>                if (FindIsLibrary(runtimePath+libEn) && AppendRuntime())     logging.LogPrint(" Added Runtime: \""+runtimePath.GetString()+"\"\n"); \>           } \>           else if (GeFExist(runtimePath+libFr, TRUE)) \>           { \>                // Verify more deeply as real Runtime - check for library folders \>                if (FindIsLibrary(runtimePath+libFr) && AppendRuntime())     logging.LogPrint(" Added Runtime: \""+runtimePath.GetString()+"\"\n"); \>           } \>           // Search Folder contents \>           else     FindAddRuntimes(runtimePath); \>           [RED]MoreRuntimesDialog     mrdlg; \>           mrdlg.InitDlg(this);[/FONT] \>           mrdlg.Open(-1L,-1L, 320L, 128L); \>           if (!mrdlg.GetResult())     return TRUE; \>      } \>      return FALSE; \> }

    But if I do it this way (as is done currently), the third time the dialog is called it has no gadgets (on MacOS, it has nothing and requires a Force Quit of Cinema 4D!) :

    > // Add Runtimes until user is done \> //\*---------------------------------------------------------------------------\* \> Bool IPPDialog::AddMoreRuntimes() \> //\*---------------------------------------------------------------------------\* \> { \>      Filename               libFr =     Filename(GeLoadString(IPPRTF_LIBRARIES_FR)); \>      Filename               libEn =     Filename("libraries"); \>      [RED]MoreRuntimesDialog     mrdlg; \>      mrdlg.InitDlg(this);[/FONT] \>      for (;;) \>      { \>           if (!runtimePath.FileSelect(0L, GE_DIRECTORY, &GeLoadString;(IPPS_SELECTRUNTIME))) return FALSE; \>           if (!GeFExist(runtimePath, TRUE)) \>           { \>                if (!QuestionDialog(GeLoadString(IPPS_NOTPOSER)+"\n"+GeLoadString(IPPS_NOTPOSERCONTINUE))) return FALSE; \>                continue; \>           } \>           // v1.7.7 \>           // Verify that Folder has "libraries" folder within - language-sensitive - English, French \>           if          (GeFExist(runtimePath+libEn, TRUE)) \>           { \>                // Verify more deeply as real Runtime - check for library folders \>                if (FindIsLibrary(runtimePath+libEn) && AppendRuntime())     logging.LogPrint(" Added Runtime: \""+runtimePath.GetString()+"\"\n"); \>           } \>           else if (GeFExist(runtimePath+libFr, TRUE)) \>           { \>                // Verify more deeply as real Runtime - check for library folders \>                if (FindIsLibrary(runtimePath+libFr) && AppendRuntime())     logging.LogPrint(" Added Runtime: \""+runtimePath.GetString()+"\"\n"); \>           } \>           // Search Folder contents \>           else     FindAddRuntimes(runtimePath); \>           mrdlg.Open(-1L,-1L, 320L, 128L); \>           if (!mrdlg.GetResult())     return TRUE; \>      } \>      return FALSE; \> }

    Why?


Log in to reply