Message sent when object placed onto card

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10096
Joined: Fri Feb 19, 2010 10:17 am

Re: Message sent when object placed onto card

Post by richmond62 » Wed Mar 15, 2023 6:45 pm

The reason was that, for various kinky reasons of my own I bunged a CR on the end. 8)

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10317
Joined: Wed May 06, 2009 2:28 pm

Re: Message sent when object placed onto card

Post by dunbarx » Wed Mar 15, 2023 8:59 pm

WHAT???

Operator malfunction???

With this ( 8) ) emoji appended???

Craig

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10096
Joined: Fri Feb 19, 2010 10:17 am

Re: Message sent when object placed onto card

Post by richmond62 » Wed Mar 15, 2023 10:32 pm

CR = carriage return.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10317
Joined: Wed May 06, 2009 2:28 pm

Re: Message sent when object placed onto card

Post by dunbarx » Thu Mar 16, 2023 1:49 am

Oh.

Carriage return.

I thought it was a ham sandwich.

No wonder you threw in a 8)

Craig

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10096
Joined: Fri Feb 19, 2010 10:17 am

Re: Message sent when object placed onto card

Post by richmond62 » Thu Mar 16, 2023 12:51 pm

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 . . . ?
Attachments
STAKK.livecode.zip
Stack.
(1010 Bytes) Downloaded 260 times

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10317
Joined: Wed May 06, 2009 2:28 pm

Re: Message sent when object placed onto card

Post by dunbarx » Thu Mar 16, 2023 1:50 pm

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

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10317
Joined: Wed May 06, 2009 2:28 pm

Re: Message sent when object placed onto card

Post by dunbarx » Thu Mar 16, 2023 1:51 pm

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

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10096
Joined: Fri Feb 19, 2010 10:17 am

Re: Message sent when object placed onto card

Post by richmond62 » Thu Mar 16, 2023 4:00 pm

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? . . .

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10317
Joined: Wed May 06, 2009 2:28 pm

Re: Message sent when object placed onto card

Post by dunbarx » Thu Mar 16, 2023 5:21 pm

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

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10096
Joined: Fri Feb 19, 2010 10:17 am

Re: Message sent when object placed onto card

Post by richmond62 » Thu Mar 16, 2023 5:39 pm

Thanks: but no nearer to answering the OP's question, methinks.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10317
Joined: Wed May 06, 2009 2:28 pm

Re: Message sent when object placed onto card

Post by dunbarx » Thu Mar 16, 2023 7:57 pm

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

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10317
Joined: Wed May 06, 2009 2:28 pm

Re: Message sent when object placed onto card

Post by dunbarx » Thu Mar 16, 2023 8:00 pm

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

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10096
Joined: Fri Feb 19, 2010 10:17 am

Re: Message sent when object placed onto card

Post by richmond62 » Fri Mar 17, 2023 7:54 am

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

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10096
Joined: Fri Feb 19, 2010 10:17 am

Re: Message sent when object placed onto card

Post by richmond62 » Fri Mar 17, 2023 11:49 am

Screen Shot 2023-03-17 at 12.48.38 pm.png
-
I did NOT see anything.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10096
Joined: Fri Feb 19, 2010 10:17 am

Re: Message sent when object placed onto card

Post by richmond62 » Fri Mar 17, 2023 2:20 pm

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

Post Reply