- bbtkDebugMessageInc("Process",9,"ColourSelectorButton::Process()"<<std::endl);
- pickerWidget->UpdateBox();
- bbtkDebugDecTab("Process",9);
+ // The widget may not be created : have to test it before using it
+ wxColourPickerCtrlWidget* w = ( wxColourPickerCtrlWidget* )bbGetOutputWidget();
+ if (w)
+ {
+ w->UpdateBox();
+ }
+ else
+ {
+ // If widget does not exist yet you have to update the output value according
+ // to the input (which may have changed if the user set it)
+ bbSetOutputOut(bbGetInputIn());
+ }