[Oberon] WMProperties.StringProperty

Dan Parnete dan.parnete at fastwebnet.it
Sun Oct 30 12:38:28 CET 2005


Hello,

The properties could be set by FromXML method. The StringProperty could 
not be reseted by FormXML because it doesn't treat the empty element.
I propose this correction:

        PROCEDURE FromXML*(xml : XML.Element);
            VAR en : XMLObjects.Enumerator;
            p : PTR;
        BEGIN
            en := xml.GetContents();
            p := en.GetNext();
            IF p # NIL THEN
                IF p IS XML.Chars THEN
                    Set(p(XML.Chars).GetStr())
                END
            ELSE  Set(Utilities.NewString(""))
            END
        END FromXML;

Thanks,
Dan Parnete


More information about the Oberon mailing list