Page 1 of 1
Ghost of field 3
Posted: Tue Mar 21, 2023 1:57 pm
by dunbarx
I thought this warranted a new thread.
In a new session I make a new stack and pull a field from the tools palette. I make sure the field does not have focus, though it hardly matters. From msg:
I get "Field 3" I can do this all day.
Craig
Re: Ghost of field 3
Posted: Tue Mar 21, 2023 2:04 pm
by richmond62
That is fun.
I just did that at work (or, probably more accurately, "work") in LiveCode 8.1.10.
What is even more fun is one can do that with NO field at all:
-
-
and my second picture may asnwer the question:
-
-
It might be vaguely instructive to know where fields 1 and 2 are.

Re: Ghost of field 3
Posted: Tue Mar 21, 2023 2:11 pm
by richmond62
IFF that constitutes a bug . . .
{Personally I would not fuss about it, except if one is worried about whether an end-user has got their insertion
point where you do or don't want it to be.]
. . . then someone 'top-dead-centre' might have to spend a short period in the naughty corner
as it has, obviously, been there a while.
Just for added entertainment value
RevMedia 4 returns
field 2.
-
Re: Ghost of field 3
Posted: Tue Mar 21, 2023 2:16 pm
by dunbarx
Richmond.
It may seem like fun, but it could easily cause havoc, in the sense that Marc Antony meant, in ones handler.
Craig
Re: Ghost of field 3
Posted: Tue Mar 21, 2023 2:40 pm
by richmond62
I really meant 'fun' to be read in an ironic sense, as, of course, that could throw things right out of whack.
Certainly the messageBox should not be showing up on the radar.
Re: Ghost of field 3
Posted: Tue Mar 21, 2023 2:47 pm
by richmond62
Because I have another 15 minutes free, I made a stack with this script in a button:
Code: Select all
on mouseUp
answer the selectedField
end mouseUp
Now, what is interesting is what happens then:
-
-
If one builds a standalone of that stack, one gets the same result.
So, I, for one, would NOT get 'all hot and sweaty' about it.
Re: Ghost of field 3
Posted: Tue Mar 21, 2023 5:24 pm
by dunbarx
Now we are getting nowhere.
So that line of code "works" from a button script, but returns "Field 3" from the message box.
Well, the message box was always a bit suspect.
Craig
Re: Ghost of field 3
Posted: Tue Mar 21, 2023 5:30 pm
by jacque
Once you have typed into the message box, it becomes focused. Field 3 is the field in the message box where you enter commands.
The best way test this is to put the command into the field or card with a trigger of some kind, like putting the selected field in a keyDown handler, or into any handler that is called when the field is active. It should also work from a button provided the button's traversalOn is false.
Re: Ghost of field 3
Posted: Tue Mar 21, 2023 6:00 pm
by dunbarx
Jacque.
OOOH. All is now solved.
I keep forgetting that the message box is "just a stack", my favorite annoying comment.
But I believe the message box ought to 100% recuse itself from the other objects in play. I know this is the reason that, since it does not (cannot?), it has gotten a bad rap over the years with other odd activities.
Craig
Re: Ghost of field 3
Posted: Tue Mar 21, 2023 8:09 pm
by richmond62
Well, as the
messageBox IS part of the programming interface, and should not be present in a standalone.
Wait a big,
CHEESY moment . . .
-
-
LC 9.6.3 'Community', MacOS 13.3 Beta 4
-
-
-
Everything behaves as . . .

Re: Ghost of field 3
Posted: Tue Mar 21, 2023 9:23 pm
by dunbarx
Richmond.
I guess that since this:
returns empty, then this:
Code: Select all
answer the name of the selectedField
has nowhere to look, nowhere to go, and complains.
Craig
Re: Ghost of field 3
Posted: Wed Mar 22, 2023 5:58 am
by richmond62
But, it does not default to the messageBox field.
Re: Ghost of field 3
Posted: Wed Mar 22, 2023 9:28 am
by richmond62
Just for tidiness's sake I have recreated last night's exercise here at work in LC 8.1.10 (Mac OS 10.7.5),
and what is OBVIOUS to me is that 'ghost' only appears when you put the code into the messageBox:
-
-
-
-
AND as you ar NEVER likely to us the messageBox in a standalone, the whole thing is a ghost
and a storm in a teacup.