FMPv22 has code folding. This is fantastic news for everyone who uses more than one IF / ELSE in their code.
Other code editors have been doing code-folding forever. One of the biggest advantages is that you can collapse the code to the logical structure ( shown in the 2nd image). Then you simply drag the entire collapsed block into a new position. It's a huge benefit.
Spoiler: code that has been folded does not drag-n-drop correctly in FMv22.
The 1st image shows some code and the 2nd image shows the code folded into a compact state. If I drag the folded code on line 7, Else If [ 2 ] and drop it between line 10 and 13 then I expect it to move the entire code block and to look like the 3rd image.
What actually happens is shown in the 4th image.
That one drag-n-drop has ruined the flow for all three of the Else If statements. It's hard to image a worse outcome.
This bug has been reported, so we hope it is fixed quickly. Until then do not drag-n-drop collapsed code.
Dropping between line 10 and line 13 is a shot in the dark: the code block may end anywhere and it's not in the control of the developer who drops the block, but in the hands of the Claris' developer who implements the drop. IMO, the analysis for this feature has not been done thoroughly and it should have been brought back up for completion. Just imagine if there were 20 lines in the Else If [ 3 ] block. The complete code block for Else If [ 3 ] block should expand to let the developer see the lines and pick the proper place for the drop.
One thing I don't get is how come no one found out that bug before v 22 went to ETS, or during ETS.
I've been with FileMaker for (grabs calendar, starts flipping pages) a few years and spent a few dollars with them, and never been invited to beta test.
In spite of that I find and submit a fair share of bug reports.
I think Claris doesn't quite have their developer relations nailed down?
@planteg, Look at the second image. The code on line 11 and 12 are folded under the Else If on line 10. Dropping the dragged line between line 10 and 13 should place it after all the code hidden by folding and immediately before the Else on line 13.
I'm on the ETS. However, we sign confidentiality agreements with Claris so I cannot say whether or not this bug was found. I do hope it will be fixed. You can do your bit by filing bug reports on the Community web site. More complaints = faster fixes.
@xochi , Cutting / copying a folded block of code shows the same bug/behaviour. It only copies the visible line.
You can request to be part of ETS. I've filed bugs on ETS builds and seen them fixed in the released version.
Interesting. That will be suitable workaround while the drag-n-drop issue is being resolved.
I originally tested at home. I'm not sure which OSX that laptop is running ( I thought it was Ventura?). I'll have to confirm that. Here at work I'm on OSX Sequoia and I'm expecting to get v22 installed today or early next week.
Update: I've just tested on v22 Sequoia and confirm that cut and copy will only put the visible line of a collapsed block into the clipboard. The hidden lines are not put onto the clipboard.
Further Update: I'm using FileMaker V22.0.1.68 on Ventura OSX13.7.5 x86_64 (intel) and the cut / copy commands only cut/copy the visible line of folded code block.
that is not even half-baked. Well as stated by Dick Kallman on the FMTraining.tv Claris fixes bugs if the demand for the fix is high (at least that is what I understood)! So now we need to beg for a fix loud and clearly!