Re: long id trap for the unwary

2022-06-29 Thread Bob Sneidar via use-livecode
So the *actual* long id reference to any object looks something like: field id 1388156 of group id 1388155 of group id 1388175 of card id 1002 of stack "/Users/bobsneidar/Documents/Livecode Projects/Forms Generator 8/Forms Generator 8.livecode" If you don't provide all of that as a reference,

Re: long id trap for the unwary

2022-06-29 Thread Craig Newman via use-livecode
Neville. I know this thread has been broken into parts, but what exactly is your question? I made two stacks, The first with a button on it, and this in its script: on mouseup put the long id of field 1 of card 1 of stack "untitled 3" into fieldID put the long ID of the owner of fieldID into

RE: long id trap for the unwary

2022-06-28 Thread Neville Smythe via use-livecode
No crashes or errors, I just didn’t get back the data I expected. Does it really have anything to do with message paths? I just expected the long id of field1 of card 1 to do what it says, that is, to return a specifier to (the instance of) field 1 on card 1. At the time I was iterating

Re: long id trap for the unwary

2022-06-28 Thread Craig Newman via use-livecode
Klaus. You are correct; I missed that the “long iD” was used, and that expression includes the work “field”. LC can then use that as a valid reference. Craig > On Jun 28, 2022, at 5:38 PM, Bob Sneidar via use-livecode > wrote: > > You can find the definition of both send and dispatch in the

Re: long id trap for the unwary

2022-06-28 Thread Bob Sneidar via use-livecode
You can find the definition of both send and dispatch in the dictionary. So an example of Dispatch being called from a card of a substack would be: put the long id of me into tParentCard dispatch extract to card "Main" of stack "Forms Generator" with tRecordA, tParentCard, tExclusions -- if

Re: long id trap for the unwary

2022-06-28 Thread Klaus major-k via use-livecode
Hi Craig, > Am 28.06.2022 um 22:27 schrieb Craig Newman via use-livecode > : > > I just glanced at this. Down at the very beginning, I noticed something odd. > One cannot do anything with “the text" of a variable; that would not throw an > error, but would always be empty, no? no, if the

Re: long id trap for the unwary

2022-06-28 Thread Craig Newman via use-livecode
I just glanced at this. Down at the very beginning, I noticed something odd. One cannot do anything with “the text" of a variable; that would not throw an error, but would always be empty, no? Craig > On Jun 28, 2022, at 3:49 PM, Peter Bogdanoff via use-livecode > wrote: > > Hi Bob, > > I

Re: long id trap for the unwary

2022-06-28 Thread Peter Bogdanoff via use-livecode
Hi Bob, I need more detail how to word the command. No need to send in time, just how to call that function on a card not in the message path. Thanks! > On Jun 28, 2022, at 12:12 PM, Bob Sneidar via use-livecode > wrote: > > Send IF you need in time. Stupid spell correct. It cannot be me

Re: long id trap for the unwary

2022-06-28 Thread Bob Sneidar via use-livecode
Send IF you need in time. Stupid spell correct. It cannot be me mistyping. Sent from my iPhone > On Jun 28, 2022, at 12:08, Bob Sneidar wrote: > > Send in you need in time. Dispatch if you are not sure the handler exists in > the target. Dispatch will not throw an error if there is no

Re: long id trap for the unwary

2022-06-28 Thread Bob Sneidar via use-livecode
Send in you need in time. Dispatch if you are not sure the handler exists in the target. Dispatch will not throw an error if there is no handler. Sent from my iPhone > On Jun 28, 2022, at 11:05, Peter Bogdanoff via use-livecode > wrote: > > Bob, > > This makes sense. > > I’m unclear as

Re: long id trap for the unwary

2022-06-28 Thread Peter Bogdanoff via use-livecode
Bob, This makes sense. I’m unclear as to how I would structure the command to call a function in a card that’s not in the message path. send … ? Peter Bogdanoff > On Jun 28, 2022, at 8:34 AM, Bob Sneidar via use-livecode > wrote: > > Your point brings up something that was discussed

Re: long id trap for the unwary

2022-06-28 Thread Bob Sneidar via use-livecode
Your point brings up something that was discussed before on this list. It's going to be cleaner in the long run to "compartmentalize" your handlers so that a handler is not trying access objects that are not in the message path, or belong to an object in the message path. A handler should not

long id trap for the unwary

2022-06-27 Thread Neville Smythe via use-livecode
If I write put the long id of field 1 of card 1 into tObject; put the text of tObject I get the text of field 1 of card 1, right ? Not necessarily. If field 1 of card 1 is in a shared group, then what I get is the text of field id something of card id whatever, where whatever is the id of