Re: Sender of send in time

2018-07-14 Thread Dick Kriesel via use-livecode


> On Jul 13, 2018, at 1:26 AM, hh via use-livecode 
>  wrote:
> 
>> Bob S. wrote:
>> Something in my scripts is sending a selectionChanged message in
>> time to a specific datagrid when it shouldn't. How do I determine 
>> the sender of a send in time message?
> 
> Simply use a a parameter:
> 
> send "selectionChanged " to  in 
> 
> where  identifies the sender.
> 

Or, if you don’t want to create such parameters to identify your senders, you 
could use the executionContexts:

send "selectionChanged item 2 of line -1 of the executionContexts" to 
 in 

Or, if you want to reduce clutter in your many senders, you could just:

send "selectionChanged the executionContexts" to  in 

— Dick


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Sender of send in time

2018-07-13 Thread hh via use-livecode
> Bob S. wrote:
> Something in my scripts is sending a selectionChanged message in
> time to a specific datagrid when it shouldn't. How do I determine 
> the sender of a send in time message?

Simply use a a parameter:

send "selectionChanged " to  in 

where  identifies the sender.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Sender of send in time

2018-07-12 Thread Bob Sneidar via use-livecode
Unfortunately it's the sendee. The object receiving the message. 

Bob S


> On Jul 12, 2018, at 12:59 , Bob Sneidar via use-livecode 
>  wrote:
> 
> I wonder if the target would return the sender or the sender. I'll check it 
> out. 
> 
> Bob S
> 
> 
>> On Jul 12, 2018, at 11:57 , Richard Gaskin via use-livecode 
>>  wrote:
>> 
>> Bob Sneidar wrote:
>> 
>>> I have a sticky problem here, or I should say a slippery one.
>>> Something in my scripts is sending a selectionChanged message in time
>>> to a specific datagrid when it shouldn't. How do I determine the
>>> sender of a send in time message? The pendingMessages and
>>> executionContexts are cleared by that time.
>> 
>> I don't believe the LC engine maintains awareness of the sender of timers.  
>> If it does, I don't know of a way that's exposed to scripters.
>> 
>> Where timers are used sparingly, it may be practical as a workaround to 
>> search for those instances and add a param to sent messages to track that.
>> 
>> Alternatively, when using "send...in " then "the result" will contain 
>> the ID of the newly created timer.  You could use that as the key in an 
>> array which stores any info you need about the caller, being mindful of 
>> course to clear entries as they fire so the array doesn't grow beyond 
>> reasonable bounds.
>> 
>> May also be useful to submit an enhancement request for that info, though I 
>> have no suggestions as to how this should be handled, except perhaps by 
>> adding a new item to the pendingMessages entry which would contain the long 
>> id of the sender, if that's sufficient.
>> 
>> -- 
>> Richard Gaskin
>> Fourth World Systems
>> Software Design and Development for the Desktop, Mobile, and the Web
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Sender of send in time

2018-07-12 Thread Bob Sneidar via use-livecode
I wonder if the target would return the sender or the sender. I'll check it 
out. 

Bob S


> On Jul 12, 2018, at 11:57 , Richard Gaskin via use-livecode 
>  wrote:
> 
> Bob Sneidar wrote:
> 
> > I have a sticky problem here, or I should say a slippery one.
> > Something in my scripts is sending a selectionChanged message in time
> > to a specific datagrid when it shouldn't. How do I determine the
> > sender of a send in time message? The pendingMessages and
> > executionContexts are cleared by that time.
> 
> I don't believe the LC engine maintains awareness of the sender of timers.  
> If it does, I don't know of a way that's exposed to scripters.
> 
> Where timers are used sparingly, it may be practical as a workaround to 
> search for those instances and add a param to sent messages to track that.
> 
> Alternatively, when using "send...in " then "the result" will contain 
> the ID of the newly created timer.  You could use that as the key in an array 
> which stores any info you need about the caller, being mindful of course to 
> clear entries as they fire so the array doesn't grow beyond reasonable bounds.
> 
> May also be useful to submit an enhancement request for that info, though I 
> have no suggestions as to how this should be handled, except perhaps by 
> adding a new item to the pendingMessages entry which would contain the long 
> id of the sender, if that's sufficient.
> 
> -- 
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for the Desktop, Mobile, and the Web


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Sender of send in time

2018-07-12 Thread Richard Gaskin via use-livecode

Bob Sneidar wrote:

> I have a sticky problem here, or I should say a slippery one.
> Something in my scripts is sending a selectionChanged message in time
> to a specific datagrid when it shouldn't. How do I determine the
> sender of a send in time message? The pendingMessages and
> executionContexts are cleared by that time.

I don't believe the LC engine maintains awareness of the sender of 
timers.  If it does, I don't know of a way that's exposed to scripters.


Where timers are used sparingly, it may be practical as a workaround to 
search for those instances and add a param to sent messages to track that.


Alternatively, when using "send...in " then "the result" will 
contain the ID of the newly created timer.  You could use that as the 
key in an array which stores any info you need about the caller, being 
mindful of course to clear entries as they fire so the array doesn't 
grow beyond reasonable bounds.


May also be useful to submit an enhancement request for that info, 
though I have no suggestions as to how this should be handled, except 
perhaps by adding a new item to the pendingMessages entry which would 
contain the long id of the sender, if that's sufficient.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Sender of send in time

2018-07-12 Thread Bob Sneidar via use-livecode
Hi Craig. 

No, because send in time allows for messages sent prior to complete execution, 
so whatever send in time is no longer executing. 

Bob S


> On Jul 12, 2018, at 10:45 , dunbarxx via use-livecode 
>  wrote:
> 
> Hi.
> 
> Would the "executionContexts" be of use here?
> 
> Craig


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Sender of send in time

2018-07-12 Thread dunbarxx via use-livecode
Hi.

Would the "executionContexts" be of use here?

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Sender of send in time

2018-07-12 Thread Bob Sneidar via use-livecode
Nevermind I found it. But it's a good question. I had to search for "send 
selectionChanged" and breakpoint each statement until I hit on the correct one. 

Bob S


> On Jul 12, 2018, at 10:31 , Bob Sneidar via use-livecode 
>  wrote:
> 
> Hi all. 
> 
> I have a sticky problem here, or I should say a slippery one. Something in my 
> scripts is sending a selectionChanged message in time to a specific datagrid 
> when it shouldn't. How do I determine the sender of a send in time message? 
> The pendingMessages and executionContexts are cleared by that time. 
> 
> Bob S


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Sender of send in time

2018-07-12 Thread Bob Sneidar via use-livecode
Hi all. 

I have a sticky problem here, or I should say a slippery one. Something in my 
scripts is sending a selectionChanged message in time to a specific datagrid 
when it shouldn't. How do I determine the sender of a send in time message? The 
pendingMessages and executionContexts are cleared by that time. 

Bob S


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode