[Laszlo-checkins] r6176 - openlaszlo/branches/wafflecone/lps/components/incubator/rich-text/test
ben@openlaszlo.org
ben at openlaszlo.org
Tue Aug 21 21:26:27 PDT 2007
Author: ben
Date: 2007-08-21 21:26:21 -0700 (Tue, 21 Aug 2007)
New Revision: 6176
Modified:
openlaszlo/branches/wafflecone/lps/components/incubator/rich-text/test/formatfontsize.lzx
openlaszlo/branches/wafflecone/lps/components/incubator/rich-text/test/richtexteditarea-test.lzx
Log:
Change 20070821-ben-d by ben at slim.local on 2007-08-21 17:53:53 PDT
in /Users/ben/src/svn/openlaszlo/branches/wafflecone
for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone
Summary: Eliminate warnings in richtext tests.
New Features:
Bugs Fixed:
Technical Reviewer: jcrowley
QA Reviewer: mkratt (pending)
Doc Reviewer: (pending)
Documentation:
Several warnings and errors were being emitted at startup of the rich text
edit area test and driver files. These were because the linking up of the
editor to the formatting menus was fuzzy; I've made the linking up
explicit, and now we don't get these warnings, but the functionality
still works once we are all hooked up.
Release Notes:
Details:
Tests:
http://localhost:8080/wafflecone/lps/components/incubator/rich-text/test/richtexteditarea-test.lzx?lzr=swf8&debug=true&lzbacktrace=true
http://localhost:8080/wafflecone/lps/components/incubator/rich-text/test/richtexteditarea-driver.lzx?lzr=swf8&debug=true&lzbacktrace=true
..runs without warnings or errors.
Modified: openlaszlo/branches/wafflecone/lps/components/incubator/rich-text/test/formatfontsize.lzx
===================================================================
--- openlaszlo/branches/wafflecone/lps/components/incubator/rich-text/test/formatfontsize.lzx 2007-08-22 01:51:46 UTC (rev 6175)
+++ openlaszlo/branches/wafflecone/lps/components/incubator/rich-text/test/formatfontsize.lzx 2007-08-22 04:26:21 UTC (rev 6176)
@@ -48,7 +48,7 @@
- <attribute name="editor" value="$once{this.parent.editor}" />
+ <attribute name="editor" />
<attribute name="toolbar" value="$once{this.parent}" />
@@ -70,8 +70,6 @@
toolbar.registerTool(this,"size");
- this.setValue(this.editor.defaultfontsize, true);
-
</method>
<!--- @keywords private
@@ -99,17 +97,23 @@
//------------------------------------------------------------
if (this.changed && this.toolbar._passthruchanges) {
+ if ("editor" in this) {
+ this.editor.setFormatAttribute("size", this.getValue());
+ this.editor.delegateRestoreSelection();
+ }
- this.editor.setFormatAttribute("size", this.getValue());
-
- this.editor.delegateRestoreSelection();
-
}
]]>
</method>
+ <!-- When we get an editor to hook up to, make this menu's value
+ match up to the default font of the editor. -->
+ <method event="oneditor" args="e">
+ this.setValue(this.editor.defaultfontsize, true);
+ </method>
+
<!--- method broadcast out by the toolbar for clearing tool's state -->
Modified: openlaszlo/branches/wafflecone/lps/components/incubator/rich-text/test/richtexteditarea-test.lzx
===================================================================
--- openlaszlo/branches/wafflecone/lps/components/incubator/rich-text/test/richtexteditarea-test.lzx 2007-08-22 01:51:46 UTC (rev 6175)
+++ openlaszlo/branches/wafflecone/lps/components/incubator/rich-text/test/richtexteditarea-test.lzx 2007-08-22 04:26:21 UTC (rev 6176)
@@ -26,9 +26,9 @@
<formatbtn name="boldbtn" id="gBoldBtn" format="bold" iconname="bold" icony="4" />
<formatbtn name="underlinebtn" id="gUnderlineBtn" format="underline" iconname="underline" />
<formatbtn name="italicbtn" id="gItalicBtn" format="italic" iconname="italic" icony="4" />
- <formatfontface name="fontfacecb" y="${(parent.height-this.height)/2}"/>
- <formatfontcolor name="fontcolorcb" y="${(parent.height-this.height)/2}"/>
- <formatfontsize name="fontsizecb" y="${Math.round((parent.height-this.height)/2)}"/>
+ <formatfontface name="fontfacecb" id="gFontFaceCB" y="${(parent.height-this.height)/2}"/>
+ <formatfontcolor name="fontcolorcb" id="gFontColorCB" y="${(parent.height-this.height)/2}"/>
+ <formatfontsize name="fontsizecb" id="gFontSizeCB" y="${Math.round((parent.height-this.height)/2)}"/>
</richtexttoolbar>
@@ -42,6 +42,16 @@
defaultfontcolor="0x336699"
border="10" text="For reasons which many persons thought ridiculous, Mrs. Lightfoot Lee decided to pass the winter in Washington. She was in excellent health, but she said that the climate would do her good. In New York she had troops of friends, but she suddenly became eager to see again the very small number of those who lived on the Potomac. It was only to her closest intimates that she honestly acknowledged herself to be tortured by ennui. Since her husband's death, five years before, she had lost her taste for New York society; she had felt no interest in the price of stocks, and very little in the men who dealt in them; she had become serious. What was it all worth, this wilderness of men and women as monotonous as the brown stone houses they lived in? In her despair she had resorted to desperate measures. She had read philosophy in the original German, and the more she read, the more she was disheartened that so much culture should lead to nothing... nothing.">
+ <method name="init">
+ super.init();
+ gBoldBtn.setAttribute("editor", this);
+ gUnderlineBtn.setAttribute("editor", this);
+ gItalicBtn.setAttribute("editor", this);
+ gFontFaceCB.setAttribute("editor", this);
+ gFontSizeCB.setAttribute("editor", this);
+ gFontColorCB.setAttribute("editor", this);
+ </method>
+
</richtexteditarea>
</view>
</view>
More information about the Laszlo-checkins
mailing list