COF dialog woes...



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

    On 16/06/2003 at 13:10, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   8.100 
    Platform:      
    Language(s) :   C.O.F.F.E.E  ;

    ---------
    Mmmh, it starts to get a little frustrating here...
    The dialog opens up correctly, but no value is set.

    What's wrong here? Any ideas?

      
         //create dialog  
         if (!gDial) gDial=new(mDialog);  
           
         //initialize  
         gDial->SetFloat(IDC_LIMIT_R,3.0,0.0,10000.0,1.0);  
         gDial->SetFloat(IDC_LIMIT_G, settings->GetFloat(1),0.0,10000.0,1.0);  
         gDial->SetFloat(IDC_LIMIT_B, settings->GetFloat(2),0.0,10000.0,1.0);  
         t1=settings->GetFloat(3);  
         t2=settings->GetFloat(4);  
         t3=settings->GetFloat(5);  
         temp=vector(t1,t2,t3);  
         gDial->SetColorChooser(IDC_COLOR1, temp, 1.0, 1.0, NO_BRIGHTNESS);  
      
         //... and open  
         gDial->Open(TRUE,-1,-1);  
    

    While I'm at it: How can I access the settings container from the dialog? I would like to update the settings when the values were changed in the dialog of course.

    Thanks

    Kabe



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

    On 16/06/2003 at 15:33, xxxxxxxx wrote:

    ? You should initialize the values in the overloaded dialog methods like Init.



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

    On 17/06/2003 at 04:42, xxxxxxxx wrote:

    Yep, I realized that in the meantime.

    To sum it up for later reference:
    Add the neccessary variables to the dialog class.

    Use these variables in mDialog::Init() to set the dialog controls, as Init() is called right before the dialog is actually opened.

    Considering this I think that the dialog methods for setting interface elements shouldn't be public anyway....

    Thanks!

    Kabe



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

    On 17/06/2003 at 04:45, xxxxxxxx wrote:

    ... and do not access settings from the dialog box either. Set the local variables of mDialog instead.

    Kabe


Log in to reply