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
 mwie...@ahsoftware.net


_______________________________________________
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

Reply via email to