Re: [jokosher-devel] File format loading
- From: chris procter <chris-procter talk21 com>
- To: jokosher-devel-list gnome org
- Subject: Re: [jokosher-devel] File format loading
- Date: Thu, 13 Jul 2006 18:30:29 +0100 (BST)
--- Stuart Langridge <sil kryogenix org> wrote:
Since J
> project dirs aren't shared around, I wonder if we
> just do what HTML
> does; if you come across stuff in the XML project
> file that you don't
> understand, then you ignore it. This does mean that
> editing a 0.3
> project in 0.2 might screw it up, though...
It doesn't have to, if the LoadProject function loads
*all* the xml elements for that project without caring
what they are, and J can use what it needs and leave
the rest.
The SaveProject function then saves *all* the
properties for each of the event/instrument/project
objects including the stuff that has been loaded but
isn't understood by this version.
So a 0.3 file will effectivly be a 0.2 file with extra
elements, and the SaveProject function will
automatically save it out as a 0.2 compatable file.
The only issue is that once a tag is defined its use
cant be changed in a later version, you'd need to
define a new element and get SaveProject to save that,
and the old version element (which may no longer be
used but is needed for backwards compatability)
This can all get a bit messy over time but then you
increment a major version number and declare a break
in backwards compatability without using a one-way
Upgrade-Project-To-2.0 function/program/thingy which
cleans it all up again.
Alternativly we can declare loading and saving as
"plugin" functions and only allow J to save out in
versions that it has the right set of plugins for. So
someone writes a 'Load0.3into0.2plugin' for Jv0.2 that
is clever enough to downgrade the project without
making a mess of it, and a Save0.3from0.2Plugin that
allows 0.2 to save out in the 0.3 format. Nastier to
code but allows the fileformat more flexability.
chris
___________________________________________________________
All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease of use." - PC Magazine
http://uk.docs.yahoo.com/nowyoucan.html
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]