Why is not work when i make a button through dorg and drop?


#1

macroScript Macro23
category:“DragAndDrop”
toolTip:""
(
rollout test “test” --width:220 height:830
(
Global ButtonArray=#()

			BUtton BT1 "1" width:70 height:90  across:10 --images:#(loadbmpFN 1 , undefined , 1,1,1,1,1 ) tooltip:Mtext01 
			BUtton BT2 "2" width:70 height:90  --images:#(loadbmpFN 2 , undefined , 1,1,1,1,1 ) tooltip:Mtext02
			BUtton BT3 "3" width:70 height:90  --images:#(loadbmpFN 3 , undefined , 1,1,1,1,1 ) tooltip:Mtext03
			BUtton BT4 "4" width:70 height:90  --images:#(loadbmpFN 4 , undefined , 1,1,1,1,1 ) tooltip:Mtext04
			BUtton BT5 "5" width:70 height:90  --images:#(loadbmpFN 5 , undefined , 1,1,1,1,1 ) tooltip:Mtext05
			
			
			BUtton BT6 "6" width:70 height:90
			BUtton BT7 "7" width:70 height:90
			BUtton BT8 "8" width:70 height:90
			BUtton BT9 "9" width:70 height:90
			BUtton BT10 "10" width:70 height:90
			
			
			BUtton BT11 "11" width:70 height:90  across:10
			BUtton BT12 "12" width:70 height:90
			BUtton BT13 "13" width:70 height:90
			BUtton BT14 "14" width:70 height:90
			BUtton BT15 "15" width:70 height:90
			
			BUtton BT16 "16" width:70 height:90
			BUtton BT17 "17" width:70 height:90
			BUtton BT18 "18" width:70 height:90
			BUtton BT19 "19" width:70 height:90
			BUtton BT20 "20" width:70 height:90
			
			BUtton BT21 "21" width:70 height:90  across:10
			BUtton BT22 "22" width:70 height:90
			BUtton BT23 "23" width:70 height:90
			BUtton BT24 "24" width:70 height:90
			BUtton BT25 "25" width:70 height:90
			
			BUtton BT26 "26" width:70 height:90
			BUtton BT27 "27" width:70 height:90
			BUtton BT28 "28" width:70 height:90
			BUtton BT29 "29" width:70 height:90
			BUtton BT30 "30" width:70 height:90
			

			BUtton BT31 "31" width:70 height:90  across:10
			BUtton BT32 "32" width:70 height:90
			BUtton BT33 "33" width:70 height:90
			BUtton BT34 "34" width:70 height:90
			BUtton BT35 "35" width:70 height:90
			
			BUtton BT36 "36" width:70 height:90
			BUtton BT37 "37" width:70 height:90
			BUtton BT38 "38" width:70 height:90
			BUtton BT39 "39" width:70 height:90
			BUtton BT40 "40" width:70 height:90
				

			BUtton BT41 "41" width:70 height:90  across:10
			BUtton BT42 "42" width:70 height:90 
			BUtton BT43 "43" width:70 height:90 
			BUtton BT44 "44" width:70 height:90 
			BUtton BT45 "45" width:70 height:90 
			
			BUtton BT46 "46" width:70 height:90 
			BUtton BT47 "47" width:70 height:90 
			BUtton BT48 "48" width:70 height:90 
			BUtton BT49 "49" width:70 height:90
			BUtton BT50 "50" width:70 height:90 

		
		
		on test open do
		(
			for n=1 to 50 do
			(
				appendIfUnique ButtonArray (execute ("test.BT"+(n as string)))
			)
		)
		
		
		
	)
	createdialog test width:740 pos:[2500,200]  --pos:[700,750]3

)


#2
global rol_
try(destroyDialog rol_)catch()
rollout rol_ ""
(
	local buttonArr = #()
	button btn_aa "Btn 01"
	button btn_aaaa "Btn 02"
	
	on rol_ open do
	(
		buttonArr = (for c in rol_.controls where classOf c == buttonControl collect c)
		format ": % \n" buttonArr
	)
)
createdialog rol_ 	

#3

thank you so much ^^