Writing Extensions

Mark Waddingham mark at livecode.com
Fri May 19 03:40:21 EDT 2017

On 2017-05-19 06:23, Mark Wieder via use-livecode wrote:
> On 05/18/2017 07:14 PM, Alejandro Tejada via use-livecode wrote:
>> Now that we are talking about widgets and extensions, many thanks 
>> again
>> Mark Wieder for updating Peter Thirkell multicolor svg widget.
>> Just for curiosity, Could you write a blog entry about your process of
>> updating this widget? Maybe others would find this useful to update 
>> their
>> own widgets.
> I'll think about it, but I'm probably the wrong person to write up the
> process of creating/modifying widgets at this point. But I'd love to
> see Peter write up the process he went through. All I did was add some
> flexibility to the xml parsing (which in LCB ends up working with char
> offsets and is ridiculously ugly, fragile, and error-prone) and
> allowing hex representations of color specifications.

If we are honest then parsing XML even with LCS's excellent text 
chunking isn't
necessarily *that* much 'prettier'. XML is quite a complicated format if 
want a 100% compliant reader (do we have a 100% compliant XML parser
written in LiveCode?) - hence why, in this case, it would probably be 
to have a wrapper around a well established XML library in LCB.

Why reinvent a wheel which many other people have already decided needs 

(Although, having said that, there is something quite pleasing about 
kind of thing being written in the host language - pragmatically though,
we're probably better off with readers which are maintained by people
who live and breath these import formats - at least when you need the 

> I had to move it out of my Extensions folder after testing it since
> having both the LC8 and LC9 versions in places messes things up. This
> changing binary format thing is a pain.

Point taken - it is a pain! However, it won't be like this forever - and
obviously the sooner it is stable, the better it is for the ecosystem.

Warmest Regards,


Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

More information about the Use-livecode mailing list