Duncan Gibson wrote:
>> I found the solution for my problem, but don't really understand why
>> it works. From the following callback function for tree browser I
>> deleted the case FLU_WIDGET_CALLBACK and it works fine. But I don't
>> see much difference in what is happening.
>>
>> void treeCallBack(Fl_Widget* o, void* v)
>> {
>> .....***...
>>
>> /*case FLU_WIDGET_CALLBACK:
>> printf( "%s widget callback\n", n->label() );
>> break;*/
>> }
>> }
>
> Are you by any chance creating the label at run-time using a char array
> that is local to a function or method,
... or do you have widgets without a label at all in your tree browser?
You should check:
if (n && n->label)
printf( "%s widget callback\n", n->label() );
else
printf( "%p widget callback\n", n);
The else case would print the address of node n, maybe 0.
Albrecht
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk