I modified the message field script in the message box to build a history of entries. It is considered dicey to meddle with IDE scripts, but this has never caused a problem. I just modified the enterInField and returnInField handlers resident there, passing the current contents to a list field I keep in a toolbox stack.
During development, I am constantly sending msg commands, sometimes with slight variations, sometimes the same one over and over. The gadget eliminates duplicates, and allows me to quickly choose from all the ones I have used. I can execute from that list, or reload into the msg box itself if I want to change an old command before sending. Craig Newman -----Original Message----- From: tbodine <lvhd...@gmail.com> To: use-revolut...@lists.runrev.com Sent: Sat, May 7, 2011 12:23 pm Subject: Re: Can Message Box retain messages? > No matter. On advice from Chris, I rolled my own Log substack as a palette > and now send things to a handler that puts them into a field there. Works > like a charm. >>Ooooh. Share. OK, Bob. Here goes... Be advised I'm a LiveCode newbie so everyone feel free to turn this into a lesson on what I should have done different. Steps to make a Log substack (Message box output alternative) 1) Make a new substack named "Log" containing a card named "Log" containing a scrollable field named "Log" Stretch the field to fill the card. 2) Configure those as you wish. (Mine has the stack set as a palette window, the "Log" field's autoHilite OFF and line wrap enabled.) 3) In the mainStack of my project, I put this script: on log thisinfo if thisinfo is "clear" then put "" into fld "Log" of stack "Log" -- empties the log else put thisinfo & RETURN after fld "Log" of stack "Log" end if end log 4) Finally, for any message you want to send to the log, call the log handler from your code: log "my whatever" I use this for debugging to record a breadcrumb trail of handlers and events, and to record changes to variables over time. The one thing it isn't doing, so far, is outputting arrays. Do I need to split those first? Does LC have a command to evaluate the type of an object or variable? (Such as Director's "ilk" command?) Comments? Improvements? Thanks, Tom Bodine -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Can-Message-Box-retain-messages-tp3503775p3505810.html Sent from the Revolution - User mailing list archive at Nabble.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 _______________________________________________ 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