What's the correct code to move to a different container? - quotes, brackets, no brackets

A stupid question,

This Stamp to move a note to a new container kept crashing Tinderbox.
$Container= “/People/”;

Whilst a stamp like this, worked
$Container= ("/People/")

I know its explained in lots of places, (brackets, quotes, etc) , but is this the ‘correct’ way of doing it? and do you know why the first version would repeatedly cause a crash?

Many thanks for your help
Thomas

Your code is correct. Can you check if you’re using straight quotes vs. smart quotes? Works fine on my side.

Many thanks. I can confirm that it is straight quotes.
The problem keeps happening though, - Tinderbox frequently hangs when I use this stamp (whatever the configuration, it seems) and I need to force quit. So perhaps I should contact Tinderbox support.
Best
Thomas

Hey Thomas, Tinderbox support is @eastgate. Let’s let him focus on SW dev. I’ll DM you with a calendar link. Schedule a meeting with me and I’ll try to fix it for you.

I see @satikusala’s kind offer to you above, but I can confirm your original code works here:

Notice how applying the stamp to note ‘bob’ has moved it into the ‘People’ container.

So, some other factor must be in play, noting that we don’t know what other code is in your file. Here’s my test doc, in case it helps: People-mover.tbx (76.8 KB)

Many thanks,
Yes, your code works exactly as it should.
My own file not that different, but the container from which I am moving notes is sorted by ‘modified’ date’
It works fine when I change your test file, (and sometimes in my own file too) though. I will keep exploring.
All the best
Thomas

1 Like

OK, altered my doc so the ‘spare’ people are in a container (‘Crowd’) sorted on $Modified:

‘ted’ got moved from ‘Crowd’ to ‘People’ just fine. Here’s the modified test file (note you can move the notes in People back out again or make more test notes: People-mover1.tbx (81.0 KB)

If you sometimes get a crash doing a particular task, it can indicate a timing issue ‘behind the curtain’, e.g. we want to make sure we place a cup before pouring boiling water; otherwise a bad event can occur. An immediate crash every time you do something—which is thankfully rare in my experience—is indicative of a more serious error. Either way, the crash logs (sent to tinderbox@eastgate.com) can help figure that out. (How to find crash logs)

†. Of course if the then to that same thing again, the app is not more crash-prone as we are simply re-creating the same error. Just don’t do that thing again until you get a fix as to the cause. :slight_smile:

We’ll figure it out on our call on Monday.

1 Like

Many thanks.
For some reason your reply didn’t come to my email inbox, so I initially missed it, forgive my delay replying. I completely appreciate your working through this, many thanks. I had updated your test file to reflect as many of the odd details that may be causing my file to hang, but yours is always working perfectly! Its an intermittent fault, but when it starts happening it keeps doing it for several days- but only when moving from one particular container to the ‘people’ one (if I use the same code to move it to another intermediate container first all is well). Anyway, I will continue to look for any clues and see if I can update your test tbx so that it also hangs.
I have to say Tinderbox is incredible and extraordinary, so many things that make it life enhancing, its a shame to be pestering you all with a pretty insignificant problem, but there we go! . Very best wishes, Thomas

Curious.

What this the full $Path of both the source container and the people container ‘People’ container?

Have you tried moving some or all your Notes into a fresh Project file and repeating test for error/crash? At the least it’s a fast way to isolate misbehaving Notes.

I would also attempt to replace your Attribute (in this case $Path) to something else and see if the Stamp/Rule runs as expected; or change the $Path to a different destination and see what pops.

The trailing slash is probably a mistake.

Still, it should not crash, and in my experiments it did not.

Many Thanks - ive tried without the trailing slash, but same problem.
However, Ive been able to duplicate the problem in a test file by copying across the offending container (with its 230 children and 500 descendants ), thanks Art Currim for the tip. so now I know its a problem in there, and will divide the file up until I know what is causing it. Best wishes, Thomas

I can’t help but wonder (as we can’t see the actual names) that a note $Name containing a slash or parentheses may be the issue. It might be useful to know if the exist in the @Thomas ’ latest test doc so we can strike that out as an issue. Otherwise, it may be a known issue just cropping up in a different place than usual.

IOW, are there $Name values like “Reported max/min”, containing a slash or “Crop yields (2021)” containing parentheses.

If such notes are in the test set, try removing them and then test to see if the issue still occurs. This is a hunch but one easily tested, even if only to show it isn’t a factor.

Deep thanks for your help - Im sure that will be it. At the moment Im so busy that I haven’t been able to do the check, and its easy to avoid the problem - but reassuring to know that the solution could well lie in this area (I know that I used a lot of “/” in $Names, and no doubt parentheses too" . I look forward to continuing to delve. !