Hi Guillaume: On Apr 18, 10:55 pm, Guillaume Maillard <[email protected]> wrote: > Hi, > > We could add a static method to return a version if you need... > "1.2b4" as String, is it ok for you?
Good enough (if not superb), thank you. > But IMHO, it's strange to rely on libraries you depends to manage > the revisions of your scripts. Strange? I suppose you've misunderstood because my motivation description was perhaps a bit too terse. The problem is this: 1. Newer jopendocument versions may have new methods that older versions lack (or IMO useful methods may have been dropped in newer versions - I've seen similar situations with other projects). 2. I obviously cannot now what jopendocument version users have installed (1.0, 1.1, one of the 1.2 versions, ...) 3. So my scripts need to know what version is installed to be able to invoke the proper (sub)script version with the new method (or that avoids the dropped method), or to even simply refuse to work in a graceful way (= rather than throw a java exception about an unknown method or class). So, somewhere before the real work is done my script queries for the jopendocument version and, based on the result, invokes subfunction script 1.2b2, 1.2b4 or simply yield a message like "this jopendocument version is not supported". BTW please remember, I'm not developing in pure java but in a scripted language through an octave-java bridge. Would this explanation make things more clear? Best wishes, Philip -- Subscription settings: http://groups.google.com/group/jopendocument/subscribe?hl=en
