Page 1 of 1

Debugging break point before Pass dragdrop

Posted: Fri Mar 25, 2022 9:35 am
by Simon Knight
Hi,
This is probably not a bug as such : it may just be a feature but it is causing me a few problems.

The code snip is from a behavior button which is assigned to a number of buttons over five cards. These buttons wait for the user to drop one or more files that have been selected in Apple's Finder or other file management tool. A list of files is placed in the local variable tFiles along with the name of the button being used (tMyParent). The two variables are then passed as parameters to a handler on the main stack called RenameFiles. This all works however today I wanted to inspect the list of files in tFiles so placed a break point on the line "get the long name...." the code stopped o.k. but the IDE was unresponsive for example it is impossible to resize the window split between variables and code or examine a long variable by clicking on the "overflow" icon.

Code: Select all

on dragEnter
   set the dragAction to "copy"
   pass dragEnter
end dragEnter

on dragDrop
   set the cursor to busy
   put the dragdata["Files"] into tFiles
   get the long name of owner of me  -- name of the group
   put it into tMyParent -- the GroupName
   
   RenameFiles tFiles,tMyParent
   pass dragdrop
end dragDrop
I believe that the issue is caused by the break occurring while a drag drop process is running. Breaking on the line "end dragDrop" is no help as the IDE remains locked and only unlocks after the run/edit code is cycled which clears all the values assigned to the variables.

Is there a work around to prevent the IDE from locking up ?

S

Re: Debugging break point before Pass dragdrop

Posted: Fri Mar 25, 2022 4:14 pm
by andresdt
enable debugging on the IDE stacks. Maybe it's a silent mistake.
write in the message box

Code: Select all

put true into gREVDevelopment
Note:
Breakpoints don't work on the resizeStack. At least not on my PC :(

Re: Debugging break point before Pass dragdrop

Posted: Fri Mar 25, 2022 6:42 pm
by jacque
What he said. I'd try this:

Code: Select all

put the dragdata["Files"] into tFiles
put tFiles <--

Re: Debugging break point before Pass dragdrop

Posted: Fri Mar 25, 2022 7:01 pm
by Simon Knight
Thanks ; Unfortunately "put true into gREVDevelopment" made no difference but as Jacque recommends the "put" statement does work.


Thanks,
S.