On 11/14/2011 09:54 PM, Adam Pigg wrote:
On a similar note, imagine the possibility of embedding JS in a document, and defining a function such as
function calligra_version()  { return "2.6"; }

then, having some kind of user field that contained '=calligra_version()' that would display the appropriate content/

In my opinion we should lobby for that to become part of a future ODF release.

So far the only way to get such dynamic functionality in is using macros. But macros suck and to my knowledge there functionality is not really specified in the specs. Since this days we have so many different Javascript-implementations around + they allow to sandbox (unlike python for exampl) + they are light and fast (unlike Java) and are already a de facto standard in HTML it would make sense to gt Javascript into ODF as official "scripting-language". The hard work would then be to define API/functionality exposed by the applications so the Javascript can
do something with the application.



On Mon, Nov 14, 2011 at 8:30 PM, Sebastian Sauer <m...@dipe.org <mailto:m...@dipe.org>> wrote:

    On 11/14/2011 01:51 PM, Pierre Stirnweiss wrote:


        Background: I indeed think that is a rather important feature
        cause it's the only way to get content into a document that
        can be in a centralized way edited/updated. Means you for
        example a document describing the features of Calligra as
        released and then add a user-variable field for the
        version-number (e.g. 2.5 in our case). Then in some months
        if the document is updated to reflect what 2.6 is about
        someone only need to change the content of the
        calligra-version variable and voila. The alternate is to find+
        replace for "2.5" manually which is error-prune.


    Do you mean that the only difference between a 2.5 and 2.6
    release announcement would be the release number????

    No, that was an example. Think of a document where you list
    all changes done between the 2.x versions. Then you can just
    add a new chapter for a new version that includes the changes
    done in e.g. 2.6, change the version-uservariables from 2.5 to
    2.6 and have text like "The last version of Calligra is [2.6]" or
    "Last release on [2011-12-24]" auto-updated.
    Other examples could be a reference-number in an
    invoice or a postal code, city-name, etc. pp.


    PierreSt


    _______________________________________________
    calligra-devel mailing list
    calligra-devel@kde.org  <mailto:calligra-devel@kde.org>
    https://mail.kde.org/mailman/listinfo/calligra-devel


    _______________________________________________
    calligra-devel mailing list
    calligra-devel@kde.org <mailto:calligra-devel@kde.org>
    https://mail.kde.org/mailman/listinfo/calligra-devel



_______________________________________________
calligra-devel mailing list
calligra-devel@kde.org
https://mail.kde.org/mailman/listinfo/calligra-devel

_______________________________________________
calligra-devel mailing list
calligra-devel@kde.org
https://mail.kde.org/mailman/listinfo/calligra-devel

Reply via email to