Are there examples of extensions?

LiveCode Builder is a language for extending LiveCode's capabilities, creating new object types as Widgets, and libraries that access lower-level APIs in OSes, applications, and DLLs.

Moderators: LCMark, LCfraser

Post Reply
geoffcanyon
Posts: 53
Joined: Thu Aug 15, 2013 9:25 am

Are there examples of extensions?

Post by geoffcanyon » Wed Mar 18, 2015 3:28 pm

There seem to be many examples of widgets, but are there any examples of simple language extensions?

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Are there examples of extensions?

Post by trevordevore » Wed Mar 18, 2015 3:35 pm

Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1209
Joined: Thu Apr 11, 2013 11:27 am

Re: Are there examples of extensions?

Post by LCMark » Wed Mar 18, 2015 3:36 pm

@geoffcanyon: There's only one library example at the moment - you can find it here - https://github.com/runrev/livecode/tree ... ies/canvas. (Warning: I've not updated this in a while - so it might not work out of the box).

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Are there examples of extensions?

Post by trevordevore » Wed Mar 18, 2015 3:52 pm

I just set up a github repository where I will keep my public extensions. There is a url_parser library that you can take a look at as well.

https://github.com/trevordevore/livecode-extensions

Note, however, that I develop against the latest Develop branch so there is some syntax in the library that may not compile in do-1. For example, the library uses 'returns String' rather than 'as String' when defining the return value of a handler.
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

geoffcanyon
Posts: 53
Joined: Thu Aug 15, 2013 9:25 am

Re: Are there examples of extensions?

Post by geoffcanyon » Wed Mar 18, 2015 9:35 pm

Thanks, Trevor and Mark, I'll have a look.

Peter Wood
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 92
Joined: Mon Jul 06, 2009 4:53 am
Location: Bamboo River

Re: Are there examples of extensions?

Post by Peter Wood » Thu Mar 19, 2015 7:03 am

@Trevor

I notice that you use the "identifier" community.livecode.trevordevore in your extension. Is it standard to use community.livecode?

I was wondering if, given that anybody with a commercial subscription is eligible for an @livecode.org address, it would be good to use org.livecode as the standard naming for community contributions.

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1209
Joined: Thu Apr 11, 2013 11:27 am

Re: Are there examples of extensions?

Post by LCMark » Thu Mar 19, 2015 9:43 am

@PeterWood: Anyone can register for an account to use with the extensions store - if you do, then you get a prefix community.livecode. The global naming of packages uses reverse host name convention - we (LiveCode Ltd) control community.livecode and bought the domain for the purpose of providing anyone with a globally-unique naming prefix for their packages.

You will be able to provide your own domain for use in this way eventually too - we will be setting up a domain verification system (a bit like google uses for certain things). This will be just so that we can verify that the person asking to use that domain actually controls it.

In terms of livecode.com/livecode.org; at the moment we are reserving these prefixes for certain uses. For example, the widgets that we (LiveCode Ltd) explicitly write, maintain and support will have a com.livecode prefix. In terms of livecode.org then I'm still considering this - it is unlikely it will be allowed for general use, but might well be 'given' to a group which is endowed with the responsibility for managing collections of widgets and extensions developed by contributors (or at least something along these lines).

These kinds of things are still in their early days and we have on the list a couple of things to ensure names we choose now don't tie us forever. In particular:

The ability to change the kind of a widget at runtime - http://quality.runrev.com/show_bug.cgi?id=14942 - this would be a short-term measure, allowing users to run a simple script to rebind any widgets on a stack to a renamed variant.

The ability to create an 'alias' package which forwards an old name to a new one - http://quality.runrev.com/show_bug.cgi?id=14947 - this is the 'correct' way to do the above. The idea here is that should the name of a published package need to change, you create the new one containing the actual implementation, then re-create the old way which is simply a redirect. When both are installed into the IDE, when a stack is re-saved any widgets bound to the old named package will automatically rebind to the new one.

Peter Wood
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 92
Joined: Mon Jul 06, 2009 4:53 am
Location: Bamboo River

Re: Are there examples of extensions?

Post by Peter Wood » Thu Mar 19, 2015 10:03 am

@Mark Many thanks for the clear and comprehensive explanation. The approach makes a lot of sense.

Post Reply

Return to “LiveCode Builder”