Home › Forums › General › Programming › Drag&Drop › Reply To: Drag&Drop
May 3, 2015 at 9:05 pm
#45606
Hi
I try to do dragAndDrop with componentchild targets and IsInterested , Events independent of parent
and if see if that works
I’ve created valid components with some prop in beforeLoadingCallback and I get issue with addAndMakeVisible :
--
-- Called when the panel has finished loading
--
Loaded = function()
Mytext = ""
for u = 1,6
do
Mytext = Mytext.."ID".. CFlt?u?:getComponentID().."\n"
-- panel:getComponent("Filter"):addAndMakeVisible (CFlt?u?,-1) -- Ambiguous
-- GFlt?u?:drawText("coucou",0,10,64,20,CENTRE,false)
-- CFlt?u?:paint(GFlt?u?)
end
panel:getLabelComponent("TEXT"):setText(Mytext) -- working
end
*table separator are represented with “?”
I haven’t set componentName not sure it is needed
Not sure if must type a stringComponentName or identifier (here a table name) in
addAndMakeVisible but this fails
“And for it to serve any useful purpose, you’ll need to write a subclass of Component or use one of the other types of component from the library. ”
What does it means ?