Debugging break point before Pass dragdrop

If you find an issue in LiveCode but are having difficulty pinning down a reliable recipe or want to sanity-check your findings with others, this is the place.

Please have one thread per issue, and try to summarize the issue concisely in the thread title so others can find related issues here.

Moderator: Klaus

Post Reply
Simon Knight
Posts: 919
Joined: Wed Nov 04, 2009 11:41 am

Debugging break point before Pass dragdrop

Post by Simon Knight » Fri Mar 25, 2022 9:35 am

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
best wishes
Skids

andresdt
Posts: 156
Joined: Fri Aug 16, 2019 7:51 pm
Contact:

Re: Debugging break point before Pass dragdrop

Post by andresdt » Fri Mar 25, 2022 4:14 pm

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 :(
Be kind, we all have our own wars.
https://torocruzand.com/

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7390
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Debugging break point before Pass dragdrop

Post by jacque » Fri Mar 25, 2022 6:42 pm

What he said. I'd try this:

Code: Select all

put the dragdata["Files"] into tFiles
put tFiles <--
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Simon Knight
Posts: 919
Joined: Wed Nov 04, 2009 11:41 am

Re: Debugging break point before Pass dragdrop

Post by Simon Knight » Fri Mar 25, 2022 7:01 pm

Thanks ; Unfortunately "put true into gREVDevelopment" made no difference but as Jacque recommends the "put" statement does work.


Thanks,
S.
best wishes
Skids

Post Reply