Recreating a binary stack from xml text
Pete
pete at mollysrevenge.com
Sat Feb 18 16:12:26 EST 2012
Hi Mark,
Thanks for the update. Like several other people, I'm really frustrated by
the non-opertaion of revOnline. I understand that the team has a lot on
their hands right now but the thing has been broken for months as far as I
can tell. Maybe we should open a community Dropbox or Box.net account that
allows us all to share useful stacks.
Back to the topic.
I've been thinking about doing something along these lines but haven't had
a chance to actually do anything other than think about the concept. Most
of the posts I've seen about this topic seem to base the solution on XML
but I'm thinking of using an sqlite database. What can I say, I'm a
database guy, I understand them, I don't know much about XML. Using a DB
would make it very easy to address the issue you raised regarding
recreating only part of a stack rather than the whole stack.
If I had the time, I'd like to do this in the context of a version control
system that would store the info about different versions of a stack and
allow comparison between versions to see what changed, not just in scripts
but in any of the stack constructs. I think that would be a useful and
fairly straightforward thing to do in the context of a database. In fact,
while we're at it, why not add bug tracking capabilties.
Wish I had time to do it.
Pete
On Sat, Feb 18, 2012 at 12:07 PM, Mark Wieder <mwieder at ahsoftware.net>wrote:
> Pete-
>
> Saturday, February 18, 2012, 11:33:51 AM, you wrote:
>
> > I saw a post earlier in this thread that perhaps Mark Wieder might be
> > working on something along these lines. Mark, can you comment?
>
> If revOnline ever comes back (hello rev team?) I'll post a stack that
> does the translations.
>
> Getting to an from xml format isn't that much of a problem technically
> now that ids are no longer immutable. What's a bit more of a brain
> teaser is preserving the object hierarchy at the same time. I opted
> for individual xml files for each control, card, and stack, as well as
> a project xml file that describes how the objects are organized. That
> way you can create the entire stack from the xml descriptions or just
> pick out individual controls and recreate them.
>
> Creating an object from the xml description is a matter of looping
> through the properties, as in
>
> -- in a try construct to handle read-only properties
> try
> set the <property> of <object> to <attribute>
> catch e
> end try
>
> <stack>
> <card>
> <group>
> <control>
> <property>
> </property>
> </control>
> </group>
> <control>
> </control>
> </card>
> <substack>
> ... etc
> </substack>
> </stack>
>
> --
> -Mark Wieder
> mwieder at ahsoftware.net
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
--
Pete
Molly's Revenge <http://www.mollysrevenge.com>
More information about the use-livecode
mailing list