Page 2 of 4

Re: Message sent when object placed onto card

Posted: Wed Mar 15, 2023 6:45 pm
by richmond62
The reason was that, for various kinky reasons of my own I bunged a CR on the end. 8)

Re: Message sent when object placed onto card

Posted: Wed Mar 15, 2023 8:59 pm
by dunbarx
WHAT???

Operator malfunction???

With this ( 8) ) emoji appended???

Craig

Re: Message sent when object placed onto card

Posted: Wed Mar 15, 2023 10:32 pm
by richmond62
CR = carriage return.

Re: Message sent when object placed onto card

Posted: Thu Mar 16, 2023 1:49 am
by dunbarx
Oh.

Carriage return.

I thought it was a ham sandwich.

No wonder you threw in a 8)

Craig

Re: Message sent when object placed onto card

Posted: Thu Mar 16, 2023 12:51 pm
by richmond62
So . . .
-
Screen Shot 2023-03-16 at 1.48.42 pm.png
-
cardScript of main stack:

Code: Select all

on opencard
   palette "OBJ LIST"
end opencard

on newImage
   put the name of the last control && cr after fld "fOBJ" of stack "OBJ LIST"
end newImage

on newButton
   put the name of the last control && cr after fld "fOBJ" of stack "OBJ LIST"
end newButton
does NOT . . . ?

Re: Message sent when object placed onto card

Posted: Thu Mar 16, 2023 1:50 pm
by dunbarx
Richmond.

What does that stack purport to do? Anyway, I made a button on the main stack with:

Code: Select all

on mouseUp
   create button "XYZ"
end mouseUp
When I click on that button a new button appears, and your card handler does its work.

Craig

Re: Message sent when object placed onto card

Posted: Thu Mar 16, 2023 1:51 pm
by dunbarx
Is it possible you are trying to send that sort of message when you pull a control from the tools palette? Those messages are not sent when you do that.

Craig

Re: Message sent when object placed onto card

Posted: Thu Mar 16, 2023 4:00 pm
by richmond62
Is it possible you are trying to send that sort of message when you pull a control from the tools palette?
Blast, blast, blast: got me in one.

Err, so? . . .

Re: Message sent when object placed onto card

Posted: Thu Mar 16, 2023 5:21 pm
by dunbarx
AHA.

To be fair, I do not know why LC considers that particular action as "not" creating a new control, but it seems it does. But if you do it in any other way, cloning, using the "create" command, it does.

Craig

Re: Message sent when object placed onto card

Posted: Thu Mar 16, 2023 5:39 pm
by richmond62
Thanks: but no nearer to answering the OP's question, methinks.

Re: Message sent when object placed onto card

Posted: Thu Mar 16, 2023 7:57 pm
by dunbarx
Richmond.

Hmmm

Except for the fact that dragging a control from the tool palette sends no useful message, what part of that question remains? There is:

Code: Select all

on newbutton
   put the name of last button into fld 1
end newbutton
Done, no?

There is in fact a message sent when pulling from the tools palette, as can be seen in the message watcher. It is "cIDETransient". This is not an "IDE message", because I have those suppressed, but it is hard (impossible?) to trap in a handler.

@Everyone.

Is there a setting (method, kluge) that allows one to trap such semi-IDE messages?

Craig

Re: Message sent when object placed onto card

Posted: Thu Mar 16, 2023 8:00 pm
by dunbarx
If there was a way to trap the "cIDETransient" message, one could

Code: Select all

on newbutton
   put the name of last control into fld 1
end newbutton
In that way you get the type of control, and whatever else you need from it.

Craig

Re: Message sent when object placed onto card

Posted: Fri Mar 17, 2023 7:54 am
by richmond62
IFF . . . But all quiet on the Western front.

AND, at the risk of sounding stupid (and I am not stupid, merely ignorant), as LiveCode
is, supposedly, built with LiveCode, why is there a distinction between 'IDE messages'
and 'non-IDE messages'?

As Wikipedia states:

"The boundary between an IDE and other parts of the broader software development environment is not well-defined"

It might be useful for EVERYONE to know WHERE the boundary in LC between the IDE and the non-IDE exists, and
HOW to leverage stuff going on in the non-IDE.

As March 15 was the IDEs of March, this seems a good a time as any to explore and push this question.

Love, Brutus. :D

Re: Message sent when object placed onto card

Posted: Fri Mar 17, 2023 11:49 am
by richmond62
Screen Shot 2023-03-17 at 12.48.38 pm.png
-
I did NOT see anything.

Re: Message sent when object placed onto card

Posted: Fri Mar 17, 2023 2:20 pm
by richmond62
HOWEVER . . . in RunRev/LC 4.5 DP 4:
-
Screen Shot 2023-03-17 at 3.18.58 pm.png
-
Screen Shot 2023-03-17 at 3.23.07 pm.png