I'm not sure if it is only me or if there is some problem, so I'm asking for help.
I'm trying to extend TGadget for own combined gadgets. But for some reason it does not work ...
I marked the line above that is the problem. Although IF_NODE is an extended TGadget (tried with TWin32Gadget as well), it fails.
Any ideas? Is it a bug, I better should post in the bug board? Or is it simply my stupidity? ;-)
I'm trying to extend TGadget for own combined gadgets. But for some reason it does not work ...
Strict Import brl.maxgui Type IF_NODE Extends TGadget 'tried with TWin32Gadget as well Field in:TGadget Field out_true:TGadget Field out_false:TGadget Function CreateNode:IF_NODE(main_panel:TGadget, x:Int, y:Int) Local pan:TGadget = CreatePanel(x,y, 150,200, main_panel, PANEL_ACTIVE) Local result:IF_NODE = IF_NODE(pan) '<-- Convert fails always! DebugStop SetPanelColor(result,0,200,0) result.in = CreatePanel(10,65, 20,20, result, PANEL_ACTIVE) result.out_true = CreatePanel(140,56, 20,20, result, PANEL_ACTIVE) result.out_false = CreatePanel(140,133, 20,20, result, PANEL_ACTIVE) Return result End Function End Type
I marked the line above that is the problem. Although IF_NODE is an extended TGadget (tried with TWin32Gadget as well), it fails.
Any ideas? Is it a bug, I better should post in the bug board? Or is it simply my stupidity? ;-)