Missing 'on' does not cause error...
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Missing 'on' does not cause error...
..........
Last edited by [-hh] on Wed Aug 13, 2014 2:35 pm, edited 1 time in total.
shiftLock happens
Re: Missing 'on' does not cause error...
Well, sure I could but I'm not sure this is a generic solution yet.[-hh] wrote:@Thierry
have you time to make a small stack with your "clean" solution (-> LC share)?
Would be great, because this is also be valuable/usable for other languages (python/perl) and hard to find here.
For example on the RaspberryPi there are readymade python libs for using the GPIOs and one could then use your technique to script & call this from LC.
BTW, you have all the code in my previous post!
Do you have some practical examples to send me?
and I could add one sample working with regex too.
Regards,
Thierry
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
Re: Missing 'on' does not cause error...
It's kind of funny, we used to store data in scripts this way all the time in HyperCard. HC had few storage options and even the Apple developers did it in their sample stacks.
Now we've come full circle, and LC users have "discovered" the feature.
I routinely comment out the "on" line to disable a whole handler. It's easier than selecting all the text.
One caveat though: if you have strict compilation mode turned on, it will fail. That's one reason I don't use it.
Now we've come full circle, and LC users have "discovered" the feature.

One caveat though: if you have strict compilation mode turned on, it will fail. That's one reason I don't use it.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Missing 'on' does not cause error...
Nothing circular here, because this is not detected, but learned, also from *your* work.
If you are new to LC, then this is the only way to learn fast: to see what people did with limited resources, to see the tricks they used, what else? HC-Archives are still available. And then use LC and you know what you are doing with all these meanwhile available wonderful tools.
But from these old scripts you learn pretty fast also 'not recommended' things. Or should I say 'forbidden' things (Craig, you know what I mean)? And you are still doing such things jacque? Clandestinely?
If you are new to LC, then this is the only way to learn fast: to see what people did with limited resources, to see the tricks they used, what else? HC-Archives are still available. And then use LC and you know what you are doing with all these meanwhile available wonderful tools.
But from these old scripts you learn pretty fast also 'not recommended' things. Or should I say 'forbidden' things (Craig, you know what I mean)? And you are still doing such things jacque? Clandestinely?
shiftLock happens
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Missing 'on' does not cause error...
I used to store data in scripts in HyperCard only because it had no custom properties, so there was no other way to bind arbitrary data to them. With SuperCard's and LiveCode's support for custom properties I haven't resorted to that in decades.
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
Re: Missing 'on' does not cause error...
..........
Last edited by [-hh] on Wed Aug 13, 2014 2:34 pm, edited 1 time in total.
shiftLock happens
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Missing 'on' does not cause error...
Thank you for the kind words. So far it's not bad at all. On the contrary, it's exciting to lend a hand seeing where this LiveCode phenomenon can take us all.[-hh] wrote:Congratulations and thanks, that you are willing to do this important and time eating job.
Many folks are on both, but really they cater to two different sets of preferences so I think they'll remain two separate things. Or at least I hope so. Some folks prefer to have everything go into their In Box with the discussion list, others like the freedom to choose the topics they want to read here in these Web forums. I'd hate to see either go away, and both are open to everyone so we all get what we most prefer.p.s. I'm sometimes told to look also in other lists (use-list).
Do you see any chance that the community could join on ONE single market place? Or is this, from some reason, no good idea?
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
Re: Missing 'on' does not cause error...
..........
Last edited by [-hh] on Wed Aug 13, 2014 2:34 pm, edited 1 time in total.
shiftLock happens
Re: Missing 'on' does not cause error...
Hermann,[-hh] wrote:@Thierry
... because this is also be valuable/usable for other languages (python/perl) and hard to find here.
For example on the RaspberryPi there are readymade python libs for using the GPIOs and one could then use your technique to script & call this from LC.
If you are still interested in integrating "external scripts" inside livecode scripts,
I suggest to start a new thread with an appropriate title or contact me off-forum...
Kind regards,
Thierry
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
Re: Missing 'on' does not cause error...
..........
Last edited by [-hh] on Wed Aug 13, 2014 2:34 pm, edited 1 time in total.
shiftLock happens
Re: Missing 'on' does not cause error...
[-hh] wrote:Bonjour Thierry,... integrating "external scripts" inside livecode scripts ...
I'm very interested, especially if you are engaged.

Well, I don't think this topic is for beginners. (we are on the experienced developers forum)Perhaps it makes sense to start with a *simple* goal, that beginners can easily follow?
I would recommend them to follow Richard or Jacque advices..

The technic I've shown above will work for any languages you want to deal within Livecode..... How is this done with applescript or specials on other platforms? How with Python, Perl or PHP?
All this integrated in an LC script?
Script it in and with your livecode script without any addition of extra and numerous "\" & and quote which
makes most of the script *unreadable*, making them hard to debug and maintain.
If you have a specific already made script, I can rewrite it for you with pleasure.
Regards,
Thierry
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
Re: Missing 'on' does not cause error...
LOL. Only the part where I comment out the handler first line. Like Richard, I haven't had to store data in scripts for ages. But I wouldn't say it's forbidden, only that it isn't the most efficient way to keep data in a stack because of the parsing you have to do to get it out. I did think using an item delimiter was clever though, I never thought of that.And you are still doing such things jacque? Clandestinely?
Usually when I want to store scripts I put those in custom properties too. In Thierry's example I would have put the whole AppleScript in one.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Missing 'on' does not cause error...
Jacque,jacque wrote:Usually when I want to store scripts I put those in custom properties too. In Thierry's example I would have put the whole AppleScript in one.
I like having a "Perl/AS/Shell/Python" script strongly connected to a livecode handler all at the same place.
Find much much easier to read and debug and copy/paste to share with others.
Plus, as I'm coding in an external editor,
the property inspector palette is not available.
And finally, the commented script is also automatically copied in a custom property.
Different background, experience and style

Regards,
Thierry
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
Re: Missing 'on' does not cause error...
Yup. There is nothing wrong with your method, Thierry. As you say, just different styles. I can see the advantages if you are using an external editor.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Posts: 919
- Joined: Wed Nov 04, 2009 11:41 am
Re: Missing 'on' does not cause error...
Hi,
I have just found this thread and am loving some of the ideas (well the ones I understand!). The script posted by hh posting the text of the first 10 rows to the message box is going to be so useful but...... how can it be used with a datagrid ? I placed it in the script area of the group but it extracts and posts data from each of the column elements which is not quite as useful.
Simon K
Belay the above, I realised all that is needed is to replace "the target" with "me" and it works as desired.
I have just found this thread and am loving some of the ideas (well the ones I understand!). The script posted by hh posting the text of the first 10 rows to the message box is going to be so useful but...... how can it be used with a datagrid ? I placed it in the script area of the group but it extracts and posts data from each of the column elements which is not quite as useful.
Simon K
Belay the above, I realised all that is needed is to replace "the target" with "me" and it works as desired.
best wishes
Skids
Skids