The "text" attribute is set directly in the <text>#construct() method. That means you also need to assign the new "cdata" attribute at that point.
ok:    assertEquals("hello", new lz.text(canvas,{text: "hello"}).text)
fails: assertEquals("hello", new lz.text(canvas,{text: "hello"}).cdata)

And additionally you need to update "cdata" in <inputtext>#inputtextevent(...) for consistency between "text" and "cdata".

(Getter support in all runtimes would be really handy! :-)

On 1/12/2011 7:31 PM, P T Withington wrote:
[This is blocking the build, if you could review at high prio.]

Change ptw-20110111-et5 by [email protected] on 2011-01-11 18:13:29 EST
     in /Users/ptw/OpenLaszlo/trunk-3
     for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Make `cdata` presentation type work

Bugs Fixed: LPP-9649 Fencepost error in `cdata` presentation type

Technical Reviewer: [email protected] (pending)
QA Reviewer: [email protected] (pending)
Doc Reviewer: [email protected] (pending)

Release Notes:

     <text>  has a new attribute `cdata` that is of type `cdata` (as
     opposed to `text` or `html`).  This attribute is an alias for
     `text`, but when using a data binding, style binding or using
     acceptAttribute/presentAttribute, it will be properly xml
     escaped/unescaped.  In other words, if you want to bind the text
     content to a string and _not_ have it interpreted as markup, you
     would use this attribute.  See the documentation for<text>  for
     example usage.

Details:

     PresentationTypes: Make the presentation type `cdata` work.  Make
     `text` and `html` aliases.

     LzText: Add the  `cdata:cdata` attribute per notes above.  Clean
     up doc, add example of using `cdata`.

     SchemaBuilder: Add support for documenting style bindings for
     kernel classes.  Recognize cdata as a builtin type.

     ViewSchema: Learn about the meta tags<containsElements>  and
     <forbiddenElements>.  Make `text` and `html` types aliases and add
     `cdata`.  Permit `final` as an attribute property.

     NodeModel:  Don't bitch about meta tags or names on builtin
     classes.  For now, emit builtin-type info on instances.

     Compiler:  Don't try to compile meta tags.

     ClassModel:  Permit meta tags.  Model builtins (from schema), so
     we can get accurate type descriptions.

Tests:

Files:
M       WEB-INF/lps/lfc/core/PresentationTypes.lzs
M       WEB-INF/lps/lfc/views/LzText.lzs
M       WEB-INF/lps/server/src/org/openlaszlo/js2doc/SchemaBuilder.java
M       WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewSchema.java
M       WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java
M       WEB-INF/lps/server/src/org/openlaszlo/compiler/Compiler.java
M       WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassModel.java
M       WEB-INF/lps/server/src/org/openlaszlo/compiler/CompilationError.java

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/ptw-20110111-et5.tar

Reply via email to