Messagemessages
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 9670
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Messagemessages
This, or whatever its true name is, a close relative of the executionContexts, exists somewhere, though not documented. Richard Gaskin turned me on to it many years ago. There is a thread in the "Experienced..." pane where this may come in handy. Anyone remember what I am talking about?
Craig
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9842
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Messagemessages
I can recall many discussions about that property, but not that one specifically.
Do you have a question about messageMessages?
Do you have a question about messageMessages?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 9670
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Messagemessages
Ah. Great.
Is there anything published about it? Syntax?
Craig
Is there anything published about it? Syntax?
Craig
-
- Posts: 720
- Joined: Thu Sep 11, 2014 1:49 pm
- Location: The Netherlands
-
- VIP Livecode Opensource Backer
- Posts: 9842
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Messagemessages
It's not documented by the core team because it was implemented as an ad hoc solution and is subject to change. So use it at your own risk, with the knowledge that any code dependent on it may need to be rewritten in the future.
For a description of what it is and how to use it, see this post to the use-LiveCode list:
http://runtime-revolution.278305.n4.nab ... 93216.html
To see a practical example in action see my tool 4W Flight Recorder, available in Stacks section of LiveNet - in the IDE choose Development -> Plugins -> GoLiveNet.
4W Flight Recorder is like the IDE's Message Watcher, but more flexible and with a more useful layout that indents to show the calling chain, and also provided an approximation of time spent in each handler in the chain. It also includes a set of filters which omit ranges of messages to make the output more useful by eliminating the reams of noise that can flood the list with things like IDE messages, mouseMove messages, and more, all customizable.
For a description of what it is and how to use it, see this post to the use-LiveCode list:
http://runtime-revolution.278305.n4.nab ... 93216.html
To see a practical example in action see my tool 4W Flight Recorder, available in Stacks section of LiveNet - in the IDE choose Development -> Plugins -> GoLiveNet.
4W Flight Recorder is like the IDE's Message Watcher, but more flexible and with a more useful layout that indents to show the calling chain, and also provided an approximation of time spent in each handler in the chain. It also includes a set of filters which omit ranges of messages to make the output more useful by eliminating the reams of noise that can flood the list with things like IDE messages, mouseMove messages, and more, all customizable.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 9670
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Messagemessages
Paul.
I understand the executionContexts. I offered it as a solution in another thread.
viewtopic.php?f=8&t=33551
It is the undocumented "messageMessages" that I am asking about.
Craig
I understand the executionContexts. I offered it as a solution in another thread.
viewtopic.php?f=8&t=33551
It is the undocumented "messageMessages" that I am asking about.
Craig
Last edited by dunbarx on Mon Jan 20, 2020 2:32 pm, edited 2 times in total.
-
- VIP Livecode Opensource Backer
- Posts: 9670
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Messagemessages
Richard.
I first tried to find this in the forums, but must have misspelled my query, because I got nothing. Trying again:
viewtopic.php?f=6&t=4673&p=20882&hilit= ... ges#p20678
It was you that pointed the way.
I will play with this again when I get back to my office. It may have some use with that thread in the "experienced" pane that the executionContexts seems to have solved.
thanks again.
Craig
I first tried to find this in the forums, but must have misspelled my query, because I got nothing. Trying again:
viewtopic.php?f=6&t=4673&p=20882&hilit= ... ges#p20678
It was you that pointed the way.
I will play with this again when I get back to my office. It may have some use with that thread in the "experienced" pane that the executionContexts seems to have solved.
thanks again.
Craig
-
- Posts: 720
- Joined: Thu Sep 11, 2014 1:49 pm
- Location: The Netherlands
Re: Messagemessages
I should have known.dunbarx wrote: ↑Sun Jan 19, 2020 8:17 pmPaul.
I understand the exectionContexts. I offered it as a solution in another thread.
viewtopic.php?f=8&t=33551
It is the undocumented "messageMessages" that I am asking about.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9670
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Messagemessages
Richard.
This is all academic, but I cannot get anything out of the "messageMessages". I set the "messageMessages" to "true" In a new stack with a couple of cards. I have this in the stack script:
Navigating produces random numbers, but the breakpoint never fires.
Craig
This is all academic, but I cannot get anything out of the "messageMessages". I set the "messageMessages" to "true" In a new stack with a couple of cards. I have this in the stack script:
Code: Select all
on openCard
answer random(99)
end openCard
on messageHandled
breakpoint
end messageHandled
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9842
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Messagemessages
I dunno what's up. It works in 4W Flight Recorder.
You might want to try the log command instead of breakpoint, because messageHandled will be sent for EVERY message handled, including those the IDE uses, so if you successfully get into the debugger you may never escape.
You might want to try the log command instead of breakpoint, because messageHandled will be sent for EVERY message handled, including those the IDE uses, so if you successfully get into the debugger you may never escape.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 3581
- Joined: Mon Jan 22, 2007 7:36 am
- Location: Berkeley, CA, US
- Contact:
Re: Messagemessages
Craig-
put the messageHandled handler in a frontscript to see it in action. I don't think it will get to any of the stack scripts.
put the messageHandled handler in a frontscript to see it in action. I don't think it will get to any of the stack scripts.
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
-
- VIP Livecode Opensource Backer
- Posts: 9670
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Messagemessages
Mark.
Yep, that worked. And as Richard warned, that sort of thing can get unruly.
Craig
Yep, that worked. And as Richard warned, that sort of thing can get unruly.
Craig
-
- Posts: 720
- Joined: Thu Sep 11, 2014 1:49 pm
- Location: The Netherlands
Re: Messagemessages
Hi Craig,
I am trying to learn from this thread about 'messageMessages' and 'frontscript'. So could you attach a small sample script for me to analyse?
I cannot seem to get things working in such a way that I understand what is happening.
regards,
Paul
-
- VIP Livecode Opensource Backer
- Posts: 9842
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Messagemessages
Here's a fully working example, and one of the few practical uses of messageMessages:
viewtopic.php?f=9&t=33553&sid=f10f638f8 ... d3#p187061
viewtopic.php?f=9&t=33553&sid=f10f638f8 ... d3#p187061
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 931
- Joined: Thu Nov 13, 2008 6:48 am
- Location: London, UK
Re: Messagemessages
Is there anything avail that could be called from inside an app (I'd like to run something inside an iOS app for example) that could be turned on/off under script control. Something along the lines of:FourthWorld wrote: ↑Sun Jan 19, 2020 3:58 pm4W Flight Recorder is like the IDE's Message Watcher, but more flexible and with a more useful layout that indents to show the calling chain, and also provided an approximation of time spent in each handler in the chain. It also includes a set of filters which omit ranges of messages to make the output more useful by eliminating the reams of noise that can flood the list with things like IDE messages, mouseMove messages, and more, all customizable.
Code: Select all
on messagesStartRecording
open file (specialFolderPath("documents") & “/messages.txt")
end messagesStartRecording
Code: Select all
on messagesStopRecording
close file (specialFolderPath("documents") & “/messages.txt")
end messagesStopRecording
Maybe there is something like this already and I don't know about it?
Thanks
Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS
Targets: Mac, iOS