[Laszlo-checkins] r8315 - in openlaszlo/branches/devildog: WEB-INF/lps/lfc/compiler WEB-INF/lps/lfc/controllers WEB-INF/lps/lfc/core WEB-INF/lps/lfc/data WEB-INF/lps/lfc/data/platform/swf WEB-INF/lps/lfc/debugger WEB-INF/lps/lfc/events WEB-INF/lps/lfc/helpers WEB-INF/lps/lfc/kernel WEB-INF/lps/lfc/kernel/dhtml WEB-INF/lps/lfc/kernel/swf WEB-INF/lps/lfc/kernel/swf9 WEB-INF/lps/lfc/views WEB-INF/lps/schema WEB-INF/lps/server/src/org/openlaszlo/compiler WEB-INF/lps/server/src/org/openlaszlo/sc WEB-INF/lps/server/src/org/openlaszlo/xml/internal WEB-INF/lps/templates demos demos/calendar demos/lzpix/classes demos/lzpixmobile demos/lzpixmobile/classes demos/lzpixmobile/data docs/src/nav docs/src/reference docs/src/reference/navbuilder docs/src/xsl examples/components laszlo-explorer lps/admin lps/components/base lps/components/charts/common lps/components/charts/styles lps/components/debugger lps/components/extensions/av lps/components/extensions/views lps/components/incubator lps/components/incubator/opttree lps/components/incubator/rich-text lps/components/incubator/rich-text/test lps/components/incubator/test lps/components/incubator/uploader lps/components/incubator/uploader/example lps/components/incubator/validators lps/components/lz lps/components/lzunit lps/components/queens-charts lps/components/queens-charts/shared lps/components/rpc lps/components/utils/diagnostic/inspector lps/includes/source test/performance test/smoke test/swf9
hqm@openlaszlo.org
hqm at openlaszlo.org
Wed Mar 19 08:02:28 PDT 2008
Author: hqm
Date: 2008-03-19 08:01:29 -0700 (Wed, 19 Mar 2008)
New Revision: 8315
Added:
openlaszlo/branches/devildog/demos/lzpixmobile/
openlaszlo/branches/devildog/demos/lzpixmobile/classes/
openlaszlo/branches/devildog/demos/lzpixmobile/classes/test/
openlaszlo/branches/devildog/demos/lzpixmobile/data/
openlaszlo/branches/devildog/demos/lzpixmobile/data/offlineimages/
openlaszlo/branches/devildog/demos/lzpixmobile/data/picts/
openlaszlo/branches/devildog/demos/lzpixmobile/lib/
openlaszlo/branches/devildog/demos/lzpixmobile/resources/
openlaszlo/branches/devildog/demos/lzpixmobile/test/
openlaszlo/branches/devildog/demos/lzpixmobile/views/
Removed:
openlaszlo/branches/devildog/demos/lzpixmobile/classes/
openlaszlo/branches/devildog/demos/lzpixmobile/classes/test/
openlaszlo/branches/devildog/demos/lzpixmobile/data/
openlaszlo/branches/devildog/demos/lzpixmobile/data/offlineimages/
openlaszlo/branches/devildog/demos/lzpixmobile/data/picts/
openlaszlo/branches/devildog/demos/lzpixmobile/lib/
openlaszlo/branches/devildog/demos/lzpixmobile/resources/
openlaszlo/branches/devildog/demos/lzpixmobile/test/
openlaszlo/branches/devildog/demos/lzpixmobile/views/
Modified:
openlaszlo/branches/devildog/WEB-INF/lps/lfc/compiler/Class.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/compiler/LzRuntime.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/controllers/LaszloAnimation.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/controllers/LaszloLayout.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/controllers/LzAnimatorGroup.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzDefs.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzNode.js
openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzNode.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/UserClass.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDataElement.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDataProvider.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDataRequest.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDataText.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDatapath.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDatapointer.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDataset.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzHTTPDatasource.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzParam.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzReplicationManager.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/platform/swf/LzConnection.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/platform/swf/LzConnectionDatasource.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/debugger/LzBacktrace.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/debugger/LzMessage.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/events/LaszloEvents.js
openlaszlo/branches/devildog/WEB-INF/lps/lfc/events/LaszloEvents.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/helpers/LzCommand.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/helpers/LzDataSelectionManager.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/helpers/LzSelectionManager.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/helpers/LzState.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/LzLibraryCleanup.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/dhtml/LzLibrary.js
openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as
openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzLibrary.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as
openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzLibrary.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloCanvas.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloView.js
openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloView.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LzInputText.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LzScript.lzs
openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LzText.lzs
openlaszlo/branches/devildog/WEB-INF/lps/schema/lfc.lzx
openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/CanvasCompiler.java
openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassCompiler.java
openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassModel.java
openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/CompilationEnvironment.java
openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java
openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewSchema.java
openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/CodeGenerator.java
openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/CommonGenerator.java
openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/Function.java
openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java
openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/ScriptClass.java
openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/ScriptCompiler.java
openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/xml/internal/Schema.java
openlaszlo/branches/devildog/WEB-INF/lps/templates/app-console.xslt
openlaszlo/branches/devildog/demos/calendar/cal-button.lzx
openlaszlo/branches/devildog/demos/lzpix/classes/clipboardinterior.lzx
openlaszlo/branches/devildog/demos/lzpix/classes/photocollection.lzx
openlaszlo/branches/devildog/docs/src/nav/classes.xml
openlaszlo/branches/devildog/docs/src/nav/tags.xml
openlaszlo/branches/devildog/docs/src/nav/toc.xml
openlaszlo/branches/devildog/docs/src/reference/navbuilder/navbuilder.rb
openlaszlo/branches/devildog/docs/src/reference/navbuilder/navxmlbuilder.rb
openlaszlo/branches/devildog/docs/src/reference/wrappers.xml
openlaszlo/branches/devildog/docs/src/xsl/js2doc2dbk.xsl
openlaszlo/branches/devildog/examples/components/index.html
openlaszlo/branches/devildog/laszlo-explorer/explore-nav.lzx
openlaszlo/branches/devildog/lps/admin/dev-console.html
openlaszlo/branches/devildog/lps/admin/dev-console.lzx
openlaszlo/branches/devildog/lps/components/base/basecomponent.lzx
openlaszlo/branches/devildog/lps/components/base/basedatacombobox.lzx
openlaszlo/branches/devildog/lps/components/base/basefocusview.lzx
openlaszlo/branches/devildog/lps/components/base/basegrid.lzx
openlaszlo/branches/devildog/lps/components/base/baselist.lzx
openlaszlo/branches/devildog/lps/components/base/basescrollbar.lzx
openlaszlo/branches/devildog/lps/components/base/baseslider.lzx
openlaszlo/branches/devildog/lps/components/base/basetabs.lzx
openlaszlo/branches/devildog/lps/components/base/basetabslider.lzx
openlaszlo/branches/devildog/lps/components/base/basetree.lzx
openlaszlo/branches/devildog/lps/components/base/basewindow.lzx
openlaszlo/branches/devildog/lps/components/base/componentmanager.lzx
openlaszlo/branches/devildog/lps/components/base/datalistselector.lzx
openlaszlo/branches/devildog/lps/components/base/resizeview.lzx
openlaszlo/branches/devildog/lps/components/base/style.lzx
openlaszlo/branches/devildog/lps/components/base/swatchview.lzx
openlaszlo/branches/devildog/lps/components/charts/common/chart.lzx
openlaszlo/branches/devildog/lps/components/charts/common/dataseries.lzx
openlaszlo/branches/devildog/lps/components/charts/common/rectangularchart.lzx
openlaszlo/branches/devildog/lps/components/charts/common/viewspoolmanager.lzx
openlaszlo/branches/devildog/lps/components/charts/styles/styleparser.lzx
openlaszlo/branches/devildog/lps/components/debugger/newcontent.lzx
openlaszlo/branches/devildog/lps/components/debugger/scrollingtext.lzx
openlaszlo/branches/devildog/lps/components/extensions/av/mediastream.lzx
openlaszlo/branches/devildog/lps/components/extensions/av/rtmpconnection.lzx
openlaszlo/branches/devildog/lps/components/extensions/av/videoview.lzx
openlaszlo/branches/devildog/lps/components/extensions/views/richinputtext.lzx
openlaszlo/branches/devildog/lps/components/incubator/autocompletecombobox.lzx
openlaszlo/branches/devildog/lps/components/incubator/baseradio.lzx
openlaszlo/branches/devildog/lps/components/incubator/colorpicker.lzx
openlaszlo/branches/devildog/lps/components/incubator/fisheye_lib.lzx
openlaszlo/branches/devildog/lps/components/incubator/gradientview.lzx
openlaszlo/branches/devildog/lps/components/incubator/opttree/opttree.lzx
openlaszlo/branches/devildog/lps/components/incubator/rich-text/baserichedittext.lzx
openlaszlo/branches/devildog/lps/components/incubator/rich-text/linkdialog.lzx
openlaszlo/branches/devildog/lps/components/incubator/rich-text/richtexteditarea.lzx
openlaszlo/branches/devildog/lps/components/incubator/rich-text/test/richtexteditarea-test.lzx
openlaszlo/branches/devildog/lps/components/incubator/scrolledittext.lzx
openlaszlo/branches/devildog/lps/components/incubator/test/test-edittext.lzx
openlaszlo/branches/devildog/lps/components/incubator/test/tooltipmanager-test.lzx
openlaszlo/branches/devildog/lps/components/incubator/tooltipmanager.lzx
openlaszlo/branches/devildog/lps/components/incubator/uploader/example/test-fileuploadlist.lzx
openlaszlo/branches/devildog/lps/components/incubator/uploader/example/test-multiplefileupload.lzx
openlaszlo/branches/devildog/lps/components/incubator/uploader/multiplefileupload.lzx
openlaszlo/branches/devildog/lps/components/incubator/validators/basevalidator.lzx
openlaszlo/branches/devildog/lps/components/incubator/validators/validatingForm.lzx
openlaszlo/branches/devildog/lps/components/lz/datepicker.lzx
openlaszlo/branches/devildog/lps/components/lz/grid.lzx
openlaszlo/branches/devildog/lps/components/lz/gridtext.lzx
openlaszlo/branches/devildog/lps/components/lz/list.lzx
openlaszlo/branches/devildog/lps/components/lz/menu.lzx
openlaszlo/branches/devildog/lps/components/lzunit/lzunit.lzx
openlaszlo/branches/devildog/lps/components/queens-charts/barchart.lzx
openlaszlo/branches/devildog/lps/components/queens-charts/linechart.lzx
openlaszlo/branches/devildog/lps/components/queens-charts/piechart.lzx
openlaszlo/branches/devildog/lps/components/queens-charts/shared/barchartbacking.lzx
openlaszlo/branches/devildog/lps/components/queens-charts/shared/basechart.lzx
openlaszlo/branches/devildog/lps/components/queens-charts/shared/basechartbacking.lzx
openlaszlo/branches/devildog/lps/components/queens-charts/shared/dataseries.lzx
openlaszlo/branches/devildog/lps/components/queens-charts/shared/legend.lzx
openlaszlo/branches/devildog/lps/components/queens-charts/shared/linechartbacking.lzx
openlaszlo/branches/devildog/lps/components/queens-charts/shared/wholepie.lzx
openlaszlo/branches/devildog/lps/components/rpc/rpc.lzx
openlaszlo/branches/devildog/lps/components/rpc/xmlrpc.lzx
openlaszlo/branches/devildog/lps/components/utils/diagnostic/inspector/inspector.lzx
openlaszlo/branches/devildog/lps/includes/source/iframemanager.js
openlaszlo/branches/devildog/test/performance/typeof-instance-of.lzx
openlaszlo/branches/devildog/test/smoke/all_setters.lzl
openlaszlo/branches/devildog/test/smoke/getters-setters.lzl
openlaszlo/branches/devildog/test/smoke/regression.lzl
openlaszlo/branches/devildog/test/smoke/smokecheck.lzx
openlaszlo/branches/devildog/test/swf9/hello.lzx
Log:
Change 20080319-hqm-0 by hqm at badtzmaru.local on 2008-03-19 10:59:12 EDT
in /Users/hqm/openlaszlo/devildog2
for http://svn.openlaszlo.org/openlaszlo/branches/devildog
Summary: merge trunk to devildog
New Features:
Bugs Fixed:
Technical Reviewer: (pending)
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Merged revisions 8174-8185,8187-8236,8238,8240-8311 via svnmerge from
http://svn.openlaszlo.org/openlaszlo/trunk
.......
r8176 | max | 2008-03-05 13:04:49 -0500 (Wed, 05 Mar 2008) | 24 lines
Change 20080305-maxcarlson-j by maxcarlson at Roboto on 2008-03-05 09:48:44 PST
in /Users/maxcarlson/openlaszlo/trunk-clean
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Fix braino in iframemanager
New Features:
Bugs Fixed: LPP-5543 - <html> tag is broken due to javascript error.
Technical Reviewer: promanik
QA Reviewer: lhenrywilkins at laszlosystems.com
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details: Should use 'i' instead of 'iframe'... Doe!
Tests: lps/components/extensions/test/html.lzx laods pages again.
.......
r8179 | max | 2008-03-05 14:32:11 -0500 (Wed, 05 Mar 2008) | 28 lines
Change 20080304-maxcarlson-k by maxcarlson at Roboto on 2008-03-04 19:57:57 PST
in /Users/maxcarlson/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Prevent null= argument for proxyless GET requests.
New Features:
Bugs Fixed: LPP-5544 - Prevent null= argument for proxyless GET requests.
Technical Reviewer: hminsky
QA Reviewer: promanik
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details: lfc.lzx - Prevent warnings for dataset.clientcacheable
LzHTTPDataProvider.lzs - Only append the post body if it exists.
LzDataset.lzs - Add docs for clientcacheable
Tests: See LPP-5544
.......
r8182 | max | 2008-03-05 17:13:01 -0500 (Wed, 05 Mar 2008) | 24 lines
Change 20080305-maxcarlson-w by maxcarlson at Roboto on 2008-03-05 13:48:58 PST
in /Users/maxcarlson/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Fix contextmenu for canvas, text and inputtext
New Features:
Bugs Fixed: LPP-5533
Technical Reviewer: promanik
QA Reviewer: a.bargull at intensis.de
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details: Attach to getMCRef() for canvas and LzTextSprite instances. If this is the canvas, attache to _root.menu. Move testing inside if ($debug) case.
Tests: See LPP-5533 and LPP-4212
.......
r8185 | max | 2008-03-05 18:22:05 -0500 (Wed, 05 Mar 2008) | 1 line
+ Add fail instanceof test
.......
r8189 | max | 2008-03-06 00:13:20 -0500 (Thu, 06 Mar 2008) | 26 lines
Change 20080305-maxcarlson-U by maxcarlson at Roboto on 2008-03-05 18:27:34 PST
in /Users/maxcarlson/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Update basefocusview to use setVisibility(), fix baserichedittext compilation error
New Features:
Bugs Fixed: LPP-5550
Technical Reviewer: promanik
QA Reviewer: enw at laszlosystems.com
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details: baserichedittext.lzx - Remove duplicate name attribute
basefocusview.lzx - Use setVisibility() instead of setVisible()
Tests: See LPP-5550
.......
r8201 | lou | 2008-03-06 16:59:05 -0500 (Thu, 06 Mar 2008) | 17 lines
Change 20080306-lou-p by lou at loumac.local on 2008-03-06 17:55:38 AST
in /Users/lou/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: reference: remove first item in Data folder "TBD REVIEW"
New Features:
Bugs Fixed: LPP-5566
Technical Reviewer: (pending)
QA Reviewer: (pending)
Doc Reviewer: (pending)
Tests: visual verify
.......
r8202 | max | 2008-03-06 17:15:12 -0500 (Thu, 06 Mar 2008) | 26 lines
Change 20080306-maxcarlson-k by maxcarlson at Roboto on 2008-03-06 13:08:28 PST
in /Users/maxcarlson/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Reset selection when when selection position is out of bounds
New Features:
Bugs Fixed: LPP-5449 - Seems like inputtext selection position is not reset until input text is focused or setSelection() is invoked
Technical Reviewer: promanik
QA Reviewer: pkang at laszlosystems.com
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details: LzTextSprite.as - Track selection position in setSelection. If the string passed to setText() is smaller than the selection, reset the selection.
LzInputTextSprite.as - If the string passed to setText() is smaller than the selection, reset the selection.
Tests: See LPP-5449
.......
r8209 | dda | 2008-03-07 15:41:02 -0500 (Fri, 07 Mar 2008) | 52 lines
Change 20080307-dda-B by dda at lester.local on 2008-03-07 15:20:58 EST
in /Users/dda/laszlo/src/svn/openlaszlo/trunk-doc
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: docs: Fixed problems in Classes and Tags tabs in left pane navigator
New Features:
Bugs Fixed: LPP-5366
Technical Reviewer: (pending)
QA Reviewer: (pending)
Doc Reviewer: liorio (pending)
Documentation:
Release Notes:
Details:
Overhauled navxmlbuilder.rb somewhat (navbuilder.rb is
a red herring, probably no longer useful - added a
message to it to use navxmlbuilder). Now navxmlbuilder
examines all files that might have tags in them, like
LzCanvas.html . This means 1) it cannot use the name of
the file to determine the tag, now it specifically looks for
the html title tag and the presence of <TAG_NAME>
Rather kludgy, but accurate. And 2) since we are looking
at a much larger set of files, including incubator files,
we need a way to eliminate incubator software from the reference
doc. Another kludge - we look for any <link> to a name
with Incubator in it. Easy enough in ruby.
There is probably a cleaner way to do this - we'd like for
the doc build process to communicate more directly to navxmlbuilder.
Either by inserting recognizable comments or div labels into the final
.html, or collected into another file. Saying for example,
this source came from the incubator, or this .html file has a tag, called <foo>.
I explored the first of these, but made little headway, so
a cleaner solution will need to be deferred.
The classes.xml and tags.xml produced by running the script are
part of this commit.
The ruby files now generate in the xml a copyright comment and a 'do not
edit this file' comment, also to make it clear that navxmlbuilder.rb
shold be used to build them.
Tests:
Clicked around in Classes Tags. There should be no more broken
links and many of the <tags> that were missing before can be found.
.......
r8210 | ptw | 2008-03-08 06:40:25 -0500 (Sat, 08 Mar 2008) | 20 lines
Change 20080307-ptw-x by ptw at dueling-banjos.local on 2008-03-07 15:16:34 EST
in /Users/ptw/OpenLaszlo/ringding
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Stop infinite recursion in baseslider
Bugs Fixed:
LPP-5570 'Circular constraints break swf instantiation'
Technical Reviewer: max (Message-ID: <47D23C0E.6040609 at openlaszlo.org>)
QA Reviewer: steele at osteele.com (pending)
Details:
Initialize basesliderthumb#x so we don't end up comparing to NaN
in setX to break recursion
Tests:
Test case from bug
.......
r8212 | dda | 2008-03-08 11:03:53 -0500 (Sat, 08 Mar 2008) | 36 lines
Change 20080308-dda-t by dda at lester.local on 2008-03-08 10:32:54 EST
in /Users/dda/laszlo/src/svn/openlaszlo/trunk-doc2
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Doc: add attributes for markup entries, remove empty Events section and empty Extends
New Features:
Bugs Fixed: LPP-5563, LPP-5564, LPP-5559, LPP-5537 (partial)
Technical Reviewer: (pending)
QA Reviewer: (pending)
Doc Reviewer: liorio (pending)
Documentation:
Release Notes:
Details:
Added attribute information in <a>,<img>,<face>,<frame> wrappers to match 3.4
I'm leaving LPP-5537 open for now:
<a> is troublesome, would like to have a list of values _blank, etc. appearing
in the attribute description (as in 3.4), but could not find a way to do that.
For the moment, I moved that list into the description of <a>, and will continue
to try to fix it 'for real'.
When there is no class to Extend from, we no longer show 'Extends: ' with a blank.
When there are no Events, the event list no longer appears.
Tests:
built all docs and examined the output for the gven pages.
Compared all html to make sure that no real 'Extends' entry got lost.
.......
r8215 | lou | 2008-03-10 12:26:43 -0400 (Mon, 10 Mar 2008) | 20 lines
Change 20080310-lou-B by lou at loumac.local on 2008-03-10 12:20:11 AST
in /Users/lou/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: include intro paragraphs and example code from 3.4 to the dataselectionmanager page of the reference.
New Features:
Bugs Fixed: LPP-5569 (partial)
Technical Reviewer: (pending)
QA Reviewer: (pending)
Doc Reviewer: (pending)
Details:
there are still problems with the name of the page and the short description.
Tests: visual verify
.......
r8220 | dda | 2008-03-10 22:35:26 -0400 (Mon, 10 Mar 2008) | 27 lines
Change 20080310-dda-7 by dda at lester.local on 2008-03-10 22:20:03 EDT
in /Users/dda/laszlo/src/svn/openlaszlo/trunk-doc
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: doctools: fix to include <splash>, <splash view> in tags index
New Features:
Bugs Fixed: LPP-5366
Technical Reviewer: (pending)
QA Reviewer: (pending)
Doc Reviewer: liorio (pending)
Documentation:
Release Notes:
Details:
This was missed in the big submit to fix the tags index.
The titles: <splash> (as2) <splash view> (as2)
were not recognized as tags because (as2) confused the script.
This is now fixed.
Tests:
.......
r8221 | max | 2008-03-11 13:57:57 -0400 (Tue, 11 Mar 2008) | 1 line
+ initial checkin of lzpixmobile
.......
r8222 | max | 2008-03-11 14:21:46 -0400 (Tue, 11 Mar 2008) | 1 line
+ Fix bad comment
.......
r8231 | max | 2008-03-11 20:19:19 -0400 (Tue, 11 Mar 2008) | 1 line
+ remove bad include
.......
r8232 | hqm | 2008-03-12 12:52:15 -0400 (Wed, 12 Mar 2008) | 26 lines
Change 20080312-hqm-S by hqm at badtzmaru.local on 2008-03-12 12:51:00 EDT
in /Users/hqm/openlaszlo/trunk2/WEB-INF/lps/server/src
for http://svn.openlaszlo.org/openlaszlo/trunk/WEB-INF/lps/server/src
Summary: adjust source locator position for functions
New Features:
Bugs Fixed:
Technical Reviewer: ptw
QA Reviewer: akitsik
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
move the soure locator string inside to the start of the function body
Tests:
.......
r8236 | hqm | 2008-03-12 16:14:29 -0400 (Wed, 12 Mar 2008) | 24 lines
Change 20080312-hqm-l by hqm at badtzmaru.local on 2008-03-12 15:48:09 EDT
in /Users/hqm/openlaszlo/trunk3
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: fix swf remote debug dev-console app.
New Features:
Bugs Fixed:
Technical Reviewer: max
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Tests:
.......
r8242 | bargull | 2008-03-12 21:05:31 -0400 (Wed, 12 Mar 2008) | 26 lines
Change 20080313-bargull-0 by bargull at dell--p4--2-53 on 2008-03-13 01:44:10
in /home/Admin/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Fix bug in datalistselector#findIndex(..)
New Features:
Bugs Fixed: LPP-5579 - "getIndexForItem() bug when only 1 item in grid"
Technical Reviewer: promanik
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
You can pass to "datalistselector#findIndex(..)" either a LzView or a LzDatapointer, the latter wasn't treated when there was no clonemanager on screen.
Tests:
Attached at bug-report
.......
r8244 | lou | 2008-03-13 08:34:13 -0400 (Thu, 13 Mar 2008) | 24 lines
Change 20080313-lou-8 by lou at loumac.local on 2008-03-13 08:29:24 AST
in /Users/lou/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: fix markup for applyData() and construct()
Bugs Fixed: LPP-5244 (partial)
Technical Reviewer: (pending)
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Incorrect markup was causing text to be left out of the generated HTML.
applyData() now correctly displays @attribute
construct() now has a properly nested bulleted list in the description
Tests: visual verify
.......
r8257 | lou | 2008-03-13 16:16:01 -0400 (Thu, 13 Mar 2008) | 21 lines
Change 20080313-lou-E by lou at loumac.local on 2008-03-13 16:06:13 AST
in /Users/lou/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Clarify dbugger and debug tag info in the reference
Bugs Fixed: LPP-4936
Technical Reviewer: (pending)
QA Reviewer: (pending)
Doc Reviewer: (pending)
Details:
Remove the incorrect info about how to enable the debugger, and just link
to the appropriate section in the dguide.
Document that the debug tag is optional, and describe the default behavior.
Change "hotlink" in the example code to "inspectable object".
Tests: visual verify
.......
r8264 | lou | 2008-03-14 12:42:20 -0400 (Fri, 14 Mar 2008) | 15 lines
Change 20080314-lou-v by lou at loumac.local on 2008-03-14 12:34:37 AST
in /Users/lou/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: fix link to the script reference page
Bugs Fixed: LPP-4933
Technical Reviewer: (pending)
QA Reviewer: (pending)
Doc Reviewer: (pending)
Tests: visual verify
.......
r8267 | max | 2008-03-14 13:38:45 -0400 (Fri, 14 Mar 2008) | 37 lines
Change 20080313-maxcarlson-i by maxcarlson at Roboto on 2008-03-13 16:23:47 PDT
in /Users/maxcarlson/openlaszlo/trunk-clean
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Update LzPix, calendar and explore-nav to work with new class system
New Features:
Bugs Fixed: LPP-1587 'ECMA4: Compile LZX declarations as JS declarations' (partial)
Technical Reviewer: henry.minsky at gmail.com
QA Reviewer: ptw
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details: Very straightforward - just added lz. for class lookups. I feel much better about committing Tucker's changes to trunk now! I also had to patch LzState:
--- WEB-INF/lps/lfc/helpers/LzState.lzs (revision 8253)
+++ WEB-INF/lps/lfc/helpers/LzState.lzs (working copy)
@@ -410,7 +410,7 @@
//create a setter for this method; by definition attributes that
//the state has a setter for are handled by the state
- this.__LZaddSetter( mname , '__LZsetProperty' );
+ //this.__LZaddSetter( mname , '__LZsetProperty' );
} else {
var arrtopush = pardels;
}
Tests: LzPix, explorer and calendar all run in DHTML now with Tucker's latest changeset. Note that the calendar now takes 2x to start up in swf8 - 1500ms vs ~3000ms on my machine with Tucker's changes.
All these changes should be safe to go in trunk as-is.
.......
r8272 | hqm | 2008-03-14 15:47:16 -0400 (Fri, 14 Mar 2008) | 40 lines
Change 20080314-hqm-U by hqm at badtzmaru.local on 2008-03-14 15:01:36 EDT
in /Users/hqm/openlaszlo/trunk4
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: add warning for method in a state
New Features:
Bugs Fixed:
Technical Reviewer: ptw
QA Reviewer: dda
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
add a "forbiddenElements" directive to the schema parser/verifier, and
make "method" a forbidden child of a <state> (or subclass of <state>) tag.
Tests:
compiling this should generate a warning
<canvas width="100%" height="80%" debug="true">
<view name="foo">
<dragstate>
<view/>
<method name="foo">
</method>
</dragstate>
</view>
</canvas>
.......
r8274 | hqm | 2008-03-15 14:11:10 -0400 (Sat, 15 Mar 2008) | 26 lines
Change 20080315-hqm-U by hqm at badtzmaru.local on 2008-03-15 14:10:12 EDT
in /Users/hqm/openlaszlo/trunk2
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: change y-offset constraint from once to always
New Features:
Bugs Fixed:
Technical Reviewer: ptw
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Tests:
run examples/components/grid_example.lzx, should display properly centered text in grid cells
.......
r8275 | hqm | 2008-03-15 16:44:04 -0400 (Sat, 15 Mar 2008) | 27 lines
Change 20080315-hqm-9 by hqm at badtzmaru.local on 2008-03-15 16:42:53 EDT
in /Users/hqm/openlaszlo/trunk2
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: move method outside of state in basewindow
New Features:
Bugs Fixed:
Technical Reviewer: ptw
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Tests:
examples/components/window_example.lzx
examples/components/style_example.lzx
examples/components/grid_example.lzx
.......
r8279 | lou | 2008-03-16 08:39:22 -0400 (Sun, 16 Mar 2008) | 17 lines
Change 20080316-lou-C by lou at loumac.local on 2008-03-16 08:34:07 AST
in /Users/lou/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: remove link to LzConnectionDatasource from the nav pane in the reference
New Features:
Bugs Fixed: LPP-5593
Technical Reviewer: (pending)
QA Reviewer: (pending)
Doc Reviewer: (pending)
Tests: visual verify
.......
r8281 | hqm | 2008-03-16 12:13:39 -0400 (Sun, 16 Mar 2008) | 24 lines
Change 20080316-hqm-Z by hqm at badtzmaru.local on 2008-03-16 12:11:57 EDT
in /Users/hqm/openlaszlo/trunk3
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: change references to class names to be from lz namespace instead of global
New Features:
Bugs Fixed:
Technical Reviewer: ptw
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Tests:
.......
r8282 | hqm | 2008-03-16 12:14:43 -0400 (Sun, 16 Mar 2008) | 24 lines
Change 20080316-hqm-X by hqm at badtzmaru.local on 2008-03-16 12:14:10 EDT
in /Users/hqm/openlaszlo/trunk3
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: remove warning for methods in states
New Features:
Bugs Fixed:
Technical Reviewer: ptw
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Tests:
.......
r8283 | hqm | 2008-03-16 12:16:50 -0400 (Sun, 16 Mar 2008) | 34 lines
Change 20080316-hqm-B by hqm at badtzmaru.local on 2008-03-16 12:10:41 EDT
in /Users/hqm/openlaszlo/trunk2
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: convert applyConstraint to applyConstraintMethod call
New Features:
Bugs Fixed:
Technical Reviewer: ptw
QA Reviewer: max
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
update component to use applyConstraintMethod
This defines a method 'adjheight' to do the work, and defines it
on the three views that need it.
If there were more than three callers, I would consider defining a new
class with this method, but
this seemed like the most expedient solution.
Tests:
examples/components/window_example.lzx
.......
r8284 | ptw | 2008-03-16 15:41:02 -0400 (Sun, 16 Mar 2008) | 19 lines
Change 20080316-ptw-N by ptw at dueling-banjos.local on 2008-03-16 15:35:22 EDT
in /Users/ptw/OpenLaszlo/ringding-clean
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Update components to use lz "namespace" to access tag classes
Bugs Fixed:
LPP-1587 'ECMA4: Compile LZX declarations as JS declarations' (partial)
Technical Reviewer: max (pending)
QA Reviewer: henry (pending)
Details:
Fixed all class references. Removed use of getAttribute.
Tests:
Inspection
.......
r8285 | ptw | 2008-03-16 15:57:05 -0400 (Sun, 16 Mar 2008) | 21 lines
Change 20080316-ptw-U by ptw at dueling-banjos.local on 2008-03-16 15:55:02 EDT
in /Users/ptw/OpenLaszlo/ringding-clean
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Modernize smokecheck
Bugs Fixed:
LPP-1587 'ECMA4: Compile LZX declarations as JS declarations' (partial)
Technical Reviewer: max (pending)
QA Reviewer: henry (pending)
Details:
regression, all_setters, smokecheck, getters-setters: update to modern class names,
remove obsolete getAttribute calls. Fix one broken test, comment
out other broken test (reported LPP-5160).
Tests:
smokecheck
.......
r8292 | ptw | 2008-03-17 12:18:07 -0400 (Mon, 17 Mar 2008) | 20 lines
Change 20080317-ptw-i by ptw at dueling-banjos.local on 2008-03-17 12:11:02 EDT
in /Users/ptw/OpenLaszlo/ringding-clean
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: More class/namespace fix-ups
Bugs Fixed:
LPP-1587 'ECMA4: Compile LZX declarations as JS declarations' (partial)
Technical Reviewer: hqm (pending)
QA Reviewer: max (pending)
Doc Reviewer: (pending)
Details:
More lz.<tagname> fixes
Tests:
Inspection
.......
r8293 | ptw | 2008-03-17 13:24:25 -0400 (Mon, 17 Mar 2008) | 109 lines
Change 20080313-ptw-5 by ptw at dueling-banjos.local on 2008-03-13 10:54:50 EDT
in /Users/ptw/OpenLaszlo/ringding-clean
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: LZX classes as JS2 classes
New Features: The tag compiler now emits LZX classes as JS2 class declarations
Bugs Fixed:
LPP-1587 'ECMA4: Compile LZX declarations as JS declarations' (partial)
LPP-2817 'Remove deprecated support for global tag classes'
Technical Reviewer: henry.minsky at gmail.com (verbal)
QA Reviewer: max at openlaszlo.org (pending)
Doc Reviewer: lou at louiorio.com (pending)
Release Notes:
Classes defined using the <class name="name"> _must_ be referenced
in script as `lz.name`, there will no longer be a global alias
`name` that refers to the class implementing the tag.
getAttribute is deprecated. You should just reference the
attribute directly. getters are no longer supported.
Details:
Highlights: The tag compiler now emits user classes as a JS2
class declaration. UserClass.lzs is dead. Setters are now just
methods on a class with a distinctive name, so the whole setters
table inheritance mechanism is gone. Early/delayed setters is a
private protocol between LzNode and LzView. All classes have a
uniform 'namespace' naming scheme: $lzc$class_<tagname>, old LFC
class names are maintained for compatibility, but there are NO
global class names any more. All user code will have to be
updated to use lz.<tagname> to address classes for `new` or
`instanceof` tests.
Every LFC Class: Use new static `attributes` mechanism, new
setters methods naming scheme, remove old setters table.
LzNode: Implement new static `attributes` mechanism. Break out
mergeAttributes and mergeChildren as class methods so they can be
used by user classes. Fetch default attributes from constructor.
Install decls compiler can't detect. Merge with instantiation
attributes. Use common merge subroutines. Install namespace
alias. Remove all obsolete inherited hashes now that we use class
inheritance to manage that. Early/delayed setters are now a
private protocol between Node and View. No other classes should
use these. In applyArgs look for setters as methods. Deprecate
getAttribute, getters have not been supported for a long time.
Update setAttribute to use setter methods. Remove old setters
mechanism. Deprecate __LZaddSetter, __LZstoreRefs -- private
protocol no longer supported. Change options setters to create
necessary inherited hash on the fly.
UserClass: Empty, save for documentation and the placement kludge.
LzDefs: Flatten inherited hash so we can dispense with
_ignoreAttribute (and be portable!).
LzView, LzCanvas: Cooperate with LzNode on early/late setters.
LzState: Adapt to new user class implementation which may place
state methods in the wrong place, and won't allow dynamically
adding setters.
TODO: Clean up the setter trampolines to be the actual setters
and have the old public setXXX methods call them (with a
deprecation warning where appropriate).
Schema: intern types.
JavascriptGenerator: Don't make checked nodes outside of a
function context (you won't have a 'this').
JavascriptGenerator, CodeGenerator: Temporarily turn of
setAttribute inlining until it can be updated.
CommonGenerator: Translate declared attributes as having an undefined
initial value.
ScriptCompiler: Support for converting objects to script,
including undefined values.
ScriptClass: Complete implementation that writes out a class as a
JS2 class declaration.
ClassCompiler: Compile user classes to JS2 class declarations,
which mostly involves mimicing the way UserClass used to
initialize according to the various types of initial values,
setters, and stateliness that you might have.
CanvasCompiler, CompilationEnvironment, etc.: Eliminate vestigial
support for case-insensitive runtimes
NodeModel: Support class compilation by delaying conversion of
bindings for attributes.
ClassModel: Support for (not yet used) merging of superclass
attributes and setters. Missing modelling of built-in classes.
baseslider: Interestingly, with the corrected initialization
order, I need to back out the previous change to this, to prevent
recursion. This is clearly a very fragile piece of code...
Tests:
smokecheck (minus broken test LPP-5610) passes in both runtimes,
amazon runs in both runtimes
.......
r8295 | hqm | 2008-03-17 14:00:13 -0400 (Mon, 17 Mar 2008) | 31 lines
Change 20080317-hqm-H by hqm at badtzmaru.local on 2008-03-17 13:56:25 EDT
in /Users/hqm/openlaszlo/trunk4
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: fix datepicker class references
New Features:
Bugs Fixed:
Technical Reviewer: ptw
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
+ datepicker uses a "once" type attribute to hold pointers to the class used for
day and week components, so need to use a "lz." prefix for the attribute initial values.
+ add link to datepicker example from examples index page
Tests:
examples/components/datepicker_example.lzx
.......
r8297 | max | 2008-03-17 21:47:45 -0400 (Mon, 17 Mar 2008) | 24 lines
Change 20080314-maxcarlson-L by maxcarlson at Roboto on 2008-03-14 12:54:25 PDT
in /Users/maxcarlson/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Reset both horizontal and vertical scrolling after setFocus()
New Features:
Bugs Fixed: LPP-5450 - Cursor position moves when clicking on inputtext containing text longer than its width
Technical Reviewer: promanik
QA Reviewer: pkang at laszlosystems.com
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details: Reset scrolling after setFocus()
Tests: See LPP-5450.
.......
r8298 | hqm | 2008-03-17 22:12:49 -0400 (Mon, 17 Mar 2008) | 1 line
remove debugging print statement
.......
r8302 | ptw | 2008-03-17 22:34:17 -0400 (Mon, 17 Mar 2008) | 29 lines
Change 20080317-ptw-d by ptw at dueling-banjos.local on 2008-03-17 20:01:31 EDT
in /Users/ptw/OpenLaszlo/ringding-clean
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Don't let a re-declared attribute clobber an inherited one
Bugs Fixed:
LPP-5614 'compiler must not redeclare instance variables in
subclasses' (partial: for JS1)
Technical Reviewer: hqm (pending)
QA Reviewer: max (pending)
Details:
LzMessage: Be more careful testing for node filenames
LzNode: Don't merge instances in the attr list!
LzText: Be more careful computing toString.
LazszloEvents: Better test for declared events. Move debug name
earlier so it shows up in the constructor.
Class: Don't clobber an inherited attribute with a declared attribute.
Tests:
I see fewer undefined property warnings in the animation example.
.......
r8303 | hqm | 2008-03-17 22:45:04 -0400 (Mon, 17 Mar 2008) | 32 lines
Change 20080317-hqm-p by hqm at badtzmaru.local on 2008-03-17 22:40:21 EDT
in /Users/hqm/openlaszlo/trunk4
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: fix lzpix class lookup
New Features:
Bugs Fixed: 5615
Technical Reviewer: max
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
The lookup of "photoclass" does not need to be in the "lz" namespace, since photoclass
is a var, and it is already set to point to an actual class, via the attribute initializer
<attribute name="photoclass" value="lz.photo" when="once"/>
Tests:
lzpix app, select a group of thumbnails, and drag to clipboard area
.......
r8305 | ptw | 2008-03-18 08:56:56 -0400 (Tue, 18 Mar 2008) | 20 lines
Change 20080318-ptw-7 by ptw at dueling-banjos.local on 2008-03-18 08:52:33 EDT
in /Users/ptw/OpenLaszlo/ringding-clean
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: static var attributes is private
Bugs Fixed:
LPP-5619 et al. (partial)
Technical Reviewer: dda at ddanderson.com (pending)
Doc Reviewer: lou at louiorio.com (pending)
Details:
Forgot to mark new class variable as private. Also remove some
debugging cruft left in LzNode.
Tests:
Inspection
.......
r8308 | hqm | 2008-03-18 13:45:42 -0400 (Tue, 18 Mar 2008) | 28 lines
Change 20080318-hqm-p by hqm at badtzmaru.local on 2008-03-18 13:43:51 EDT
in /Users/hqm/openlaszlo/trunk4
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: remove duplicate initializer for 'y' in calendar button class
New Features:
Bugs Fixed:
Technical Reviewer: ptw
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
there is a text view which is declared to have both a "y=2" initial value and
also a once constraint on 'y', which leads to a compiler warning. This change
removed the constant value, and leaves the constraint declaration.
Tests:
.......
r8309 | lou | 2008-03-18 14:46:04 -0400 (Tue, 18 Mar 2008) | 5 lines
Change 20080318-lou-E by lou at loumac.local on 2008-03-18 14:44:20 AST
in /Users/lou/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
.......
r8311 | ptw | 2008-03-18 16:06:32 -0400 (Tue, 18 Mar 2008) | 30 lines
Change 20080318-ptw-i by ptw at dueling-banjos.local on 2008-03-18 15:55:21 EDT
in /Users/ptw/OpenLaszlo/ringding
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Fix behaviour of attributes with setter _and_ intial value
Bugs Fixed:
LPP-5613 'examples/animation/animation.lzx broken by class compiler
change' (partial)
Technical Reviewer: hqm (pending)
QA Reviewer: max (pending)
Details:
By reverse-engineering, I determined that an attribute with a
setter _and_ and initial value expects to be initially initialized
to `null` (as opposed to `undefined`), and then the setter called
with the actual initial value. This is the source of the
remaining "reference to undefined property" warnings: some
setters expect to be able to _read_ the value of the state
variable, even before it has been given its initial value. <barf />
Also checking in simplification to LzBactrace that takes advantage
of the AS2 back-end implementing try/catch (thanks Don!).
Tests:
animation.lzx no longer gives "reference to undefined property"
errors.
.......
Tests:
smoke
calendar
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/compiler/Class.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/compiler/Class.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/compiler/Class.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -51,7 +51,14 @@
*/
(function () {
var addProperty = function AddProperty (name, value) {
- this[name] = value;
+ if ((value !== void 0) || (! (name in this))) {
+ this[name] = value;
+// } else if ($debug) {
+// for (var s = this.constructor; s !== Instance; s = s.prototype.constructor) {
+// if (s.prototype.hasOwnProperty(name)) { break; }
+// }
+// Debug.debug("Attempt to override %w.%s, already defined in %w", this, name, s);
+ }
if (value instanceof Function) {
var xtor = this.constructor;
if (value.hasOwnProperty('superclasses')) {
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/compiler/LzRuntime.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/compiler/LzRuntime.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/compiler/LzRuntime.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -80,32 +80,25 @@
var Debug;
/**
- * The <tagname>debug</tagname> tag controls the initial appearance
- * and options of the debugger when debugging is enabled. Debugging is
- * enabled either by including the <code>debug="true"</code> option on
- * the <xref linkend="LzCanvas"><tagname>canvas</tagname></xref> tag,
- * or adding the <code>?debug=true</code> query argument to the
- * application's URL.
+ * <p>The optional <tagname>debug</tagname> tag controls the appearance of the debugger when
+ * debugging is on. It does not cause the application to be
+ * compiled with debugging mode enabled. There are three ways to
+ * enable the debugger, as described in the
+ * <a href="${dguide}debugging.html#enabling-the-debugger">Debugging</a> chapter of the Developer's Guide.</p>
*
+ * <p>By default, the debug window will be sized to fit the lower 1/2 of the canvas, and can be
+ * resized as necessary.</p>
+ *
* <example title="debug tag"><programlisting><![CDATA[
* <canvas debug="true" height="120">
* <debug width="300" height="50" x="5" y="5" fontsize="8"/>
* <script>
* Debug.write("Hello world!");
- * Debug.warn('This is a hotlink: %w', {a: 1, b: 2});
+ * Debug.warn('This is an inspectable object: %w', {a: 1, b: 2});
* </script>
* </canvas>]]>
* </programlisting></example>
*
- *
- * The debug tag controls the appearance of the debugger when
- * debugging is on. It does not cause the application to be
- * compiled with debugging mode enabled. Only the debug option on
- * the canvas and the debug query parameter of the URL do this.
- *
- * For more information, see the
- * <a href="${dguide}debugging.html">Debugging</a> chapter of the Guide.
- *
* @shortdesc The Laszlo debugger
* @keywords private_constructor
* @access public
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/controllers/LaszloAnimation.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/controllers/LaszloAnimation.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/controllers/LaszloAnimation.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -1,7 +1,7 @@
/**
* LaszloAnimations.as
*
- * @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
* @affects animation lzanimator
* @access public
@@ -37,6 +37,8 @@
* @modifiers override
*/
static var tagname = 'animator';
+/** @access private */
+static var attributes = new LzInheritedHash(LzAnimatorGroup.attributes);
var beginPoleDelta = .25;
var endPoleDelta = .25;
@@ -48,12 +50,6 @@
*/
var attribute;
-//setters.from = "defaultSet";
-//setters.to = "defaultSet";
-//setters.duration = "defaultSet";
-//setters.attribute = "defaultSet";
-//setters.relative = "defaultSet";
-
/**
* The style of motion to use for the animator. This
* is one of "linear", "easin" , "easeout" , and "easeboth". The default
@@ -61,14 +57,14 @@
*
* @type String
*/
-setters.motion = "setMotion";
+var motion;
/**
* The destination value for the animator.
*
* @type Number
*/
-setters.to = "setTo";
+var to;
/**
@@ -84,8 +80,10 @@
* @param String eparam: One of "easein", "easeout" , "linear" or "easeboth"
* to describe how the animator accelerates and decelerates. The default is
* "easeboth".
+ * @access private
*/
-function setMotion ( eparam ){
+function $lzc$set_motion ( eparam ){
+ this.motion = eparam
//easin, easeout , linear , easeboth (default)
if ( eparam == "linear" ){
this.calcNextValue = this.calcNextValueLinear;
@@ -98,14 +96,36 @@
}
}
}
+/**
+ * @deprecated in 4.1
+ * @access private
+ */
+function setMotion (eparam) {
+ if ($debug) {
+ Debug.deprecated(this, arguments.callee, this.setAttribute);
+ }
+ this.$lzc$set_motion(eparam);
+}
+
/**
* Sets the destination value for the animator
* @param Number eparam: The destination value for the animator.
+ * @access private
*/
-function setTo ( eparam ){
+function $lzc$set_to ( eparam ) {
this.origto = Number(eparam);
}
+/**
+ * @deprecated in 4.1
+ * @access private
+ */
+function setTo (eparam) {
+ if ($debug) {
+ Debug.deprecated(this, arguments.callee, this.setAttribute);
+ }
+ this.$lzc$set_to(eparam);
+}
/**
@@ -339,7 +359,7 @@
/**
- * This method replaces the nonlinear calcNextValue when motion is set to linear
+ * This method replaces the nonlinear calcNextValue when motion is set to linear
*
* @access private
*/
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/controllers/LaszloLayout.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/controllers/LaszloLayout.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/controllers/LaszloLayout.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -1,7 +1,7 @@
/**
* LaszloLayout.lzs
*
- * @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @topic LFC
@@ -65,6 +65,8 @@
* @modifiers override
*/
static var tagname = 'layout';
+/** @access private */
+ static var attributes = new LzInheritedHash(LzNode.attributes);
/**
* Set to true if layout is locked from updates.
@@ -72,8 +74,22 @@
*/
//locked is set to 2 in the prototype of the layout. This is a special signal that the layout is locked temporarily until it resolves its references
var locked = 2;
- setters.locked = "__LZsetLocked";
+ /**
+ * Setter for locked
+ * Unlock the layout once update is done.
+ *
+ * @access private
+ */
+ function $lzc$set_locked ( locked ) {
+ if ( this.locked == locked ) return;
+ if ( locked ){
+ this.lock();
+ } else {
+ this.unlock();
+ }
+ }
+
/** Array holding the views under this layout's control.
*
* @type Array
@@ -259,22 +275,8 @@
}
/**
- * Unlock the layout once update is done.
- *
* @access private
*/
-function __LZsetLocked ( locked ) {
- if ( this.locked == locked ) return;
- if ( locked ){
- this.lock();
- } else {
- this.unlock();
- }
-}
-
-/**
- * @access private
- */
function __parentInit (){
if ( this.locked == 2){
if (this.isinited) {
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/controllers/LzAnimatorGroup.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/controllers/LzAnimatorGroup.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/controllers/LzAnimatorGroup.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -1,5 +1,5 @@
/**
- * @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @affects animation lzanimatorgroup
@@ -47,6 +47,8 @@
* @modifiers override
*/
static var tagname = 'animatorgroup';
+/** @access private */
+ static var attributes = new LzInheritedHash(LzNode.attributes);
/** The name of the attribute whose value is animated. This
* attribute is required on an animator, unless the animator is
@@ -65,8 +67,7 @@
* @lzxdefault "true"
*/
var start = true;
- setters.start = "setStart";
- defaultattrs.start = true;
+ LzAnimatorGroup.attributes.start = true;
/** The start value for the animation. Defaults to the
* targeted attribute's current value.
@@ -88,7 +89,6 @@
* @lzxtype xsd:float {minInclusive="0"} | constraint
*/
var duration;
- setters.duration = "setDuration";
/**
* @type Boolean
@@ -121,7 +121,6 @@
* @since 1.1
*/
var repeat;
- // setters.repeat = "defaultSet";
/** The paused state of the animator. If true, the animator will stop. When
* changed to false, the animator will resume from its current location.
@@ -131,6 +130,13 @@
* @lzxdefault "false"
*/
var paused = false;
+ /**
+ * Setter for paused
+ * @access private
+ */
+ function $lzc$set_paused (val) {
+ this.pause(val);
+ }
/** Value of the animator's start attribute.
*
@@ -156,25 +162,14 @@
* @type string
*/
var process = "sequential";
- // setters.process = "defaultSet";
/** The object to animate
*
* @type string
+ * @devnote see $lzc$set_target below
*/
var target;
- setters.target = "setTarget";
- /** If true, the running animator will pause. If false
- * it will resume
- *
- * @type boolean
- */
- var paused;
- setters.paused = "pause";
-
-//setters.view = "defaultSet";
-
/** The active-state of the animator. If true, the animator is currently processing its animation.
* This field is read-only.
*
@@ -223,7 +218,7 @@
*
* @modifiers override
*/
-defaultattrs.ignoreplacement = true;
+LzAnimatorGroup.attributes.ignoreplacement = true;
/**
@@ -264,25 +259,36 @@
/**
* setter for the target attribute
+ * @access private
*/
-function setTarget ( new_target ){
+function $lzc$set_target ( new_target ){
this.target = new_target;
var nodes = this.subnodes;
if (nodes) {
for (var i=0; i < nodes.length; i++) {
if ((nodes[i]) instanceof ( LzAnimatorGroup )) {
- nodes[i].setTarget(new_target);
+ nodes[i].$lzc$set_target(new_target);
}
}
}
if (this.ontarget.ready) this.ontarget.sendEvent( new_target );
}
+/** Remove after 4.1
+ * @access private */
+function setTarget (n) {
+ if ($debug) {
+ Debug.deprecated(this, arguments.callee, this.setAttribute);
+ }
+ this.$lzc$set_target(n);
+}
+
+
/**
* setter for the start attribute
* @access private
*/
-function setStart ( start ){
+function $lzc$set_start ( start ){
this.started = start;
if (this.onstarted.ready) this.onstarted.sendEvent( start );
if ( !this.isinited ){
@@ -454,7 +460,15 @@
this.__LZhalt();
}
+
function setDuration(duration){
+ if ($debug) {
+ Debug.deprecated(this, arguments.callee, this.setAttribute);
+ }
+ this.$lzc$set_duration(duration);
+}
+/** @access private */
+function $lzc$set_duration (duration) {
if(isNaN(duration) || duration == null){
duration = 0;
} else if(typeof(duration) == "string"){
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzDefs.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzDefs.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzDefs.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -13,11 +13,18 @@
/** Sentinel value for events
* @access private
*/
-public class LzEventInterface {
+public class LzDeclaredEventClass /* implements LzEvent */ {
- public function LzEventInterface ( ) {
- }
+ function LzDeclaredEventClass () {
+ // Debug.debug("%w.%s(%w)", this, arguments.callee, arguments);
+ super();
+ }
+ /**
+ * @access private
+ */
+ /* const */ public var ready:Boolean = false;
+
/**
* @access private
*/
@@ -45,14 +52,9 @@
return "LzDeclaredEvent";
}
-/**
- * @access private
- */
- var ready:Boolean = false;
-
}
-public class LzNullEvent extends LzEventInterface {
+public class LzNullEvent extends LzDeclaredEventClass {
public function LzNullEvent () {
}
@@ -184,20 +186,8 @@
function LzInheritedHash (parent) {
if (parent) {
- // NOTE: [2007-08-31 ptw] AS2 does not allow returning an
- // alternate object from a constructor, so we have to resort to
- // platform-specific code to implement inheritance.
- if ($as2) {
- this.__proto__ = parent;
- } else {
- // NOTE: [2007-08-30 ptw/hqm/max] We tried to set the
- // constructor property for this object to LzInheritedHash for
- // the debugger, but that does not work (in at least Firefox and
- // Opera). Apparently there is something we don't fully
- // understand about the constructor property in Javascript.
- function xtor() {};
- xtor.prototype = parent;
- return new xtor();
+ for (var key in parent) {
+ this[key] = parent[key];
}
}
}
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzNode.js
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzNode.js 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzNode.js 2008-03-19 15:01:29 UTC (rev 8315)
@@ -305,20 +305,20 @@
* e.g. before a view displays, or before a layout affects its subviews.
* @lzxtype event
*/
- var oninit:LzEventInterface = LzDeclaredEvent;
+ var oninit:LzDeclaredEventClass = LzDeclaredEvent;
/** This is the first event a node sends, right
* at the end of the instantiation process, but before any subnodes
* have been created or references resolved
* @lzxtype event
*/
- var onconstruct:LzEventInterface = LzDeclaredEvent;
+ var onconstruct:LzDeclaredEventClass = LzDeclaredEvent;
/** The ondata script is executed when the data selected by a view's datapath
* changes.
* @lzxtype event
*/
- var ondata:LzEventInterface = LzDeclaredEvent;
+ var ondata:LzDeclaredEventClass = LzDeclaredEvent;
/**
* If replicated, the index of this clone
* @lzxtype event
@@ -329,12 +329,12 @@
* @access private
* @lzxtype event
*/
- var onclonenumber:LzEventInterface = LzDeclaredEvent;
+ var onclonenumber:LzDeclaredEventClass = LzDeclaredEvent;
/**
* @lzxtype event
* @access private
*/
- var ondestroy:LzEventInterface = LzDeclaredEvent;
+ var ondestroy:LzDeclaredEventClass = LzDeclaredEvent;
/** @access private */
var __LZlateinit:Boolean = false;
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzNode.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzNode.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/LzNode.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -34,11 +34,90 @@
*/
class LzNode {
-/** @access private
- * @modifiers override
- */
- static var tagname = 'node';
+ /** @access private
+ * @modifiers override
+ */
+ static var tagname = 'node';
+ /** @access private */
+ static var attributes = { $hasdefaultattrs : true };
+
+ /**
+ * Helper function to merge an class or instance's attributes with
+ * those of its superclass. Broken out because it is called by
+ * user classes.
+ *
+ * @param LzInheritedHash dattrs: A copy of the attributes that
+ * are inherited from the parent (and into which the resulting
+ * merge will be made)..
+ * @param Object attrs: The new attributes to be merged in
+ * @access private
+ */
+ static function mergeAttributes (attrs, dattrs) {
+ // Check for object and array merges, 'ignored' attributes
+ // (i.e., binders that have been overridden by a constant),
+ // and decls that the compiler could not detect because it
+ // does not know the built-in setters (see ClassCompiler).
+ for ( var k in attrs ) {
+ var attrk = attrs[ k ];
+ if ( attrk === LzNode._ignoreAttribute ) {
+ delete dattrs[k];
+ } else if (attrk is LzInitExpr) {
+ dattrs[k] = attrk;
+ } else {
+ // NOTE: [2008-01-22 ptw] This is just whacky, but it
+ // is required for back-compatibility. IWBNI this
+ // were handled at compile-time
+ //
+ // NOTE: [2008-03-17 ptw] We have to make sure the
+ // 'objects' we merge are just hash tables. We should
+ // _use_ hash tables, not Objects and then there would
+ // not be any confusion! Hence the check for the
+ // constructor.
+ if (attrk is Object) {
+ var dattrk = dattrs[ k ];
+ if (dattrk is Object) {
+ if ( attrk is Array && dattrk is Array) {
+ // Debug.debug("%w.%s: merging %s (%w)", this, arguments.callee, k, attrk);
+ dattrs[ k ] = attrk.concat( dattrk );
+ continue;
+ } else if ((attrk.constructor === Object || attrk is LzInheritedHash) &&
+ (dattrk.constructor === Object || dattrk is LzInheritedHash)) {
+ // Debug.debug("%w.%s: merging %s (%w)", this, arguments.callee, k, attrk);
+ var tmp = new LzInheritedHash(dattrk);
+ for (var j in attrk) {
+ tmp[j] = attrk[j];
+ }
+ dattrs[ k ] = tmp;
+ continue;
+ }
+ }
+ }
+ // Debug.debug("%w.%s: NOT merging %s (%w)", this, arguments.callee, k, attrk);
+ // Just a normal value (or LzInitExpr), install it
+ dattrs[k] = attrk;
+ }
+ }
+ }
+
+ /**
+ * Helper function to merge a class or instance's children with
+ * those of its superclass. Used by user classes
+ *
+ * @param Array? children: the children of this class or instance
+ * @param Array? superclasschildren: the children of the
+ * superclass
+ * @return Array?: the merged result
+ * @access private
+ */
+ static function mergeChildren(children, superclasschildren) {
+ if (superclasschildren is Array) {
+ children = superclasschildren.concat(children is Array ? children : []);
+ }
+ return children;
+ }
+
+
/**
* @param LzNode parent: a node above this one in the hierarchy -- not
* necessarily the immediate parent -- that will decide where this node goes
@@ -80,43 +159,44 @@
iargs = attrs;
} else {
// Otherwise we create a new hash that inherits the defaults
- iargs = new LzInheritedHash(this.defaultattrs);
- // And merge in our attrs (if any). Taking care to merge
- // Array and Object attrs (for back-compatibility). No
- // special magic is needed to compute attributes overriding
- // constraints, because they all come as attrs now and
- // overriding will be automatic from the InheritedHash
- // (except for the bizarre merging of arrays and hashes!)
+ iargs = new LzInheritedHash(this['constructor'].attributes);
+ // Now install any decls that the tag compiler could't
+ // figure out (because it does not know the built-in class
+ // setters (c.f., ClassCompiler.java)
+ if (! (this is LzState)) {
+ for (var key in iargs) {
+ var val = iargs[key];
+ if (! (val is LzInitExpr)) {
+ // If there is no setter for this attr the value
+ // should just be installed as a declaration
+ var setr = '$lzc$set_' + key;
+ if (! this[setr]) {
+ if (val is Function) {
+ Debug.debug("%s[%w] = %s", this, key, val);
+ }
+ this.addProperty(key, val);
+ delete iargs[key];
+ } else {
+ // NOTE: [2008-03-18 ptw] this is for
+ // back-compatibility: it appears that an
+ // attribute with a setter is expected to be
+ // initially `null` not undefined
+ if (this[key] === void 0) {
+ this.addProperty(key, null);
+ }
+ }
+ }
+ }
+ }
+ // And merge in our instantiation attrs (if any). Taking
+ // care to merge Array and Object attrs (for
+ // back-compatibility). No special magic is needed to
+ // compute attributes overriding constraints, because they
+ // all come as attrs now and overriding will be automatic
+ // from the InheritedHash (except for the bizarre merging of
+ // arrays and hashes!)
if (attrs) {
- var dattrs = this.defaultattrs;
- // Check for object and array merges
- // NOTE: [2008-01-22 ptw] This is just whacky, but it is
- // required for back-compatibility. IWBNI this were
- // handled at compile-time
- for ( var k in attrs ) {
- var attrk = attrs[ k ];
- if ( attrk instanceof Object && (! (attrk instanceof LzInitExpr))) {
- var dattrk = dattrs[ k ];
- if ( dattrk instanceof Object && (! (dattrk instanceof LzInitExpr))) {
- if ( attrk instanceof Array ) {
-// Debug.debug("%w.%s: merging %s (%w)", this, arguments.callee, k, attrk);
- iargs[ k ] = attrk.concat( dattrk );
- continue;
- } else if (typeof attrk == 'object') {
-// Debug.debug("%w.%s: merging %s (%w)", this, arguments.callee, k, attrk);
- var tmp = new LzInheritedHash(dattrk);
- for (var j in attrk) {
- tmp[j] = attrk[j];
- }
- iargs[ k ] = tmp;
- continue;
- }
- }
- }
-// Debug.debug("%w.%s: NOT merging %s (%w)", this, arguments.callee, k, attrk);
- // Just a normal value (or LzInitExpr), install it
- iargs[ k ] = attrk;
- }
+ LzNode.mergeAttributes(attrs, iargs);
}
}
@@ -130,28 +210,18 @@
//Flag if this was newed by the instantiator
this.__LZisnew = !instcall;
- var c = ('classChildren' in this.constructor.prototype) ? this.constructor.prototype.classChildren : null;
- if ( c && c.length ){
+ var classChildren = this['constructor']['children'];
+ if ( classChildren is Array ){
// classroot will not be defined for members of a state
// class, this is hard because the classroot is not a
// parent of its lexical children
- if (!('doneClassRoot' in c && c.doneClassRoot) && !this.$isstate) {
- c.doneClassRoot=true;
- this.__LZassignClassRoot(c, 1);
+ // TODO: [2008-03-11 ptw] This should be computed at
+ // compile time
+ if (!classChildren['doneClassRoot'] && ! this.$isstate) {
+ classChildren.doneClassRoot=true;
+ this.__LZassignClassRoot(classChildren, 1);
}
- if ( children && children.length ) {
- children = c.concat( children );
- } else {
- // TODO: [2006-05-25 hqm] If we are copying the array in the
- // case above, should we be copying the classChildren array here??
- children = c;
- }
- } else {
- //this is just for parity with the flasm loop
- //the children are pushed before the method call
- if ( children && children.length ) {
- children = children.concat();
- }
+ children = LzNode.mergeChildren(children, classChildren);
}
this.construct( parent , maskedargs );
@@ -223,6 +293,8 @@
// Debug.debug("ConstructorMap[%s] = %s", tagname, this);
}
ConstructorMap[tagname] = this;
+ // Install global alias for userclass compiler
+ global['$lzc$class_' + tagname] = this;
}
if ($debug) {
// Use the package tag name as the typename
@@ -234,15 +306,6 @@
// Debug.debug("No tag for node class %w", this);
// }
}
-
- // Ensure you have your own private dictionaries, not one
- // inherited from your superclass
- for (var hash in {setters: true, getters: true, defaultattrs: true, options: true, __LZdelayedSetters: true, earlySetters: true} ) {
- if (! prototype.hasOwnProperty(hash)) {
- prototype[hash] = new LzInheritedHash(prototype[hash]);
- }
- }
-
}
/** This event is sent right before a node becomes active --
@@ -297,9 +360,6 @@
/** @access private */
var __LZdelegates = null;
-/** @access private */
-var defaultattrs = { $hasdefaultattrs : true };
-
/**
* Indicates that a <varname>node</varname>'s <method>init</method> method has been
* called. The execution of the <method>init</method> method is under
@@ -556,13 +616,13 @@
* skipped. </li>
*
* <li>Second, the placement view name is determined from the first of the
- * following that matches:</li>
+ * following that matches:
* <ul><li>the view's <attribute>placement</attribute> attribute, if that
* exists; or</li>
* <li>the lexical parent's <attribute>defaultplacement</attribute> attribute,
* if that exists; or</li>
* <li>nil.</li></ul>
- *
+ * </li>
* <li>Third, if there is no placement view name, the subview is placed within
* its lexical parent (that is,
* <code>view.immediateparent = view.parent</code>),
@@ -593,7 +653,10 @@
* LzNode.
*/
function construct ( parent , args ){
-
+ // Set applyArgs ordering kludges. LzView overrides these
+ this.__LZdelayedSetters = LzNode.__LZdelayedSetters;
+ this.earlySetters = LzNode.earlySetters;
+
var lp = parent; // lp == lexical parent
this.parent = lp;
@@ -623,7 +686,6 @@
ip = pp;
}
}
-
var ip_subnodes = ip.subnodes;
if (ip_subnodes == null) {
ip_subnodes = new Array;
@@ -798,16 +860,14 @@
var oset = {};
var hasset = null;
var hasearly = null;
- if ( '$setters' in args && args.$setters ){
- this.__LZsetSetters( args.$setters );
- }
- var setrs = this.setters;
var inits = null;
var constraints = null;
for ( var a in args ){
var val = args[a];
+ /* To see if it has a setter. Cf., setAttribute */
+ var setr = '$lzc$set_' + a;
//handle flash bug where objects slots are enumerated multiple times
if ( oset[a] || args[a] === LzNode._ignoreAttribute ) continue;
oset[ a ] = true;
@@ -833,19 +893,20 @@
// method... er, unless you set the attribute to a
// function. YOW!
if (! (a in this)) {this[a] = null;}
- } else if (! (a in setrs)) {
+ } else if (! this[setr]) {
// TODO: should already be declared, so we should just be
- // able to set it
- this.addProperty( a, val);
+ // able to set it, but that doesn't work if this is a
+ // method
+ this.addProperty(a, val);
if (! constcall) {
//then we need to notify the rest of the system that this
//value changed.
var evt = ("on" + a);
- if (evt in this) {
+ if (this[evt] is LzEvent) {
if (this[evt].ready) this[ evt ].sendEvent( args[ a ] );
}
}
- } else if (setrs[ a ] != -1) {
+ } else if (this[setr] is Function) {
if (a in this.earlySetters) {
if (hasearly == null) { hasearly = []; }
hasearly[this.earlySetters[a]] = a;
@@ -860,7 +921,8 @@
for (var i = 1, l = hasearly.length; i < l; i++) {
if (i in hasearly) {
var a = hasearly[i];
- this[setrs[a]]( args[a], a);
+ var setr = '$lzc$set_' + a;
+ this[setr]( args[a] );
}
}
}
@@ -868,7 +930,8 @@
if (hasset) {
for (var i = hasset.length - 1; i >= 0; i--) {
var a = hasset[i];
- this[setrs[a]]( args[a], a);
+ var setr = '$lzc$set_' + a;
+ this[setr]( args[a] );
}
}
@@ -913,27 +976,20 @@
LzInstantiator.requestInstantiation( this , carr );
}
}
-
-/* returns the value for a property
- *
- * @param String prop: a string specifying the key of attribute to return.
- * @return any: value of named property
- */
+/**
+ * returns the value for a property
+ *
+ * @param String prop: a string specifying the key of attribute to return.
+ * @return any: value of named property
+ * @deprecated
+ */
function getAttribute(prop) {
- if ( null == this.getters[ prop ] ){
- return this[ prop ];
- } else {
- return this[ this.getters[ prop ] ] ();
- }
+ Debug.info("%w.%s(%#w) is deprecated. Use %w[%#w] instead.", this, arguments.callee, prop, this, prop);
+ return this[ prop ];
}
/**
- * @access private
- */
- //prototype.getProp = getAttribute;
-
-/**
* Sets the named attribute to the given value. If there is no setter for the
* property, this[ prop ] is set to the value, and the event this [ "on"+prop ]
* is sent.
@@ -942,26 +998,24 @@
* @param any val: The value for that attribute
* @param Boolean ifchanged: If true, only set the attribute if the value
* changed
+ *
+ * @devnote Note: this is inlined by the script compiler, so that
+ * must be updated if you change this function
*/
function setAttribute(prop, val, ifchanged) {
if (this.__LZdeleted || (ifchanged && (this[prop] == val))) return;
- var s = this.setters;
- if (s && (prop in s)) {
- this[s[prop]](val);
+ // Must agree with NodeModel in tag compiler
+ var s = ('$lzc$set_' + prop);
+ if (this[s] is Function) {
+ this[s](val);
} else {
- if (s == null) {
- if ($debug) {
- Debug.warn('null setters on', this, prop, val);
- }
- }
this[ prop ] = val;
var evt = ("on" + prop);
- if (evt in this) {
+ if (this[evt] is LzEvent) {
if (this[evt].ready) this[ evt ].sendEvent( val );
}
}
-
}
/**
@@ -1094,33 +1148,21 @@
return w;
}
+ /**
+ * @access private
+ * @devnote kludge for applyArgs
+ */
+ var $lzc$set_placement = -1;
+ /**
+ * @access private
+ * @devnote kludge for applyArgs
+ */
+ var $lzc$set_$setters = -1;
-/** @access private */
-var setters ={
- name : "setName" ,
- id : "setID" ,
- $refs : "__LZstoreRefs" ,
- $delegates : "__LZstoreDelegates" ,
- options: "__LZsetOptions",
- placement : -1 ,
- datapath : "setDatapath",
- $setters : -1,
- $classrootdepth : "__LZsetClassRoot",
- $datapath : "__LZmakeDatapath"
-};
-
-/* this is for the doc generator:
-setters.name = "setName"
-setters.id = "setID"
-setters.placement = -1
-setters.datapath = "setDatapath"
-setters.data = "setData"
-*/
-
/**
* @access private
*/
-function __LZsetClassRoot ( d ) {
+function $lzc$set_$classrootdepth ( d ) {
if (!d) return;
@@ -1130,43 +1172,27 @@
this.classroot = p;
}
+if ($debug) {
/**
- * @access private
- */
+ * @deprecated
+ * @devnote remove after 4.1
+ * @access private
+ */
function __LZsetSetters ( o ) {
- if (! this.hasOwnProperty('setters')) {
- this.setters = new LzInheritedHash(this.setters);
- }
- if ('put' in this.setters) {
- for ( var s in o ){
- // inlined: this.__LZaddSetter( s , o[s] );
- this.setters.put(s, o[s]);
- }
- } else {
- for ( var s in o ){
- // inlined: this.__LZaddSetter( s , o[s] );
- this.setters[s] = o[s];
- }
- }
+ Debug.error("%w.%s is no longer supported", this, arguments.callee);
}
+}
-
+if ($debug) {
/**
- * @access private
- */
+ * @deprecated
+ * @devnote remove after 4.1
+ * @access private
+ */
function __LZaddSetter ( key , val ) {
- // Ensure you have your own private setters dictionary, not one
- // inherited from your superclass
- if (! this.hasOwnProperty('setters')) {
-// Debug.debug('__LZaddSetter: creating setters dictionary');
- this.setters = new LzInheritedHash(this.setters);
- }
- if ('put' in this.setters) {
- this.setters.put(key, val);
- } else {
- this.setters[key] = val;
- }
+ Debug.error("%w.%s is no longer supported", this, arguments.callee);
}
+}
/**
* Binds the named attribute to the given path, relative to this node's
@@ -1196,28 +1222,27 @@
}
/** @access private */
-var __LZdelayedSetters ={
- $refs : "__LZresolveRefs"
-};
+static var __LZdelayedSetters = new LzInheritedHash({
+ $refs : "$lzc$set_$refs"
+ });
+var __LZdelayedSetters;
+
/** @access private */
-var earlySetters ={
+static var earlySetters = new LzInheritedHash({
name : 1 ,
id : 2 ,
$events : 3 ,
$delegates : 4 ,
$classrootdepth : 5 ,
$datapath : 6
-};
+ });
+var earlySetters;
-/** @access private */
-var getters ={};
-
-
/**
* @access private
*/
-function __LZstoreDelegates ( delarr ){
+function $lzc$set_$delegates ( delarr ){
//delarr is a sequence of triplets of the form
//... eventname, methodname, referencemethodname
@@ -1242,13 +1267,14 @@
}
-// TODO: [2008-02-14 ptw] Remove at 4.1 or later
if ($debug) {
/**
- * @access private
- */
+ * @deprecated
+ * @devnote remove after 4.1
+ * @access private
+ */
function __LZstoreRefs ( val , prop ){
- Debug.error("%w.%s is no longer supported", this, arguments.callee);
+ Debug.error("%w.%s is no longer supported", this, arguments.callee);
}
}
@@ -1324,6 +1350,7 @@
function __LZresolveRefs ( refs ){
Debug.error("$refs: %s is no longer supported", refs);
}
+function $lzc$set_$refs(v) { this.__LZresolveRefs(v); }
}
/**
@@ -1476,7 +1503,7 @@
* @access protected
* @param String name: A string to use for the name of this node.
*/
-function setName ( name ){
+function $lzc$set_name ( name ){
if ((typeof(name) == 'string') && name.length) {
if ($debug) {
if (this.parent && this.parent[name] && this.parent[name] !== this) {
@@ -1540,7 +1567,7 @@
* @access protected
* @param String id: The id to use for this node.
*/
-function setID ( id ){
+function $lzc$set_id ( id ){
//support for current system
if ((typeof(id) == 'string') && id.length) {
if ($debug) {
@@ -1580,6 +1607,13 @@
new LzDatapath ( this, { xpath : dp } );
}
}
+ /**
+ * Setter for datapath
+ * @access private
+ */
+ function $lzc$set_datapath (dp) {
+ this.setDatapath(dp);
+ }
/**
* Sets the datacontext for the node to the data element given as an
@@ -1600,7 +1634,7 @@
/**
* Called on any node that is declared with a datapath that matches a
* terminal selector, such as <code>text()</code> or
- * <code>@<var>attribute</var></code> when the data it matches is
+ * <code>@attribute</code> when the data it matches is
* changed.
* @access public
* @param String data: a string representing the matching data
@@ -1629,11 +1663,11 @@
*
* @access private
*/
- function __LZsetOptions(hash) {
+ function $lzc$set_options(hash) {
// Ensure you have your own private options dictionary, not the one
// inherited from your class, nor the default empty one inherited
// from LzNode!
- if (! this.hasOwnProperty('options')) {
+ if (this.options === this['constructor'].prototype.options) {
this.options = new LzInheritedHash(this.options);
}
for (var key in hash) {
@@ -1665,7 +1699,7 @@
// Ensure you have your own private options dictionary, not the one
// inherited from your class, nor the default empty one inherited
// from LzNode!
- if (! this.hasOwnProperty('options')) {
+ if (this.options === this['constructor'].prototype.options) {
this.options = new LzInheritedHash(this.options);
}
this.options[ key ] = val;
@@ -1831,10 +1865,6 @@
//don't allow a call on this method if I'm deleted
this.__LZinstantiationDone = null;
- //clear setters object -- this way if we're in applyArgs, we won't run
- //extra code
- this.setters = null;
-
//remove this and all subnodes
if (this.subnodes != null) {
for (var i = this.subnodes.length -1; i >=0 ; i-- ){
@@ -2054,11 +2084,12 @@
/**
* @access private
+ * setter for $datapath
*/
-function __LZmakeDatapath( dpobj ){
+function $lzc$set_$datapath( dpobj ){
if (! (dpobj instanceof Object)) {
if ($debug) {
- Debug.debug('__LZmakeDatapath on non-object %w?', dpobj)
+ Debug.debug('%s on non-object %w?', arguments.callee, dpobj)
}
}
this.makeChild( dpobj , true);
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/UserClass.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/UserClass.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/core/UserClass.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -67,200 +67,12 @@
* @shortdesc Defining your own tags.
* @lzxname class
*/
-class LzUserClass extends LzNode {
-/** @access private
- * @modifiers override
- */
-static var tagname = 'class';
+/** @devnote Userclasses are now compiled by the tag compiler
+ * directly into a JS2 class declaration. This file exists for
+ * documentation, and the support class below:
+ */
-function LzUserClass (parent, args) {
- #pragma "warnUndefinedReferences=true"
- // TODO: [2006-05-19 ptw] The original did not do this, should we?
- // super(parent, args);
- var classobj = args.initobj;
- var classname = classobj.name;
- var attrs = classobj.attrs;
- var extend = args.parent;
- var sup;
-
- if ( extend == null ){
- sup = LzView;
- } else {
- sup = ConstructorMap[ extend ];
- }
- if ($debug) {
- if (! ((sup instanceof Function) && (sup === LzNode || sup.prototype instanceof LzNode))) {
- Debug.error('Invalid superclass %w for %s',
- sup, classname);
- }
- }
-
- var traitList = null;
- if ('with' in attrs) {
- traitList = attrs['with'].split(' ').join('').split(',');
- for (var i = traitList.length - 1; i >= 0; i--) {
- var n = traitList[i];
- traitList[i] = global[n];
- if (traitList[i] == null || traitList[i].makeInterstitial == null) {
- if ($debug) {
- Debug.error("LzUserClass.initialize: skipping invalid trait %w for class %w", n, classname);
- }
- traitList.splice(i, 1);
- }
- }
- traitList.push(sup);
- }
-
- var newclass = this.userclass = Class.make(
- classname,
- traitList ? traitList : sup,
- null,
- // LzNode.initialize installs the tagname in ConstructorMap
- ['tagname', classname]
- );
-
- // For backward compatibility, we also install the class as a
- // global constructor, so long as it does not clobber a runtime
- // global
- // TODO: [2006-09-28 ptw] (LPP-2817) Remove this in 4.1
- if (! (classname in global)) {
- // TODO: [2006-09-30 ptw] This breaks instanceof global.class in
- // debug mode. Need to figure out some other way to make
- // deprecation warnings.
-// if ($debug) {
-// var trampoline = new LzInheritedHash(newclass);
-// // Compiler transforms new to make
-// trampoline.make = function LzUserClassDeprecatedTrampolineMake () {
-// if ($debug) {
-// Debug.warn("`new %s` is deprecated. Use `new lz.%s` instead.", newclass, newclass);
-// }
-// return newclass.make.apply(newclass, arguments);
-// };
-// global[classname] = trampoline;
-// } else {
- global[classname] = newclass;
-// }
- } else {
- if ($debug) {
- Debug.info("The global `%s` is already defined. To dynamically create a <%s> element, you will have to use `%s`.",
- classname, classname, newclass);
- }
- }
-
- var newproto = newclass.prototype;
-
- delete attrs.name;
-
- var cc;
- if ( 'classChildren' in sup.prototype && sup.prototype.classChildren.length ){
- cc = sup.prototype.classChildren.concat();
- } else{
- cc = []
- }
-
- if ( 'children' in classobj && classobj.children.length ){
- cc = cc.concat( classobj.children );
- }
-
- // TODO: [2006-09-28 ptw] There must be a better way. See comment
- // below where this is inserted in ConstructorMap regarding the
- // wart this is. You need some way to not set defaultplacement
- // until the class-defined children are instantiated, only the
- // instance-defined children should get default placement. For
- // now this is done by inserting this sentinel in the child
- // nodes...
- if ( 'defaultplacement' in attrs && attrs.defaultplacement != null ){
- cc.push( { name : "__LZUserClassPlacementObject" ,
- attrs : attrs.defaultplacement } );
-
- delete attrs.defaultplacement;
- }
-
- if ( cc.length ){
- newproto.addProperty('classChildren', cc);
- }
-
-
- var haveone = false;
-
- var customsetters = '$setters' in attrs ? attrs.$setters : null;
- if (customsetters) {
- delete attrs.$setters;
-
- for ( var s in customsetters ){
- newproto.setters[ s ] = customsetters[ s ];
- }
- }
-
- // TODO: [2006-05-25 ptw] Share this crud with LzNode
- // LzNode class initializer assures that we already have a
- // defaultattrs property that is an LzInheritedHash
- if (attrs) {
- var dattrs = newproto.defaultattrs;
- var setters = newproto.setters;
- // Could this test be an instanceof test?
- var isstate = (('$isstate' in newproto) && (newproto.$isstate));
- for ( var k in attrs ) {
- var attrk = attrs[k];
-
- if (! (attrk instanceof LzInitExpr)) {
- // if there's no setter, then attach this to the prototype
- // TODO: [2008-02-11 ptw] this is different from LzNode, why?
- // It means things without setters won't get the magic merge
- // treatment (which is a hack, but it seems wrong to not merge
- // just because you don't have a setter). I guess the
- // intent here is to save setting constant values in each
- // instance so this is a micro-optimization, somewhat
- // broken.
- if (setters[k] == null && (! isstate)) {
- newproto.addProperty( k, attrk );
- // If there is a property that would have been shadowed,
- // you have to hide that from applyArgs, or you will get
- // clobbered!
- if (k in dattrs) {
- dattrs[k] = LzNode._ignoreAttribute;
- }
- continue;
- }
- // Check for object and array merges
- // NOTE: [2008-01-22 ptw] This is just whacky, but it is
- // required for back-compatibility. IWBNI this were
- // handled at compile-time
- if (attrk instanceof Object) {
- var dattrk = dattrs[k];
- if (dattrk instanceof Object && (! (dattrk instanceof LzInitExpr))) {
- if ( attrk instanceof Array ) {
-// Debug.debug("%w.%s: merging %s (%w)", this, arguments.callee, k, attrk);
- dattrs[ k ] = attrk.concat( dattrk );
- continue;
- } else if (typeof attrk == 'object') {
-// Debug.debug("%w.%s: merging %s (%w)", this, arguments.callee, k, attrk);
- var tmp = new LzInheritedHash(dattrk);
- for (var j in attrk) {
- tmp[j] = attrk[j];
- }
- dattrs[ k ] = tmp;
- continue;
- }
- }
- }
- }
-// Debug.debug("%w.%s: NOT merging %s (%w)", this, arguments.callee, k, attrk);
- // Just a normal value (or LzInitExpr), install it
- dattrs[k] = attrk;
- }
- }
-}
-
- if ($debug) {
- /** @access private */
- function _dbg_name() {
- return Debug.formatToString("for %s", this.userclass);
- };
- }
-} // End of LzUserClass
-
/**
* @access private
* @todo [2006-09-28 ptw] This is a wart, needed for backward
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDataElement.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDataElement.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDataElement.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -8,6 +8,615 @@
*/
/**
+ * @access private
+ */
+trait LzDataElementTrait {
+ // N.B.: LzDataElementTrait may or may not be an LzNode, so
+ // _if_ it were to have an initialize method, it would have to
+ // match LzNode.initialize's signature.
+
+ /**
+ * @devnote These are the setters that this trait creates
+ */
+ /** @access private */
+ function $lzc$set_attributes(v) { this.setAttrs(v); }
+ /** @access private */
+ function $lzc$set_childNodes(v) { this.setChildNodes(v); }
+ /** @access private */
+ function $lzc$set_nodeName(v) { this.setNodeName(v); }
+ /** @access private */
+ function $lzc$set_ownerDocument(v) { this.setOwnerDocument(v); }
+
+/** @lzxtype event */
+var onDocumentChange = LzDeclaredEvent;
+/** @lzxtype event */
+var onparentNode = LzDeclaredEvent;
+/** @lzxtype event */
+var onchildNode = LzDeclaredEvent;
+/** @lzxtype event */
+var onchildNodes = LzDeclaredEvent;
+/** @lzxtype event */
+var onattributes = LzDeclaredEvent;
+/** @lzxtype event */
+var onnodeName = LzDeclaredEvent;
+
+/** @access private */
+var __LZo = -1;
+/** @access private */
+var __LZcoDirty = true;
+/** @access private */
+var __LZchangeQ = null;
+/** @access private */
+var __LZlocker = null;
+
+
+/** Inserts the given LzDataNode before another node in this node's childNodes
+ * @param LzDataNode newChild: the LzDataNode to insert
+ * @param LzDataNode refChild: the LzDataNode to insert newChild before
+ * @return LzDataElement: The new child, or null if the refChild wasn't found
+ */
+function insertBefore (newChild, refChild){
+ this.__LZcoDirty = true;
+
+ for ( var i = 0; i < this.childNodes.length; i++ ){
+ if ( this.childNodes[ i ] == refChild ){
+ this.childNodes.splice( i , 0 , newChild );
+ newChild.setOwnerDocument( this.ownerDocument );
+
+ newChild.parentNode = this;
+ if (newChild.onparentNode.ready) newChild.onparentNode.sendEvent( this );
+ if (this.onchildNodes.ready) this.onchildNodes.sendEvent( newChild );
+ this.ownerDocument.handleDocumentChange( "insertBefore" ,
+ this, 0 );
+ return newChild;
+ }
+ }
+
+ //raise exception
+ return null;
+}
+
+
+/**
+ * Replaces a given LzDataNode in this node's childNodes with a new one.
+ * @param LzDataNode newChild: the LzDataNode to add
+ * @param LzDataNode oldChild: the LzDataNode to be replaced by the newChild
+ * @return LzDataElement: The new child, or null if the oldChild wasn't found
+ */
+function replaceChild (newChild, oldChild){
+
+ this.__LZcoDirty = true;
+ for ( var i = 0; i < this.childNodes.length; i++ ){
+ if ( this.childNodes[ i ] == oldChild ){
+ this.childNodes[ i ] = newChild;
+
+ newChild.setOwnerDocument( this.ownerDocument );
+
+ newChild.parentNode = this;
+ if (newChild.onparentNode.ready) newChild.onparentNode.sendEvent( this );
+ if (this.onchildNodes.ready) this.onchildNodes.sendEvent( newChild );
+ this.ownerDocument.handleDocumentChange( "childNodes" , this , 0, newChild );
+ return newChild;
+ }
+ }
+ //raise exception
+ return null;
+}
+
+/**
+ * Removes a given node from this node's childNodes
+ * @param LzDataNode oldChild: The LzDataNode to remove
+ * @return LzDataNode: The removed child, or null if the oldChild was not found
+ */
+function removeChild (oldChild){
+ var reval = null;
+ this.__LZcoDirty = true;
+ for ( var i = 0; i < this.childNodes.length; i++ ){
+ if ( this.childNodes[ i ] == oldChild ){
+ this.childNodes.splice( i , 1 );
+ if (this.onchildNodes.ready) this.onchildNodes.sendEvent( oldChild );
+ reval = oldChild;
+ this.ownerDocument.handleDocumentChange("removeChild", this, 0, oldChild);
+ }
+ }
+ //raise exception if not found
+ return reval;
+}
+
+/**
+ * Adds a child to this node's list of childNodes
+ * @param LzDataNode newChild: The LzDataNode to add.
+ * @return LzDataNode: The newChild.
+ */
+function appendChild (newChild){
+ if ( this.childNodes ){
+ this.childNodes.push( newChild );
+ } else {
+ this.childNodes = [ newChild ];
+ }
+
+ newChild.setOwnerDocument( this.ownerDocument );
+
+ newChild.parentNode = this;
+ if (newChild.onparentNode.ready) newChild.onparentNode.sendEvent( this );
+
+ //instead of marking dirty, this is easy
+ newChild.__LZo = this.childNodes.length -1;
+
+ if (this.onchildNodes.ready) this.onchildNodes.sendEvent( newChild );
+ this.ownerDocument.handleDocumentChange( "appendChild" , this , 0, newChild );
+ return newChild;
+}
+
+/**
+ * Tests whether or not this node has child nodes.
+ * @return Boolean: If true, this node has child nodes.
+ */
+function hasChildNodes (){
+ return this.childNodes.length > 0;
+}
+
+/**
+ * Returns a copy of this node.
+ * @param Boolean deep: If true, the children of this node will be part of the
+ * new node
+ * @return LzDataNode: A copy of this node.
+ */
+function cloneNode ( deep ){
+ var n = new LzDataElement(this.nodeName);
+ n.setAttrs( this.attributes );
+ if ( deep ){
+ for ( var i = 0 ; i < this.childNodes.length; i++ ){
+ n.appendChild ( this.childNodes[ i ].cloneNode( true ) );
+ }
+ }
+
+ return n;
+}
+
+/**
+ * Returns the value for the give attribute
+ * @param String name: The name of the attribute whose value to return
+ * @return String: The value for the given attribute
+ */
+function getAttr (name){
+ if (this.attributes) return this.attributes[ name ];
+}
+
+/**
+ * @access private
+ */
+prototype.getAttr.dependencies = function (who , self){
+ return [ self, 'attributes' ];
+}
+
+/**
+ * Sets the given attribute to the given value
+ * @param String name: The name of the attribute to set.
+ * @param String value: The value for the attribute.
+ */
+function setAttr (name, value){
+ if ( ! this.attributes ) {
+ this.attributes = {};
+ }
+ this.attributes[ name ] = value;
+ if (this.onattributes.ready) this.onattributes.sendEvent( name );
+ this.ownerDocument.handleDocumentChange( "attributes" , this , 1, {name: name, value: value, type: 'set'});
+ return value;
+}
+
+/**
+ * Removes the named attribute
+ * @param String name: The name of the attribute to remove.
+ */
+function removeAttr (name){
+ var v = this.attributes[ name ];
+ delete this.attributes[ name ];
+ if (this.onattributes.ready) this.onattributes.sendEvent( name );
+ this.ownerDocument.handleDocumentChange( "attributes" , this , 1, {name: name, value: v, type: 'remove'});
+ return v;
+}
+
+/**
+ *This method returns a Attr object.
+ *The name parameter is of type String.
+ */
+//function getAttributeNode (name){
+//}
+
+/**
+ *This method returns a Attr object.
+ *The newAttr parameter is a Attr object.
+ */
+//function setAttrNode (newAttr){
+//}
+
+/**
+ * Tests whether or not this node has a given attribute.
+ * @param String name: The name of the attribute to test
+ * @return Boolean: If true, the named attribute is present.
+ */
+function hasAttr (name){
+ return this.attributes[ name ] != null;
+}
+
+/**
+ * Returns the first child of this node.
+ * @return LzDataNode: The first child of this node
+ */
+function getFirstChild (){
+ return this.childNodes[ 0 ];
+}
+/**
+ * @access private
+ */
+prototype.getFirstChild.dependencies = function( who, self ){
+ return [ this , "childNodes" ];
+}
+
+/**
+ * Returns the last child of this node.
+ * @return LzDataNode: The last child of this node
+ */
+function getLastChild (){
+ return this.childNodes[ this.childNodes.length-1 ];
+}
+/**
+ * @access private
+ */
+prototype.getLastChild.dependencies = function( who, self ){
+ return [ this , "childNodes" ];
+}
+
+
+/**
+ * @access private
+ */
+function __LZupdateCO (){
+ for ( var i = 0; i < this.childNodes.length; i++ ){
+ this.childNodes[ i ].__LZo = i;
+ }
+ this.__LZcoDirty = false;
+}
+
+
+/**
+ * @access private
+ */
+prototype.hasAttr.dependencies = function (who , self){
+ return [ self, 'attributes' ];
+}
+
+/**
+ * Sets the attributes of this node to the given Object.
+ * @param Object attrs: The object to use as the attrs for this node.
+ */
+function setAttrs ( attrs ){
+ var a = {};
+ for ( var k in attrs ){ a[ k ] = attrs[ k ]; }
+
+ this.attributes = a;
+ if (this.onattributes.ready) this.onattributes.sendEvent( a);
+ if (this.ownerDocument) {
+ this.ownerDocument.handleDocumentChange( "attributes" , this , 1);
+ }
+}
+
+/**
+ * Sets the children of this node to the given array.
+ * @param [LzDataNode] children: An array of LzDataNodes to be the new children
+ * of this node
+ */
+function setChildNodes ( children ){
+ this.childNodes = children;
+ for ( var i = 0; i < children.length; i++ ){
+ var c = children[ i ];
+ if (c) {
+ c.setOwnerDocument( this.ownerDocument );
+ c.parentNode = this;
+ if (c.onparentNode) {
+ if (c.onparentNode.ready) c.onparentNode.sendEvent( this );
+ }
+ c.__LZo = i;
+ }
+ }
+ this.__LZcoDirty = false;
+ if (this.onchildNodes) {
+ if (this.onchildNodes.ready) this.onchildNodes.sendEvent( children );
+ }
+ this.ownerDocument.handleDocumentChange( "childNodes" , this , 0);
+}
+
+/**
+ * Sets the name of this node.
+ * @param String name: The new name for this node
+ */
+function setNodeName ( name ){
+ //Debug.write('setting node name from "',this.nodeName, '" to "', name, '"');
+ this.nodeName = name;
+ //since this can affect xpaths, send onchildNodes event
+ if (this.onnodeName.ready) this.onnodeName.sendEvent( name );
+ if (this.parentNode) {
+ if (this.parentNode.onchildNodes.ready) this.parentNode.onchildNodes.sendEvent( this );
+ if (this.parentNode.onchildNode.ready) this.parentNode.onchildNode.sendEvent( this );
+ }
+ this.ownerDocument.handleDocumentChange( "childNodeName" ,
+ this.parentNode , 0 );
+ this.ownerDocument.handleDocumentChange( "nodeName" , this, 1 );
+}
+
+/**
+ * @access private
+ */
+function __LZgetText ( ){
+ var s= "";
+ for ( var i = 0; i < this.childNodes.length; i++ ){
+ var c = this.childNodes[ i ]
+ if ( c.nodeType == LzDataNode.TEXT_NODE ){
+ s += c.data;
+ }
+ }
+ return s;
+}
+
+/**
+ * Returns a list of the childNodes of this node which have a given name
+ * @param String name: The name of the node to look for.
+ * @return [LzDataNode]: A list of childNodes which have the given name.
+ */
+function getElementsByTagName (name) {
+ var r = [];
+ for ( var i = 0; i < this.childNodes.length; i++ ){
+ if ( this.childNodes[i].nodeName == name ){
+ r.push( this.childNodes[ i ] );
+ }
+ }
+ return r;
+}
+
+/*
+//This method returns a Attr object.
+//The oldAttr parameter is a Attr object.
+//This method can raise a DOMException object.
+// function removeAttributeNode (oldAttr) {
+}
+//This method returns a String.
+//The namespaceURI parameter is of type String.
+//The localName parameter is of type String.
+// function getAttributeNS (namespaceURI, localName) {
+}
+//This method has no return value.
+//The namespaceURI parameter is of type String.
+//The qualifiedName parameter is of type String.
+//The value parameter is of type String.
+//This method can raise a DOMException object.
+// function setAttrNS (namespaceURI, qualifiedName,
+ value) {
+}
+//This method has no return value.
+//The namespaceURI parameter is of type String.
+//The localName parameter is of type String.
+//This method can raise a DOMException object.
+// function removeAttributeNS (namespaceURI, localName) {
+}
+//This method returns a Attr object.
+//The namespaceURI parameter is of type String.
+//The localName parameter is of type String.
+// function getAttributeNodeNS (namespaceURI, localName) {
+}
+//This method returns a Attr object.
+//The newAttr parameter is a Attr object.
+//This method can raise a DOMException object.
+// function setAttrNodeNS (newAttr) {
+}
+//This method returns a NodeList object.
+//The namespaceURI parameter is of type String.
+//The localName parameter is of type String.
+// function getElementsByTagNameNS (namespaceURI, localName) {
+}
+//This method returns a Boolean.
+//The namespaceURI parameter is of type String.
+//The localName parameter is of type String.
+// function hasAttrNS (namespaceURI, localName) {
+}
+*/
+
+var __LZlt = "<";
+var __LZgt = ">";
+
+
+/**
+ * Returns this node as a string of xml.
+ * @return String: The string serialization of this node.
+ */
+function serialize (){
+ return this.serializeInternal(Infinity);
+}
+
+/**
+ * Implementation of serialize with option to limit string length
+ * @access private
+ */
+function serializeInternal (len) {
+ if (arguments.length < 1) {
+ len = Infinity;
+ }
+ var s = this.__LZlt + this.nodeName;
+
+ //Debug.info('k', this.attributes);
+ for ( var k in this.attributes ){
+ s += " " + k + '="' + this.__LZXMLescape( this.attributes[ k ] ) + '"';
+ if (s.length > len) { break; }
+ }
+
+ if ( s.length <= len && this.childNodes && this.childNodes.length ){
+ s += this.__LZgt;
+ for ( var i = 0; i < this.childNodes.length; i++ ){
+ s += this.childNodes[ i ].serialize(len);
+ if (s.length > len) { break; }
+ }
+ s += this.__LZlt + "/" + this.nodeName + this.__LZgt;
+ } else {
+ s += "/" + this.__LZgt;
+ }
+ if (s.length > len) { s = Debug.abbreviate(s, len); }
+ return s;
+}
+
+/**
+ * For debugging. Same as serialize, but will abbreviate at printLength.
+ * @access private
+ */
+function _dbg_name () {
+ return this.serializeInternal(Debug.printLength);
+}
+
+/**
+ * Nodes call this method on their ownerDocument whenever they change in any
+ * way. This method sends the onDocumentChange event, which triggers
+ * datapointer updates
+ * @param String what: A description of what changed.
+ * @param LzDataNode who: The node that changed.
+ * @param Number type: private
+ */
+function handleDocumentChange ( what , who , type, cobj ){
+ var o = { who: who , what: what , type : type};
+ if (cobj) o.cobj = cobj;
+ if ( this.__LZchangeQ ){
+ this.__LZchangeQ.push ( o );
+ } else {
+ if (this.onDocumentChange.ready) this.onDocumentChange.sendEvent( o );
+ }
+}
+
+/**
+ * @access private
+ */
+function toString (){
+ //this.__LZlt = "<";
+ //this.__LZgt = ">";
+ var r = this.serialize();
+ //delete this.__LZlt;
+ //delete this.__LZgt;
+ return r;
+}
+
+/**
+ * @access private
+ */
+function __LZdoLock ( locker ){
+ if ( !this.__LZchangeQ ){
+ this.__LZchangeQ = [];
+ this.__LZlocker = locker;
+ }
+}
+
+
+/**
+ * @access private
+ */
+function __LZdoUnlock ( locker ){
+
+ if ( this.__LZlocker != locker ){
+ return;
+ }
+
+ var lzq = this.__LZchangeQ;
+ this.__LZchangeQ = null;
+
+ if (lzq != null) {
+ for ( var i = 0; i < lzq.length; i++ ){
+ var sendit = true;
+ var tc = lzq[ i ];
+ for ( var j = 0; j < i; j++ ){
+ var oc = lzq[ j ];
+ if ( tc.who == oc.who &&
+ tc.what == oc.what &&
+ tc.type == oc.type ){
+ sendit = false;
+ break;
+ }
+ }
+
+ if ( sendit ){
+ this.handleDocumentChange ( tc.what, tc.who, tc.type );
+ }
+ }
+ }
+
+
+}
+
+/**
+ * Get LzDataElement representation of primitive type, array, or object value.
+ */
+static function valueToElement ( o ) {
+ var n = new LzDataElement("element", { }, LzDataElementTrait.__LZv2E(o));
+ return n;
+}
+
+/**
+ * @param Type o: primitive type, array, or object value.
+ * @return array of LzDataElements
+ * @access private
+ */
+static function __LZv2E ( o ) {
+
+ var type = typeof( o );
+ type.toLowerCase();
+
+ var c = [];
+ if (type == "object") {
+ if ( o instanceof LzDataElement ||
+ o instanceof LzDataText ) {
+ c[0] = o;
+ } else if (o instanceof Date) {
+
+ type = "date";
+ // FIXME: [2004-04-10 pkang] what should we do with dates?
+
+ } else if (o instanceof Array) {
+ type = "array";
+ var tag = (o.__LZtag != null ? o.__LZtag : 'item');
+ for (var i=0; i < o.length; i++) {
+ var tmpC = this.__LZv2E( o[i] );
+ c[i] = new LzDataElement(tag, null, tmpC );
+ }
+ } else {
+ type = "struct";
+ var i = 0;
+ for (var k in o) {
+ // skip any properties that start with __LZ
+ if (k.indexOf('__LZ') == 0) continue;
+ c[i++] = new LzDataElement(k, null, this.__LZv2E(o[k]));
+ }
+ }
+ } else if (o != null) {
+ c[0] = new LzDataText( o );
+ }
+
+ if (c.length == 0) c = null;
+
+ return c;
+}
+
+} // End LzDataElementTrait
+
+/**
+ * Just enough of LzNode to make setters work for DataElements
+ * @access public
+ * @topic LZX
+ * @subtopic Runtime
+ * @todo [2006-08-23 ptw] Fix this modularity. Is it really too
+ * expensive to have this above LzNode?
+ * @devnote this is public because public classes inherit from it. Put it
+ * in LZX.Runtime to semi-sorta obscure it.
+ */
+class LzMiniNode {
+ var setAttribute = LzNode.prototype.setAttribute;
+}
+
+/**
* <p>
* An LzDataElement represents a node a in a hierarchical dataset. An LzDataElement can contain other LzDataElements, or <classname>LzDataText</classname>, which represents a text node. See the example on <classname>LzDataNode</classname>.
* </p>
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDataProvider.lzs
===================================================================
(Binary files differ)
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDataRequest.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDataRequest.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDataRequest.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -26,6 +26,8 @@
* @modifiers override
*/
static var tagname = 'datarequest';
+/** @access private */
+ static var attributes = new LzInheritedHash(LzNode.attributes);
/* Status value constants */
static var SUCCESS = 'success';
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDataText.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDataText.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDataText.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -51,11 +51,11 @@
*/
var nodeName = '#text';
-setters.data = "setData";
-
/** The data held by this node.
* @type String */
var data = "";
+/** @access private */
+function $lzc$set_data(v) { this.setData(v); }
/** read-only property
* @type Number */
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDatapath.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDatapath.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDatapath.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -1,7 +1,7 @@
/**
* LzDatapath.lzs
*
- * @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @topic LFC
@@ -73,6 +73,8 @@
* @modifiers override
*/
static var tagname = 'datapath';
+/** @access private */
+ static var attributes = new LzInheritedHash(LzDatapointer.attributes);
/** By default, this is false for instances
* of <classname>datapointer</classname>, and true for instances of
@@ -359,7 +361,7 @@
* @access private
*/
function destroy( recur ){
- this.setName = null; //so this can't be assigned
+ this.$lzc$set_name = null; //so this can't be assigned
this.__LZupdateLocked = true; //so won't set data
if ( this.context && !this.context.__LZdeleted &&
@@ -553,14 +555,13 @@
}
/** @access private */
-setters.__LZmanager = "__LZsetCloneManager";
-/** @access private */
var __LZisclone = false;
/**
* @access private
+ * @devnote Setter for __LZmanager
*/
-function __LZsetCloneManager( m ) {
+function $lzc$set___LZmanager ( m ) {
this.__LZisclone = true;
this.immediateparent.cloneManager = m;
this.parsedPath = m.parsedPath;
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDatapointer.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDatapointer.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDatapointer.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -79,13 +79,21 @@
* @modifiers override
*/
static var tagname = 'datapointer';
+// static var attributes = new LzInheritedHash(LzNode.attributes);
+// [2006-07-25 pbr] This clears out what is defined in LzNode. Is this
+// ok?
+/** @access private */
+ static var attributes = {ignoreplacement: true};
-setters.xpath = "setXPath";
-setters.context = "setDataContext";
+ /** @access private */
+ function $lzc$set_xpath (v) { this.setXPath(v); }
+ /** @access private */
+ function $lzc$set_context (v) { this.setDataContext(v); }
-/** @access private */
-setters.pointer = "setPointer";
-setters.p = "setPointer";
+ /** @access private */
+ function $lzc$set_pointer (v) { this.setPointer(v); }
+ /** @access private */
+ function $lzc$set_p (v) { this.setPointer(v); }
/** The LzDataNode that the datapointer is pointing
* to. Calling <method>setAttribute</method> on attribute calls
@@ -104,9 +112,6 @@
/** @access private */
var __LZtrackDel = null;
-// [2006-07-25 pbr] This clears out what is defined in LzNode. Is this ok?
-prototype.defaultattrs = {};
-prototype.defaultattrs.ignoreplacement = true;
/** This determines the behavior of the
* datapointer in response to notification that the dataset the
@@ -123,7 +128,6 @@
* @type Boolean
*/
var rerunxpath = false;
-setters.rerunxpath = "__LZsetRerunXPath";
/** @lzxtype event */
var onp = LzDeclaredEvent;
@@ -785,7 +789,7 @@
}
/** @access private */
-function __LZsetRerunXPath ( rrx ){
+function $lzc$set_rerunxpath ( rrx ){
this.rerunxpath = rrx;
if (this.onrerunxpath.ready) this.onrerunxpath.sendEvent( rrx );
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDataset.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDataset.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDataset.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -98,6 +98,8 @@
* @modifiers override
*/
static var tagname = 'dataset';
+/** @access private */
+ static var attributes = new LzInheritedHash(LzNode.attributes);
var dataprovider = defaultdataprovider;
var multirequest = false;
@@ -154,7 +156,7 @@
/** HTTP method */
var querytype = "GET";
-setters.querytype = "setQueryType";
+function $lzc$set_querytype (v) { this.setQueryType(v); }
/** When true, the server will trim
* whitespace in the XML data (defaults to false).
@@ -173,6 +175,12 @@
*/
var cacheable = false;
+/** When true, an argument will be added to the request string in the format
+ * '__lzbc__=1204685840777'. This is to prevent client caching.
+ * @type Boolean
+ */
+var clientcacheable = true;
+
/** A string to be appended to the request that
* the dataset makes.
* @type String
@@ -182,32 +190,32 @@
/**
* @access private
*/
-setters.data = "setData";
+function $lzc$set_data(v) { this.setData(v); }
/** The source for requests made by this dataset.
* @type String
*/
var src = null;
-setters.src = "setSrc";
+function $lzc$set_src(v) { this.setSrc(v); }
+var autorequest = false;
/** @access private */
-setters.autorequest = "setAutorequest";
+function $lzc$set_autorequest(v) { this.setAutorequest(v); }
/** If true, the datset will make a request when it
* inits. The default for this is false.
* @type Boolean
*/
var request = false;
-setters.request = "setRequest";
+function $lzc$set_request(v) { this.setRequest(v); }
-var autorequest = false;
var headers = null;
var proxied = null;
var responseheaders = null;
/** @access private */
-setters.initialdata = "setInitialData";
+function $lzc$set_initialdata(v) { this.setInitialData(v); }
/** @access private */
@@ -242,8 +250,8 @@
* Sets the name of this datasource - used only by initializer
* @access private
*/
-function setName(name) {
- super.setName.apply(this, arguments);
+function $lzc$set_name(name) {
+ super.$lzc$set_name.apply(this, arguments);
//for compatibility with dataNode API
this.nodeName = name;
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -159,12 +159,14 @@
// For GET requests, merge in params data with URL query
if (dreq.method == "GET") {
- if (lzurl.query != null) {
- lzurl.query = lzurl.query + "&" + postbody;
- } else {
- lzurl.query = postbody;
+ if (postbody != null) {
+ if (lzurl.query != null) {
+ lzurl.query = lzurl.query + "&" + postbody;
+ } else {
+ lzurl.query = postbody;
+ }
+ postbody = null;
}
- postbody = null;
}
// convert url back to string
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzHTTPDatasource.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzHTTPDatasource.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzHTTPDatasource.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -1,6 +1,6 @@
/**
*
- * @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @access public
@@ -29,6 +29,8 @@
* @modifiers override
*/
static var tagname = 'datasource';
+/** @access private */
+ static var attributes = new LzInheritedHash(LzDatasource.attributes);
var reqtype = "GET";
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzParam.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzParam.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzParam.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -42,9 +42,12 @@
* @modifiers override
*/
static var tagname = 'params';
+/** @access private */
+ static var attributes = new LzInheritedHash(LzNode.attributes);
+ // FIXME: [2008-03-12 ptw] WTF is this supposed to be doing?
//undefine all setters but name and id
-setters.$hasdefaultattrs = -1;
+//setters.$hasdefaultattrs = -1;
/**
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzReplicationManager.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzReplicationManager.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzReplicationManager.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -84,9 +84,9 @@
* create new ones.
*/
var pooling = false;
-setters.sortpath = "setOrder";
-setters.sortorder = "setComparator";
-setters.datapath = "setXPath";
+function $lzc$set_sortpath(v) { this.setOrder(v); }
+function $lzc$set_sortorder(v) { this.setComparator(v); }
+function $lzc$set_datapath(v) { this.setXPath(v); }
var asyncnew = true;
// FIXME [2006-10-23 pbr] (LPP-2397) Uncomment 'override' when implemented
@@ -142,7 +142,7 @@
var name = view._instanceAttrs.name;
args.name = name;
- // remove view we replace to avoid warning in LzNode.setName
+ // remove view we replace to avoid warning in LzNode.$lzc$set_name
delete view.immediateparent[name];
delete view.parent[name];
@@ -274,7 +274,7 @@
this.clonePool = [ ];
if ( this.pooling ){
- odp.__LZsetCloneManager( this );
+ odp.$lzc$set___LZmanager( this );
//make sure that the original view and datapath don't get their xpath
//set by a constraint..
if ( hadxpathconstraint ){
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/platform/swf/LzConnection.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/platform/swf/LzConnection.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/platform/swf/LzConnection.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -1,6 +1,6 @@
/**
*
- * @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @access private
@@ -177,6 +177,8 @@
* @modifiers override
*/
static var tagname = 'connection';
+/** @access private */
+ static var attributes = new LzInheritedHash(LzHTTPDatasource.attributes);
/**
* LzAgent is a placeholder to silence warnings about undefined
@@ -189,7 +191,7 @@
/**
* @access private
*/
-setters.authparam = "setAuthParam";
+function $lzc$set_authparam(v) { this.setAuthParam(v); }
/**
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/platform/swf/LzConnectionDatasource.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/platform/swf/LzConnectionDatasource.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/platform/swf/LzConnectionDatasource.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -1,6 +1,6 @@
/**
*
- * @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @access private
@@ -125,6 +125,8 @@
* @modifiers override
*/
static var tagname = 'connectiondatasource';
+/** @access private */
+ static var attributes = new LzInheritedHash(LzDatasource.attributes);
/**
* @access private
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/debugger/LzBacktrace.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/debugger/LzBacktrace.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/debugger/LzBacktrace.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -2,7 +2,7 @@
/**
*
- * @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @affects lzbacktrace
@@ -20,27 +20,15 @@
#pragma "debugBacktrace=false"
/** @access private */
Debug.stackOverflow = function () {
-#pragma "passThrough=true"
var bs = this.backtraceStack;
- if ($js1) {
- try {
- var old = bs.maxDepth;
- // Auto grow the stack. If error handling does not work,
- // eventually the runtime will blow you away...
- bs.maxDepth *= 1.25;
- throw new Error(Debug.error("Stack overflow"));
- } finally {
- bs.maxDepth = old;
- }
- } else if ($as2) {
- // FIXME: [2006-06-06 ptw] When the swf compiler understands try
- // and throw.
+ try {
var old = bs.maxDepth;
+ // Auto grow the stack. If error handling does not work,
+ // eventually the runtime will blow you away...
bs.maxDepth *= 1.25;
- (Debug.error("Stack overflow"));
+ throw new Error(Debug.error("Stack overflow: %s", Debug.backtrace(bs.length - 50)));
+ } finally {
bs.maxDepth = old;
- } else {
- Debug.error('LzBacktrace, unsupported runtime %s', $runtime);
}
};
}
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/debugger/LzMessage.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/debugger/LzMessage.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/debugger/LzMessage.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -2,7 +2,7 @@
/**
*
- * @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @access public
@@ -359,7 +359,7 @@
if (file == null) {
for (var i = 3; i < arguments.length; i++) {
var arg = arguments[i];
- if (arg instanceof lz.node && '_dbg_filename' in arg) {
+ if (global['lz'] && arg is lz['node'] && '_dbg_filename' in arg) {
file = arg._dbg_filename;
line = arg._dbg_lineno;
}
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/events/LaszloEvents.js
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/events/LaszloEvents.js 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/events/LaszloEvents.js 2008-03-19 15:01:29 UTC (rev 8315)
@@ -335,7 +335,7 @@
* @see LzDelegate
*/
-public class LzEvent extends LzEventInterface {
+public class LzEvent extends LzDeclaredEventClass {
var delegateList:Array = null;
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/events/LaszloEvents.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/events/LaszloEvents.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/events/LaszloEvents.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -116,7 +116,12 @@
var anEvent = eventSender[ eventName ];
- if ( anEvent == LzDeclaredEvent || !anEvent ){
+ if (! (anEvent is LzEvent)){
+ if ($debug) {
+ if (anEvent && (! (anEvent is LzDeclaredEventClass))) {
+ Debug.debug("Bad event: %w.%s => %w", eventSender, eventName, anEvent);
+ }
+ }
// The call used to be unrolled here for swf. I removed it since it
// was done during the swf5 days
anEvent = new LzEvent( eventSender, eventName , this );
@@ -349,7 +354,7 @@
* @see LzDelegate
*/
-public class LzEvent extends LzEventInterface {
+public class LzEvent extends LzDeclaredEventClass {
var delegateList:Array = null;
@@ -358,7 +363,13 @@
* @param String eventName: The name of this event.
*/
function LzEvent ( eventSender:* , eventName:* , d:* = null){
- super();
+ super();
+ // If debugging, add an informative name
+ if ($debug) {
+ this._dbg_eventSender = eventSender;
+ this._dbg_eventName = eventName;
+ }
+
var _evs = eventSender._events;
if (_evs == null ){
eventSender._events = [ this ];
@@ -373,11 +384,6 @@
this.delegateList = [];
}
- // If debugging, add an informative name
- if ($debug) {
- this._dbg_eventSender = eventSender;
- this._dbg_eventName = eventName;
- }
if ($profile) {
this._dbg_profileName = eventName;
}
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/helpers/LzCommand.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/helpers/LzCommand.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/helpers/LzCommand.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -1,6 +1,6 @@
/**
*
- * @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @affects lzcommand
@@ -36,6 +36,8 @@
* @modifiers override
*/
static var tagname = 'command';
+/** @access private */
+ static var attributes = new LzInheritedHash(LzNode.attributes);
/**
* true if the command is currently active.
@@ -50,7 +52,7 @@
* @type [String]?
*/
var keys = null;
-setters.key = "setKeys";
+function $lzc$set_key(v) { this.setKeys(v); }
/**
* If the command is active, this event is sent
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/helpers/LzDataSelectionManager.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/helpers/LzDataSelectionManager.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/helpers/LzDataSelectionManager.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -1,6 +1,6 @@
/**
*
- * @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @affects lzdataselectionmanager
@@ -8,21 +8,72 @@
* @topic LFC
* @subtopic Helpers
* @lzxname dataselectionmanager
+ * @shortdesc A selection manager for views generated by a lazily-replicated datapath
*/
/**
- * Implements same functionality as a normal selection manager, but without
- * storing view references, which become invalid as views created by a datapath
- * that uses lazy replication do. Does this by storing subview numbers.
- *
- */
-
+ * <p>If a datapath's <classname>datapath.replication</classname> attribute is set to "lazy", then a match to
+ * multiple nodes will create an <classname>LzLazyReplicationManager</classname> instead of an <classname>LzReplicationManager</classname>.
+ * The lazy replication manager creates only enough replicated views in order to display the data,
+ * so there is not a view for each data node. This enables the display of very large datasets.
+ * </p>
+ * <p>
+ * With lazy replication you must use a <classname>LzDataSelectionManager </classname>instead of a <classname>LzSelectionManager</classname>.
+ * The <classname>LzDataSelectionManager</classname> will operate on the data itself, instead of on the views (which
+ * may not be present if the data has scrolled out of view). For each dataset you are controlling,
+ * you can have only one <classname>LzDataSelectionManager</classname> operating on it.
+ * </p>
+ * <p>As with a LzSelectionManager, ctrl-click will select multiple items and shift-click will
+ * select a range. To modify this behavior, you can extend the <classname>LzDataSelectionManager</classname> and implement
+ * <method>isRangeSelect</method> and <method>isMultiSelect</method>.</p>
+ * <example class="program" id="datasenectionmgr">
+ * <canvas width="200" height="200">
+ * <dataset name="mydata">
+ * <list>
+ * <item>tricycle</item>
+ * <item>train</item>
+ * <item>racecar</item>
+ * <item>scooter</item>
+ * <item>bicycle</item>
+ * <item>rollerblades</item>
+ * <item>iceskates</item>
+ * <item>minivan</item>
+ * <item>sailbaot</item>
+ * <item>motorboat</item>
+ * </list>
+ * </dataset>
+
+ * <class name="selectme" onclick="immediateparent.selector.select(this)"
+ height="17" width="100" bgcolor="white">
+ * <text datapath="text()"/>
+ * <method name="setSelected" args="isselected">
+ if (isselected) setAttribute('bgcolor', yellow);
+ else setAttribute('bgcolor', white);
+ * </method>
+ * </class>
+
+ * <view height="70" clip="true">
+ * <view>
+ * <dataselectionmanager name="selector"/>
+ * <selectme>
+ * <datapath xpath="mydata:/list/item/" replication="lazy"/>
+ * </selectme>
+ * <simplelayout/>
+ * </view>
+ * <scrollbar/>
+ * </view>
+ * </canvas>
+ * </example>
+ */
+
class LzDataSelectionManager extends LzSelectionManager {
/** @access private
* @modifiers override
*/
static var tagname = 'dataselectionmanager';
+/** @access private */
+ static var attributes = new LzInheritedHash(LzSelectionManager.attributes);
/**
* Makes the given view selected
@@ -187,4 +238,4 @@
}
}
-} // End of LzDataSelectionManager
+} // End of LzDataselectionmanager
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/helpers/LzSelectionManager.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/helpers/LzSelectionManager.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/helpers/LzSelectionManager.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -1,6 +1,6 @@
/**
*
- * @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @affects lzselectionmanager
@@ -92,6 +92,8 @@
* @modifiers override
*/
static var tagname = 'selectionmanager';
+/** @access private */
+ static var attributes = new LzInheritedHash(LzNode.attributes);
/** The name of the method to call on an object
* when an object's selectedness changes. The method is called with a single Boolean argument. The default value for this
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/helpers/LzState.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/helpers/LzState.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/helpers/LzState.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -78,6 +78,8 @@
* @modifiers override
*/
static var tagname = 'state';
+/** @access private */
+ static var attributes = new LzInheritedHash(LzNode.attributes);
/** Sent when the state is applied.
* @lzxtype event
@@ -105,29 +107,32 @@
* the state, rather than the state itself.
* @type Boolean
*/
-setters.apply = "setApply";
-setters.$setters = null;
-static var stateprops = { apply : true };
-static var stateevents = { onremove : true , onapply : true };
+function $lzc$set_apply(v) { this.setApply(v); }
+
+static var props = { apply : true }; // unused?
+static var events = { onremove : true , onapply : true };
prototype.$isstate = true; // Defined in LzNode
var asyncnew = false;
+/** @access private */
var subh = null;
var pooling = false;
-setters.asyncnew = "__LZsetProperty";
+function $lzc$set_asyncnew(v) { this.__LZsetProperty(v, 'asyncnew'); }
/** If true, the state will merely hide any views it has created
* when it is removed, instead of destroying them.
* @type Boolean
*/
-setters.pooling = "__LZsetProperty";
+function $lzc$set_pooling(v) { this.__LZsetProperty(v, 'pooling'); }
/** When __LZsourceLocation is set, it should only apply to the state,
* not the parent
* @access private
*/
-setters.__LZsourceLocation = "__LZsetProperty";
-
+function $lzc$set___LZsourceLocation(v) { this.__LZsetProperty(v, '__LZsourceLocation'); }
+/** @access private */
var heldargs;
+var handlerMethodNames;
+/** @access private */
var releasedconstraints;
var appliedchildren;
var isapplied = false;
@@ -138,6 +143,7 @@
function construct ( parent , args ){
super.construct.apply(this, arguments);
this.heldArgs = {};
+ this.handlerMethodNames = {};
this.appliedChildren = [];
}
@@ -197,7 +203,7 @@
// release any constraints you are about to override
var pia = parent._instanceAttrs;
for (var key in this.heldArgs) {
- if (pia && key in pia && pia[key] instanceof LzConstraintExpr) {
+ if (pia && pia[key] instanceof LzConstraintExpr) {
if (this.releasedconstraints == null) { this.releasedconstraints = []; }
var constraintMethodName = pia[key].methodName;
if (parent.releaseConstraintMethod(constraintMethodName)) {
@@ -325,14 +331,16 @@
* application to parent.
*
* @devnote NOTE: [2006-12-09 ptw] Currently the only args that apply to the
- * state are args that have setters
+ * state are args that have setters or handlers for state events
*/
/* override */ function __LZapplyArgs ( args ){
var stateArgs = {};
var held = this.heldArgs;
+ var handlers = this.handlerMethodNames;
for (var key in args) {
var val = args[key];
- if (key in this.setters) {
+ var setr = '$lzc$set_' + key;
+ if (this[setr] is Function || key in handlers) {
stateArgs[key] = val;
} else {
held[key] = val;
@@ -344,10 +352,12 @@
var val = stateArgs[key];
if (val instanceof LzInitExpr) {
var methodName = val.methodName;
+ // Method could be in held args
if (methodName in held) {
stateArgs[methodName] = held[methodName];
delete held[methodName];
}
+ // If it is already a method on the state, nothing to do
}
}
@@ -359,21 +369,31 @@
var val = held[key];
if (val instanceof LzInitExpr) {
var methodName = val.methodName;
- if (methodName in held) {
+ // Method could be in held args
+ if (held[methodName] is Function) {
if (rename == null) { rename = []; }
- rename.push(key);
+ rename.push(key, held[methodName]);
}
+ // Or it could be a method on the state, in which case we have
+ // to re-tach it to the parent
+ if (this[methodName] is Function) {
+ if (rename == null) { rename = []; }
+ rename.push(key, this[methodName]);
+ }
}
}
if (rename != null) {
- for (var i = 0, l = rename.length; i < l; i++) {
+ for (var i = 0, l = rename.length; i < l; i += 2) {
var key = rename[i];
- var val = held[key];
- var methodName = val.methodName;
+ var val = rename[i + 1];
+ var expr = held[key];
+ var methodName = expr.methodName;
var newMethodName = methodName + this.__LZUID;
// Clone the init expr with the new name
- held[key] = new (val.constructor)(newMethodName);
- held[newMethodName] = held[methodName];
+ held[key] = new (expr.constructor)(newMethodName);
+ // Promote the binding method to held
+ held[newMethodName] = val;
+ // If the binding method was in held, remove it
delete held[methodName];
}
}
@@ -387,7 +407,7 @@
* application to the parent (and pass the ones that do apply to the
* state on to your superclass).
*/
-/* override */ function __LZstoreDelegates ( delarr ){
+/* override */ function $lzc$set_$delegates ( delarr ){
var pardels = [];
var mydels = [];
@@ -395,7 +415,7 @@
//does this go with the state or the state's owner?
//goes with the state ONLY IF the event is an event that the state
//sends, and a reference isn't given.
- if ( LzState.stateevents[ delarr[ i ] ] && ! delarr[ i + 2 ] ){
+ if ( LzState.events[ delarr[ i ] ] && ! delarr[ i + 2 ] ){
var arrtopush = mydels;
//now, capture the method that this calls
@@ -404,13 +424,13 @@
//check to see if we already processed this method
//in __LZapplyArgs
if ( this.heldArgs[ mname ] ){
- this[ mname ] = this.heldArgs[ mname ];
+ this.addProperty(mname, this.heldArgs[ mname ]);
delete this.heldArgs[ mname ];
}
//create a setter for this method; by definition attributes that
//the state has a setter for are handled by the state
- this.__LZaddSetter( mname , '__LZsetProperty' );
+ this.handlerMethodNames[mname] = true;
} else {
var arrtopush = pardels;
}
@@ -420,7 +440,7 @@
if ( mydels.length ){
// Install state handlers
- super.__LZstoreDelegates( mydels );
+ super.$lzc$set_$delegates( mydels );
}
if ( pardels.length ){
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/LzLibraryCleanup.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/LzLibraryCleanup.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/LzLibraryCleanup.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -17,6 +17,8 @@
* @modifiers override
*/
static var tagname = '__libraryloadercomplete';
+/** @access private */
+ static var attributes = new LzInheritedHash(LzNode.attributes);
function LzLibraryCleanup ( owner , args ) {
super(owner, args);
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/dhtml/LzLibrary.js
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/dhtml/LzLibrary.js 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/dhtml/LzLibrary.js 2008-03-19 15:01:29 UTC (rev 8315)
@@ -18,6 +18,8 @@
* @modifiers override
*/
static var tagname = 'import';
+/** @access private */
+static var attributes = new LzInheritedHash(LzNode.attributes);
/** @access private */
var loaded = false;
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as 2008-03-19 15:01:29 UTC (rev 8315)
@@ -189,14 +189,15 @@
LzInputTextSprite.prototype.select = function ( ){
var sf = targetPath(this.__LZtextclip);
- // calling setFocus() seems to bash the scroll value, so save it
+ // calling setFocus() bashes the scroll and hscroll values, so save them
var myscroll = this.__LZtextclip.scroll;
+ var myhscroll = this.__LZtextclip.hscroll;
if( Selection.getFocus() != sf ) {
Selection.setFocus( sf );
}
- this.__LZtextclip.hscroll = 0;
- // restore the scroll value
+ // restore the scroll and hscroll values
this.__LZtextclip.scroll = myscroll;
+ this.__LZtextclip.hscroll = myhscroll;
this.__LZtextclip.background = false;
}
@@ -298,6 +299,7 @@
* @param String t: the string to which to set the text
*/
LzInputTextSprite.prototype.setText = function ( t ){
+ // Keep in sync with LzTextSprite.setText()
//Debug.write('LzInputTextSprite.setText', this, t);
if (typeof(t) == 'undefined' || t == null) {
t = "";
@@ -331,6 +333,12 @@
LzIdle.callOnIdle(scrolldel);
}
+ // Fix for lpp-5449
+ var l = t.length;
+ if (this._selectionstart > l || this._selectionend > l) {
+ this.setSelection(l);
+ }
+
//@event ontext: Sent whenever the text in the field changes.
//this.owner.ontext.sendEvent(t);
}
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzLibrary.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzLibrary.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzLibrary.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -18,6 +18,8 @@
* @modifiers override
*/
static var tagname = 'import';
+/** @access private */
+ static var attributes = new LzInheritedHash(LzNode.attributes);
/** @access private */
var loaded = false;
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzSprite.as 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzSprite.as 2008-03-19 15:01:29 UTC (rev 8315)
@@ -1634,9 +1634,13 @@
}
// [todo hqm 01-24-07] SWF-specific
- if (this.owner == canvas) {
- // if this is the canvas sprite
+ if (this.owner == canvas || this instanceof LzTextSprite) {
+ // check canvas for LPP-4214, instanceof LzTextSprite for LPP-5533
var mc = this.getMCRef();
+ if (this.owner == canvas) {
+ // must use _root if canvas
+ var mc = _root;
+ }
if (mc != null) {
mc.menu = cmenu;
}
@@ -1651,8 +1655,10 @@
mb.menu = cmenu;
}
- if (mb == null && mc == null) {
- if ($debug) Debug.warn("LzView.setContextMenu: cannot set menu on view %w, it has no foreground or background movieclip", this.owner);
+ if ($debug) {
+ if (mb == null && mc == null) {
+ Debug.warn("LzView.setContextMenu: cannot set menu on view %w, it has no foreground or background movieclip", this.owner);
+ }
}
}
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as 2008-03-19 15:01:29 UTC (rev 8315)
@@ -1,7 +1,7 @@
/**
* LzTextSprite.as
*
- * @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @topic Kernel
@@ -461,6 +461,7 @@
* @param String t: the string to which to set the text
*/
LzTextSprite.prototype.setText = function ( t ){
+ // Keep in sync with LzTextSprite.setText()
if (typeof(t) == 'undefined' || t == 'null') {
t = "";
} else if (typeof(t) != "string") {
@@ -496,6 +497,12 @@
LzIdle.callOnIdle(scrolldel);
}
+ // Fix for lpp-5449
+ var l = t.length;
+ if (this._selectionstart > l || this._selectionend > l) {
+ this.setSelection(l);
+ }
+
//@event ontext: Sent whenever the text in the field changes.
//this.ontext.sendEvent( );
}
@@ -800,6 +807,10 @@
end = start;
}
+ // Fix for lpp-5449
+ this._selectionstart = start;
+ this._selectionend = end;
+
Selection.setSelection( start , end );
}
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzLibrary.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzLibrary.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf9/LzLibrary.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -1,7 +1,7 @@
/**
* LzLibrary.as
*
- * @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @topic LZX
@@ -18,6 +18,8 @@
* @modifiers override
*/
static var tagname = 'import';
+/** @access private */
+ static var attributes = new LzInheritedHash(LzNode.attributes);
/**
* @access private
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloCanvas.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloCanvas.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloCanvas.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -60,10 +60,17 @@
* @modifiers override
*/
static var tagname = 'canvas';
+/** @access private */
+ static var attributes = new LzInheritedHash(LzView.attributes);
function LzCanvas ( args ) {
// TODO: [2006-05-19 ptw] The original did not do this, should we?
// super(null, args);
+ // No, we can't. But you have to be aware that if you futz with
+ // LzNode or LzView, you have to consider whether you will have to
+ // change the canvas constructor too, since it _pretends_ to be a
+ // view!
+
// Note canvas start
if ($profile) {
Profiler.event('start: #canvas');
@@ -175,6 +182,9 @@
this.lpsversion = args.lpsversion + "." + this.__LZlfcversion;
delete args.lpsversion;
+ // Set applyArgs ordering kludges.
+ this.__LZdelayedSetters = LzView.__LZdelayedSetters;
+ this.earlySetters = LzView.earlySetters;
this.__LZapplyArgs( args );
if (!('version' in this && this.version)){
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloView.js
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloView.js 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloView.js 2008-03-19 15:01:29 UTC (rev 8315)
@@ -36,42 +36,42 @@
var _resource;
var __LZhaser;
- var onaddsubview:LzEventInterface = LzDeclaredEvent;
+ var onaddsubview:LzDeclaredEventClass = LzDeclaredEvent;
/** @access private */
- var onbgcolor:LzEventInterface = LzDeclaredEvent;
+ var onbgcolor:LzDeclaredEventClass = LzDeclaredEvent;
/** The onblur script is executed when an element loses focus either
* by the pointing device or by tabbing navigation.
* @lzxtype event
*/
- var onblur:LzEventInterface = LzDeclaredEvent;
+ var onblur:LzDeclaredEventClass = LzDeclaredEvent;
/** The onclick script is executed when the pointing device button is
* clicked over an element.
* @lzxtype event
*/
- var onclick:LzEventInterface = LzDeclaredEvent;
+ var onclick:LzDeclaredEventClass = LzDeclaredEvent;
/** @access private */
- var onclickable:LzEventInterface = LzDeclaredEvent;
+ var onclickable:LzDeclaredEventClass = LzDeclaredEvent;
/** The onfocus script is executed when an element receives focus
* either by the pointing device or by tabbing navigation.
* @lzxtype event
*/
- var onfocus:LzEventInterface = LzDeclaredEvent; // From LzFocus
+ var onfocus:LzDeclaredEventClass = LzDeclaredEvent; // From LzFocus
/** @lzxtype event */
- var onframe:LzEventInterface = LzDeclaredEvent;
+ var onframe:LzDeclaredEventClass = LzDeclaredEvent;
/** Event for changes to view's <attribute>height</attribute> property
* @lzxtype event
*/
- var onheight:LzEventInterface = LzDeclaredEvent;
+ var onheight:LzDeclaredEventClass = LzDeclaredEvent;
/** @lzxtype event */
- var onimload:LzEventInterface = LzDeclaredEvent;
+ var onimload:LzDeclaredEventClass = LzDeclaredEvent;
/** The onkeyup script is executed when this view has the focus and a
* key is released. This event is sent with the keycode for the key that
* went up.
* @lzxtype event
*/
- var onkeyup:LzEventInterface = LzDeclaredEvent; // From LzFocus
+ var onkeyup:LzDeclaredEventClass = LzDeclaredEvent; // From LzFocus
/** The onkeydown script is executed when this view has the focus and
* a key is pressed down. Multiple key down events are sent for a
@@ -80,142 +80,142 @@
* down.
* @lzxtype event
*/
- var onkeydown:LzEventInterface = LzDeclaredEvent; // From LzFocus
+ var onkeydown:LzDeclaredEventClass = LzDeclaredEvent; // From LzFocus
/** @lzxtype event */
- var onlastframe:LzEventInterface = LzDeclaredEvent;
+ var onlastframe:LzDeclaredEventClass = LzDeclaredEvent;
/** @lzxtype event */
- var onload:LzEventInterface = LzDeclaredEvent;
+ var onload:LzDeclaredEventClass = LzDeclaredEvent;
/** @lzxtype event */
- var onloadperc:LzEventInterface = LzDeclaredEvent;
+ var onloadperc:LzDeclaredEventClass = LzDeclaredEvent;
/** <event>onerror</event>: Sent when there is an error loading the view's resource.
* The argument sent with the event is the error string sent by the server.
* @access private
* @lzxtype event
*/
- var onerror:LzEventInterface = LzDeclaredEvent;
+ var onerror:LzDeclaredEventClass = LzDeclaredEvent;
/**
* <event>ontimeout</event>: Sent when the request to load media for the view times
* out
* @lzxtype event
*/
- var ontimeout:LzEventInterface = LzDeclaredEvent;
+ var ontimeout:LzDeclaredEventClass = LzDeclaredEvent;
/** The onmousedown script is executed when the pointing device button is
* pressed over an element.
* @lzxtype event
*/
- var onmousedown:LzEventInterface = LzDeclaredEvent;
+ var onmousedown:LzDeclaredEventClass = LzDeclaredEvent;
- var onmousemove:LzEventInterface = LzDeclaredEvent;
+ var onmousemove:LzDeclaredEventClass = LzDeclaredEvent;
/** The onmouseout script is executed when the point device is moved
* so that is is no longer over an element.
* @lzxtype event
*/
- var onmouseout:LzEventInterface = LzDeclaredEvent;
+ var onmouseout:LzDeclaredEventClass = LzDeclaredEvent;
/** The onmouseover script is executed when the pointing device is
* moved onto an element.
* @lzxtype event
*/
- var onmouseover:LzEventInterface = LzDeclaredEvent;
+ var onmouseover:LzDeclaredEventClass = LzDeclaredEvent;
/** @access private
* @lzxtype event
*/
- var onmousetrackover:LzEventInterface = LzDeclaredEvent;
+ var onmousetrackover:LzDeclaredEventClass = LzDeclaredEvent;
/** @access private
* @lzxtype event
*/
- var onmousetrackup:LzEventInterface = LzDeclaredEvent;
+ var onmousetrackup:LzDeclaredEventClass = LzDeclaredEvent;
/** The onmouseup script is executed when the pointing device button is
* released over an element.
* @lzxtype event
*/
- var onmouseup:LzEventInterface = LzDeclaredEvent;
+ var onmouseup:LzDeclaredEventClass = LzDeclaredEvent;
/**
* Sent when a view changes its opacity
* @lzxtype event
*/
- var onopacity:LzEventInterface = LzDeclaredEvent;
+ var onopacity:LzDeclaredEventClass = LzDeclaredEvent;
/** @access private
* @lzxtype event
*/
- var onplay:LzEventInterface = LzDeclaredEvent;
+ var onplay:LzDeclaredEventClass = LzDeclaredEvent;
/**
* Event called when this view removes a subview
* @lzxtype event
*/
- var onremovesubview:LzEventInterface = LzDeclaredEvent;
+ var onremovesubview:LzDeclaredEventClass = LzDeclaredEvent;
/** @access private
* @lzxtype event
*/
- var onresource:LzEventInterface = LzDeclaredEvent;
+ var onresource:LzDeclaredEventClass = LzDeclaredEvent;
/** @access private
* @lzxtype event
*/
- var onresourceheight:LzEventInterface = LzDeclaredEvent;
+ var onresourceheight:LzDeclaredEventClass = LzDeclaredEvent;
/** @access private
* @lzxtype event
*/
- var onresourcewidth:LzEventInterface = LzDeclaredEvent;
+ var onresourcewidth:LzDeclaredEventClass = LzDeclaredEvent;
/** @access private
* @lzxtype event
*/
- var onrotation:LzEventInterface = LzDeclaredEvent;
+ var onrotation:LzDeclaredEventClass = LzDeclaredEvent;
/** @access private
* @lzxtype event
*/
- var onstop:LzEventInterface = LzDeclaredEvent;
+ var onstop:LzDeclaredEventClass = LzDeclaredEvent;
/** @access private
* @lzxtype event
*/
- var ontotalframes:LzEventInterface = LzDeclaredEvent;
+ var ontotalframes:LzDeclaredEventClass = LzDeclaredEvent;
/** @access private
* @lzxtype event
*/
- var onunstretchedheight:LzEventInterface = LzDeclaredEvent;
+ var onunstretchedheight:LzDeclaredEventClass = LzDeclaredEvent;
/** @access private
* @lzxtype event
*/
- var onunstretchedwidth:LzEventInterface = LzDeclaredEvent;
+ var onunstretchedwidth:LzDeclaredEventClass = LzDeclaredEvent;
/** @lzxtype event */
- var onvisible:LzEventInterface = LzDeclaredEvent;
+ var onvisible:LzDeclaredEventClass = LzDeclaredEvent;
/** @access private
* @lzxtype event
*/
- var onvisibility:LzEventInterface = LzDeclaredEvent;
+ var onvisibility:LzDeclaredEventClass = LzDeclaredEvent;
/** event for changes to view's <attribute>width</attribute> property
* @lzxtype event
*/
- var onwidth:LzEventInterface = LzDeclaredEvent;
+ var onwidth:LzDeclaredEventClass = LzDeclaredEvent;
/** event for changes to view's <attribute>x</attribute> property
* @lzxtype event
*/
- var onx:LzEventInterface = LzDeclaredEvent;
+ var onx:LzDeclaredEventClass = LzDeclaredEvent;
/** @access private
* @lzxtype event
*/
- var onxoffset:LzEventInterface = LzDeclaredEvent;
+ var onxoffset:LzDeclaredEventClass = LzDeclaredEvent;
/** event for changes to view's <attribute>y</attribute> property
* @lzxtype event
*/
- var ony:LzEventInterface = LzDeclaredEvent;
+ var ony:LzDeclaredEventClass = LzDeclaredEvent;
/** @access private
* @lzxtype event
*/
- var onyoffset:LzEventInterface = LzDeclaredEvent;
+ var onyoffset:LzDeclaredEventClass = LzDeclaredEvent;
/**
* The ondblclick script is executed when the pointing device button
@@ -229,7 +229,7 @@
* DOUBLE_CLICK_TIME attribute
* @lzxtype event
*/
- var ondblclick:LzEventInterface = LzDeclaredEvent;
+ var ondblclick:LzDeclaredEventClass = LzDeclaredEvent;
/** @access private */
var DOUBLE_CLICK_TIME = 500;
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloView.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloView.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloView.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -62,7 +62,14 @@
* @modifiers override
*/
static var tagname = 'view';
+/** @access private */
+ static var attributes = new LzInheritedHash(LzNode.attributes);
+ // We add some more kludges to those in LzNode. See #construct
+ // where we override the LzNode setting
+ static var __LZdelayedSetters = new LzInheritedHash(LzNode.__LZdelayedSetters);
+ static var earlySetters = new LzInheritedHash(LzNode.earlySetters);
+
/** Event called when this view adds a subview
* @access public
* @lzxtype event
@@ -320,6 +327,10 @@
//this.callInherited( "construct" , arguments.callee , parent ,args );
super.construct( (parent ? parent : canvas), args );
+ // Set applyArgs ordering kludges. Overriding those of LzNode
+ this.__LZdelayedSetters = LzView.__LZdelayedSetters;
+ this.earlySetters = LzView.earlySetters;
+
var ip = this.immediateparent;
this.mask = ip.mask;
@@ -459,26 +470,26 @@
* @keywords final
*/
var clip = false;
-setters.clip = -1;
-setters.x ="setX"
-setters.y = "setY";
+var $lzc$set_clip = -1;
+function $lzc$set_x(v) { this.setX(v) }
+function $lzc$set_y(v) { this.setY(v) }
-setters.rotation= "setRotation";
-setters.opacity = "setOpacity";
+function $lzc$set_rotation(v) { this.setRotation(v); }
+function $lzc$set_opacity(v) { this.setOpacity(v); }
/** @access private */
-setters.alpha = "setOpacity";
-setters.visible = "setVisible"
+function $lzc$set_alpha(v) { this.setOpacity(v); }
+function $lzc$set_visible(v) { this.setVisible(v) }
/** @access private */
-setters.visibility = "setVisibility"
+function $lzc$set_visibility(v) { this.setVisibility(v) }
/**
* @lzxtype "left" | "center" | "right" | constraint
* @lzxdefault "left"
* @keywords final
*/
-var align = "left"
-setters.align = "setAlign"
+var align = "left";
+function $lzc$set_align(v) { this.setAlign(v) }
/**
* Creates a constraint on the view's y position which is a function
@@ -487,8 +498,8 @@
* @lzxtype "top" | "middle" | "bottom" | constraint
* @lzxdefault "top"
*/
-var valign = "top"
-setters.valign = "setValign"
+var valign = "top";
+function $lzc$set_valign(v) { this.setValign(v) }
/** The URL from which to load the resource for this
* view. If this attribute is set, the media for the view is loaded
@@ -505,31 +516,31 @@
* a setter. [bshine 2007.11.07]
* @access private
*/
-setters.source = "setSource";
+function $lzc$set_source(v) { this.setSource(v); }
/** The background color of the canvas.
* @lzxtype token
*/
-setters.bgcolor = "setBGColor";
+function $lzc$set_bgcolor(v) { this.setBGColor(v) }
/** Sets the name of this views resource, or the URL from which it should
* be loaded.
* @type String
*/
var resource;
-setters.resource = "setResource";
+function $lzc$set_resource(v) { this.setResource(v) }
/** If true, this view intercepts click events; otherwise they are passed
* to its container. This defaults to true if the view defines a mouse
* event handler or a cursor.
* @lzxtype boolean
*/
-setters.clickable = "setClickable";
+function $lzc$set_clickable(v) { this.setClickable(v); }
/** Setting clickRegion to a vector-based SWF turns the SWF shape into a clickable hotspot.
* @access public
* @lzxtype string
*/
var clickregion;
-setters.clickregion = "__LZsetClickRegion";
+function $lzc$set_clickregion(v) { this.__LZsetClickRegion(v); }
/** The cursor to display when the mouse is over this view. Any
* resource can be used as a cursor. This attribute can be set for
* any view with clickable=true, or any view whose class defaults
@@ -537,14 +548,14 @@
* @lzxtype token
*/
var cursor;
-setters.cursor = "setCursor";
+function $lzc$set_cursor(v) { this.setCursor(v); }
/** A color to use to render object that appears inside this view,
* which includes any vector or bitmap art in the view's resource
* and any contained views.
* @lzxtype color
*/
var fgcolor;
-setters.fgcolor = "setColor";
+function $lzc$set_fgcolor(v) { this.setColor(v); }
/** The font to use for any @c{<text>} or @c{<inputtext>} elements that
* appear inside this view. Like all the font properties
* (<code>fontstyle</code> and <code>fontsize</code> too) these
@@ -555,7 +566,7 @@
* @lzxtype string
*/
var font;
-setters.font = "setFontName" ;
+function $lzc$set_font(v) { this.setFontName(v) ; }
/** The style to use to render text fields that appear inside of
* this view. One of "plain", "bold" , "italic" or "bolditalic".
@@ -579,14 +590,14 @@
* @lzxdefault "none"
*/
var stretches = "none";
-setters.stretches = "stretchResource";
+function $lzc$set_stretches(v) { this.stretchResource(v); }
/** If true, the resource attached to this view begins playing when
* the view is instantiated.
* @lzxtype boolean
*/
-setters.play = "setPlay";
+function $lzc$set_play(v) { this.setPlay(v); }
/** Show or hide the handcursor for this view, if clickable */
-setters.showhandcursor = "setShowHandCursor";
+function $lzc$set_showhandcursor(v) { this.setShowHandCursor(v); }
/** A CSS property when declared in the tag: value sequence of layout
* parameters, which are used to create a layout that is attached to
@@ -600,42 +611,42 @@
* @access public
*/
var layout;
-setters.layout = "setLayout";
+function $lzc$set_layout(v) { this.setLayout(v); }
/** Activate/inactivate children for accessibility
* @type Boolean
* @lzxtype boolean
*/
var aaactive;
-setters.aaactive = "setAAActive";
+function $lzc$set_aaactive(v) { this.setAAActive(v); }
/** Set accessibility name
* @type String
* @lzxtype string
*/
var aaname;
-setters.aaname = "setAAName";
+function $lzc$set_aaname(v) { this.setAAName(v); }
/** Set accessibility description
* @type String
* @lzxtype string
*/
var aadescription;
-setters.aadescription = "setAADescription";
+function $lzc$set_aadescription(v) { this.setAADescription(v); }
/** Set accessibility tab order
* @type Number
* @lzxtype number
*/
var aatabindex;
-setters.aatabindex = "setAATabIndex";
+function $lzc$set_aatabindex(v) { this.setAATabIndex(v); }
/** Set accessibility silencing/unsilencing
* @type Boolean
* @lzxtype boolean
*/
var aasilent;
-setters.aasilent = "setAASilent";
+function $lzc$set_aasilent(v) { this.setAASilent(v); }
-__LZdelayedSetters.layout = "setLayout";
-earlySetters.clickregion = 7;
-earlySetters.stretches = 8;
+LzView.__LZdelayedSetters.layout = "$lzc$set_layout";
+LzView.earlySetters.clickregion = 7;
+LzView.earlySetters.stretches = 8;
/** A value to be added to the
* <attribute>x</attribute> position of this view before drawing
@@ -644,14 +655,14 @@
* internal coordinate system.
* @type Number
*/
-setters.xoffset = "setXOffset";
+function $lzc$set_xoffset(v) { this.setXOffset(v); }
/** A value to be added to the <attribute>y</attribute> position of this view
* before drawing it. This affects the apparent rotation point of the view, as
* well as its apparent <attribute>y</attribute> position. It does not affect the view's width or its
* internal coordinate system.
* @type Number
*/
-setters.yoffset = "setYOffset";
+function $lzc$set_yoffset(v) { this.setYOffset(v); }
/** @access private */
var sprite = null;
@@ -727,7 +738,7 @@
* @lzxtype sizeExpression
*/
var width = 0;
-setters.width = "setWidth";
+function $lzc$set_width(v) { this.setWidth(v); }
/**
* The height of the view
@@ -736,7 +747,7 @@
* @lzxtype sizeExpression
*/
var height = 0;
-setters.height = "setHeight";
+function $lzc$set_height(v) { this.setHeight(v); }
/** If stretches is not set to none, the width
* that this view would be if it weren't stretched. This attribute can be used
@@ -809,7 +820,7 @@
* know what frame the resource is showing while it is playing.
*/
var frame = 0;
-setters.frame = "setResourceNumber";
+function $lzc$set_frame(v) { this.setResourceNumber(v); }
/** @keywords deprecated
* @access private
@@ -2133,12 +2144,11 @@
if (prop == "x" || prop =="y" ){
tLink.update ( prop );
- return tLink.offset[prop] + tLink.scale[prop] * this.getAttribute( prop );
+ return tLink.offset[prop] + tLink.scale[prop] * this[ prop ];
}else if ( prop == "width" || prop == "height" ){
var axis = prop == "width" ? "x" : "y"
tLink.update ( axis )
- return tLink.scale[axis] * this.getAttribute( prop );
-
+ return tLink.scale[axis] * this[ prop ];
}else{
//not yet implemented: rotation, alpha...
}
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LzInputText.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LzInputText.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LzInputText.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -72,6 +72,15 @@
*/
class LzInputText extends LzText {
+/** @access private
+ * @modifiers override
+ */
+static var tagname = 'inputtext';
+/** @access private */
+ static var attributes = new LzInheritedHash(LzText.attributes);
+ LzNode.mergeAttributes({selectable: true, enabled: true}, LzInputText.attributes);
+
+
/** @lzxtype event */
var onenabled = LzDeclaredEvent;
@@ -92,11 +101,6 @@
/** @access private */
var _modemanagerDel = null;
-/** @access private
- * @modifiers override
- */
-static var tagname = 'inputtext';
-
/**
* Width to use for text field if none is specified
* @access private
@@ -105,10 +109,7 @@
return 100;
}
-defaultattrs.selectable = true;
-defaultattrs.enabled = true;
-
/**
* @access private
*/
@@ -220,7 +221,7 @@
/**
* @access private
*/
-setters.enabled = "setEnabled";
+function $lzc$set_enabled(v) { this.setEnabled(v); }
/**
* Set the html flag on this text view
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LzScript.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LzScript.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LzScript.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -67,6 +67,8 @@
* @modifiers override
*/
static var tagname = 'script';
+/** @access private */
+static var attributes = new LzInheritedHash(LzNode.attributes);
function LzScript ( parent, args ) {
super(parent, args);
Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LzText.lzs
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LzText.lzs 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LzText.lzs 2008-03-19 15:01:29 UTC (rev 8315)
@@ -77,6 +77,8 @@
* @modifiers override
*/
static var tagname = 'text';
+/** @access private */
+static var attributes = new LzInheritedHash(LzView.attributes);
/** Sent whenever the text in the field changes.
* @lzxtype event
@@ -126,7 +128,7 @@
return 0;
}
-defaultattrs.pixellock = true;
+LzText.attributes.pixellock = true;
/**
* If true, the lines of text are wrapped to fit within the text
@@ -296,23 +298,24 @@
} else {
this.setThickness(0);
}
- if (! LzText.prototype.setters.antiAliasType) {
+ // ---+++--- WTF? ---+++---
+ if (! LzText.setters.antiAliasType) {
/**
* @lzxtype string
* @modifiers virtual
*/
// no var decl since this is a virtual field
- LzText.prototype.setters.antiAliasType = "setAntiAliasType";
- LzText.prototype.defaultattrs.antiAliasType = "normal";
+ LzText.setters.antiAliasType = "setAntiAliasType";
+ LzText.attributes.antiAliasType = "normal";
- LzText.prototype.setters.gridFit = "setGridFit";
- LzText.prototype.defaultattrs.gridfit = "subpixel";
+ LzText.setters.gridFit = "setGridFit";
+ LzText.attributes.gridfit = "subpixel";
- LzText.prototype.setters.sharpness = "setSharpness";
- LzText.prototype.defaultattrs.sharpness = 0;
+ LzText.setters.sharpness = "setSharpness";
+ LzText.attributes.sharpness = 0;
- LzText.prototype.setters.thickness = "setThickness";
- LzText.prototype.defaultattrs.thickness = 0;
+ LzText.setters.thickness = "setThickness";
+ LzText.attributes.thickness = 0;
}
}
}
@@ -340,23 +343,23 @@
/**
* @access private
*/
-setters.text = "setText";
+function $lzc$set_text(v) { this.setText(v); }
/**
* @access private
*/
-setters.resize = "setResize";
+function $lzc$set_resize(v) { this.setResize(v); }
/**
* @access private
*/
-setters.multiline = -1;
+var $lzc$set_multiline = -1;
/**
* @access private
*/
-setters.yscroll = "setYScroll";
+function $lzc$set_yscroll(v) { this.setYScroll(v); }
/**
* @access private
*/
-setters.xscroll = "setXScroll";
+function $lzc$set_xscroll(v) { this.setXScroll(v); }
/**
* If true, the text is selectable
@@ -365,8 +368,8 @@
* @modifiers virtual
*/
// no var decl since this is a virtual field
-setters.selectable = "setSelectable";
-defaultattrs.selectable = false;
+function $lzc$set_selectable(v) { this.setSelectable(v); }
+LzText.attributes.selectable = false;
/**
* @lzxtype numberExpression
@@ -374,7 +377,7 @@
*/
var maxlength;
/** @access private */
-setters.maxlength = "setMaxLength";
+function $lzc$set_maxlength(v) { this.setMaxLength(v); }
/**
* @lzxtype string
@@ -382,10 +385,10 @@
*/
var pattern;
/** @access private */
-setters.pattern = "setPattern";
+function $lzc$set_pattern(v) { this.setPattern(v); }
-defaultattrs.clip = true;
+LzText.attributes.clip = true;
@@ -522,7 +525,10 @@
if (id != this.toString()) {
return id;
} else {
- return Debug.stringEscape(this.getText(), true);
+ var contents = this.getText();
+ if (contents) {
+ return Debug.stringEscape(contents, true);
+ }
}
}
}
@@ -581,15 +587,15 @@
/**
* @access private
*/
-setters.font = "setFontName";
+function $lzc$set_font(v) { this.setFontName(v); }
/**
* @access private
*/
-setters.fontsize = "setFontSize";
+function $lzc$set_fontsize(v) { this.setFontSize(v); }
/**
* @access private
*/
-setters.fontstyle = "setFontStyle";
+function $lzc$set_fontstyle(v) { this.setFontStyle(v); }
/**
* @access private
Modified: openlaszlo/branches/devildog/WEB-INF/lps/schema/lfc.lzx
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/schema/lfc.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/schema/lfc.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -404,6 +404,9 @@
you set this to true.
-->
<attribute name="cacheable" type="boolean" value="false"/>
+ <!-- When true, an argument will be added to the request string, e.g. __lzbc__=1204685840777. This is to prevent client caching.
+ -->
+ <attribute name="clientcacheable" type="boolean" value="false"/>
<!-- The ondata event is received when data arrives -->
<event name="ondata" />
<!-- The onerror event is recevied when an error occurs -->
Modified: openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/CanvasCompiler.java
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/CanvasCompiler.java 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/CanvasCompiler.java 2008-03-19 15:01:29 UTC (rev 8315)
@@ -3,7 +3,7 @@
* ****************************************************************************/
/* J_LZ_COPYRIGHT_BEGIN *******************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* J_LZ_COPYRIGHT_END *********************************************************/
@@ -195,8 +195,7 @@
}
}
collectObjectProperties(element, model, visited);
- model.updateAttrs();
- Map attrs = model.attrs;
+ Map attrs = model.getAttrs();
// default width is 100% by 100%
if (attrs.get("width") == null) attrs.put("width", "100%");
Modified: openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassCompiler.java
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassCompiler.java 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassCompiler.java 2008-03-19 15:01:29 UTC (rev 8315)
@@ -3,7 +3,7 @@
* ****************************************************************************/
/* J_LZ_COPYRIGHT_BEGIN *******************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* J_LZ_COPYRIGHT_END *********************************************************/
@@ -17,7 +17,7 @@
import org.openlaszlo.xml.internal.MissingAttributeException;
import org.openlaszlo.xml.internal.Schema;
import org.openlaszlo.xml.internal.Schema.Type;
-import org.openlaszlo.sc.ScriptCompiler;
+import org.openlaszlo.sc.*;
import org.openlaszlo.utils.ChainedException;
import org.openlaszlo.css.CSSParser;
@@ -232,12 +232,17 @@
schema.addElement(element, classname, superclass, attributeDefs, mEnv);
}
+ public static String tagToClass(String s) {
+ String lzcPackagePrefix = "$lzc$class_";
+ return lzcPackagePrefix + s;
+ }
+
public void compile(Element elt) {
- String className = elt.getAttributeValue("name");
+ String tagName = elt.getAttributeValue("name");
ViewSchema schema = mEnv.getSchema();
if (schema.enforceValidIdentifier) {
try {
- className = requireIdentifierAttributeValue(elt, "name");
+ tagName = requireIdentifierAttributeValue(elt, "name");
} catch (MissingAttributeException e) {
throw new CompilationError(
/* (non-Javadoc)
@@ -249,9 +254,9 @@
, elt);
}
}
-
+ String className = tagToClass(tagName);
- ClassModel classModel = schema.getClassModel(className);
+ ClassModel classModel = schema.getClassModel(tagName);
String linedir = CompilerUtils.sourceLocationDirective(elt, true);
ViewCompiler.preprocess(elt, mEnv);
@@ -263,26 +268,120 @@
model = model.expandClassDefinitions();
model.removeAttribute("name");
classModel.setNodeModel(model);
+ // Should the package prefix be in the model? Should the
+ // model store class and tagname separately?
+ String supertagname = classModel.getSuperclassName();
+ String superclassname = tagToClass(supertagname);
+ model.removeAttribute("extends");
+
+ // Build the constructor
+ String body = "";
+ body += "super(parent, attrs, children, async);\n";
+
+
+ model.setAttribute(
+ className,
+ new Function(
+ className,
+ // All nodes get these args when constructed
+// "parent:LzNode, attrs:Object, children:Object? = null, async:boolean = false",
+ "parent:LzNode, attrs:Object, children:Object?, async:boolean",
+ body,
+ null));
+
+ // Set the tag name
+ model.setClassAttribute("tagname", ScriptCompiler.quote(tagName));
+
+ // --- This should only be for subclasses of Node
+ String children = ScriptCompiler.objectAsJavascript(model.childrenMaps());
+ // class#classChildren now class.children
+ model.setClassAttribute("children", "LzNode.mergeChildren(" + children + ", " + superclassname + "['children'])");
+
+ // Build the class body
+ String classBody = "";
+ // Declare all instance vars and methods, save initialization
+ // in <class>.attributes
+ Map attrs = model.getAttrs(); // classModel.getMergedAttributes();
+ Map setters = classModel.getMergedSetters();
+ Map decls = new LinkedHashMap();
+ Map inits = new LinkedHashMap();
+ boolean isstate = classModel.isSubclassOf(schema.getClassModel("state"));
+ for (Iterator i = attrs.entrySet().iterator(); i.hasNext(); ) {
+ Map.Entry entry = (Map.Entry) i.next();
+ String key = (String) entry.getKey();
+ Object value = entry.getValue();
+ if ((value instanceof NodeModel.BindingExpr)) {
+ // Bindings always have to be installed as an init
+ // A null value indicates that the var was only
+ // declared, not initialized
+ decls.put(key, null);
+ inits.put(key, ((NodeModel.BindingExpr)value).getExpr());
+ } else if (value instanceof Function &&
+ ((! isstate) ||
+ className.equals(key))) {
+ // Methods are just decls. Except in states, because they
+ // have to be applied to the parent, except for the
+ // constructor!
+ decls.put(key, value);
+ } else if (value != null) {
+ // If there is a setter for this attribute, or this is a
+ // state, or this is an Array or Map argument that needs
+ // magic merging, the value has to be installed as an init,
+ // otherwise it should be installed as a decl
+ //
+ // TODO: [2008-03-15 ptw] This won't work until we know
+ // (in the classModel) the setters for the built-in
+ // classes, so we install as an init for now and this is
+ // fixed up in LzNode by installing inits that have no
+ // setters when the arguments are merged
+ if (true) { // (! (value instanceof String)) || setters.containsKey(key) || isstate) {
+ decls.put(key, null);
+ inits.put(key, value);
+ } else {
+ decls.put(key, value);
+ // If there is a property that would have been shadowed,
+ // you have to hide that from applyArgs, or you will get
+ // clobbered!
+ inits.put(key, "LzNode._ignoreAttribute");
+ }
+ } else {
+ // Just a declaration
+ decls.put(key, value);
+// if (mEnv.isSWF()) {
+// // Work around LHS implicit-this bug in SWF by making
+// // sure each instance has slots defined on it
+// inits.put(key, value);
+// }
+ }
+ }
+ // mergedAttrs does not deal with our methods
+// Map methods = model.getAttrs();
+// for (Iterator i = methods.entrySet().iterator(); i.hasNext(); ) {
+// Map.Entry entry = (Map.Entry) i.next();
+// String key = (String) entry.getKey();
+// Object value = entry.getValue();
+// if ((value instanceof Function)) {
+// decls.put(key, value);
+// }
+// }
+ model.setClassAttribute("attributes", "new LzInheritedHash(" + superclassname + ".attributes)");
+ classBody += "LzNode.mergeAttributes(" +
+ ScriptCompiler.objectAsJavascript(inits) +
+ ", " + className + ".attributes);\n";
+
Map viewMap = model.asMap();
-
- // Put in the class name, not "class"
+ // Put in the class name, not "class"
viewMap.put("name", ScriptCompiler.quote(className));
-
- // TODO: [2007-01-29 ptw] Someday write out real Javascript classes
- // String superclass = XMLUtils.getAttributeValue(elt, "extends", DEFAULT_SUPERCLASS_NAME);
- // org.openlaszlo.sc.ScriptClass scriptClass =
- // new org.openlaszlo.sc.ScriptClass(className, superclass, (Map)viewMap.get("attrs"));
-
- // Construct a Javascript statement from the initobj map
- String initobj;
- try {
- java.io.Writer writer = new java.io.StringWriter();
- ScriptCompiler.writeObject(viewMap, writer, emitClassDecl);
- initobj = writer.toString();
- } catch (java.io.IOException e) {
- throw new ChainedException(e);
- }
- compileClass(elt, classModel, initobj);
+
+ ScriptClass scriptClass =
+ new ScriptClass(className,
+ superclassname,
+ decls,
+ (Map)viewMap.get("classAttrs"),
+ classBody);
+ mEnv.compileScript(scriptClass.toString(), elt);
+ // Install in constructor map ??
+
}
protected void compileClass(Element elt, ClassModel classModel, String initobj) {
Modified: openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassModel.java
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassModel.java 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassModel.java 2008-03-19 15:01:29 UTC (rev 8315)
@@ -7,6 +7,7 @@
package org.openlaszlo.compiler;
import java.util.*;
import org.jdom.Element;
+import org.openlaszlo.sc.Function;
class ClassModel implements Comparable {
protected final ViewSchema schema;
@@ -20,6 +21,9 @@
/** Set of tags that can legally be nested in this element */
protected Set mCanContainTags = new HashSet();
+ /** Set of forbidden child tags of this element */
+ protected Set mForbiddenTags = new HashSet();
+
/* If superclass is a predefined system class, just store its name. */
protected String superclassName = null;
protected boolean hasInputText = false;
@@ -108,6 +112,36 @@
return superclass;
}
+ Map getMergedAttributes() {
+ if (nodeModel == null) { return new LinkedHashMap(); }
+ Map merged = superclass.getMergedAttributes();
+ // Merge in the our attributes, omitting methods
+ for (Iterator i = nodeModel.getAttrs().entrySet().iterator(); i.hasNext(); ) {
+ Map.Entry entry = (Map.Entry) i.next();
+ String key = (String) entry.getKey();
+ Object value = entry.getValue();
+ if ("LzNode._ignoreAttribute".equals(value)) {
+ merged.remove(key);
+ } else if (! (value instanceof Function)) {
+ merged.put(key, value);
+ }
+ }
+ return merged;
+ }
+
+ Map getMergedSetters() {
+ if (nodeModel == null) { return new LinkedHashMap(); }
+ Map merged = superclass.getMergedSetters();
+ // Merge in the our setters
+ for (Iterator i = nodeModel.getSetters().entrySet().iterator(); i.hasNext(); ) {
+ Map.Entry entry = (Map.Entry) i.next();
+ String key = (String) entry.getKey();
+ Object value = entry.getValue();
+ merged.put(key, value);
+ }
+ return merged;
+ }
+
String getClassName () {
return this.className;
}
@@ -310,9 +344,20 @@
public Set getContainsSet () {
return mCanContainTags;
}
+
+ /** Add an entry to the table of forbidden tags for a
+ * given tag */
+ public void addForbiddenElement (String childtag) {
+ mForbiddenTags.add(childtag);
+ }
+
+ public Set getForbiddenSet () {
+ return mForbiddenTags;
+ }
+
}
/**
- * @copyright Copyright 2001-2007 Laszlo Systems, Inc. All Rights
+ * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights
* Reserved. Use is subject to license terms.
*/
Modified: openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/CompilationEnvironment.java
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/CompilationEnvironment.java 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/CompilationEnvironment.java 2008-03-19 15:01:29 UTC (rev 8315)
@@ -15,7 +15,6 @@
import org.apache.log4j.*;
import org.openlaszlo.server.LPS;
import org.openlaszlo.utils.ChainedException;
-import org.openlaszlo.utils.ComparisonMap;
import org.openlaszlo.utils.FileUtils;
import org.openlaszlo.xml.internal.XMLUtils;
@@ -104,7 +103,7 @@
/** Keep a list of assigned global id's, so we can warn when one
* is redefined */
- private final Map idTable = new ComparisonMap();
+ private final Map idTable = new LinkedHashMap();
/** Holds a set of unresolved references to resources, so we can
check for undefined (possibly forward) references after all
Modified: openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java 2008-03-19 15:01:29 UTC (rev 8315)
@@ -23,7 +23,6 @@
import org.openlaszlo.server.*;
import org.openlaszlo.utils.ChainedException;
import org.openlaszlo.utils.ListFormat;
-import org.openlaszlo.utils.ComparisonMap;
import org.openlaszlo.xml.internal.MissingAttributeException;
import org.openlaszlo.xml.internal.Schema;
import org.openlaszlo.xml.internal.XMLUtils;
@@ -43,33 +42,34 @@
public static final String WHEN_ALWAYS = "always";
public static final String WHEN_PATH = "path";
public static final String WHEN_STYLE = "style";
+ public static final String ALLOCATION_INSTANCE = "instance";
+ public static final String ALLOCATION_CLASS = "class";
private static final String SOURCE_LOCATION_ATTRIBUTE_NAME = "__LZsourceLocation";
- protected final ViewSchema schema;
- protected final Element element;
- protected String className;
- protected String id = null;
- protected ComparisonMap attrs = new ComparisonMap();
- protected List children = new Vector();
+ final ViewSchema schema;
+ final Element element;
+ String className;
+ String id = null;
+ LinkedHashMap attrs = new LinkedHashMap();
+ List children = new Vector();
/** A set {eventName: String -> True) of names of event handlers
* declared with <method event="xxx"/>. */
- protected ComparisonMap delegates = new ComparisonMap();
+ LinkedHashMap delegates = new LinkedHashMap();
/* Unused */
- protected ComparisonMap events = new ComparisonMap();
- protected ComparisonMap references = new ComparisonMap();
- /* Unused */
- protected ComparisonMap paths = new ComparisonMap();
- protected ComparisonMap setters = new ComparisonMap();
- protected ComparisonMap styles = new ComparisonMap();
+ LinkedHashMap events = new LinkedHashMap();
+ LinkedHashMap references = new LinkedHashMap();
+ LinkedHashMap classAttrs = new LinkedHashMap();
+ LinkedHashMap setters = new LinkedHashMap();
+ LinkedHashMap styles = new LinkedHashMap();
- protected NodeModel datapath = null;
+ NodeModel datapath = null;
/** [eventName: String, methodName: String, Function] */
- protected List delegateList = new Vector();
- protected ClassModel parentClassModel;
- protected String initstage = null;
- protected int totalSubnodes = 1;
- protected final CompilationEnvironment env;
+ List delegateList = new Vector();
+ ClassModel parentClassModel;
+ String initstage = null;
+ int totalSubnodes = 1;
+ final CompilationEnvironment env;
protected boolean emitClassDecl = false;
public Object clone() {
@@ -79,13 +79,13 @@
} catch (CloneNotSupportedException e) {
throw new RuntimeException(e);
}
- copy.attrs = new ComparisonMap(copy.attrs);
- copy.delegates = new ComparisonMap(copy.delegates);
- copy.events = new ComparisonMap(copy.events);
- copy.references = new ComparisonMap(copy.references);
- copy.paths = new ComparisonMap(copy.paths);
- copy.setters = new ComparisonMap(copy.setters);
- copy.styles = new ComparisonMap(copy.styles);
+ copy.attrs = new LinkedHashMap(copy.attrs);
+ copy.delegates = new LinkedHashMap(copy.delegates);
+ copy.events = new LinkedHashMap(copy.events);
+ copy.references = new LinkedHashMap(copy.references);
+ copy.classAttrs = new LinkedHashMap(copy.classAttrs);
+ copy.setters = new LinkedHashMap(copy.setters);
+ copy.styles = new LinkedHashMap(copy.styles);
copy.delegateList = new Vector(copy.delegateList);
copy.children = new Vector();
for (Iterator iter = children.iterator(); iter.hasNext(); ) {
@@ -94,19 +94,11 @@
return copy;
}
- private boolean caseSensitive = true;
-
NodeModel(Element element, ViewSchema schema, CompilationEnvironment env) {
this.element = element;
this.schema = schema;
this.env = env;
- if ("swf6".equals(env.getRuntime())) {
- this.caseSensitive = false;
- }
- else if ("swf9".equals(env.getRuntime())) {
- this.emitClassDecl = true;
- }
this.className = element.getName();
// Cache ClassModel for parent
this.parentClassModel = this.getParentClassModel();
@@ -194,24 +186,111 @@
}
}
- static class CompiledAttribute {
- static final int ATTRIBUTE = 0;
- static final int EVENT = 1;
- static final int REFERENCE = 2;
- static final int PATH = 3;
- static final int STYLE = 4;
+ static class BindingExpr {
+ String expr;
+ BindingExpr(String expr) { this.expr = expr; }
+ String getExpr() { return this.expr; }
+ }
- final int type;
- final Object value;
+ static class CompiledAttribute {
+ String name;
+ Schema.Type type;
+ private String value;
+ String when;
+ Element source;
+ String srcloc;
+ String bindername;
- CompiledAttribute(int type, Object value) {
- this.type = type;
- this.value = value;
+ public CompiledAttribute (String name, Schema.Type type, String value, String when, Element source) {
+ this.name = name;
+ this.type = type;
+ this.value = value;
+ this.when = when;
+ this.source = source;
+ this.srcloc = CompilerUtils.sourceLocationDirective(source, true);
+ if (when.equals(WHEN_PATH) || (when.equals(WHEN_STYLE)) || when.equals(WHEN_ONCE) || when.equals(WHEN_ALWAYS)) {
+ this.bindername = "$lzc$bind_" + name;
+ }
+ }
+
+ public Function getBinderMethod() {
+ if (! (when.equals(WHEN_PATH) || (when.equals(WHEN_STYLE)) || when.equals(WHEN_ONCE) || when.equals(WHEN_ALWAYS))) {
+ return null;
+ }
+ String installer = "setAttribute";
+ String body = "\n#beginAttribute\n" + srcloc + value + "\n#endAttribute\n)";
+ String pragmas =
+ // Should be unnecessary for JS2 methods
+ "\n#pragma 'withThis'\n";
+ if (when.equals(WHEN_ONCE)) {
+ // default
+ } else if (when.equals(WHEN_PATH)) {
+ installer = "dataBindAttribute";
+ } else if (when.equals(WHEN_STYLE)) {
+ // Styles are processed as constraints, although
+ // they are not compiled as constraints. Whether
+ // a style results in a constraint or not cannot
+ // be determined until the style property value is
+ // derived (at run time)
+ installer = "__LZstyleBindAttribute";
+ } else if (when.equals(WHEN_ALWAYS)) {
+ pragmas =
+ "\n#pragma 'constraintFunction'\n" +
+ // Should be unnecessary for JS2 methods
+ "\n#pragma 'withThis'\n";
+ }
+ Function binder = new Function(
+ bindername,
+ "",
+ pragmas +
+ "this." + installer + "(" +
+ ScriptCompiler.quote(name) + "," +
+ body,
+ srcloc);
+ return binder;
+ }
+
+ public Object getInitialValue () {
+ // A null value indicates an attribute that was declared only
+ if (value == null) { return null; }
+ // Handle when cases
+ // N.B., $path and $style are not really when values, but
+ // there you go...
+ if (when.equals(WHEN_PATH) || (when.equals(WHEN_STYLE)) || when.equals(WHEN_ONCE) || when.equals(WHEN_ALWAYS)) {
+ String kind = "LzOnceExpr";
+ if (when.equals(WHEN_ONCE) || when.equals(WHEN_PATH)) {
+ // default
+ } else if (when.equals(WHEN_STYLE)) {
+ // Styles are processed as constraints, although
+ // they are not compiled as constraints. Whether
+ // a style results in a constraint or not cannot
+ // be determined until the style property value is
+ // derived (at run time)
+ kind = "LzConstraintExpr";
+ } else if (when.equals(WHEN_ALWAYS)) {
+ kind = "LzConstraintExpr";
}
- CompiledAttribute(Object value) {
- this(ATTRIBUTE, value);
+ // Return an initExpr as the 'value' of the attribute
+ return new BindingExpr("new " + kind + "(" + ScriptCompiler.quote(bindername) +")");
+ } else if (when.equals(WHEN_IMMEDIATELY)) {
+ if (CanvasCompiler.isElement(source) &&
+ ("width".equals(name) || "height".equals(name))) {
+ // The Canvas compiler depends on seeing width/height
+ // unadulterated <sigh />.
+ // TODO: [2007-05-05 ptw] (LPP-3949) The
+ // #beginAttribute directives for the parser should
+ // be added when the attribute is written, not
+ // here...
+ return value;
+ } else {
+ return "\n#beginAttribute\n" + srcloc + value + "\n#endAttribute\n";
}
+ } else {
+ throw new CompilationError("invalid when value '" +
+ when + "'", source);
+ }
}
+ }
public String toString() {
StringBuffer buffer = new StringBuffer();
@@ -224,8 +303,8 @@
buffer.append(" events=" + events.keySet());
if (!references.isEmpty())
buffer.append(" references=" + references.keySet());
- if (!paths.isEmpty())
- buffer.append(" paths=" + paths.keySet());
+ if (!classAttrs.isEmpty())
+ buffer.append(" classAttrs=" + classAttrs.keySet());
if (!setters.isEmpty())
buffer.append(" setters=" + setters.keySet());
if (!styles.isEmpty())
@@ -332,7 +411,7 @@
boolean includeChildren, CompilationEnvironment env)
{
NodeModel model = new NodeModel(elt, schema, env);
- ComparisonMap attrs = model.attrs;
+ LinkedHashMap attrs = model.attrs;
Map events = model.events;
Map delegates = model.delegates;
model.addAttributes(env);
@@ -505,7 +584,7 @@
location, ViewSchema.STRING_TYPE,
WHEN_IMMEDIATELY);
addAttribute(cattr, SOURCE_LOCATION_ATTRIBUTE_NAME,
- attrs, events, references, paths, styles);
+ attrs, events, references, classAttrs, styles);
}
// Add file/line information if debugging
@@ -515,11 +594,11 @@
String filename = Parser.getSourceMessagePathname(element);
CompiledAttribute cattr =
compileAttribute(element, name, filename, ViewSchema.STRING_TYPE, WHEN_IMMEDIATELY);
- addAttribute(cattr, name, attrs, events, references, paths, styles);
+ addAttribute(cattr, name, attrs, events, references, classAttrs, styles);
name = "_dbg_lineno";
Integer lineno = Parser.getSourceLocation(element, Parser.LINENO);
cattr = compileAttribute(element, name, lineno.toString(), ViewSchema.NUMBER_TYPE, WHEN_IMMEDIATELY);
- addAttribute(cattr, name, attrs, events, references, paths, styles);
+ addAttribute(cattr, name, attrs, events, references, classAttrs, styles);
}
ClassModel classModel = getClassModel();
@@ -684,11 +763,14 @@
} else {
String when = this.getAttributeValueDefault(
name, "when", WHEN_IMMEDIATELY);
+ // NYI
+ String allocation = this.getAttributeValueDefault(
+ name, "allocation", ALLOCATION_INSTANCE);
try {
CompiledAttribute cattr = compileAttribute(
element, name, value, type, when);
addAttribute(cattr, name, attrs, events,
- references, paths, styles);
+ references, classAttrs, styles);
// Check if we are aliasing another 'name'
// attribute of a sibling
if (name.equals("name")) {
@@ -721,26 +803,23 @@
}
void addAttribute(CompiledAttribute cattr, String name,
- ComparisonMap attrs, ComparisonMap events,
- ComparisonMap references, ComparisonMap paths,
- ComparisonMap styles) {
- if (cattr.type == cattr.ATTRIBUTE || cattr.type == cattr.EVENT ||
- (cattr.type == cattr.REFERENCE) || (cattr.type == cattr.PATH) ||
- (cattr.type == cattr.STYLE)) {
- if (attrs.containsKey(name, caseSensitive)) {
- env.warn(
-/* (non-Javadoc)
- * @i18n.test
- * @org-mes="an attribute or method named '" + p[0] + "' already is defined on " + p[1]
- */
- org.openlaszlo.i18n.LaszloMessages.getMessage(
- NodeModel.class.getName(),"051018-682", new Object[] {name, getMessageName()})
- ,element);
- }
- attrs.put(name, cattr.value);
- } else {
- assert false: "Unknown cattr.type: " + cattr.type;
+ LinkedHashMap attrs, LinkedHashMap events,
+ LinkedHashMap references, LinkedHashMap classAttrs,
+ LinkedHashMap styles) {
+ if (attrs.containsKey(name)) {
+ env.warn(
+ /* (non-Javadoc)
+ * @i18n.test
+ * @org-mes="an attribute or method named '" + p[0] + "' already is defined on " + p[1]
+ */
+ org.openlaszlo.i18n.LaszloMessages.getMessage(
+ NodeModel.class.getName(),"051018-682", new Object[] {name, getMessageName()})
+ ,element);
}
+ if (cattr.bindername != null) {
+ attrs.put(cattr.bindername, cattr.getBinderMethod());
+ }
+ attrs.put(name, cattr.getInitialValue());
}
static String getDatasetContent(Element element, CompilationEnvironment env) {
@@ -1099,7 +1178,7 @@
,element);
}
- if (attrs.containsKey(name, caseSensitive)) {
+ if (attrs.containsKey(name)) {
env.warn(
/* (non-Javadoc)
* @i18n.test
@@ -1167,14 +1246,11 @@
String value, Schema.Type type,
String when)
{
-
- String srcloc = CompilerUtils.sourceLocationDirective(source, true);
String parent_name = source.getAttributeValue("id");
if (parent_name == null) {
parent_name = CompilerUtils.attributeUniqueName(source, name);
}
- // Some values are not canonicalized to String
- Object canonicalValue = null;
+ String canonicalValue = null;
boolean warnOnDeprecatedConstraints = true;
if (value == null) {
@@ -1231,7 +1307,7 @@
entry.setValue(ScriptCompiler.quote((String) mv));
}
}
- canonicalValue = cssProperties;
+ canonicalValue = ScriptCompiler.objectAsJavascript(cssProperties);
} catch (org.openlaszlo.css.ParseException e) {
// Or just set when to WHEN_ONCE and fall
// through to TODO?
@@ -1338,78 +1414,11 @@
if (canonicalValue == null)
canonicalValue = value;
- // Handle when cases
- // N.B., $path and $style are not really when values, but
- // there you go...
- if (when.equals(WHEN_PATH) || (when.equals(WHEN_STYLE)) || when.equals(WHEN_ONCE) || when.equals(WHEN_ALWAYS)) {
- String installer = "setAttribute";
- String body = "\n#beginAttribute\n" + srcloc + canonicalValue + "\n#endAttribute\n)";
- String pragmas =
- // Should be unnecessary for JS2 methods
- "\n#pragma 'withThis'\n";
- String kind = "LzOnceExpr";
- if (when.equals(WHEN_ONCE)) {
- // default
- } else if (when.equals(WHEN_PATH)) {
- installer = "dataBindAttribute";
- } else if (when.equals(WHEN_STYLE)) {
- // Styles are processed as constraints, although
- // they are not compiled as constraints. Whether
- // a style results in a constraint or not cannot
- // be determined until the style property value is
- // derived (at run time)
- kind = "LzConstraintExpr";
- installer = "__LZstyleBindAttribute";
- } else if (when.equals(WHEN_ALWAYS)) {
- pragmas =
- "\n#pragma 'constraintFunction'\n" +
- // Should be unnecessary for JS2 methods
- "\n#pragma 'withThis'\n";
- kind = "LzConstraintExpr";
- } else {
- assert false : "Unhandled when value: " + when;
- }
- String bindername = "$lzc$bind_" + name;
- Function binder = new Function(
- bindername,
- "",
- pragmas +
- "this." + installer + "(" +
- ScriptCompiler.quote(name) + "," +
- body,
- srcloc);
- // Add the binder as a method
- attrs.put(bindername, binder);
- // Return an initExpr as the 'value' of the attribute
- return new CompiledAttribute("new " + kind + "(" + ScriptCompiler.quote(bindername) +")");
- } else if (when.equals(WHEN_IMMEDIATELY)) {
- if ((CanvasCompiler.isElement(source) &&
- ("width".equals(name) || "height".equals(name))) ||
- canonicalValue instanceof Map) {
- // The Canvas compiler depends on seeing width/height
- // unadulterated <sigh />. Or, if it's already an
- // object, e.g., compiled from a CSS list, we
- // don't want to mess it up.
- //
- // TODO: [2007-05-05 ptw] (LPP-3949) The
- // #beginAttribute directives for the parser should
- // be added when the attribute is written, not
- // here...
- return new CompiledAttribute(canonicalValue);
- } else {
- if (emitClassDecl) {
- return new CompiledAttribute(srcloc + canonicalValue);
- }
- else {
- return new CompiledAttribute("\n#beginAttribute\n" + srcloc + canonicalValue + "\n#endAttribute\n");
- }
- }
- } else {
- throw new CompilationError("invalid when value '" +
- when + "'", source);
- }
+ return new CompiledAttribute(name, type, canonicalValue, when, source);
}
+ static final Schema.Type EVENT_TYPE = Schema.newType("LzEvent");
+
/* Handle the <event> tag
* example: <event name="onfoobar"/>
*/
@@ -1428,7 +1437,7 @@
, element);
}
- if (events.containsKey(name, caseSensitive)) {
+ if (events.containsKey(name)) {
env.warn(
/* (non-Javadoc)
* @i18n.test
@@ -1441,8 +1450,9 @@
// An event is really just an attribute with an implicit
// default (sentinal) value
- CompiledAttribute cattr = new CompiledAttribute(CompiledAttribute.EVENT, "LzDeclaredEvent");
- addAttribute(cattr, name, attrs, events, references, paths, styles);
+ CompiledAttribute cattr =
+ new CompiledAttribute(name, EVENT_TYPE, "LzDeclaredEvent", WHEN_IMMEDIATELY, element);
+ addAttribute(cattr, name, attrs, events, references, classAttrs, styles);
}
void addAttributeElement(Element element) {
@@ -1552,13 +1562,15 @@
element);
}
- // Don't initialize an attribute that is only declared.
+ CompiledAttribute cattr;
+ // Value may be null if attribute is only declared
if (value != null) {
- CompiledAttribute cattr = compileAttribute(element, name,
- value, type,
- when);
- addAttribute(cattr, name, attrs, events, references, paths, styles);
+ cattr = compileAttribute(element, name, value, type, when);
+ } else {
+ String srcloc = CompilerUtils.sourceLocationDirective(element, true);
+ cattr = new CompiledAttribute(name, type, null, WHEN_IMMEDIATELY, element);
}
+ addAttribute(cattr, name, attrs, events, references, classAttrs, styles);
// Add entry for attribute setter function
String setter = element.getAttributeValue("setter");
@@ -1568,6 +1580,8 @@
CompilerUtils.sourceLocationDirective(element, true);
// By convention 'anonymous' setters are put in the 'lzc'
// namespace with the name set_<property name>
+ // NOTE: LzNode#applyArgs and #setAttribute depend on this
+ // convention to find setters
String settername = "$lzc$" + "set_" + name;
// Maybe we need a new type for "function"?
Function setterfn = new
@@ -1619,7 +1633,7 @@
ViewSchema.XML_LITERAL,
WHEN_IMMEDIATELY);
- addAttribute(cattr, name, attrs, events, references, paths, styles);
+ addAttribute(cattr, name, attrs, events, references, classAttrs, styles);
}
@@ -1636,6 +1650,18 @@
attrs.put(name, value);
}
+ boolean hasClassAttribute(String name) {
+ return classAttrs.containsKey(name);
+ }
+
+ void removeClassAttribute(String name) {
+ classAttrs.remove(name);
+ }
+
+ void setClassAttribute(String name, Object value) {
+ classAttrs.put(name, value);
+ }
+
void addText() {
if (schema.hasHTMLContent(element)) {
String text = TextCompiler.getHTMLContent(element);
@@ -1659,18 +1685,16 @@
}
void updateAttrs() {
- if (!setters.isEmpty()) {
- attrs.put("$setters", setters);
- }
+ // Only used for checking multiple definitions now
+// if (!setters.isEmpty()) {
+// attrs.put("$setters", setters);
+// }
if (!delegateList.isEmpty()) {
attrs.put("$delegates", delegateList);
}
if (!references.isEmpty()) {
assert false : "There should not be any $refs";
}
- if (!paths.isEmpty()) {
- assert false : "There should not be any $paths";
- }
if (datapath != null) {
attrs.put("$datapath", datapath.asMap());
// If we've got an explicit datapath value, we have to
@@ -1684,24 +1708,70 @@
}
}
+ Map getAttrs() {
+ updateAttrs();
+ return attrs;
+ }
+
+ Map getSetters() {
+ return setters;
+ }
+
Map asMap() {
Map map = new LinkedHashMap();
updateAttrs();
map.put("name", ScriptCompiler.quote(className));
- map.put("attrs", attrs);
+ Map inits = new LinkedHashMap();
+ // Node as map just wants to see all the attrs, so clean out
+ // the binding markers
+ for (Iterator i = attrs.entrySet().iterator(); i.hasNext(); ) {
+ Map.Entry entry = (Map.Entry) i.next();
+ String key = (String) entry.getKey();
+ Object value = entry.getValue();
+ if (! (value instanceof NodeModel.BindingExpr)) {
+ inits.put(key, value);
+ } else {
+ inits.put(key, ((NodeModel.BindingExpr)value).getExpr());
+ }
+ }
+ map.put("attrs", inits);
+ if (!classAttrs.isEmpty()) {
+ map.put("classAttrs", classAttrs);
+ }
if (id != null) {
map.put("id", ScriptCompiler.quote(id));
- attrs.put("id", ScriptCompiler.quote(id));
+ inits.put("id", ScriptCompiler.quote(id));
}
if (!children.isEmpty()) {
- List childMaps = new Vector(children.size());
- for (Iterator iter = children.iterator(); iter.hasNext(); )
- childMaps.add(((NodeModel) iter.next()).asMap());
- map.put("children", childMaps);
+ map.put("children", childrenMaps());
}
return map;
}
+ List childrenMaps() {
+ List childMaps = new Vector(children.size());
+ for (Iterator iter = children.iterator(); iter.hasNext(); )
+ childMaps.add(((NodeModel) iter.next()).asMap());
+
+ // TODO: [2006-09-28 ptw] There must be a better way. See
+ // comment in LFC where __LZUserClassPlacementObject is
+ // inserted in ConstructorMap regarding the wart this is. You
+ // need some way to not set defaultplacement until the
+ // class-defined children are instantiated, only the
+ // instance-defined children should get default placement.
+ // For now this is done by inserting this sentinel in the
+ // child nodes...
+ if (className.equals("class") && hasAttribute("defaultplacement")) {
+ LinkedHashMap dummy = new LinkedHashMap();
+ dummy.put("name", ScriptCompiler.quote("__LZUserClassPlacementObject"));
+ dummy.put("attrs", attrs.get("defaultplacement"));
+ removeAttribute("defaultplacement");
+ childMaps.add(dummy);
+ }
+
+ return childMaps;
+ }
+
/** Expand eligible instances by replacing the instance by the
* merge of its class definition with the instance content
* (attributes and children). An eligible instance is an instance
@@ -1743,9 +1813,9 @@
// FIXME [2004-06-04]: only compare events with the same reference
if (CollectionUtils.containsAny(
- events.normalizedKeySet(), source.events.normalizedKeySet())) {
+ events.keySet(), source.events.keySet())) {
Collection sharedEvents = CollectionUtils.intersection(
- events.normalizedKeySet(), source.events.normalizedKeySet());
+ events.keySet(), source.events.keySet());
throw new CompilationError(
/* (non-Javadoc)
* @i18n.test
@@ -1760,7 +1830,7 @@
// Check for duplicate methods. Collect all the keys that name
// a Function in both the source and target.
List sharedMethods = new Vector();
- for (Iterator iter = attrs.normalizedKeySet().iterator();
+ for (Iterator iter = attrs.keySet().iterator();
iter.hasNext(); ) {
String key = (String) iter.next();
if (attrs.get(key) instanceof Function &&
@@ -1780,7 +1850,7 @@
// Check for attributes that have a value in this and
// a setter in the source. These can't be merged.
Collection overriddenAttributes = CollectionUtils.intersection(
- attrs.normalizedKeySet(), source.setters.normalizedKeySet());
+ attrs.keySet(), source.setters.keySet());
if (!overriddenAttributes.isEmpty())
throw new CompilationError(
/* (non-Javadoc)
@@ -1808,7 +1878,7 @@
delegates.putAll(source.delegates);
events.putAll(source.events);
references.putAll(source.references);
- paths.putAll(source.paths);
+ classAttrs.putAll(source.classAttrs);
setters.putAll(source.setters);
styles.putAll(source.styles);
delegateList.addAll(source.delegateList);
Modified: openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewSchema.java
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewSchema.java 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewSchema.java 2008-03-19 15:01:29 UTC (rev 8315)
@@ -3,7 +3,7 @@
* ****************************************************************************/
/* J_LZ_COPYRIGHT_BEGIN *******************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* J_LZ_COPYRIGHT_END *********************************************************/
@@ -362,6 +362,19 @@
"containsElement block must only contain <element> tags", etag);
}
}
+ } else if (child.getName().equals("forbiddenElements")) {
+ // look for <element>tagname</element>
+ Iterator iter1 = child.getChildren().iterator();
+ while (iter1.hasNext()) {
+ Element etag = (Element) iter1.next();
+ if (etag.getName().equals("element")) {
+ String tagname = etag.getText();
+ info.addForbiddenElement(tagname);
+ } else {
+ throw new CompilationError(
+ "containsElement block must only contain <element> tags", etag);
+ }
+ }
}
}
@@ -622,6 +635,12 @@
// TODO [hqm 2007-09]: CHECK FOR NULL HERE
Set tagset = parent.getContainsSet();
+ Set forbidden = parent.getForbiddenSet();
+
+ if (forbidden.contains(childTag)) {
+ return false;
+ }
+
if (tagset.contains(childTag)) {
return true;
}
Modified: openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/CodeGenerator.java
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/CodeGenerator.java 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/CodeGenerator.java 2008-03-19 15:01:29 UTC (rev 8315)
@@ -1402,7 +1402,7 @@
String name = ((ASTIdentifier)fnchildren[1]).getName();
// We can't expand this if an expression value is expected,
// since we don't have 'let'
- if (name.equals("setAttribute") && (! isReferenced)) {
+ if (false && name.equals("setAttribute") && (! isReferenced)) {
SimpleNode scope = fnchildren[0];
SimpleNode property = args[0];
SimpleNode value = args[1];
Modified: openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/CommonGenerator.java
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/CommonGenerator.java 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/CommonGenerator.java 2008-03-19 15:01:29 UTC (rev 8315)
@@ -544,6 +544,9 @@
private TranslateHow() {}
}
+
+ static SimpleNode undefined = parseFragment("void 0").get(1).get(0);
+
// translate the class directives according to the 'how' argument.
// If how is AS_PROPERTY_LIST, function name/values and variable
// name/initvalues are added to either classProps (for statics)
@@ -552,6 +555,7 @@
// to stmts. Any other thing in the directive list is added
// to stmts, no matter what 'how' is.
public void translateClassDirectivesBlock(SimpleNode[] dirs, String classnameString, List props, List classProps, List stmts, TranslateHow how) {
+
dirs = (SimpleNode[])(flatten(dirs).toArray(new SimpleNode[0]));
// Scope #pragma directives to block
Compiler.OptionMap savedOptions = options;
@@ -617,7 +621,7 @@
if (v.getChildren().length > 1) {
p.add(v.get(1));
} else {
- p.add(new ASTLiteral(null));
+ p.add(undefined);
}
}
} else if (n instanceof ASTClassDirectiveBlock) {
Modified: openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/Function.java
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/Function.java 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/Function.java 2008-03-19 15:01:29 UTC (rev 8315)
@@ -37,8 +37,8 @@
}
public String toString() {
- return (sourceLocation != null?(sourceLocation + "\n"):"") +
- "function " + name + "\n(" + args + "\n) {" + body + "\n}";
+ return "function " + name + "\n(" + args + "\n) {" +
+ "\n" + (sourceLocation != null?(sourceLocation + "\n"):"") + body + "\n}";
}
}
Modified: openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java 2008-03-19 15:01:29 UTC (rev 8315)
@@ -812,7 +812,9 @@
}
public SimpleNode makeCheckedNode(SimpleNode node) {
- if (options.getBoolean(Compiler.DEBUG) && options.getBoolean(Compiler.WARN_UNDEFINED_REFERENCES)) {
+ if (options.getBoolean(Compiler.DEBUG) && options.getBoolean(Compiler.WARN_UNDEFINED_REFERENCES)
+ // Only check this where 'this' is available
+ && (context.findFunctionContext() != null)) {
String file = "null";
String line = "null";
if (node.filename != null) {
@@ -860,7 +862,7 @@
String name = ((ASTIdentifier)fnchildren[1]).getName();
// We can't expand this if an expression value is expected,
// since we don't have 'let'
- if (name.equals("setAttribute") && (! isReferenced)) {
+ if (false && name.equals("setAttribute") && (! isReferenced)) {
SimpleNode scope = fnchildren[0];
SimpleNode property = args[0];
SimpleNode value = args[1];
Modified: openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/ScriptClass.java
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/ScriptClass.java 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/ScriptClass.java 2008-03-19 15:01:29 UTC (rev 8315)
@@ -14,34 +14,44 @@
String name;
String superclass;
Map attributes;
+ Map classAttributes;
+ String classBody;
- public ScriptClass(String name, String superclass, Map attributes) {
+ public ScriptClass(String name, String superclass, Map attributes, Map classAttributes, String classBody) {
this.name = name;
this.superclass = superclass;
this.attributes = attributes;
+ this.classAttributes = classAttributes;
+ this.classBody = classBody;
}
public String toString() {
- String str = "class " + name + (superclass != null?(" extends " + superclass):"") + "{\n";
- for (Iterator i = attributes.entrySet().iterator(); i.hasNext(); ) {
- Map.Entry entry = (Map.Entry)i.next();
- String name = (String)entry.getKey();
- Object value = entry.getValue();
- if (value instanceof Function) {
- Function fn = (Function)value;
- fn.setName(name);
- str += value.toString();
- str += "\n";
- } else {
- str += "var " + name + " = " + value.toString() + ";\n";
+ String str = "class " + name + (superclass != null?(" extends " + superclass + " "):"") + "{\n";
+ int n = 1; Map attrs = classAttributes; String prefix = "static ";
+ for (; n <= 2; n++, attrs = attributes, prefix = "") {
+ for (Iterator i = attrs.entrySet().iterator(); i.hasNext(); ) {
+ Map.Entry entry = (Map.Entry)i.next();
+ String name = (String)entry.getKey();
+ Object value = entry.getValue();
+ if (value instanceof Function) {
+ Function fn = (Function)value;
+ fn.setName(name);
+ str += prefix + value.toString();
+ str += "\n";
+ } else if (value != null) {
+ str += prefix + "var " + name + " = " + ScriptCompiler.objectAsJavascript(value) + ";\n";
+ } else {
+ str += prefix + "var " + name + ";\n";
+ }
}
}
+ str += classBody;
str += "}\n";
return str;
}
}
/**
- * @copyright Copyright 2006-2007 Laszlo Systems, Inc. All Rights
+ * @copyright Copyright 2006-2008 Laszlo Systems, Inc. All Rights
* Reserved. Use is subject to license terms.
*/
Modified: openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/ScriptCompiler.java
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/ScriptCompiler.java 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/ScriptCompiler.java 2008-03-19 15:01:29 UTC (rev 8315)
@@ -3,9 +3,9 @@
* ****************************************************************************/
/* J_LZ_COPYRIGHT_BEGIN *******************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
-* Use is subject to license terms. *
-* J_LZ_COPYRIGHT_END *********************************************************/
+ * Copyright 2001-2006, 2008 Laszlo Systems, Inc. All Rights Reserved. *
+ * Use is subject to license terms. *
+ * J_LZ_COPYRIGHT_END *********************************************************/
package org.openlaszlo.sc;
import java.io.*;
@@ -239,6 +239,17 @@
+ public static String objectAsJavascript(Object object) {
+ try {
+ java.io.Writer writer = new java.io.StringWriter();
+ writeObject(object, writer);
+ return writer.toString();
+ } catch (java.io.IOException e) {
+ throw new ChainedException(e);
+ }
+ }
+
+
/** Writes a LaszloScript expression that evaluates to a
* LaszloScript representation of the object.
*
@@ -267,8 +278,11 @@
writeMap((Map) object, writer, emitClassDecl);
} else if (object instanceof List) {
writeList((List) object, writer, emitClassDecl);
+ } else if (object != null) {
+ writer.write(object.toString());
} else {
- writer.write(object.toString());
+ // A declared property with no intial value
+ writer.write("void 0");
}
}
Modified: openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/xml/internal/Schema.java
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/xml/internal/Schema.java 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/xml/internal/Schema.java 2008-03-19 15:01:29 UTC (rev 8315)
@@ -3,7 +3,7 @@
* ****************************************************************************/
/* J_LZ_COPYRIGHT_BEGIN *******************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* J_LZ_COPYRIGHT_END *********************************************************/
@@ -45,12 +45,15 @@
}
/** Returns a unique type.
- * @return a unique type
+ * @return a unique type corresponding to typeName
*/
public static Type newType(String typeName) {
- Type newtype = new Type(typeName);
- typeNames.put(typeName, newtype);
- return newtype;
+ if (typeNames.containsKey(typeName)) {
+ return (Type)typeNames.get(typeName);
+ }
+ Type newtype = new Type(typeName);
+ typeNames.put(typeName, newtype);
+ return newtype;
}
Modified: openlaszlo/branches/devildog/WEB-INF/lps/templates/app-console.xslt
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/templates/app-console.xslt 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/WEB-INF/lps/templates/app-console.xslt 2008-03-19 15:01:29 UTC (rev 8315)
@@ -214,7 +214,7 @@
<xsl:otherwise>
<iframe id="dhtml-application"
src="{$lps}/lps/admin/dev-console.html?lzappuid={$appuid}&appinfo={$appinfo}"
- style="width: 100%; height: {$consoleheight}px" width="100%" height="70"/>
+ style="width: 100%; height: {$consoleheight}px" width="100%" height="{$consoleheight}"/>
</xsl:otherwise>
</xsl:choose>
@@ -346,7 +346,7 @@
</xsl:stylesheet>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2006 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2006, 2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
Modified: openlaszlo/branches/devildog/demos/calendar/cal-button.lzx
===================================================================
--- openlaszlo/branches/devildog/demos/calendar/cal-button.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/demos/calendar/cal-button.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -108,7 +108,7 @@
<attribute name="x" value="parent.bkgnd.lft.leftinset - 1" when="always" />
<attribute name="text" value="parent.label" when="always" />
</text>
- <text name="title" y="2" fgcolor="white"
+ <text name="title" fgcolor="white"
pixellock="true" width="200" >
<attribute name="y" value="parent.yadjust" when="once"/>
<attribute name="x" value="parent.bkgnd.lft.leftinset" when="always" />
Modified: openlaszlo/branches/devildog/demos/lzpix/classes/clipboardinterior.lzx
===================================================================
--- openlaszlo/branches/devildog/demos/lzpix/classes/clipboardinterior.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/demos/lzpix/classes/clipboardinterior.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -1,5 +1,5 @@
<photocollection name="interior" bgcolor="0xf0f0f0" clip="true"
- photoclass="clipboardphoto" clickable="true">
+ photoclass="lz.clipboardphoto" clickable="true">
<handler name="oninit">
LzTrack.register( this , 'photos' );
</handler>
@@ -28,6 +28,6 @@
</photocollection>
<!--
* X_LZ_COPYRIGHT_BEGIN ****************************************************
-* Copyright 2006, 2008 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2006-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ******************************************************-->
Modified: openlaszlo/branches/devildog/demos/lzpix/classes/photocollection.lzx
===================================================================
--- openlaszlo/branches/devildog/demos/lzpix/classes/photocollection.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/demos/lzpix/classes/photocollection.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -1,7 +1,7 @@
<library>
<class name="photocollection">
- <attribute name="photoclass" value="photo" when="once"/>
+ <attribute name="photoclass" value="lz.photo" when="once"/>
<attribute name="activephotos" value="$once{ [] }"/>
@@ -55,6 +55,6 @@
</library>
<!--
* X_LZ_COPYRIGHT_BEGIN ****************************************************
-* Copyright 2006 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2006-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ******************************************************-->
Copied: openlaszlo/branches/devildog/demos/lzpixmobile (from rev 8236, openlaszlo/trunk/demos/lzpixmobile)
Copied: openlaszlo/branches/devildog/demos/lzpixmobile/classes (from rev 8236, openlaszlo/trunk/demos/lzpixmobile/classes)
Copied: openlaszlo/branches/devildog/demos/lzpixmobile/classes/test (from rev 8236, openlaszlo/trunk/demos/lzpixmobile/classes/test)
Copied: openlaszlo/branches/devildog/demos/lzpixmobile/data (from rev 8236, openlaszlo/trunk/demos/lzpixmobile/data)
Copied: openlaszlo/branches/devildog/demos/lzpixmobile/data/offlineimages (from rev 8236, openlaszlo/trunk/demos/lzpixmobile/data/offlineimages)
Copied: openlaszlo/branches/devildog/demos/lzpixmobile/data/picts (from rev 8236, openlaszlo/trunk/demos/lzpixmobile/data/picts)
Copied: openlaszlo/branches/devildog/demos/lzpixmobile/lib (from rev 8236, openlaszlo/trunk/demos/lzpixmobile/lib)
Copied: openlaszlo/branches/devildog/demos/lzpixmobile/resources (from rev 8236, openlaszlo/trunk/demos/lzpixmobile/resources)
Copied: openlaszlo/branches/devildog/demos/lzpixmobile/test (from rev 8236, openlaszlo/trunk/demos/lzpixmobile/test)
Copied: openlaszlo/branches/devildog/demos/lzpixmobile/views (from rev 8236, openlaszlo/trunk/demos/lzpixmobile/views)
Modified: openlaszlo/branches/devildog/docs/src/nav/classes.xml
===================================================================
--- openlaszlo/branches/devildog/docs/src/nav/classes.xml 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/docs/src/nav/classes.xml 2008-03-19 15:01:29 UTC (rev 8315)
@@ -1,48 +1,43 @@
<index>
- <item href="Lz+swf7+swf8+swf9.html" title="Lz" />
+ <!-- DO NOT EDIT: generated by navxmlbuilder.rb -->
<item href="LzAnimator.html" title="LzAnimator" />
<item href="LzAnimatorGroup.html" title="LzAnimatorGroup" />
- <item href="LzBrowser+dhtml.html" title="LzBrowser" />
- <item href="LzBrowser+swf7+swf8+swf9.html" title="LzBrowser" />
- <item href="LzCSSStyle.html" title="LzCSSStyle" />
- <item href="LzCSSStyleDeclaration.html" title="LzCSSStyleDeclaration" />
- <item href="LzCSSStyleRule.html" title="LzCSSStyleRule" />
- <item href="LzCSSStyleSheet.html" title="LzCSSStyleSheet" />
+ <item href="LzBrowser+dhtml.html" title="LzBrowser (dhtml)" />
+ <item href="LzBrowser+swf7+swf8+swf9.html" title="LzBrowser (swf)" />
<item href="LzCanvas.html" title="LzCanvas" />
<item href="LzCommand.html" title="LzCommand" />
- <item href="LzConnection+swf7+swf8+swf9.html" title="LzConnection" />
- <item href="LzConnectionDatasource+swf7+swf8+swf9.html" title="LzConnectionDatasource" />
- <item href="LzContextMenu+dhtml.html" title="LzContextMenu" />
- <item href="LzContextMenu+swf7+swf8+swf9.html" title="LzContextMenu" />
- <item href="LzContextMenuItem+dhtml.html" title="LzContextMenuItem" />
- <item href="LzContextMenuItem+swf7+swf8+swf9.html" title="LzContextMenuItem" />
+ <item href="LzContextMenu+dhtml.html" title="LzContextMenu (dhtml)" />
+ <item href="LzContextMenu+swf7+swf8+swf9.html" title="LzContextMenu (swf)" />
+ <item href="LzContextMenuItem+dhtml.html" title="LzContextMenuItem (dhtml)" />
+ <item href="LzContextMenuItem+swf7+swf8+swf9.html" title="LzContextMenuItem (swf)" />
+ <item href="LzCSSStyle.html" title="LzCSSStyle" />
<item href="LzCursor.html" title="LzCursor" />
<item href="LzDataElement.html" title="LzDataElement" />
<item href="LzDataNode.html" title="LzDataNode" />
+ <item href="LzDatapath.html" title="LzDatapath" />
+ <item href="LzDatapointer.html" title="LzDatapointer" />
<item href="LzDataProvider.html" title="LzDataProvider" />
<item href="LzDataRequest.html" title="LzDataRequest" />
<item href="LzDataSelectionManager.html" title="LzDataSelectionManager" />
- <item href="LzDataText.html" title="LzDataText" />
- <item href="LzDatapath.html" title="LzDatapath" />
- <item href="LzDatapointer.html" title="LzDatapointer" />
<item href="LzDataset.html" title="LzDataset" />
<item href="LzDatasource.html" title="LzDatasource" />
+ <item href="LzDataText.html" title="LzDataText" />
<item href="LzDelegate.html" title="LzDelegate" />
<item href="LzEvent.html" title="LzEvent" />
<item href="LzFocus.html" title="LzFocus" />
<item href="LzFormatter.html" title="LzFormatter" />
<item href="LzGlobalMouse.html" title="LzGlobalMouse" />
+ <item href="LzHistory+dhtml.html" title="LzHistory (dhtml)" />
+ <item href="LzHistory+swf7+swf8+swf9.html" title="LzHistory (swf)" />
<item href="LzHTTPDataProvider.html" title="LzHTTPDataProvider" />
<item href="LzHTTPDataRequest.html" title="LzHTTPDataRequest" />
<item href="LzHTTPDatasource.html" title="LzHTTPDatasource" />
- <item href="LzHistory+dhtml.html" title="LzHistory" />
- <item href="LzHistory+swf7+swf8+swf9.html" title="LzHistory" />
<item href="LzIdleClass.html" title="LzIdleClass" />
<item href="LzInputText.html" title="LzInputText" />
<item href="LzInstantiator.html" title="LzInstantiator" />
<item href="LzInstantiatorClass.html" title="LzInstantiatorClass" />
- <item href="LzKeys+dhtml.html" title="LzKeys" />
- <item href="LzKeys+swf7+swf8+swf9.html" title="LzKeys" />
+ <item href="LzKeys+dhtml.html" title="LzKeys (dhtml)" />
+ <item href="LzKeys+swf7+swf8+swf9.html" title="LzKeys (swf)" />
<item href="LzLayout.html" title="LzLayout" />
<item href="LzLazyReplicationManager.html" title="LzLazyReplicationManager" />
<item href="LzMiniNode.html" title="LzMiniNode" />
@@ -58,8 +53,7 @@
<item href="LzTimer.html" title="LzTimer" />
<item href="LzTimerClass.html" title="LzTimerClass" />
<item href="LzTrackClass.html" title="LzTrackClass" />
- <item href="LzURL.html" title="LzURL" />
<item href="LzUserClass.html" title="LzUserClass" />
<item href="LzView.html" title="LzView" />
- <!-- Copyright 2007 Laszlo Systems -->
+ <!-- Copyright 2008 Laszlo Systems -->
</index>
Modified: openlaszlo/branches/devildog/docs/src/nav/tags.xml
===================================================================
--- openlaszlo/branches/devildog/docs/src/nav/tags.xml 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/docs/src/nav/tags.xml 2008-03-19 15:01:29 UTC (rev 8315)
@@ -1,16 +1,12 @@
<index>
- <item href="lz.DebugObject.html" title="DebugObject" />
- <item href="lz.LzTextFormat.html" title="LzTextFormat" />
- <item href="lz.SyncTester.html" title="SyncTester" />
- <item href="lz.Test.html" title="Test" />
- <item href="lz.TestCase.html" title="TestCase" />
- <item href="lz.TestResult.html" title="TestResult" />
- <item href="lz.TestSuite.html" title="TestSuite" />
- <item href="lz.XMLHttpRequest.html" title="XMLHttpRequest" />
+ <!-- DO NOT EDIT: generated by navxmlbuilder.rb -->
+ <item href="tag-a.html" title="a" />
<item href="lz.alert.html" title="alert" />
- <item href="lz.autocompletecombobox.html" title="autocompletecombobox" />
- <item href="lz.axis.html" title="axis" />
- <item href="lz.barchart.html" title="barchart" />
+ <item href="LzAnimator.html" title="animator" />
+ <item href="LzAnimatorGroup.html" title="animatorgroup" />
+ <item href="tag.attribute.html" title="attribute" />
+ <item href="tag-audio.html" title="audio" />
+ <item href="tag-b.html" title="b" />
<item href="lz.basebutton.html" title="basebutton" />
<item href="lz.basebuttonrepeater.html" title="basebuttonrepeater" />
<item href="lz.basecombobox.html" title="basecombobox" />
@@ -19,8 +15,6 @@
<item href="lz.basedatepicker.html" title="basedatepicker" />
<item href="lz.basedatepickerday.html" title="basedatepickerday" />
<item href="lz.basedatepickerweek.html" title="basedatepickerweek" />
- <item href="lz.basedragimage.html" title="basedragimage" />
- <item href="lz.baseedittext.html" title="baseedittext" />
<item href="lz.basefloatinglist.html" title="basefloatinglist" />
<item href="lz.baseform.html" title="baseform" />
<item href="lz.baseformitem.html" title="baseformitem" />
@@ -41,73 +35,60 @@
<item href="lz.basetabsbar.html" title="basetabsbar" />
<item href="lz.basetabscontent.html" title="basetabscontent" />
<item href="lz.basetabslider.html" title="basetabslider" />
- <item href="lz.basetooltip.html" title="basetooltip" />
<item href="lz.basetrackgroup.html" title="basetrackgroup" />
<item href="lz.basetree.html" title="basetree" />
- <item href="lz.basevalidator.html" title="basevalidator" />
<item href="lz.basevaluecomponent.html" title="basevaluecomponent" />
<item href="lz.basewindow.html" title="basewindow" />
- <item href="lz.basezoomarea.html" title="basezoomarea" />
- <item href="lz.bigcheckbox.html" title="bigcheckbox" />
- <item href="lz.borderinput.html" title="borderinput" />
- <item href="lz.boxview.html" title="boxview" />
+ <item href="tag-br.html" title="br" />
<item href="lz.button.html" title="button" />
<item href="lz.camera.html" title="camera" />
- <item href="lz.chart.html" title="chart" />
+ <item href="LzCanvas.html" title="canvas" />
<item href="lz.checkbox.html" title="checkbox" />
- <item href="lz.checkdragstate.html" title="checkdragstate" />
- <item href="lz.closebox.html" title="closebox" />
- <item href="lz.colorpicker.html" title="colorpicker" />
- <item href="lz.colorpot.html" title="colorpot" />
- <item href="lz.colorrow.html" title="colorrow" />
- <item href="lz.colorswatch.html" title="colorswatch" />
- <item href="lz.columnchart.html" title="columnchart" />
+ <item href="LzUserClass.html" title="class" />
<item href="lz.combobox.html" title="combobox" />
+ <item href="LzCommand.html" title="command" />
<item href="lz.constantboundslayout.html" title="constantboundslayout" />
<item href="lz.constantlayout.html" title="constantlayout" />
- <item href="lz.custombutton.html" title="custombutton" />
- <item href="lz.datacolumn.html" title="datacolumn" />
<item href="lz.datacombobox.html" title="datacombobox" />
- <item href="lz.datalabel.html" title="datalabel" />
- <item href="lz.datamarker.html" title="datamarker" />
- <item href="lz.dataseries.html" title="dataseries" />
- <item href="lz.datatip.html" title="datatip" />
+ <item href="LzDatapath.html" title="datapath" />
+ <item href="LzDatapointer.html" title="datapointer" />
+ <item href="LzDataRequest.html" title="datarequest" />
+ <item href="LzDataset.html" title="dataset" />
+ <item href="LzHTTPDatasource.html" title="datasource" />
<item href="lz.datepicker.html" title="datepicker" />
<item href="lz.datepickerday.html" title="datepickerday" />
<item href="lz.datepickerweek.html" title="datepickerweek" />
- <item href="lz.datevalidator.html" title="datevalidator" />
+ <item href="lz.DebugObject.html" title="DebugObject" />
<item href="lz.dragstate.html" title="dragstate" />
<item href="lz.drawview.html" title="drawview" />
<item href="lz.edittext.html" title="edittext" />
- <item href="lz.emailvalidator.html" title="emailvalidator" />
- <item href="lz.fileupload.html" title="fileupload" />
- <item href="lz.fileuploadlist.html" title="fileuploadlist" />
- <item href="lz.fisheye.html" title="fisheye" />
- <item href="lz.fisheye_item.html" title="fisheye_item" />
+ <item href="tag.event.html" title="event" />
+ <item href="tag-face.html" title="face" />
<item href="lz.floatinglist.html" title="floatinglist" />
<item href="lz.form.html" title="form" />
- <item href="lz.formatbtn.html" title="formatbtn" />
- <item href="lz.formatfontcolor.html" title="formatfontcolor" />
- <item href="lz.formatfontface.html" title="formatfontface" />
- <item href="lz.gradientview.html" title="gradientview" />
+ <item href="tag-frame.html" title="frame" />
<item href="lz.grid.html" title="grid" />
<item href="lz.gridcolumn.html" title="gridcolumn" />
<item href="lz.gridtext.html" title="gridtext" />
+ <item href="tag.handler.html" title="handler" />
<item href="lz.hbox.html" title="hbox" />
- <item href="lz.horizontalaxis.html" title="horizontalaxis" />
<item href="lz.hscrollbar.html" title="hscrollbar" />
- <item href="lz.hsplitpane.html" title="hsplitpane" />
- <item href="lz.html" title="html" />
<item href="lz.html.html" title="html" />
+ <item href="LzHTTPDataProvider.html" title="httpdataprovider" />
+ <item href="LzHTTPDataRequest.html" title="httpdatarequest" />
+ <item href="tag-i.html" title="i" />
<item href="lz.image.html" title="image" />
+ <item href="tag-img.html" title="img" />
+ <item href="tag.import.html" title="import" />
+ <item href="tag.include.html" title="include" />
+ <item href="LzInputText.html" title="inputtext" />
<item href="lz.javarpc.html" title="javarpc" />
- <item href="lz.label.html" title="label" />
+ <item href="LzLayout.html" title="layout" />
<item href="lz.lazyreplicator.html" title="lazyreplicator" />
- <item href="lz.legend.html" title="legend" />
- <item href="lz.linechart.html" title="linechart" />
- <item href="lz.linkdialog.html" title="linkdialog" />
+ <item href="tag.library.html" title="library" />
<item href="lz.list.html" title="list" />
<item href="lz.listitem.html" title="listitem" />
+ <item href="lz.LzTextFormat.html" title="LzTextFormat" />
<item href="lz.mediadevice.html" title="mediadevice" />
<item href="lz.mediastream.html" title="mediastream" />
<item href="lz.menu.html" title="menu" />
@@ -117,56 +98,53 @@
<item href="lz.menuitem.html" title="menuitem" />
<item href="lz.menuseparator.html" title="menuseparator" />
<item href="lz.menutrackgroup.html" title="menutrackgroup" />
+ <item href="tag.method.html" title="method" />
<item href="lz.microphone.html" title="microphone" />
- <item href="lz.minibutton.html" title="minibutton" />
<item href="lz.modaldialog.html" title="modaldialog" />
- <item href="lz.multiplefileupload.html" title="multiplefileupload" />
<item href="lz.multistatebutton.html" title="multistatebutton" />
<item href="lz.netparam.html" title="netparam" />
<item href="lz.netremotecall.html" title="netremotecall" />
- <item href="lz.numbervalidator.html" title="numbervalidator" />
- <item href="lz.opttree.html" title="opttree" />
+ <item href="LzNode.html" title="node" />
+ <item href="tag-p.html" title="p" />
<item href="lz.param.html" title="param" />
- <item href="lz.piechart.html" title="piechart" />
+ <item href="LzParam.html" title="params" />
<item href="lz.plainfloatinglist.html" title="plainfloatinglist" />
+ <item href="tag-pre.html" title="pre" />
<item href="lz.radiobutton.html" title="radiobutton" />
<item href="lz.radiogroup.html" title="radiogroup" />
- <item href="lz.radioitem.html" title="radioitem" />
- <item href="lz.rectangularchart.html" title="rectangularchart" />
<item href="lz.remotecall.html" title="remotecall" />
<item href="lz.replicator.html" title="replicator" />
<item href="lz.resizelayout.html" title="resizelayout" />
<item href="lz.resizestate.html" title="resizestate" />
<item href="lz.resizestatemin.html" title="resizestatemin" />
+ <item href="tag-resource.html" title="resource" />
<item href="lz.reverselayout.html" title="reverselayout" />
<item href="lz.richinputtext.html" title="richinputtext" />
- <item href="lz.richtexteditarea.html" title="richtexteditarea" />
- <item href="lz.richtexteditor.html" title="richtexteditor" />
- <item href="lz.richtexttoolbar.html" title="richtexttoolbar" />
- <item href="lz.roundrect.html" title="roundrect" />
- <item href="lz.roundrectbutton.html" title="roundrectbutton" />
<item href="lz.rpc.html" title="rpc" />
<item href="lz.rtmpconnection.html" title="rtmpconnection" />
<item href="lz.rtmpstatus.html" title="rtmpstatus" />
+ <item href="LzScript.html" title="script" />
<item href="lz.scrollbar.html" title="scrollbar" />
+ <item href="tag.security.html" title="security" />
+ <item href="LzSelectionManager.html" title="selectionmanager" />
<item href="lz.sessionrpc.html" title="sessionrpc" />
- <item href="lz.shadowbox.html" title="shadowbox" />
<item href="lz.simpleboundslayout.html" title="simpleboundslayout" />
- <item href="lz.simpledefaultlist.html" title="simpledefaultlist" />
<item href="lz.simpleinputtext.html" title="simpleinputtext" />
<item href="lz.simplelayout.html" title="simplelayout" />
<item href="lz.slider.html" title="slider" />
<item href="lz.sliderthumb.html" title="sliderthumb" />
<item href="lz.slidertrack.html" title="slidertrack" />
<item href="lz.soap.html" title="soap" />
+ <item href="tag.splash+as2.html" title="splash (as2)" />
+ <item href="tag.splash-view.html" title="splash view (as2)" />
<item href="lz.stableborderlayout.html" title="stableborderlayout" />
+ <item href="LzState.html" title="state" />
<item href="lz.statictext.html" title="statictext" />
- <item href="lz.stepper.html" title="stepper" />
- <item href="lz.stringvalidator.html" title="stringvalidator" />
<item href="lz.style.html" title="style" />
- <item href="lz.stylishbutton.html" title="stylishbutton" />
<item href="lz.submit.html" title="submit" />
<item href="lz.swatchview.html" title="swatchview" />
+ <item href="tag.switch.html" title="switch" />
+ <item href="lz.SyncTester.html" title="SyncTester" />
<item href="lz.tab.html" title="tab" />
<item href="lz.tabelement.html" title="tabelement" />
<item href="lz.tabpane.html" title="tabpane" />
@@ -174,19 +152,16 @@
<item href="lz.tabsbar.html" title="tabsbar" />
<item href="lz.tabscontent.html" title="tabscontent" />
<item href="lz.tabslider.html" title="tabslider" />
+ <item href="lz.Test.html" title="Test" />
+ <item href="lz.TestCase.html" title="TestCase" />
+ <item href="lz.TestResult.html" title="TestResult" />
+ <item href="lz.TestSuite.html" title="TestSuite" />
+ <item href="LzText.html" title="text" />
<item href="lz.textformat.html" title="textformat" />
<item href="lz.textlistitem.html" title="textlistitem" />
- <item href="lz.textstyle.html" title="textstyle" />
- <item href="lz.tooltip.html" title="tooltip" />
- <item href="lz.tooltipManager.html" title="tooltipManager" />
<item href="lz.tree.html" title="tree" />
- <item href="lz.ulink.html" title="ulink" />
- <item href="lz.validatingForm.html" title="validatingForm" />
- <item href="lz.valueline.html" title="valueline" />
- <item href="lz.valuepoints.html" title="valuepoints" />
- <item href="lz.valueregion.html" title="valueregion" />
+ <item href="tag-u.html" title="u" />
<item href="lz.vbox.html" title="vbox" />
- <item href="lz.verticalaxis.html" title="verticalaxis" />
<item href="lz.videolibraryicon.html" title="videolibraryicon" />
<item href="lz.videolibrarypopup.html" title="videolibrarypopup" />
<item href="lz.videoplayer.html" title="videoplayer" />
@@ -196,14 +171,13 @@
<item href="lz.videotogglebutton.html" title="videotogglebutton" />
<item href="lz.videoview.html" title="videoview" />
<item href="lz.videovolumebutton.html" title="videovolumebutton" />
- <item href="lz.viewslist.html" title="viewslist" />
- <item href="lz.virtualdrawview.html" title="virtualdrawview" />
+ <item href="LzView.html" title="view" />
<item href="lz.vscrollbar.html" title="vscrollbar" />
<item href="lz.webapprpc.html" title="webapprpc" />
<item href="lz.window.html" title="window" />
<item href="lz.windowpanel.html" title="windowpanel" />
<item href="lz.wrappinglayout.html" title="wrappinglayout" />
+ <item href="lz.XMLHttpRequest.html" title="XMLHttpRequest" />
<item href="lz.xmlrpc.html" title="xmlrpc" />
- <item href="lz.zoomarea.html" title="zoomarea" />
- <!-- Copyright 2007 Laszlo Systems -->
+ <!-- Copyright 2008 Laszlo Systems -->
</index>
Modified: openlaszlo/branches/devildog/docs/src/nav/toc.xml
===================================================================
--- openlaszlo/branches/devildog/docs/src/nav/toc.xml 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/docs/src/nav/toc.xml 2008-03-19 15:01:29 UTC (rev 8315)
@@ -126,7 +126,6 @@
</category>
<category title="Data">
- <item title="TBD REVIEW" />
<item title="datapath (LzDatapath)" href="LzDatapath.html" />
<item title="datapointer (LzDatapointer)" href="LzDatapointer.html" />
<item title="dataselectionmanager (LzDataSelectionManager)" href="LzDataSelectionManager.html" />
@@ -134,7 +133,7 @@
<item title="datasource (LzDatasource)" href="LzDatasource.html" />
<item title="defaultdataprovider" href="defaultdataprovider.html" />
<item title="httpdataprovider" href="httpdataprovider.html" />
- <item title="LzConnectionDatasource+swf7+swf8+swf9" href="LzConnectionDatasource+swf7+swf8+swf9.html" />
+ <!-- <item title="LzConnectionDatasource+swf7+swf8+swf9" href="LzConnectionDatasource+swf7+swf8+swf9.html" /> -->
<item title="LzDataElement" href="LzDataElement.html" />
<item title="LzDataNode" href="LzDataNode.html" />
<item title="LzDataProvider" href="LzDataProvider.html" />
@@ -152,7 +151,7 @@
<item title="LzBrowser (dhtml)" href="LzBrowser+dhtml.html" />
<item title="method" href="tag.method.html" />
<item title="node (LzNode)" href="LzNode.html" />
- <item title="script [TODO LPP-4933]" />
+ <item title="script" href="LzScript.html" />
<item title="stylesheet (LzCSSStylesheet)" href="LzCSSStyleSheet.html" />
</category>
<category title="States">
Modified: openlaszlo/branches/devildog/docs/src/reference/navbuilder/navbuilder.rb
===================================================================
--- openlaszlo/branches/devildog/docs/src/reference/navbuilder/navbuilder.rb 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/docs/src/reference/navbuilder/navbuilder.rb 2008-03-19 15:01:29 UTC (rev 8315)
@@ -1,5 +1,6 @@
# Special-purpose ruby script to generate index-generated.html, a simple left-nav
# for OL4 reference.
+#
# usage: ruby navbuilder.rb > index-generated.html
# docs/src/reference/navbuilder/index-generated.html is managed by subversion.
# When you want to update the left-nav, tweak this script, navbuilder.rb,
@@ -8,8 +9,15 @@
# author: benjamin shine ben at laszlosystems.com
# created: 2007.08.29
# built on OSX 10.4 with ruby 1.8.6
-# Copyright 2007 Laszlo Systems. Use according to license terms.
+# Copyright 2007-2008 Laszlo Systems. Use according to license terms.
+################################################################
+# Note: it appears this script is no longer used, as navigation
+# is now driven by xml files produced by navxmlbuilder.rb .
+# TODO [2008-02-20 dda] remove this script, index-generated.html, etc. from svn
+################################################################
+$stderr.puts("Use navxmlbuilder.rb - navbuilder.rb is not needed");
+
def generate_index ( prefix, comment )
# generate a list of the lz stuff
puts "<div id=\"tags#{prefix}\">";
@@ -30,6 +38,48 @@
end
+# search for <title><tagname></title>,
+# if present, it's a tag that should appear in the index.
+# This works, though it's not elegant.
+def generate_index_tags ( prefix, comment )
+ # generate a list of the lz stuff
+ puts "<div id=\"tags#{prefix}\">";
+ puts "<h1>" + prefix + "</h1>";
+ puts "<p>" + comment + "</p>";
+ puts "<ul>";
+ file_filter = '../../../reference/*.html';
+
+ tags = Hash::new()
+ Dir.glob(file_filter).each{ |file|
+ open(file) {|f|
+ filebase = file.sub(/..\/..\/..\/reference\//, '');
+ f.each_line { |line|
+ line.chomp!
+ if (line =~ /<title>.*<\/title>/) then
+ if (line =~ /<title><.*><\/title>/) then
+ t = line.sub(/.*<title></, '').sub(/><\/title>.*/, '');
+ tags[t] = filebase;
+ end
+ break;
+ end
+ }
+ }
+ }
+ # sort ignoring case
+ hash_sort_nocase(tags) { |tag,file|
+ puts "<li><a href=\"" + file + "\" target=\"content\">";
+ yield tag;
+ puts "</a></li>" ;
+ }
+ puts "</ul></div>"
+end
+
+def hash_sort_nocase (h)
+ lowerkey = Hash::new()
+ h.each_pair { |k,v| lowerkey[k.downcase] = k; }
+ lowerkey.sort.each { |low,key| yield key, h[key] }
+end
+
def generate_topic_index
puts "<div id=\"topics\">";
puts "<h1>Topics</h1>"
@@ -79,7 +129,7 @@
puts "<html><body>";
generate_top
-generate_index("lz", "lzx tags") { | elem | puts "<" + elem + ">" }
+generate_index_tags("lz", "lzx tags") { | elem | puts "<" + elem + ">" }
generate_class_index;
generate_topic_index;
generate_index("tag", "lzx xml language elements") { | elem | puts "<" + elem + ">" }
Modified: openlaszlo/branches/devildog/docs/src/reference/navbuilder/navxmlbuilder.rb
===================================================================
--- openlaszlo/branches/devildog/docs/src/reference/navbuilder/navxmlbuilder.rb 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/docs/src/reference/navbuilder/navxmlbuilder.rb 2008-03-19 15:01:29 UTC (rev 8315)
@@ -1,73 +1,96 @@
-# Special-purpose ruby script to generate index-generated.html, a simple left-nav
+# Special-purpose ruby script to generate xml data files for a simple left-nav
# for OL4 reference.
-# usage: ruby navbuilder.rb > index-generated.html
-# docs/src/reference/navbuilder/index-generated.html is managed by subversion.
-# When you want to update the left-nav, tweak this script, navbuilder.rb,
-# and rerun it, then check in index-generated.html. Builds will grab
-# the version-controlled index-generated.html when they build the doc.
+#
+# usage: ruby navxmlbuilder.rb
+#
+# docs/nav/classes.xml and docs/nav/tags.xml are managed by subversion.
+# When you want to update the left-nav, run this script from the directory
+# it is in, then mv classes.xml and tags.xml to ../../nav. Builds will grab
+# the version-controlled *.xml when they build the doc.
+#
# author: benjamin shine ben at laszlosystems.com
# created: 2007.08.29
# built on OSX 10.4 with ruby 1.8.6
-# Copyright 2007 Laszlo Systems. Use according to license terms.
+# Copyright 2007-2008 Laszlo Systems. Use according to license terms.
+require 'date'
+YEAR = Date::today().year.to_s
+DEBUGLEVEL = 0
-
-
-def generate_index ( prefix, outfilename, roottag="index" )
- f = File.new(outfilename, "w");
+def debug ( lev, str )
+ if (lev <= DEBUGLEVEL) then
+ $stdout.puts str + "\n"
+ end
+end
+# only appears if DEBUGLEVEL set to 1 or higher
+debug(1, "debug level is set to " + DEBUGLEVEL.to_s)
+
+def generate_index ( filepat, outfilename, roottag="index" )
+ debug(1, "generate " + outfilename + " using file pattern " + filepat);
+ f = File.new(outfilename, "w")
f.puts "<#{roottag}>"
- file_filter = '../../../reference/' + prefix + '*';
- name_filter = Regexp.new(prefix + ".") ;
+ f.puts " <!-- DO NOT EDIT: generated by navxmlbuilder.rb -->\n"
+ file_filter = '../../../reference/' + filepat
lz_topics = Dir.glob(file_filter).sort
- lz_topics = lz_topics.each{ |file| file.sub!(/..\/..\/..\/reference\//, '')};
- lz_topics.each { |file|
- lz_name = yield file
+ h = Hash::new();
+ lz_topics.each { |fullname|
+ ftype = File::ftype(fullname)
+ if (ftype != "directory") then
+ debug(2, "process " + fullname);
+ file = fullname.sub(/..\/..\/..\/reference\//, '')
+ lz_name = yield file, fullname
+ if (lz_name) then
+ h[lz_name] = file
+ end
+ end
+ }
+ hash_sort_ignorecase (h) { |lz_name,file|
f.puts " <item href=\"" + file + "\" title=\"#{lz_name}\" />\n"
}
+ f.puts " <!-- Copyright " + YEAR + " Laszlo Systems -->\n"
f.puts "</#{roottag}>"
f
end
-def generate_topic_index
- puts "<div id=\"topics\">";
- puts "<h1>Topics</h1>"
- puts "<ul>"
- prefix = "topic";
- file_filter = '../../../reference/' + prefix + '*';
- name_filter = Regexp.new(prefix + ".") ;
- lz_topics = Dir.glob(file_filter).sort
- lz_topics = lz_topics.each{ |file| file.sub!(/..\/..\/..\/reference\//, '')};
- lz_topics.each { |file|
- lz_name = file.sub(name_filter, '').sub(/.html/, '').gsub(/_/, ' ').gsub(/\./, ': ');
- puts "<li><a href=\"" + file + "\" target=\"content\">" + lz_name + "</a></li>" ;
- }
-
- puts "</ul></div>"
-
-end
+def hash_sort_ignorecase (h)
+ lowerkey = Hash::new()
+ h.each_pair { |k,v| lowerkey[k.downcase] = k; }
+ lowerkey.sort.each { |low,key| yield key, h[key] }
+end
-def generate_class_index
- puts "<div id=\"classes\">";
- puts "<h1>Classes</h1>"
- puts "<ul>"
- prefix = "Lz";
- file_filter = '../../../reference/' + prefix + '*';
- name_filter = Regexp.new(prefix);
- lz_topics = Dir.glob(file_filter).sort
- lz_topics = lz_topics.each{ |file| file.sub!(/..\/..\/..\/reference\//, '')};
- lz_topics.each { |file|
- lz_name = file.sub(/\.html/, '').gsub(/\+swf\d/, '').gsub(/\+dhtml/,'');
- puts "<li><a href=\"" + file + "\" target=\"content\">" + lz_name + "</a></li>" ;
+# If the title of this document has a tag name, return it.
+# We look for <.....> (e.g. <canvas>), but we
+# also allow that the title may contain platform information,
+# like <splash> (as2). We return the title without brackets,
+# e.g. "canvas", or "splash (as2)" as that is how it appears
+# in the index.
+def tagname_for(filename)
+ tag = nil;
+ open(filename) {|f|
+ f.each_line { |line|
+ line.chomp!
+ if (line =~ /<title>.*<\/title>/) then
+ if (line =~ /<title><.*>.*<\/title>/) then
+ tag = line.sub(/.*<title></, '').sub(/>/, '').sub(/<\/title>.*/, '')
+ end
+ end
+ if (line =~ /<link.*\.Incubator\./) then
+ tag = nil
+ break
+ end
+ }
}
-
- puts "</ul></div>";
+ tag
end
+# Filenames are like lz.alert, LzAnimator.html, tag.attribute.html, tag-br.html
+# The file pattern for Lz/lz should work around any file case issues
+# on Windows vs. Unix/Linux.
-
-generate_index("lz", "lz.xml", "index") { | file | file.sub(Regexp.new("lz."), '').sub(/.html/, ''); }
-generate_index("tag", "tags.xml", "index") { | file | file.sub(Regexp.new("lz."), '').sub(/.html/, ''); }
-generate_index("Lz", "classes.xml", "index") { | file |
- file.sub(/\.html/, '').gsub(/\+swf\d/, '').gsub(/\+dhtml/,'');
- }
-
+generate_index("{[Ll]z,tag}*.html", "tags.xml", "index") { | file,fullname |
+ tagname_for(fullname);
+ }
+generate_index("Lz*.html", "classes.xml", "index") { | file,ignored |
+ file.sub(/\.html/, '').sub(/([^+]*)\+(.*)/, '\1 (\2)').gsub(/\+/, ' ').
+ sub('swf7 swf8 swf9', 'swf');
+}
Modified: openlaszlo/branches/devildog/docs/src/reference/wrappers.xml
===================================================================
--- openlaszlo/branches/devildog/docs/src/reference/wrappers.xml 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/docs/src/reference/wrappers.xml 2008-03-19 15:01:29 UTC (rev 8315)
@@ -11,7 +11,7 @@
<property id="tag-a" topic="LZX" subtopic="HTML Markup" access="public">
<doc>
-<tag name="lzxname"><text><a></text></tag>
+<tag name="lzxname"><text>a</text></tag>
<tag name="shortdesc"><text>HTML hypertext link.</text></tag>
<text>
<p/>
@@ -34,10 +34,48 @@
</text>
</canvas>
</example>
+<p/>The user agent will interpret the <tagname>a</tagname> tag depending on the following value of the target attribute:
+<ul>
+ <li>_blank<p/>
+ The user agent should load the designated document in a new, unnamed window.
+ </li>
+ <li>_parent<p/>
+ The user agent should load the document into the full, original window (thus canceling all other frames). This value is equivalent to _self if the current frame has no parent.
+ </li>
+ <li>_self<p/>
+ The user agent should load the document in the same frame as the element that refers to this target.
+ </li>
+ <li>_top<p/>
+ The user agent should load the document into the immediate FRAMESET parent of the current frame. This value is equivalent to _self if the current frame has no parent.
+ </li>
+</ul>
</text>
</doc>
+
+<class>
+ <property name="__ivars__">
+ <attribute name="id" select="$attrs-id"/>
+ <object>
+ <property id="tag-a.__ivars__.href" name="href" type="" modifiers="final">
+ <doc>
+ <tag name="lzxtype"><text>URL</text></tag>
+ <text>The link target</text>
+ </doc>
+ </property>
+ <property id="tag-a.__ivars__.target" name="target" type="" modifiers="final">
+ <doc>
+ <tag name="lzxtype"><text>_blank | _parent | _self | _top</text></tag>
+ <text>
+ The value of this attribute determines where the link target will be displayed. The interpretation is the same as in HTML, where the "current frame" is the frame containing the LZX application. The value must be a name beginning with an alphabetic character, or one of: "_blank", "_parent", "_self", "_top"
+ </text>
+ </doc>
+ </property>
+ </object>
+ </property>
+</class>
</property>
+
<property id="tag-b" topic="LZX" subtopic="HTML Markup" access="public">
<doc>
<tag name="shortdesc"><text>Bold Text.</text></tag>
@@ -104,7 +142,7 @@
<property id="tag-img" topic="LZX" subtopic="HTML Markup" access="public">
<doc>
<tag name="shortdesc"><text>A way to import images into html</text></tag>
-<tag name="lzxname"><text><img></text></tag>
+<tag name="lzxname"><text>img</text></tag>
<text>
<p>
The compiler supports the <img> tag in HTML text content, for
@@ -114,6 +152,49 @@
</p>
</text>
</doc>
+<class>
+ <property name="__ivars__">
+ <attribute name="id" select="$attrs-id"/>
+ <object>
+ <property id="tag-img.__ivars__.align" name="align" type="" modifiers="final">
+ <doc>
+ <tag name="lzxtype"><text>String</text></tag>
+ <text></text>
+ </doc>
+ </property>
+ <property id="tag-img.__ivars__.height" name="height" type="" modifiers="final">
+ <doc>
+ <tag name="lzxtype"><text>String</text></tag>
+ <text></text>
+ </doc>
+ </property>
+ <property id="tag-img.__ivars__.hspace" name="hspace" type="" modifiers="final">
+ <doc>
+ <tag name="lzxtype"><text>String</text></tag>
+ <text></text>
+ </doc>
+ </property>
+ <property id="tag-img.__ivars__.src" name="src" type="" modifiers="final">
+ <doc>
+ <tag name="lzxtype"><text>String</text></tag>
+ <text></text>
+ </doc>
+ </property>
+ <property id="tag-img.__ivars__.vspace" name="vspace" type="" modifiers="final">
+ <doc>
+ <tag name="lzxtype"><text>String</text></tag>
+ <text></text>
+ </doc>
+ </property>
+ <property id="tag-img.__ivars__.width" name="width" type="" modifiers="final">
+ <doc>
+ <tag name="lzxtype"><text>String</text></tag>
+ <text></text>
+ </doc>
+ </property>
+ </object>
+ </property>
+</class>
</property>
<property id="tag-p" topic="LZX" subtopic="HTML Markup" access="public">
@@ -185,6 +266,7 @@
</doc>
</property>
+
<!-- ================================================================ -->
<property id="tag-audio" topic="LZX" subtopic="Media" access="public">
<doc>
@@ -234,7 +316,7 @@
<property id="tag-face" topic="LZX" subtopic="Media" access="public">
<doc>
<tag name="shortdesc"><text></text></tag>
-<tag name="lzxname"><text><face></text></tag>
+<tag name="lzxname"><text>face</text></tag>
<text>
<p>Defines a font face or style within the font family that the
outer element defines.</p>
@@ -243,6 +325,25 @@
</p>
</text>
</doc>
+<class>
+ <property name="__ivars__">
+ <attribute name="id" select="$attrs-id"/>
+ <object>
+ <property id="tag-face.__ivars__.src" name="src" type="" modifiers="final">
+ <doc>
+ <tag name="lzxtype"><text>URL</text></tag>
+ <text>The path of a file that contains the source for this object.</text>
+ </doc>
+ </property>
+ <property id="tag-face.__ivars__.style" name="style" type="" modifiers="final">
+ <doc>
+ <tag name="lzxtype"><text>bold | italic | bold italic | italic bold | plain </text></tag>
+ <text>Corresponds to the fontstyle attribute of a view.</text>
+ </doc>
+ </property>
+ </object>
+ </property>
+</class>
</property>
<property id="tag-resource" topic="LZX" subtopic="Media" access="public">
@@ -282,7 +383,7 @@
<property id="tag-frame" topic="LZX" subtopic="Media" access="public">
<doc>
<tag name="shortdesc"><text>A frame of a multi-frame resource.</text></tag>
-<tag name="lzxname"><text><frame></text></tag>
+<tag name="lzxname"><text>frame</text></tag>
<text>
<p>The <tagname>frame</tagname> tag is used to define a single frame
of a multi-frame <tagname>resource</tagname>. A multi-frame resource
@@ -345,6 +446,25 @@
</text>
</doc>
+<class>
+ <property name="__ivars__">
+ <attribute name="id" select="$attrs-id"/>
+ <object>
+ <property id="tag-frame.__ivars__.name" name="name" type="" modifiers="final">
+ <doc>
+ <tag name="lzxtype"><text>token</text></tag>
+ <text>The name of a variable that will be set to this object when the application is started. If this element is directly within a <tagname>canvas</tagname> or <tagname>library</tagname> element, the global variable and the canvas property with this name will be set to this object. If this element is within another object, that object's property with this name will be set to this object.</text>
+ </doc>
+ </property>
+ <property id="tag-frame.__ivars__.src" name="src" type="" modifiers="final">
+ <doc>
+ <tag name="lzxtype"><text>URL</text></tag>
+ <text>The path of a file that contains the source for this object.</text>
+ </doc>
+ </property>
+ </object>
+ </property>
+</class>
</property>
</js2doc>
Modified: openlaszlo/branches/devildog/docs/src/xsl/js2doc2dbk.xsl
===================================================================
--- openlaszlo/branches/devildog/docs/src/xsl/js2doc2dbk.xsl 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/docs/src/xsl/js2doc2dbk.xsl 2008-03-19 15:01:29 UTC (rev 8315)
@@ -574,13 +574,7 @@
</informaltable>
</refsect2>
</xsl:if>
-
- <xsl:if test="count($visible-members) = 0">
- <refsect2><title>Events</title>
- <para>(no events found)</para>
- </refsect2>
- </xsl:if>
-
+
</xsl:template>
<xsl:template match="initarg|property" mode="describe-member">
@@ -985,7 +979,7 @@
</refsect1>
</xsl:if>
- <xsl:if test="child::class">
+ <xsl:if test="child::class[@extends]">
<refsect1>
<xsl:text>Extends </xsl:text>
<xsl:call-template name="describe-superclass-chain">
Modified: openlaszlo/branches/devildog/examples/components/index.html
===================================================================
--- openlaszlo/branches/devildog/examples/components/index.html 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/examples/components/index.html 2008-03-19 15:01:29 UTC (rev 8315)
@@ -109,13 +109,21 @@
(<a href="../../lps/utils/viewer/viewer.jsp?file=/examples/components/window_example.lzx">source</a>,
<a href= "window_example.lzx?lzt=filter&filter=/LZViewer">LZViewer</a>)<br />
</li>
+<li>
+<b>DatePicker:</b> <a href="datepicker_example.lzx?lzt=html">datepicker_example.lzx</a>
+(<a href="../../lps/utils/viewer/viewer.jsp?file=/examples/components/datepicker_example.lzx">source</a>,
+ <a href= "datepicker_example.lzx?lzt=filter&filter=/LZViewer">LZViewer</a>)<br />
+</li>
+
+
+
</ul>
<!-- * H_LZ_COPYRIGHT_BEGIN *********************************************** -->
-<p class="copyright">Copyright © 2002-2006 <a target="_top"
+<p class="copyright">Copyright © 2002-2008 <a target="_top"
href="http://www.laszlosystems.com/">Laszlo Systems, Inc.</a>
All Rights Reserved. Unauthorized use, duplication or
distribution is strictly prohibited. This is the proprietary
Modified: openlaszlo/branches/devildog/laszlo-explorer/explore-nav.lzx
===================================================================
--- openlaszlo/branches/devildog/laszlo-explorer/explore-nav.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/laszlo-explorer/explore-nav.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -91,7 +91,7 @@
this.setAttribute("isleaf", !this.datapath.p.hasChildNodes());
if( !this['clonenumber'] || this.clonenumber == 0) {
var mb = this.parent;
- if (mb instanceof menubutton) {
+ if (mb instanceof lz.menubutton) {
mb.dataBound();
}
}
@@ -107,7 +107,7 @@
if (o && this.children.itemlist.subviews.length == 0) {
this.deferOpen = true;
- new navbutton(this, { level: this.level + 1 });
+ new lz.navbutton(this, { level: this.level + 1 });
}
else
super._setOpen(o);
@@ -163,14 +163,14 @@
<method name="doOpen">
if (this.animateOpen == null) {
- this.animateOpen = new openanimator(this, { item: classroot });
+ this.animateOpen = new lz.openanimator(this, { item: classroot });
}
this.animateOpen.doStart();
</method>
<method name="doClose">
if (this.animateClose == null) {
- this.animateClose = new closeanimator(this, { item: classroot });
+ this.animateClose = new lz.closeanimator(this, { item: classroot });
}
this.animateClose.doStart();
</method>
@@ -345,7 +345,7 @@
if (typeof(global.bookmark) != 'undefined'){
var restore = global.bookmark.split('|');
if (restore.length > 0) {
- this[restore[0]].openSequence(restore);
+ if (this[restore[0]]) this[restore[0]].openSequence(restore);
}
}
</method>
Modified: openlaszlo/branches/devildog/lps/admin/dev-console.html
===================================================================
--- openlaszlo/branches/devildog/lps/admin/dev-console.html 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/admin/dev-console.html 2008-03-19 15:01:29 UTC (rev 8315)
@@ -27,7 +27,7 @@
document.body.clientHeight = height;
}
}
- })(null, 70);
+ })(null, 370);
}
</script><script type="text/javascript">
lzOptions = { ServerRoot: '../../'};
@@ -43,11 +43,11 @@
img { border: 0 none; }
</style></head><body><script type="text/javascript">
//alert(document.location.search.substring(1))
- Lz.swfEmbed({url: 'dev-console.lzx.swf?' + document.location.search.substring(1), bgcolor: '#9494ad', width: '100%', height: '70', id: 'lzapp', accessible: 'false'});
+ Lz.swfEmbed({url: 'dev-console.lzx.swf?' + document.location.search.substring(1), bgcolor: '#9494ad', width: '100%', height: '370', id: 'lzapp', accessible: 'false'});
</script><noscript>
Please enable JavaScript in order to use this application.
</noscript></body></html>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
Modified: openlaszlo/branches/devildog/lps/admin/dev-console.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/admin/dev-console.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/admin/dev-console.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -7,7 +7,7 @@
<!--=======================================================================-->
-<canvas width="100%" height="70" proxied="false" bgcolor="#9494ad">
+<canvas width="100%" height="370" proxied="false" bgcolor="#9494ad">
<switch>
<when runtime="dhtml">
</when>
Modified: openlaszlo/branches/devildog/lps/components/base/basecomponent.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/base/basecomponent.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/base/basecomponent.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -107,7 +107,7 @@
// initialize internal _parentcomponent attribute
var p = this.immediateparent;
while (p != canvas) {
- if (p instanceof basecomponent) {
+ if (p instanceof lz.basecomponent) {
this._parentcomponent = p;
break;
}
@@ -168,9 +168,9 @@
if ( this.isdefault == def ) return;
if ( def ){
- _componentmanager.service.makeDefault( this );
+ lz._componentmanager.service.makeDefault( this );
} else {
- _componentmanager.service.unmakeDefault( this );
+ lz._componentmanager.service.unmakeDefault( this );
}
this.isdefault = def;
@@ -183,14 +183,14 @@
<method name="_setDoesEnter" args="doe">
this.doesenter = doe;
if ( LzFocus.getFocus() == this ){
- _componentmanager.service.checkDefault( this );
+ lz._componentmanager.service.checkDefault( this );
}
</method>
<!--- this method can be called to force the default
button to update -->
<method name="updateDefault">
- _componentmanager.service.checkDefault( LzFocus.getFocus() );
+ lz._componentmanager.service.checkDefault( LzFocus.getFocus() );
</method>
<!--- if null, the style is set to the inherited style from the parent
@@ -224,7 +224,7 @@
var old_style = this._style;
if (!old_style) {
if (this._parentcomponent) old_style = this._parentcomponent.style;
- else old_style = _componentmanager.service.getDefaultStyle();
+ else old_style = lz._componentmanager.service.getDefaultStyle();
}
s = old_style.extend(s);
}
@@ -242,9 +242,9 @@
'onstyle');
s = this._parentcomponent.style;
} else { // constrain to canvas defaultstyle
- this._otherstyledel.register(_componentmanager.service,
+ this._otherstyledel.register(lz._componentmanager.service,
'ondefaultstyle');
- s = _componentmanager.service.getDefaultStyle();
+ s = lz._componentmanager.service.getDefaultStyle();
}
} else if (this._otherstyledel) {
this._otherstyledel.unregisterAll();
@@ -388,7 +388,7 @@
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/base/basedatacombobox.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/base/basedatacombobox.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/base/basedatacombobox.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -297,11 +297,11 @@
var flcn = this.menuclassname;
if ($debug) {
- if (typeof global[flcn] == "undefined")
+ if (typeof lz[flcn] == "undefined")
Debug.format("basedatacombobox floatinglist class (%w) is undefined", flcn);
}
- var cblist = new global[flcn](this,
+ var cblist = new lz[flcn](this,
{ visible:false,
attach: this.listattach,
attachoffset: -2,
@@ -310,7 +310,7 @@
// add in a white view to reduce the visual effect of the
// list items appearing as they are created
- var tmp = new global[icn](cblist, { name:'item' });
+ var tmp = new lz[icn](cblist, { name:'item' });
new LzDatapath(tmp, { pooling: true });
this._cblist = cblist;
@@ -485,7 +485,7 @@
@keywords private -->
<method name="_getItemAt" args="index"> <![CDATA[
var item = null;
- if (this._cblist._selector instanceof datalistselector) {
+ if (this._cblist._selector instanceof lz.datalistselector) {
this._cblist._selector._ensureItemInViewByIndex( index );
}
var svs = this._cblist._selector.immediateparent.subviews;
Modified: openlaszlo/branches/devildog/lps/components/base/basefocusview.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/base/basefocusview.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/base/basefocusview.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -82,7 +82,7 @@
if ( this.target ) this.setTarget( null )
// Make sure this focusview is visible if it is active
- this.setVisible( this.active );
+ this.setVisibility( this.active?'visible':'hidden' );
// store the target that the focusview will be constrained to when
// it stops animating.
@@ -115,7 +115,7 @@
// fade in the brackets to balance out the fade out
if (this.sprite && this.sprite['quirks'] && this.sprite.quirks['minimize_opacity_changes']) {
- this.setVisible(true);
+ this.setVisibility( 'visible' );
} else {
this.animate('opacity', 1, 500);
}
@@ -149,7 +149,7 @@
]]> </method>
<!--- @keywords private -->
- <handler name="onstop" method="stopanim" />
+ <handler name="onstop" method="stopanim"/>
<method name="stopanim" > <![CDATA[
this._animatorcounter -= 1;
if ( this._animatorcounter < 1 ) {
@@ -171,7 +171,7 @@
<method name="fadeout" >
if (_dofadeout) {
if (this.sprite && this.sprite['quirks'] && this.sprite.quirks['minimize_opacity_changes']) {
- this.setVisible(false);
+ this.setVisibility( 'hidden' );
} else {
this.animate( 'opacity' ,0 , 500);
}
Modified: openlaszlo/branches/devildog/lps/components/base/basegrid.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/base/basegrid.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/base/basegrid.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -46,10 +46,10 @@
<!--- The class to use to construct columns, if the
columns are inferred by the basegrid.
@access protected -->
- <attribute name="_columnclass" value="basegridcolumn" when="once"/>
+ <attribute name="_columnclass" value="lz.basegridcolumn" when="once"/>
<!--- The class to use to construct rows.
@access protected -->
- <attribute name="_rowclass" value="basegridrow" when="once"/>
+ <attribute name="_rowclass" value="lz.basegridrow" when="once"/>
<!--- A boolean. If true, the grid will keep its width set to the size
of the header. This is automatically set to true for grids that
@@ -393,7 +393,7 @@
var cells = [];
if ( svl ){
for ( var i = 0; i< svl.length; i++ ){
- if ( svl[ i ] instanceof basegridcolumn ) {
+ if ( svl[ i ] instanceof lz.basegridcolumn ) {
this.columns.push( svl[ i ] );
cells.push( svl[ i ]._getCellForColumn() );
}
Modified: openlaszlo/branches/devildog/lps/components/base/baselist.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/base/baselist.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/base/baselist.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -70,10 +70,10 @@
}
}
if (this.dataoption == "lazy" || this.dataoption == "resize") {
- this._selector = new datalistselector(this,
+ this._selector = new lz.datalistselector(this,
{multiselect:this.multiselect, toggle:toggleselected});
} else {
- this._selector = new listselector(this,
+ this._selector = new lz.listselector(this,
{multiselect:this.multiselect, toggle:toggleselected});
}
@@ -296,11 +296,11 @@
}
} else {
if ($debug) {
- if (typeof(global[this.itemclassname]) == "undefined") {
+ if (typeof(lz[this.itemclassname]) == "undefined") {
Debug.write("itemclassname undefined", this);
}
}
- new global[this.itemclassname](this, {text:text, value:value});
+ new lz[this.itemclassname](this, {text:text, value:value});
}
</method>
Modified: openlaszlo/branches/devildog/lps/components/base/basescrollbar.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/base/basescrollbar.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/base/basescrollbar.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -121,7 +121,7 @@
for (var i = 0; i < subcount; i++) {
var s = immediateparent.subviews[i];
if (s instanceof LzView) {
- if (! (s instanceof basescrollbar )){
+ if (! (s instanceof lz.basescrollbar )){
// first non-scrollbar view is the scrolltarget
if (!this.scrolltarget) this.scrolltarget = s;
} else {
@@ -638,7 +638,7 @@
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/base/baseslider.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/base/baseslider.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/base/baseslider.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -288,7 +288,7 @@
</class><!-- end basesliderthumb class -->
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/base/basetabs.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/base/basetabs.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/base/basetabs.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -35,7 +35,7 @@
// If I'm selected, tell my parent to select me. Basetabs cannot exist
// w/o basetabpanes, so not necessary to check for existence.
- if (parent instanceof basetabsbar && tabpane.selected) {
+ if (parent instanceof lz.basetabsbar && tabpane.selected) {
parent.select(this);
}
@@ -47,7 +47,7 @@
<!--- @keywords private -->
<method name="destroy">
<![CDATA[
- if (parent instanceof basetabsbar && parent._initcomplete) {
+ if (parent instanceof lz.basetabsbar && parent._initcomplete) {
// We need to move selected to another tab
if (parent._selector.selected[0] == this) {
if (parent.subviews.length == 1) {
@@ -460,7 +460,7 @@
<method name="determinePlacement" args="v,p">
<![CDATA[
- if (v instanceof basetabpane) {
+ if (v instanceof lz.basetabpane) {
// reassign parent of view to basetabs
v.parent = this.parent;
p = this.defaultplacement;
@@ -602,28 +602,28 @@
<handler name="onconstruct">
// Create tabsbar
if (this.barclass != "") {
- if (typeof(global[this.barclass]) != "undefined") {
- this.bar = new global[this.barclass](this, {}, null, true);
+ if (typeof(lz[this.barclass]) != "undefined") {
+ this.bar = new lz[this.barclass](this, {}, null, true);
} else {
Debug.write('barclass ' + this.barclass + ' is undefined');
}
}
if (this.bar == null) {
- this.bar = new basetabsbar(this, {}, null, true);
+ this.bar = new lz.basetabsbar(this, {}, null, true);
Debug.write('Using basetabsbar for tab bar');
}
// Create tabscontent, if it hasn't been already created
if (this.contentclass != "") {
- if (typeof(global[this.contentclass]) != "undefined") {
- this.content = new global[this.contentclass](this, {}, null, true);
+ if (typeof(lz[this.contentclass]) != "undefined") {
+ this.content = new lz[this.contentclass](this, {}, null, true);
} else {
Debug.write('contentclass ' + this.contentclass +
' is undefined');
}
}
if (this.content == null) {
- this.content = new basetabscontent(this, {}, null, true);
+ this.content = new lz.basetabscontent(this, {}, null, true);
Debug.write('Using basetabscontent for tabs content area');
}
</handler>
@@ -651,8 +651,8 @@
}
}
}
- if (typeof(global[tc]) != "undefined") {
- v.tab = new global[tc](this.bar, { tabpane: v }, null, true);
+ if (typeof(lz[tc]) != "undefined") {
+ v.tab = new lz[tc](this.bar, { tabpane: v }, null, true);
} else {
if ($debug) {
Debug.write('tabclass \'' + tc + '\' is undefined');
@@ -823,7 +823,7 @@
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/base/basetabslider.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/base/basetabslider.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/base/basetabslider.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -153,7 +153,7 @@
if ( typeof(v.minheight) == "undefined" ) {
// no minheight was defined so assign the parent
// value before calling calcAvailableHeight
- if ( v instanceof basetabelement ) v.setAttribute('minheight', this.mintabheight);
+ if ( v instanceof lz.basetabelement ) v.setAttribute('minheight', this.mintabheight);
}
// v.setHeight(v.minheight);
@@ -203,7 +203,7 @@
tabelement.
@param String txt: The name of the tabelement. -->
<method name="addItem" args="txt" > <;
+ var v = new lz[this.itemclassname](this,{text:txt});
this.onheight.sendEvent(); // force an update
]]> </method>
@@ -221,7 +221,7 @@
var tmh = 0;
for( var m=0; m < cv.subviews.length; m++ ) {
var sv = cv.subviews[m]
- if ( sv.visible && sv instanceof basetabelement ) {
+ if ( sv.visible && sv instanceof lz.basetabelement ) {
tmh += sv['minheight'] + spacing;
}
}
@@ -230,7 +230,7 @@
// set the corresponding height of the attributes
this.setAttribute('availableheight',
- Math.max(0,cv.getAttribute("height") - tmh));
+ Math.max(0,cv.height - tmh));
this.setAttribute('totalminheight',tmh);
}
]]> </method>
@@ -286,7 +286,7 @@
</class> <!-- END: basetabslider -->
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/base/basetree.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/base/basetree.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/base/basetree.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -141,12 +141,12 @@
this.children.setAttribute("x", 0);
this.children.setAttribute("y", 0);
var sv = this.children.subviews;
- if (sv && (sv[0]) instanceof basetree) {
+ if (sv && (sv[0]) instanceof lz.basetree) {
focusItem = sv[0].item;
}
}
- this._selector = new treeselector(this,
+ this._selector = new lz.treeselector(this,
{ multiselect: this.multiselect,
toggle: this.toggleselected });
@@ -212,7 +212,7 @@
var c = this.getChildClass();
if (c != null) {
- new global[c](this, args, null, true);
+ new lz[c](this, args, null, true);
}
]]>
</method>
@@ -333,7 +333,7 @@
@return Boolean: true if this tree is the root, otherwise
false. -->
<method name="isRoot">
- return ! (parent instanceof basetree);
+ return ! (parent instanceof lz.basetree);
</method>
<!--- Get the root of this tree.
@@ -341,7 +341,7 @@
<method name="getRoot">
var v = this;
var p = v.parent;
- while (p instanceof basetree) {
+ while (p instanceof lz.basetree) {
v = v.parent;
p = v.parent;
}
@@ -498,7 +498,7 @@
<![CDATA[
var n = 0;
if (children.subviews &&
- (children.subviews[n]) instanceof basetree) {
+ (children.subviews[n]) instanceof lz.basetree) {
this.setAttribute("_currentChild", n);
this.changeFocus(children.subviews[n]);
}
@@ -512,11 +512,11 @@
<![CDATA[
var n = children.subviews.length - 1;
if (children.subviews &&
- (children.subviews[n]) instanceof basetree) {
+ (children.subviews[n]) instanceof lz.basetree) {
var last = children.subviews[n];
if (last.open && last.children.subviews) {
var next = last.children.subviews.length -1;
- if ((last.children.subviews[next]) instanceof basetree) {
+ if ((last.children.subviews[next]) instanceof lz.basetree) {
last._focusLastChild();
return;
}
@@ -548,7 +548,7 @@
// If previous sibling is open, select last child of that sibling
var sibling = parent.children.subviews[prev]
if (sibling.open && sibling.children.subviews &&
- (sibling.children.subviews[0]) instanceof basetree) {
+ (sibling.children.subviews[0]) instanceof lz.basetree) {
sibling._focusLastChild();
} else {
this.changeFocus(sibling);
@@ -603,7 +603,7 @@
} else if (kc == 40) { // down
if (this.open &&
this.children.subviews &&
- (this.children.subviews[0]) instanceof basetree) {
+ (this.children.subviews[0]) instanceof lz.basetree) {
this._focusFirstChild();
} else {
this._focusNextSibling();
Modified: openlaszlo/branches/devildog/lps/components/base/basewindow.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/base/basewindow.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/base/basewindow.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -1,5 +1,5 @@
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<!-- @LZX_VERSION@ -->
@@ -55,16 +55,18 @@
value="${setDragPos('y', this.immediateparent.getMouse( 'y' ))}"/>
<attribute name="x"
value="${setDragPos('x', this.immediateparent.getMouse( 'x' ))}"/>
- <method name="setDragPos" args="xory, mousepos"> <![CDATA[
- var newpos = mousepos - this[xory + 'doffset'];
- var diff = this[xory] - this['start' + xory];
- if (Math.abs(diff) > 3) {
- setAttribute('state', 3);
- }
- return newpos;
- ]]> </method>
</state>
+ <method name="setDragPos" args="xory, mousepos"> <![CDATA[
+ var newpos = mousepos - this[xory + 'doffset'];
+ var diff = this[xory] - this['start' + xory];
+ if (Math.abs(diff) > 3) {
+ setAttribute('state', 3);
+ }
+ return newpos;
+ ]]>
+ </method>
+
<!-- resizestatemin uses minwidth and minheight attribute-->
<resizestatemin name="_windowResize" onapply="parent.setAttribute('haswindowfocus', true)"/>
Modified: openlaszlo/branches/devildog/lps/components/base/componentmanager.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/base/componentmanager.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/base/componentmanager.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -1,7 +1,7 @@
<library>
<!-- style.lzx is not included here, even thought it is required.
- _componentmanager needs style to be defined before it is used, but style
- has script in it that needs _componentmanager, so don't include it here.
+ lz._componentmanager needs style to be defined before it is used, but style
+ has script in it that needs lz._componentmanager, so don't include it here.
Instead, style is always included before component manager is used. -->
<!-- This class handles global issues for components. It's more efficient
@@ -47,7 +47,7 @@
}
if ( fclass != null ){
- canvas.__focus = new global[ fclass ](canvas);
+ canvas.__focus = new lz[ fclass ](canvas);
canvas.__focus.reset();
}
super.init();
@@ -64,7 +64,7 @@
if ( key == 32 ){
this.lastsdown = null;
var foc = LzFocus.getFocus();
- if ( foc instanceof ( basecomponent ) ){
+ if ( foc instanceof lz.basecomponent ){
foc.doSpaceDown();
this.lastsdown = foc;
}
@@ -167,7 +167,7 @@
<method name="checkDefault" args="who">
<![CDATA[
- if ( ! ( who instanceof basecomponent ) ||
+ if ( ! ( who instanceof lz.basecomponent ) ||
! who.doesenter ){
if ( ( who instanceof LzInputText ) &&
@@ -209,7 +209,7 @@
<method name="getDefaultStyle">
if (this.defaultstyle == null) {
- this.defaultstyle = new global.style(canvas, {isdefault:true});
+ this.defaultstyle = new lz.style(canvas, {isdefault:true});
}
return this.defaultstyle
</method>
Modified: openlaszlo/branches/devildog/lps/components/base/datalistselector.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/base/datalistselector.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/base/datalistselector.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -141,6 +141,14 @@
]]>
</method>
<method name="findIndex" args="s"> <![CDATA[
+ if ( ! immediateparent.subviews[0].cloneManager ) {
+ if (s instanceof LzView) {
+ return (immediateparent.subviews[0] == s ? 0 : -1);
+ } else {
+ return (immediateparent.subviews[0].datapath.p == s.p ? 0 : -1);
+ }
+ }
+
var target_element;
if (s instanceof LzView) {
target_element = s.datapath.p;
@@ -148,10 +156,6 @@
target_element = s.p;
}
- if ( ! immediateparent.subviews[0].cloneManager ) {
- return (immediateparent.subviews[0] == s ? 0 : -1);
- }
-
var nodelist = immediateparent.subviews[0].cloneManager.nodes;
var found_index = -1;
for (var i=0; i < nodelist.length; i++) {
@@ -269,7 +273,7 @@
</class>
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/base/resizeview.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/base/resizeview.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/base/resizeview.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -13,28 +13,34 @@
// be constrained to that height, otherwise they will be sized
// to the height of their resource
if (hassetheight) {
- var f = function (){
- this.setAttribute( "height" , this.immediateparent.height);
- }
var d = [ this , 'height' ];
- leftview.applyConstraint( 'height' , f , d );
- middleview.applyConstraint( 'height' , f , d );
- rightview.applyConstraint( 'height' , f , d );
+ leftview.applyConstraintMethod('adjheight' , d );
+ middleview.applyConstraintMethod('adjheight' , d );
+ rightview.applyConstraintMethod( 'adjheight' , d );
}
</handler>
<view name="leftview" stretches="height">
+ <method name="adjheight">
+ this.setAttribute('height', this.immediateparent.height);
+ </method>
<attribute name="frame" value="${parent.frame}"/>
<handler name="onconstruct">
this.setResource(parent.left);
</handler>
</view>
<view name="middleview" stretches="both">
+ <method name="adjheight">
+ this.setAttribute('height', this.immediateparent.height);
+ </method>
<attribute name="frame" value="${parent.frame}"/>
<handler name="onconstruct">
this.setResource(parent.middle);
</handler>
</view>
<view name="rightview" stretches="height">
+ <method name="adjheight">
+ this.setAttribute('height', this.immediateparent.height);
+ </method>
<attribute name="frame" value="${parent.frame}"/>
<handler name="onconstruct">
this.setResource(parent.right);
@@ -87,7 +93,7 @@
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2004 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/base/style.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/base/style.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/base/style.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -86,7 +86,7 @@
<method name="_setdefault" args="def"> <![CDATA[
this.isdefault = def;
if (isdefault) {
- global._componentmanager.service.setDefaultStyle(this);
+ lz._componentmanager.service.setDefaultStyle(this);
if (this['canvascolor'] != null) {
canvas.setBGColor(this.canvascolor);
}
@@ -225,13 +225,13 @@
-->
<script>
- _componentmanager.service = new _componentmanager( canvas , null,
+ lz._componentmanager.service = new lz._componentmanager( canvas , null,
null, true );
</script>
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/base/swatchview.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/base/swatchview.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/base/swatchview.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -19,10 +19,10 @@
<method name="construct" args="parent, args"> <![CDATA[
super.construct( parent, args );
if ( args['width'] == null ){
- args['width'] = this.immediateparent.getAttribute( 'width' );
+ args['width'] = this.immediateparent.width;
}
if ( args['height'] == null ){
- args['height'] = this.immediateparent.getAttribute( 'height' );
+ args['height'] = this.immediateparent.height;
}
if ( args['fgcolor'] == null && args['bgcolor'] == null){
args['fgcolor'] = 0xFFFFFF;
@@ -88,7 +88,7 @@
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/charts/common/chart.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/charts/common/chart.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/charts/common/chart.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -78,7 +78,7 @@
this.style = this.defaultstyle;
} else {
// Check for a complete style definition.
- var parser = new styleparser(this, {style:this.style, defaultstyle:this.defaultstyle});
+ var parser = new lz.styleparser(this, {style:this.style, defaultstyle:this.defaultstyle});
this.style = parser.style;
}
@@ -171,7 +171,7 @@
<!--- @keyword private -->
<method name="createLabelViewspool">
- return new viewspool(this, {parentview:this.plotarea, viewclass:'datalabel'})
+ return new lz.viewspool(this, {parentview:this.plotarea, viewclass:'datalabel'})
</method>
<!--- @keyword private -->
@@ -271,7 +271,7 @@
var objs = [];
for (var i = this.subnodes.length - 1; i >= 0; i--)
{
- if((className == "dataseries" || className == "datacolumn") && this.subnodes[i] instanceof dataseries){
+ if((className == "dataseries" || className == "datacolumn") && this.subnodes[i] instanceof lz.dataseries){
return this.subnodes[i];
}
if(this.subnodes[i].constructor.tagname == className)
Modified: openlaszlo/branches/devildog/lps/components/charts/common/dataseries.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/charts/common/dataseries.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/charts/common/dataseries.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -154,8 +154,8 @@
<method name="getRootDataSeries">
var objectplace = this;
- while(objectplace.parent instanceof dataseries){
- if(parent instanceof dataseries){
+ while(objectplace.parent instanceof lz.dataseries){
+ if(parent instanceof lz.dataseries){
objectplace = objectplace.parent;
} else {
break;
@@ -208,7 +208,7 @@
{
return this[attName];
}
- else if(parent instanceof dataseries)
+ else if(parent instanceof lz.dataseries)
{
return parent.getNestedAttribute(attName);
}
@@ -235,7 +235,7 @@
for(var i = 0; i < this.subnodes.length; i++)
{
//Debug.write("subnodename: " + this.subnodes[i].name);
- if((this.subnodes[i] instanceof datacolumn) && (this.subnodes[i].name == name))
+ if((this.subnodes[i] instanceof lz.datacolumn) && (this.subnodes[i].name == name))
{
datacolumnsmap[name] = this.subnodes[i];
@@ -244,7 +244,7 @@
}
}
- if(parent instanceof dataseries)
+ if(parent instanceof lz.dataseries)
{
return parent.getDataColumn(name);
@@ -278,7 +278,7 @@
for(var i = 0; i < this.subnodes.length; i++){
var childDataSeries = this.subnodes[i];
- if(childDataSeries instanceof dataseries){
+ if(childDataSeries instanceof lz.dataseries){
this.dataseriesleafs = this.dataseriesleafs.concat(childDataSeries.getDataSeriesLeafs());
}
}
@@ -353,8 +353,8 @@
<!--- get the top level -->
<method name="getRootDataSeries">
var objectplace = this;
- while(objectplace.parent instanceof dataseries){
- if(parent instanceof dataseries){
+ while(objectplace.parent instanceof lz.dataseries){
+ if(parent instanceof lz.dataseries){
objectplace = objectplace.parent;
} else {
break;
@@ -382,7 +382,7 @@
@param object args: args to pass in to create dataseries. it is ok to be null -->
<method name="addDataSeries" args="args">
this.clearCache();
- var childNode = new dataseries(this, args);
+ var childNode = new lz.dataseries(this, args);
this.clearCache();
return childNode;
</method>
@@ -399,7 +399,7 @@
@param object args: args to pass in to create. It is ok to be null -->
<method name="addDataColumn" args="args">
this.clearCache();
- var childNode = new datacolumn(this, args);
+ var childNode = new lz.datacolumn(this, args);
return childNode;
</method>
Modified: openlaszlo/branches/devildog/lps/components/charts/common/rectangularchart.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/charts/common/rectangularchart.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/charts/common/rectangularchart.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -207,7 +207,7 @@
if ( this.style.vaxisstyle!=null ) {
vaxis.style = this.style.vaxisstyle;
} else {
- vaxis.style = new axisstyle();
+ vaxis.style = new lz.axisstyle();
}
vaxis.setX( (this.plotarea[x] != null ? this.plotarea.x : this.x) );
@@ -222,7 +222,7 @@
if ( this.style.haxisstyle!=null ) {
haxis.style = this.style.haxisstyle;
} else {
- haxis.style = new axisstyle();
+ haxis.style = new lz.axisstyle();
}
haxis.setX( (this.plotarea[x] != null ? this.plotarea.x : this.x) );
Modified: openlaszlo/branches/devildog/lps/components/charts/common/viewspoolmanager.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/charts/common/viewspoolmanager.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/charts/common/viewspoolmanager.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -15,7 +15,7 @@
var pool = this.pools[className];
if(!pool)
{
- pool = new viewspool(parent);
+ pool = new lz.viewspool(parent);
//debug.write(pool);
pool.parentview = parent;
pool.viewclass = className;
@@ -52,7 +52,7 @@
}
else
{
- marker = new global[viewclass](parentview, args);
+ marker = new lz[viewclass](parentview, args);
}
this.used.push(marker);
marker.setVisible(true);
@@ -99,7 +99,7 @@
var pool = this.pools[listName];
if(!pool)
{
- pool = new viewslist(parent);
+ pool = new lz.viewslist(parent);
pool.parentview = parent;
pool.viewclass = className;
this.pools[listName] = pool;
@@ -130,7 +130,7 @@
<method name="getViewAt" args="index, args">
if(this.vlist[index] == null)
{
- this.vlist[index] = new global[viewclass](parentview, args);
+ this.vlist[index] = new lz[viewclass](parentview, args);
}
else
{
@@ -155,8 +155,8 @@
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN
***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
* X_LZ_COPYRIGHT_END
****************************************************** -->
-<!-- @LZX_VERSION@ -->
\ No newline at end of file
+<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/charts/styles/styleparser.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/charts/styles/styleparser.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/charts/styles/styleparser.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -38,15 +38,15 @@
<method name="readChildrenNode" >
<![CDATA[
if( this.style.constructor.tagname == this.defaultstyle.constructor.tagname ) {
- lParser = new styleparser(this, {defaultstyle:this.defaultstyle.subnodes[this.increment], style:this.style});
+ lParser = new lz.styleparser(this, {defaultstyle:this.defaultstyle.subnodes[this.increment], style:this.style});
} else if( this.style[this.defaultstyle.name] ) {
- lParser = new styleparser(this, {defaultstyle:this.defaultstyle.subnodes[this.increment], style:this.style[this.defaultstyle.name]});
+ lParser = new lz.styleparser(this, {defaultstyle:this.defaultstyle.subnodes[this.increment], style:this.style[this.defaultstyle.name]});
}
else {
this.style[this.defaultstyle.name] = this.defaultstyle;
this.style.subnodes.push(this.defaultstyle);
this.style.subviews.push(this.defaultstyle);
- lParser = new styleparser(this, {defaultstyle:this.defaultstyle.subnodes[this.increment], style:this.style[this.defaultstyle.subnodes[this.increment].name]});
+ lParser = new lz.styleparser(this, {defaultstyle:this.defaultstyle.subnodes[this.increment], style:this.style[this.defaultstyle.subnodes[this.increment].name]});
}
]]>
</method>
Modified: openlaszlo/branches/devildog/lps/components/debugger/newcontent.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/debugger/newcontent.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/debugger/newcontent.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -135,7 +135,7 @@
<!-- this gets called every time the x value changes -->
<handler name="onx" reference="this">
- if (parent.getAttribute("autoscroll")) {
+ if (parent.autoscroll) {
this.handleThumbPosX(this.x);
}
</handler>
@@ -257,7 +257,7 @@
<!-- this gets called every time the y value changes -->
<handler name="ony" reference="this">
- if (parent.parent.getAttribute("autoscroll")) {
+ if (parent.parent.autoscroll) {
this.handleThumbPos(this.y);
}
</handler>
Modified: openlaszlo/branches/devildog/lps/components/debugger/scrollingtext.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/debugger/scrollingtext.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/debugger/scrollingtext.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -131,7 +131,7 @@
<!-- this gets called every time the x value changes -->
<handler name="onx" reference="this">
- if (parent.getAttribute("autoscroll")) {
+ if (parent.autoscroll) {
this.handleThumbPosX(this.x);
}
</handler>
@@ -261,7 +261,7 @@
<!-- this gets called every time the y value changes -->
<handler name="ony" reference="this">
- if (parent.parent.getAttribute("autoscroll")) {
+ if (parent.parent.autoscroll) {
this.handleThumbPos(this.y);
}
</handler>
Modified: openlaszlo/branches/devildog/lps/components/extensions/av/mediastream.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/extensions/av/mediastream.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/extensions/av/mediastream.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2006-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2006-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
@@ -315,16 +315,16 @@
}
case "rtmp": {
- if (global['rtmpconnection'] == undefined) {
+ if (lz['rtmpconnection'] == undefined) {
Debug.warn("rtmpconnection must be included");
}
// If we don't define our own connection, then use
// the default one (the first rtmpconnection created).
- //Debug.write("_findnc type rtmp, rtmpconnection", this.rtmpconnection, "_nc", global.rtmpconnection.prototype._default._nc);
+ //Debug.write("_findnc type rtmp, rtmpconnection", this.rtmpconnection, "_nc", lz.rtmpconnection.prototype._default._nc);
this._nc =
this.rtmp ||
- global.rtmpconnection.prototype._default._nc;
+ lz.rtmpconnection.prototype._default._nc;
break;
}
Modified: openlaszlo/branches/devildog/lps/components/extensions/av/rtmpconnection.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/extensions/av/rtmpconnection.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/extensions/av/rtmpconnection.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -1,5 +1,5 @@
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2006-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2006-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
@@ -300,9 +300,9 @@
return -1;
}
var rtmpObject = null;
- if (this.parent instanceof rtmpconnection){
+ if (this.parent instanceof lz.rtmpconnection){
rtmpObject = this.parent;
- } else if(this.remotecontext instanceof rtmpconnection){
+ } else if(this.remotecontext instanceof lz.rtmpconnection){
rtmpObject = this.remotecontext;
} else {
Debug.write("ERROR: no remotecontext availible abort call");
Modified: openlaszlo/branches/devildog/lps/components/extensions/av/videoview.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/extensions/av/videoview.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/extensions/av/videoview.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -1,5 +1,5 @@
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2006-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2006-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<library>
@@ -110,7 +110,7 @@
//Debug.write("videoview init found stream", this, stream);
if (!stream) {
stream =
- new global.mediastream(
+ new lz.mediastream(
this,
{debug:this.debug},
null,
Modified: openlaszlo/branches/devildog/lps/components/extensions/views/richinputtext.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/extensions/views/richinputtext.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/extensions/views/richinputtext.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -207,7 +207,7 @@
function getTextFormat(beginindex, endindex) {
var flashformat = this.sprite.__LZtextclip.getTextFormat(beginindex, endindex);
- var fmt = new textformat(this);
+ var fmt = new lz.textformat(this);
for (var i in flashformat) {
fmt[i] = flashformat[i];
@@ -298,7 +298,7 @@
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/incubator/autocompletecombobox.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/incubator/autocompletecombobox.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/incubator/autocompletecombobox.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -36,12 +36,12 @@
</handler>
<method name="showAll">
- var isShowing = myFloatBox.getAttribute("visible");
+ var isShowing = myFloatBox.visible;
if(isShowing) {
myFloatBox.setAttribute("visible",false);
} else {
- var theDictionary = this.getAttribute("__component_contents");
+ var theDictionary = this.__component_contents;
for(item in theDictionary) {
var the_object = theDictionary[item];
@@ -54,7 +54,7 @@
<simplelayout axis="x" spacing="0"/>
<view name="theeditor" width="${classroot.width - classroot.rgt.width}">
- <inputtext name="actual" width="100%" text="$once{classroot.getAttribute('defaulttext')}">
+ <inputtext name="actual" width="100%" text="$once{classroot.defaulttext}">
<handler name="onfocus">
Debug.write("focused..");
this.setSelection(0,this.getText().length);
@@ -83,7 +83,7 @@
}
}
} else if(k == 8) {
- var actualTyped = this.getAttribute("actuallyTyped");
+ var actualTyped = this.actuallyTyped;
Debug.write("Actual = "+actualTyped);
var oneMinus = actualTyped.substr(0,actualTyped.length-1);
@@ -110,7 +110,7 @@
var theInput = this.getText();
this.setAttribute("actuallyTyped",theInput);
- Debug.write( "What was actually typed... "+this.getAttribute("actuallyTyped"));
+ Debug.write( "What was actually typed... "+this.actuallyTyped);
computeBox(theInput);
@@ -122,7 +122,7 @@
<method name="computeBox" args="theInput">
<![CDATA[
- var theDictionary = classroot.getAttribute("__component_contents");
+ var theDictionary = classroot.__component_contents;
for(item in theDictionary) {
var the_object = theDictionary[item];
if(item.indexOf(theInput) == 0) {
@@ -138,7 +138,7 @@
var numberOfItems = classroot.myFloatBox.getNumItems();
for(var i=0; i<numberOfItems; i++) {
theFirst = classroot.myFloatBox.getItemAt(i);
- if(theFirst.getAttribute("visible")) break;
+ if(theFirst.visible) break;
theFirst = null;
}
@@ -182,12 +182,12 @@
<textlistitem name="replicated_textitem" datapath="">
<handler name="ondata">
- parent.owner.getAttribute("__component_contents")[this.data] = this;
+ parent.owner.__component_contents[this.data] = this;
</handler>
<handler name="onselect">
Debug.write("onselect ",this.data);
parent.owner.theeditor.actual.setText(this.data);
- var actualTyped = parent.owner.theeditor.actual.getAttribute("actuallyTyped");
+ var actualTyped = parent.owner.theeditor.actual.actuallyTyped;
parent.owner.theeditor.actual.setSelection(actualTyped.length,this.data.length);
</handler>
<handler name="onclick">
Modified: openlaszlo/branches/devildog/lps/components/incubator/baseradio.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/incubator/baseradio.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/incubator/baseradio.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -25,7 +25,7 @@
<method name="createGroup" args="groupname,rb"><![CDATA[
var groupPlacement = rb.findForm();
if (groupPlacement == null) groupPlacement = this;
- var group = new baseradiogroup(groupPlacement,
+ var group = new lz.baseradiogroup(groupPlacement,
{ name: groupname,
submitname: rb.submitname,
submit: rb.submit,
@@ -39,7 +39,7 @@
@keywords private -->
<method name="findRadioGroupAncestor" args="rb"><![CDATA[
var p = rb.parent;
- while (p != canvas && ! (p instanceof baseradiogroup)) {
+ while (p != canvas && ! (p instanceof lz.baseradiogroup)) {
p = p.parent;
}
return (p != canvas ? p : null);
Modified: openlaszlo/branches/devildog/lps/components/incubator/colorpicker.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/incubator/colorpicker.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/incubator/colorpicker.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -8,7 +8,7 @@
<attribute name="mycolor" type="color" value="#000000"/>
<attribute name="listener" type="expression"/>
<handler name="onclick">
- listener.changeColor(this.getAttribute('mycolor'));
+ listener.changeColor(this.mycolor);
</handler>
<view bgcolor="#444444" width="13" height="13">
<view bgcolor="${classroot.mycolor}" x="1" y="1" width="11" height="11"/>
Modified: openlaszlo/branches/devildog/lps/components/incubator/fisheye_lib.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/incubator/fisheye_lib.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/incubator/fisheye_lib.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -33,7 +33,7 @@
<attribute name="halo_size" value="${parent.halo_size}" />
<attribute name="myTooltipManager" value="$once{parent.tooltipmanager}" />
- <attribute name="tooltip" value="${this.getAttribute('text')}" />
+ <attribute name="tooltip" value="${this.text}" />
<handler name="oninit">
@@ -62,8 +62,8 @@
var my_x = this.getAttributeRelative( "x", canvas );
var my_y = this.getAttributeRelative( "y", canvas );
- var center_x = my_x + this.getAttribute("width")/2;
- var center_y = my_y + this.getAttribute("height")/2;
+ var center_x = my_x + this.width/2;
+ var center_y = my_y + this.height/2;
var dist_from_center =
(global_x-center_x)*(global_x-center_x) +
Modified: openlaszlo/branches/devildog/lps/components/incubator/gradientview.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/incubator/gradientview.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/incubator/gradientview.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -71,12 +71,12 @@
<method name="draw">
<![CDATA[
- if (this.getAttribute('stretchHeight') == null) {
+ if (this.stretchHeight == null) {
this.stretchHeight = this.height;
if (this.measureHeight() > this.height) { this.stretchHeight = this.measureHeight(); }
}
- if (this.getAttribute('stretchWidth') == null) {
+ if (this.stretchWidth == null) {
this.stretchWidth = this.width;
if (this.measureWidth() > this.width) { this.stretchWidth = this.measureWidth(); }
}
@@ -110,17 +110,17 @@
g = this.createRadialGradient(0-(this.stretchWidth*.5),-(this.stretchHeight*.5),0,this.stretchWidth*1.5,this.stretchHeight*1.5,0);
}
- if ((g != null) && (this.getAttribute('colorFrom') != null)) {
+ if ((g != null) && (this.colorFrom != null)) {
this.globalAlpha = 1;
g.addColorStop(0, this.colorFrom);
- g.addColorStop(1, this.getAttribute('colorTo') != null ? this.colorTo : this.colorFrom);
+ g.addColorStop(1, this.colorTo != null ? this.colorTo : this.colorFrom);
this.fillStyle = g;
this.fill();
}
if ((this.borderSize > 0) || (this.borderSizeTop > 0)) {
- if (this.getAttribute('borderColorTop') == null) {
+ if (this.borderColorTop == null) {
this.borderColorTop = this.borderColor;
}
@@ -140,7 +140,7 @@
}
if ((this.borderSize > 0) || (this.borderSizeBottom > 0)) {
- if (this.getAttribute('borderColorBottom') == null) {
+ if (this.borderColorBottom == null) {
this.borderColorBottom = this.borderColor;
}
// create bottom border
@@ -158,7 +158,7 @@
}
if ((this.borderSize > 0) || (this.borderSizeLeft > 0)) {
- if (this.getAttribute('borderColorLeft') == null) {
+ if (this.borderColorLeft == null) {
this.borderColorLeft= this.borderColor;
}
@@ -178,7 +178,7 @@
}
if ((this.borderSize > 0) || (this.borderSizeRight > 0)) {
- if (this.getAttribute('borderColorRight') == null) {
+ if (this.borderColorRight == null) {
this.borderColorRight= this.borderColor;
}
Modified: openlaszlo/branches/devildog/lps/components/incubator/opttree/opttree.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/incubator/opttree/opttree.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/incubator/opttree/opttree.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -51,7 +51,7 @@
<!--- @keywords private -->
<method name="setNodeInst" args="nc">
- this.nodeclass = global[ nc ];
+ this.nodeclass = lz[ nc ];
new nodeclass( this , { name : "nodeinst" } );
</method>
Modified: openlaszlo/branches/devildog/lps/components/incubator/rich-text/baserichedittext.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/incubator/rich-text/baserichedittext.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/incubator/rich-text/baserichedittext.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -32,7 +32,7 @@
if (parent['onblur']) parent.onblur.sendEvent(s);
</handler>
<!--- Sent whenever a user enters a valid new character. -->
- <handler name="ontext" name="doOnText">
+ <handler name="ontext">
if (! this.ignorecallup) {
parent.setValue(this.getText(),false,true);
}
Modified: openlaszlo/branches/devildog/lps/components/incubator/rich-text/linkdialog.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/incubator/rich-text/linkdialog.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/incubator/rich-text/linkdialog.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -73,7 +73,7 @@
fmt.target = "_new";
fmt.underline = true;
this.editor.setTextFormat(fmt, this.ssel, this.esel);
- var ncaratinsertpoint = this.editor.getAttribute("_esel");
+ var ncaratinsertpoint = this.editor._esel;
// make sure that next onfocus, which will be triggered by doing setSelection here, is ignored by editor.
this.editor._ignorenextfocus = true;
@@ -112,7 +112,7 @@
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2006-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2006-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/incubator/rich-text/richtexteditarea.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/incubator/rich-text/richtexteditarea.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/incubator/rich-text/richtexteditarea.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -140,7 +140,7 @@
// Create a currentformat object, and initialize it to the format
// specified by the various defaultfontsize/defaultfontcolor/defaultfontname
// attributes.
- this.currentformat = new textformat();
+ this.currentformat = new lz.textformat();
this._resetFormatToDefaults();
this.startformat = this.currentformat;
this.inp.setDefaultFormat(this.currentformat);
Modified: openlaszlo/branches/devildog/lps/components/incubator/rich-text/test/richtexteditarea-test.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/incubator/rich-text/test/richtexteditarea-test.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/incubator/rich-text/test/richtexteditarea-test.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -110,21 +110,21 @@
<method name="testNoIndent"><![CDATA[
var fmt = grte.getTextFormat(5,10);
- assertTrue( (fmt.getAttribute("indent") == null) || (fmt.indent==0));
+ assertTrue( (fmt.indent == null) || (fmt.indent==0));
]]></method>
<method name="testNoBlockIndent"><![CDATA[
var fmt = grte.getTextFormat(5,10);
- assertTrue( (fmt.getAttribute("blockIndent") == null) || (!fmt.blockIndent));
+ assertTrue( (fmt.blockIndent == null) || (!fmt.blockIndent));
]]></method>
<method name="testNoAlign"><![CDATA[
var fmt = grte.getTextFormat(5,10);
- assertTrue( (fmt.getAttribute("align") == null) || (fmt.align == "left"));
+ assertTrue( (fmt.align == null) || (fmt.align == "left"));
]]></method>
<method name="testNoBullet"><![CDATA[
var fmt = grte.getTextFormat(5,10);
- assertTrue( (fmt.getAttribute("bullet") == null) || (fmt.bullet == false));
+ assertTrue( (fmt.bullet == null) || (fmt.bullet == false));
]]></method>
</TestCase>
@@ -157,7 +157,7 @@
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
- * Copyright 2006-2007 Laszlo Systems, Inc. All Rights Reserved. *
+ * Copyright 2006-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/incubator/scrolledittext.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/incubator/scrolledittext.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/incubator/scrolledittext.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -96,11 +96,11 @@
#pragma "methodName=init"
super.init();
}
- this._vs = new global[classname](this,
- { axis: "y",
- scrollattr: "pos",
- scrolltarget: this.inp,
- init: vsinit});
+ this._vs = new lz[classname](this,
+ { axis: "y",
+ scrollattr: "pos",
+ scrolltarget: this.inp,
+ init: vsinit});
}
</method>
@@ -127,7 +127,7 @@
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2006-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2006-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/incubator/test/test-edittext.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/incubator/test/test-edittext.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/incubator/test/test-edittext.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -57,7 +57,7 @@
width="100" height="75"
bgcolor="black" border="1" />
- <text>scrolledittext (new vscrollbar)</text>
+ <text>scrolledittext (new lz.vscrollbar)</text>
<scrolledittext id="et7" datapath="mydset2:/value/@text"
width="100" height="75"
bgcolor="black" border="1"
Modified: openlaszlo/branches/devildog/lps/components/incubator/test/tooltipmanager-test.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/incubator/test/tooltipmanager-test.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/incubator/test/tooltipmanager-test.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -42,9 +42,9 @@
<view bgcolor="black" x="${parent.width-1}" height="${parent.height}" width="1"/>
<handler name="ontext">
- theText.setAttribute("text",this.getAttribute("text"));
+ theText.setAttribute("text",this.text);
</handler>
- <text name="theText" resize="true" text="${parent.getAttribute('text')}" x="1" y="1"/>
+ <text name="theText" resize="true" text="${parent.text}" x="1" y="1"/>
</view>
</tooltipManager>
Modified: openlaszlo/branches/devildog/lps/components/incubator/tooltipmanager.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/incubator/tooltipmanager.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/incubator/tooltipmanager.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -34,7 +34,7 @@
<attribute name="messageMap" value="[]" />
<handler name="ondata"><![CDATA[
- var xpath = datapath.xpath+"/"+this.getAttribute("messages");
+ var xpath = datapath.xpath+"/"+this.messages;
var messages = datapath.xpathQuery(xpath);
var dict = [];
for(var i=0; i<messages.length; i++) {
@@ -48,9 +48,9 @@
</handler>
<handler name="oninit">
- var tooltip = this.getAttribute("tooltip_obj");
+ var tooltip = this.tooltip_obj");
if(tooltip == undefined || tooltip == null) {
- tooltip = new basetooltip(canvas);
+ tooltip = new lz.basetooltip(canvas);
this.setAttribute("tooltip_obj",tooltip);
}
tooltip.setAttribute("opacity",0);
@@ -65,12 +65,12 @@
<![CDATA[
{ //register mouse over delegate
var over_delegate = new LzDelegate(this,"doMouseover");
- this.getAttribute("onMouseOverDelegateArray").push(over_delegate);
+ this.onMouseOverDelegateArray.push(over_delegate);
over_delegate.register(component,"onmouseover");
}
{ //register mouse out delegate
var out_delegate = new LzDelegate(this,"doMouseout");
- this.getAttribute("onMouseOutDelegateArray").push(out_delegate);
+ this.onMouseOutDelegateArray.push(out_delegate);
out_delegate.register(component,"onmouseout");
}
//Debug.write("Component registered",component);
@@ -82,12 +82,12 @@
var timerDelegate = new LzDelegate( this, "showTooltip",component,"name");
this.setAttribute("__timerDelegate",timerDelegate);
this.setAttribute("__currentComponent",component);
- LzTimer.addTimer( timerDelegate, this.getAttribute("delay") );
+ LzTimer.addTimer( timerDelegate, this.delay );
</method>
<method name="doMouseout" args="component">
this.setAttribute("__currentComponent",[]);
- var timerDelegate = this.getAttribute("__timerDelegate");
+ var timerDelegate = this.__timerDelegate;
LzTimer.removeTimer(timerDelegate);
this.setAttribute("__timerDelegate",[]);
this.destroyTooltip(component);
@@ -95,15 +95,15 @@
<method name="showTooltip" >
<![CDATA[
- var component = this.getAttribute("__currentComponent");
+ var component = this.__currentComponent;
- var keyID = component.getAttribute(this.getAttribute("component_identifier"));
- var msg = this.getAttribute("messageMap")[keyID];
+ var keyID = component[this["component_identifier"]];
+ var msg = this.messageMap[keyID];
- var tooltip = this.getAttribute("tooltip_obj");
+ var tooltip = this.tooltip_obj;
- var override = component.getAttribute("tooltip");
+ var override = component.tooltip;
if(override == undefined || override == null) {
tooltip.setAttribute("text",msg);
} else {
@@ -111,7 +111,7 @@
}
- var tooltipWidth = tooltip.getAttribute("width");
+ var tooltipWidth = tooltip.width;
var xPos = canvas.getMouse("x");
var xDelta = xPos - tooltipWidth/2;
@@ -142,7 +142,7 @@
</method>
<method name="destroyTooltip" args="component">
- var tooltip = this.getAttribute("tooltip_obj");
+ var tooltip = this.tooltip_obj;
tooltip.setAttribute("opacity",0);
</method>
@@ -158,9 +158,9 @@
<view bgcolor="black" x="${parent.width-1}" height="${parent.height}" width="1"/>
<handler name="ontext">
- theText.setAttribute("text",this.getAttribute("text"));
+ theText.setAttribute("text",this.text);
</handler>
- <text name="theText" resize="true" text="${parent.getAttribute('text')}" x="1" y="1"/>
+ <text name="theText" resize="true" text="${parent.text}" x="1" y="1"/>
</class>
Modified: openlaszlo/branches/devildog/lps/components/incubator/uploader/example/test-fileuploadlist.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/incubator/uploader/example/test-fileuploadlist.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/incubator/uploader/example/test-fileuploadlist.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -1,5 +1,5 @@
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2007, 2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<canvas debug="true">
@@ -45,7 +45,7 @@
<button name="upload" text="Upload" x="430" enabled="false">
<handler name="onclick"><![CDATA[
for(var i=0; i<main.upview.subnodes.length;i++ ){
- if(main.upview.subnodes[i] instanceof fileuploadlist && main.upview.subnodes[i].selected==true){
+ if(main.upview.subnodes[i] instanceof lz.fileuploadlist && main.upview.subnodes[i].selected==true){
main.upview.subnodes[i].myFileUpload.upload('upload.jsp');
}
}
@@ -54,7 +54,7 @@
<method name="checkupload"><![CDATA[
this.setAttribute('enabled',false);
for(var i=0; i<main.upview.subnodes.length;i++ ){
- if(main.upview.subnodes[i] instanceof fileuploadlist){
+ if(main.upview.subnodes[i] instanceof lz.fileuploadlist){
if(main.upview.subnodes[i].myFileUpload.uploadenable==true){
this.setAttribute('enabled',true);
}
Modified: openlaszlo/branches/devildog/lps/components/incubator/uploader/example/test-multiplefileupload.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/incubator/uploader/example/test-multiplefileupload.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/incubator/uploader/example/test-multiplefileupload.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -29,7 +29,7 @@
Debug.write("---------- check select -----------");
var count=0;
for(var i=0; i<mul.content.subnodes.length;i++ ){
- if(mul.content.subnodes[i] instanceof fileuploadlist){
+ if(mul.content.subnodes[i] instanceof lz.fileuploadlist){
if(mul.content.subnodes[i].selected ==true){
count++;
mul.content.subnodes[i].onselect.sendEvent(mul.content.subnodes[i].myFileUpload.fileref.name+' has been selected in field #' + i );
@@ -51,7 +51,7 @@
mul.onincomplete.sendEvent();
var count=0;
for(var i=0; i<mul.content.subnodes.length;i++ ){
- if(mul.content.subnodes[i] instanceof fileuploadlist){
+ if(mul.content.subnodes[i] instanceof lz.fileuploadlist){
if(mul.content.subnodes[i].erroroccured ==true){
count++;
mul.content.subnodes[i].onerror.sendEvent(mul.content.subnodes[i].myFileUpload.fileref.name+' encountered an error in field #' + i);
Modified: openlaszlo/branches/devildog/lps/components/incubator/uploader/multiplefileupload.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/incubator/uploader/multiplefileupload.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/incubator/uploader/multiplefileupload.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -1,5 +1,5 @@
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2007, 2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<library>
@@ -15,7 +15,7 @@
<handler name="oninit"><;
+ var t = new lz['fileuploadlist'](content);
}
]]>
</handler>
@@ -34,7 +34,7 @@
<method name="checkError"><![CDATA[
this.setAttribute('erroroccured', false);
for(var i=0; i<this.content.subnodes.length;i++ ){
- if(this.content.subnodes[i] instanceof fileuploadlist){
+ if(this.content.subnodes[i] instanceof lz.fileuploadlist){
if(this.content.subnodes[i].erroroccured ==true){
this.setAttribute('erroroccured', true);
}
@@ -50,7 +50,7 @@
if(num>0)
if(num > numfields){
for(var i=numfields;i<num;i++){
- var t = new global['fileuploadlist'](content);
+ var t = new lz['fileuploadlist'](content);
}
this.setAttribute('numfields',num);
@@ -66,7 +66,7 @@
if(kill>count){
for(var i=0;i<kill-count;i++){
- var t = new global['fileuploadlist'](content);
+ var t = new lz['fileuploadlist'](content);
}
}else if(kill < count){
for(var i=numfields-kill-1;i>=numfields-count;i--){
@@ -95,7 +95,7 @@
<button name="upload" text="Upload" x="410" enabled="true">
<handler name="onclick"><![CDATA[
for(var i=0; i<parent.content.subnodes.length;i++){
- if(parent.content.subnodes[i] instanceof fileuploadlist && parent.content.subnodes[i].selected==true){
+ if(parent.content.subnodes[i] instanceof lz.fileuploadlist && parent.content.subnodes[i].selected==true){
parent.content.subnodes[i].myFileUpload.upload('upload.jsp');
}
}
Modified: openlaszlo/branches/devildog/lps/components/incubator/validators/basevalidator.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/incubator/validators/basevalidator.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/incubator/validators/basevalidator.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -29,7 +29,7 @@
<method name="addSubview" args="item">
super.addSubview(item);
- if(item instanceof edittext) {
+ if(item instanceof lz.edittext) {
new LzDelegate(this, "doValidation", item, "onkeyup");
new LzDelegate(this, "doValidation", item, "ontext");
this.innercompornent = item;
@@ -114,7 +114,7 @@
</class>
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2007, 2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/incubator/validators/validatingForm.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/incubator/validators/validatingForm.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/incubator/validators/validatingForm.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -50,8 +50,8 @@
</method>
<method name="addevents" args="obj">
- if(typeof obj.getAttribute("isformvalidator") != "undefined"){
- if(obj.getAttribute("isformvalidator") == true){
+ if(typeof obj.isformvalidator != "undefined"){
+ if(obj.isformvalidator == true){
new LzDelegate( this, "iserrorchanged", obj, "oniserror");
this.validators.push(obj);
}
Modified: openlaszlo/branches/devildog/lps/components/lz/datepicker.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/lz/datepicker.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/lz/datepicker.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -202,9 +202,9 @@
<!--- @keywords private -->
<attribute name="firstDaySelected" type="boolean" value="false"/>
<!--- @keywords private -->
- <attribute name="weekclass" value="datepickerweek"/>
+ <attribute name="weekclass" value="lz.datepickerweek"/>
<!--- @keywords private -->
- <attribute name="dayclass" value="datepickerday"/>
+ <attribute name="dayclass" value="lz.datepickerday"/>
<!--- @keywords public -->
<attribute name="allowdrag" type="boolean" value="true"/>
@@ -461,7 +461,7 @@
<method name="addYears" args="start,end">
<![CDATA[
for( var i = start ; i <= end ; i++ ) {
- new datepickerlistitem( this, { text : i } );
+ new lz.datepickerlistitem( this, { text : i } );
}
]]>
</method>
@@ -540,7 +540,7 @@
</class>
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/lz/grid.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/lz/grid.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/lz/grid.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -26,7 +26,7 @@
value="placement : 'hcontent';axis:'x' ; spacing:-1"/>
<!--- @keywords private -->
- <attribute name="_columnclass" value="gridtext" />
+ <attribute name="_columnclass" value="lz.gridtext" />
<!--- @keywords private -->
<scrollbar placement="content" name="_scrx"/>
@@ -83,7 +83,7 @@
</class>
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/lz/gridtext.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/lz/gridtext.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/lz/gridtext.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -65,7 +65,7 @@
<text visible="${!parent.editing}" width="${parent.width}"
resize="false"
- y="$once{ parent.height /2 - this.height/2}"
+ y="${ parent.height /2 - this.height/2}"
fgcolor="${ parent.immediateparent.selected ?
classroot._textselectedcolor:
(parent.immediateparent.highlighted ?
Modified: openlaszlo/branches/devildog/lps/components/lz/list.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/lz/list.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/lz/list.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -120,7 +120,7 @@
Debug.write("scrollbarclassname undefined", this);
}
}
- this._sbar = new global[classname](this, { stepsize: "20" });
+ this._sbar = new lz[classname](this, { stepsize: "20" });
}
</method>
@@ -363,7 +363,7 @@
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/lz/menu.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/lz/menu.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/lz/menu.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -508,7 +508,7 @@
// of the menubutton by default ( the floating list is
// canvas-aware and will try to display itself below the menubutton ).
// if this does not work, then it will try above it.
- this.flist = new menufloatinglist(this,
+ this.flist = new lz.menufloatinglist(this,
{ attach:'bottom',
attachoffset:-2,
width:w,
@@ -518,7 +518,7 @@
// menu's parent is a menuitem so attach the floatinglist to
// the right ( again canvas-aware will try right but display left
// if necessary )
- this.flist = new menufloatinglist(this,
+ this.flist = new lz.menufloatinglist(this,
{ attach:'right',
width:w,
issubmenu:true,
@@ -527,7 +527,7 @@
// menu's parent is some other type of view so attach the
// floatinglist to the value of 'attach' attribute
var atch = this.attach;
- this.flist = new menufloatinglist(this,
+ this.flist = new lz.menufloatinglist(this,
{ attach:atch,
width:w,
shadowcrn:1 }, this._menuitems);
@@ -541,7 +541,7 @@
// Since the parent is a menubar ...
// Create a menubutton and have the menu keep a reference to it.
- this._menubutton = new menubutton( parent,{text:this.text}, null, false);
+ this._menubutton = new lz.menubutton( parent,{text:this.text}, null, false);
//Likewise, have the menubutton keep a reference to this menu
this._menubutton._menuref = this;
@@ -561,7 +561,7 @@
} else if ( parent instanceof lz.menuitem ) {
// insert an arrow into the target
- new menuarrow( this._flisttarget, { name:'_menuarrow' } );
+ new lz.menuarrow( this._flisttarget, { name:'_menuarrow' } );
// have the menuitem keep a reference to its submenu
this.parent._submenu = this;
@@ -797,7 +797,7 @@
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/lzunit/lzunit.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/lzunit/lzunit.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/lzunit/lzunit.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -295,7 +295,7 @@
-->
<method name="setResult" args="theTestResult">
if (typeof(theTestResult) == "undefined") {
- theTestResult = new TestResult();
+ theTestResult = new lz.TestResult();
} else {
this.result = theTestResult;
}
Modified: openlaszlo/branches/devildog/lps/components/queens-charts/barchart.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/queens-charts/barchart.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/queens-charts/barchart.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -351,16 +351,16 @@
<![CDATA[
var killviews = 0;
for(var i = 0; i <= this.subviews.length; i++){
- if(this.subviews[i] instanceof databar ||
- this.subviews[i] instanceof label){
+ if(this.subviews[i] instanceof lz.databar ||
+ this.subviews[i] instanceof lz.label){
killviews++;
}
}
var remainviews = this.subviews.length - killviews;
while(this.subviews.length != remainviews){
for(var j = 0; j <= this.subviews.length; j++){
- if(this.subviews[j] instanceof databar ||
- this.subviews[j] instanceof label){
+ if(this.subviews[j] instanceof lz.databar ||
+ this.subviews[j] instanceof lz.label){
this.subviews[j].destroy();
}
}
@@ -411,7 +411,7 @@
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
-<!-- @LZX_VERSION@ -->
\ No newline at end of file
+<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/queens-charts/linechart.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/queens-charts/linechart.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/queens-charts/linechart.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -364,7 +364,7 @@
var labelheight = 15;
if(ld.labeldata[i] != null){
var ltext = ld.labeldata[i];
- new label(dataclip.datapane, {height:labelheight,
+ new lz.label(dataclip.datapane, {height:labelheight,
x:xposit, labelnumber:i, y:yposit - labelheight - 3,
bgcolor:lbcolor, name:"label"+j+i, fadein:false,
ltext:ltext, labelset:j, ltextsize:ltxtsize,
@@ -474,14 +474,14 @@
<![CDATA[
var killviews = 0;
for(var i = 0; i <= this.subviews.length; i++){
- if(this.subviews[i] instanceof label){
+ if(this.subviews[i] instanceof lz.label){
killviews++;
}
}
var remainviews = this.subviews.length - killviews;
while(this.subviews.length != remainviews){
for(var j = 0; j <= this.subviews.length; j++){
- if(this.subviews[j] instanceof label){
+ if(this.subviews[j] instanceof lz.label){
this.subviews[j].destroy();
}
}
@@ -576,7 +576,7 @@
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
-<!-- @LZX_VERSION@ -->
\ No newline at end of file
+<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/queens-charts/piechart.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/queens-charts/piechart.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/queens-charts/piechart.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -95,8 +95,8 @@
} else {
popac = subnodes[dnode].subviews[j].dataopacity;
}
- new wrappinglayout(this.datapane, {spacing:this.piespacing});
- new wholepie(this.datapane, {name:'pie'+j, width:piespacewidth, height:piespaceheight,
+ new lz.wrappinglayout(this.datapane, {spacing:this.piespacing});
+ new lz.wholepie(this.datapane, {name:'pie'+j, width:piespacewidth, height:piespaceheight,
pienumber:j, allpies:snum, pievalue:pievalue,
piecevalues:subnodes[dnode].subviews[j].xdata,
colorvalues:bcolor, borderwidths:borderw, opacvalues:popac,
@@ -149,7 +149,7 @@
<method name="findData">
<![CDATA[
for(var i = 0; i <= this.subnodes.length; i++){
- if(subnodes[i] instanceof chartdata){
+ if(subnodes[i] instanceof lz.chartdata){
return i;
}
}
@@ -205,7 +205,7 @@
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
-<!-- @LZX_VERSION@ -->
\ No newline at end of file
+<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/queens-charts/shared/barchartbacking.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/queens-charts/shared/barchartbacking.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/queens-charts/shared/barchartbacking.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -253,7 +253,7 @@
} else {
offsetter = Math.abs(parent.minimum % parent.hgridspacing) * -1;
}
- new ticklabel(this.vtickclip.vtickpane,
+ new lz.ticklabel(this.vtickclip.vtickpane,
{y:this.height + parent.vticklength + 2,
x:maxoffset, charttype:'bar',
ltext:parent.minimum + (parent.hgridspacing * i) + offsetter,
@@ -350,7 +350,7 @@
} else {
offsetter = Math.abs(parent.minimum % parent.hgridspacing) * -1;
}
- new ticklabel(this.htickclip.htickpane,
+ new lz.ticklabel(this.htickclip.htickpane,
{x:this.htickclip.width,
y:this.height + maxoffset,
ltext:parent.minimum + (parent.hgridspacing * i) + offsetter,
@@ -470,7 +470,7 @@
</class>
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
-<!-- @LZX_VERSION@ -->
\ No newline at end of file
+<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/queens-charts/shared/basechart.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/queens-charts/shared/basechart.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/queens-charts/shared/basechart.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -269,7 +269,7 @@
<method name="findData">
<![CDATA[
for(var i = 0; i <= this.subnodes.length; i++){
- if(subnodes[i] instanceof chartdata){
+ if(subnodes[i] instanceof lz.chartdata){
return i;
}
}
@@ -280,7 +280,7 @@
<method name="findLegend">
<![CDATA[
for(var i = 0; i <= this.subnodes.length; i++){
- if(subnodes[i] instanceof chartlegend){
+ if(subnodes[i] instanceof lz.chartlegend){
return i;
}
}
@@ -331,7 +331,7 @@
this.setAttribute('minimum', this.lowesty);
this.datazoom.setAttribute('origmaximum', this.highesty);
this.datazoom.setAttribute('origminimum', this.lowesty);
- if(typeof linechart != 'undefined' && this instanceof linechart){
+ if(typeof linechart != 'undefined' && this instanceof lz.linechart){
this.setAttribute('altmaximum', this.highestx);
this.setAttribute('altminimum', this.lowestx);
this.datazoom.setAttribute('origaltmaximum', this.highestx);
@@ -351,7 +351,7 @@
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
-<!-- @LZX_VERSION@ -->
\ No newline at end of file
+<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/queens-charts/shared/basechartbacking.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/queens-charts/shared/basechartbacking.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/queens-charts/shared/basechartbacking.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -70,14 +70,14 @@
<![CDATA[
var killviews = 0;
for(var i = 0; i <= this.subviews.length; i++){
- if(this.subviews[i] instanceof ticklabel){
+ if(this.subviews[i] instanceof lz.ticklabel){
killviews++;
}
}
var remainviews = this.subviews.length - killviews;
while(this.subviews.length != remainviews){
for(var j = 0; j <= this.subviews.length; j++){
- if(this.subviews[j] instanceof ticklabel){
+ if(this.subviews[j] instanceof lz.ticklabel){
this.subviews[j].destroy();
}
}
@@ -108,14 +108,14 @@
<![CDATA[
var killviews = 0;
for(var i = 0; i <= this.subviews.length; i++){
- if(this.subviews[i] instanceof ticklabel){
+ if(this.subviews[i] instanceof lz.ticklabel){
killviews++;
}
}
var remainviews = this.subviews.length - killviews;
while(this.subviews.length != remainviews){
for(var j = 0; j <= this.subviews.length; j++){
- if(this.subviews[j] instanceof ticklabel){
+ if(this.subviews[j] instanceof lz.ticklabel){
this.subviews[j].destroy();
}
}
@@ -271,7 +271,7 @@
</class>
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
-<!-- @LZX_VERSION@ -->
\ No newline at end of file
+<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/queens-charts/shared/dataseries.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/queens-charts/shared/dataseries.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/queens-charts/shared/dataseries.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -301,7 +301,7 @@
var siblength = parent.subnodes.length;
var sibnum = 0;
for(var i = 0; i <= siblength; i++){
- if(parent.subnodes[i] instanceof dataseries){
+ if(parent.subnodes[i] instanceof lz.dataseries){
sibnum++;
}
}
@@ -334,7 +334,7 @@
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
-<!-- @LZX_VERSION@ -->
\ No newline at end of file
+<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/queens-charts/shared/legend.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/queens-charts/shared/legend.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/queens-charts/shared/legend.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -45,7 +45,7 @@
is used on a piechart. -->
<attribute name="charttype" type="string"
value="$once{typeof linechart != 'undefined' ?
- (parent instanceof linechart ? 'line' : null) : null}"/>
+ (parent instanceof lz.linechart ? 'line' : null) : null}"/>
<!--- Piechart-specific attributes. Piechart legends
are generated dynamically, since it's possible there
@@ -132,7 +132,7 @@
var litemwidth = parent.expanded ? 80 : 30;
var litemheight = parent.expanded ? 14 : 8;
if(this.ltitle != null){
- new legendtitle(this, {name:'legendtitle', ltitle:this.ltitle, tposit:this.titleposition,
+ new lz.legendtitle(this, {name:'legendtitle', ltitle:this.ltitle, tposit:this.titleposition,
ttsize:(parent.expanded ? this.titletextsize : 10), tcolor:this.titlecolor});
}
this.setWidth(litemwidth * numcols);
@@ -153,7 +153,7 @@
var litemwidth = parent.expanded ? 80 : 30;
var litemheight = parent.expanded ? 14 : 8;
if(this.ltitle != null){
- new legendtitle(this, {name:'legendtitle', ltitle:this.ltitle, tposit:this.titleposition,
+ new lz.legendtitle(this, {name:'legendtitle', ltitle:this.ltitle, tposit:this.titleposition,
ttsize:(parent.expanded ? this.titletextsize : 10), tcolor:this.titlecolor});
}
this.setWidth(litemwidth * numcols);
@@ -185,7 +185,7 @@
var numrows = Math.ceil(this.itemnums / numcols);
}
if(this.ltitle != null){
- new legendtitle(this, {name:'legendtitle', ltitle:this.ltitle, tposit:this.titleposition,
+ new lz.legendtitle(this, {name:'legendtitle', ltitle:this.ltitle, tposit:this.titleposition,
ttsize:(parent.expanded ? this.titletextsize : 10), tcolor:this.titlecolor});
}
var litemwidth = (this.width / numcols);
@@ -194,7 +194,7 @@
for(var i = 0; i < this.piepieces.length; i++){
var pclink = this.piepieces[i];
- new legenditem(this, {itemvalue:parent[pclink]['piecevalue'],
+ new lz.legenditem(this, {itemvalue:parent[pclink]['piecevalue'],
lpiece:this.piepieces[i], width:litemwidth,
hlcolor:(this.hlcolor == null ? this.backcolor : this.hlcolor),
height:litemheight, iconcolor:this.piececolors[i],
@@ -256,7 +256,7 @@
var litemwidth = (this.width / numcols);
var litemheight = (this.height / numrows);
if(this.ltitle != null){
- new legendtitle(this, {name:'legendtitle', ltitle:this.ltitle, tposit:this.titleposition,
+ new lz.legendtitle(this, {name:'legendtitle', ltitle:this.ltitle, tposit:this.titleposition,
ttsize:this.titletextsize, tcolor:this.titlecolor});
}
@@ -286,7 +286,7 @@
//itemlabel = ll.legenddatapath;
}
if(itemlabel != null){
- new legenditem(this, {itemvalue:itemlabel,
+ new lz.legenditem(this, {itemvalue:itemlabel,
width:litemwidth, height:litemheight, dlink:ll,
hlcolor:(this.hlcolor == null ? this.backcolor : this.hlcolor),
height:this.height, iconcolor:iconcolor, textcolor:this.textcolor,
@@ -302,7 +302,7 @@
var litemwidth = 80;
var litemheight = 14;
if(this.ltitle != null){
- new legendtitle(this, {name:'legendtitle', ltitle:this.ltitle, tposit:this.titleposition,
+ new lz.legendtitle(this, {name:'legendtitle', ltitle:this.ltitle, tposit:this.titleposition,
ttsize:this.titletextsize, tcolor:this.titlecolor});
}
this.setWidth(litemwidth * numcols);
@@ -334,7 +334,7 @@
//itemlabel = ll.legenddatapath;
}
if(itemlabel != null){
- new legenditem(this, {itemvalue:itemlabel,
+ new lz.legenditem(this, {itemvalue:itemlabel,
width:litemwidth, height:litemheight, dlink:ll,
hlcolor:(this.hlcolor == null ? this.backcolor : this.hlcolor),
height:this.height, iconcolor:iconcolor, textcolor:this.textcolor,
@@ -350,7 +350,7 @@
var litemwidth = 80;
var litemheight = 14;
if(this.ltitle != null){
- new legendtitle(this, {name:'legendtitle', ltitle:this.ltitle, tposit:this.titleposition,
+ new lz.legendtitle(this, {name:'legendtitle', ltitle:this.ltitle, tposit:this.titleposition,
ttsize:this.titletextsize, tcolor:this.titlecolor});
}
this.setWidth(litemwidth * numcols);
@@ -382,7 +382,7 @@
//itemlabel = ll.legenddatapath;
}
if(itemlabel != null){
- new legenditem(this, {itemvalue:itemlabel,
+ new lz.legenditem(this, {itemvalue:itemlabel,
width:litemwidth, height:litemheight, dlink:ll,
hlcolor:(this.hlcolor == null ? this.backcolor : this.hlcolor),
height:this.height, iconcolor:iconcolor, textcolor:this.textcolor,
@@ -537,7 +537,7 @@
</class>
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
-<!-- @LZX_VERSION@ -->
\ No newline at end of file
+<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/queens-charts/shared/linechartbacking.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/queens-charts/shared/linechartbacking.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/queens-charts/shared/linechartbacking.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -209,7 +209,7 @@
} else {
offsetter = Math.abs(parent.altminimum % parent.vgridspacing) * -1;
}
- new ticklabel(this.vtickclip.vtickpane,
+ new lz.ticklabel(this.vtickclip.vtickpane,
{y:this.height + parent.vticklength + 2,
x:vlinesetter + maxoffset,
ltext:parent.altminimum + (parent.vgridspacing * i) + offsetter,
@@ -262,7 +262,7 @@
} else {
offsetter = Math.abs(parent.minimum % parent.hgridspacing) * -1;
}
- new ticklabel(this.htickclip.htickpane,
+ new lz.ticklabel(this.htickclip.htickpane,
{x:this.htickclip.width,
y:this.height + maxoffset,
ltext:parent.minimum + (parent.hgridspacing * i) + offsetter,
@@ -342,7 +342,7 @@
</class>
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
-<!-- @LZX_VERSION@ -->
\ No newline at end of file
+<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/queens-charts/shared/wholepie.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/queens-charts/shared/wholepie.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/queens-charts/shared/wholepie.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -232,7 +232,7 @@
//find wedge that contains this angle if any
for (var i = 0; i < piecelist.length; i++) {
if(piecelist[i].name != 'bgcircle' && piecelist[i].name != 'legend' &&
- (piecelist[i] instanceof label != true) &&
+ (piecelist[i] instanceof lz.label != true) &&
typeof piecelist[i].startpercent != 'undefined'){
var startpos = (2 * Math.PI) * piecelist[i].startpercent;
var endpos = startpos + ((2 * Math.PI) * piecelist[i].piecepercent);
@@ -333,7 +333,7 @@
}
}
if(this.drawbg != null){
- new backcircle(this, {name:'bgcircle', drawbg:this.drawbg,
+ new lz.backcircle(this, {name:'bgcircle', drawbg:this.drawbg,
drawbgborder:this.drawbgborder, bgborderwidth:this.bgborderwidth,
ctrx:ctrx, ctry:ctry, pieradius:pieradius})
}
@@ -348,7 +348,7 @@
var piecestart = (totaltonow / this.pievalue);
}
var adjradius = pieradius + (pieradius * (this.corrrad[k] / 100));
- new piepiece(this, {centerx:ctrx, centery:ctry, piececolor:this.corrcolors[k],
+ new lz.piepiece(this, {centerx:ctrx, centery:ctry, piececolor:this.corrcolors[k],
bordercolor:this.corrborder[k], pieceradius:adjradius, piecepercent:pieceperc, startpercent:piecestart,
borderwidth:this.corrbwidth[k], pieceopacity:this.corropac[k], explode:this.explode, name:'pp'+k,
piecevalue:corrvalues[k]});
@@ -358,7 +358,7 @@
var eposit = sposit + ((2 * Math.PI) * (pieceperc / 2));
var sx = ctrx - (adjradius * .7) * Math.cos(((2 * Math.PI) / 2) - eposit);
var sy = ctry - (adjradius * .7) * Math.sin(eposit);
- new label(this, {height:16,
+ new lz.label(this, {height:16,
y:sy, x:sx, bgcolor:this.corrlabelcolor[k],
ltext:this.corrlabel[k], labelnumber:k,
ltextsize:(this.expanded ? this.corrlabeltsize[k] : 10),
@@ -370,7 +370,7 @@
// Bring labels to the front, since they might've gotten partially
// covered by pie slices.
for(var j = 0; j <= this.subviews.length; j++){
- if(this.subviews[j] instanceof label){
+ if(this.subviews[j] instanceof lz.label){
this.subviews[j].bringToFront();
}
}
@@ -382,12 +382,12 @@
var ppccount = 0;
for(var i = 0; i <= this.subviews.length; i++){
if(typeof this.subviews[i] != 'undefined' && this.subviews[i].name != 'bgcircle' &&
- (this.subviews[i] instanceof label == false)){
+ (this.subviews[i] instanceof lz.label == false)){
ppc[ppccount] = this.subviews[i].name;
ppccount++;
}
}
- new chartlegend(this, {border:this.lborder, borderwidth:this.lborderwidth, backcolor:this.lbgcolor,
+ new lz.chartlegend(this, {border:this.lborder, borderwidth:this.lborderwidth, backcolor:this.lbgcolor,
hlcolor:this.lhlcolor, itemnums:litems, charttype:'pie', posit:this.legend, piepieces:ppc,
ltitle:this.ltitle, pieradius:pieradius, centerx:ctrx, centery:ctry, piececolors:corrcolors,
legendvalues:this.corrlegend, legendx:this.legendx, legendy:this.legendy,
@@ -416,7 +416,7 @@
lx = (ctrx + pieradius) + (this.width - ctrx - pieradius - lwid) / 2;
lholder = 'manualright';
}
- new chartlegend(this, {border:this.lborder, borderwidth:this.lborderwidth, backcolor:this.lbgcolor,
+ new lz.chartlegend(this, {border:this.lborder, borderwidth:this.lborderwidth, backcolor:this.lbgcolor,
itemnums:0, charttype:'pie', posit:lholder, ltitle:this.ltitle, pieradius:pieradius,
centerx:ctrx, centery:ctry, legendvalues:this.corrlegend, legendx:lx,
legendy:ly, legendwidth:lwid, legendheight:lhigh, titleposition:this.legendtitleposition})
@@ -448,7 +448,7 @@
</class>
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
-<!-- @LZX_VERSION@ -->
\ No newline at end of file
+<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/rpc/rpc.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/rpc/rpc.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/rpc/rpc.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -146,7 +146,7 @@
for (var k in this.subnodes) {
var c = this.subnodes[k];
- if ( ! (c instanceof remotecall) ) continue;
+ if ( ! (c instanceof lz.remotecall) ) continue;
// funcname is required
var fn = c['funcname'];
@@ -342,7 +342,7 @@
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/rpc/xmlrpc.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/rpc/xmlrpc.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/rpc/xmlrpc.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -26,7 +26,7 @@
if (this.proxy == null) this.proxy = {};
var call = this.subnodes[cn];
- if ( ! (call instanceof remotecall) ) continue;
+ if ( ! (call instanceof lz.remotecall) ) continue;
var method = call.funcname;
// create proxy for a particular funcname only once.
@@ -66,7 +66,7 @@
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/devildog/lps/components/utils/diagnostic/inspector/inspector.lzx
===================================================================
--- openlaszlo/branches/devildog/lps/components/utils/diagnostic/inspector/inspector.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/components/utils/diagnostic/inspector/inspector.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -139,7 +139,7 @@
show = false;
}
}
- if (show) new item(this.children, {reference: nodes[i], root:this.root});
+ if (show) new lz.item(this.children, {reference: nodes[i], root:this.root});
}
setAttribute('open', true);
} else {
Modified: openlaszlo/branches/devildog/lps/includes/source/iframemanager.js
===================================================================
--- openlaszlo/branches/devildog/lps/includes/source/iframemanager.js 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/lps/includes/source/iframemanager.js 2008-03-19 15:01:29 UTC (rev 8315)
@@ -19,7 +19,7 @@
if (name != "") Lz.__setAttr(i, 'name', name);
this.__namebyid[id] = name;
- Lz.__setAttr(iframe, 'src', 'javascript:""');
+ Lz.__setAttr(i, 'src', 'javascript:""');
if (appendto == null || appendto == "undefined") {
appendto = document.body;
Modified: openlaszlo/branches/devildog/test/performance/typeof-instance-of.lzx
===================================================================
--- openlaszlo/branches/devildog/test/performance/typeof-instance-of.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/test/performance/typeof-instance-of.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -61,11 +61,11 @@
}
(new Measurement({'instanceof': instanceOf,
+ 'instanceof that fails': instanceOfFail,
'typeof': typeOf,
'typeof with instanceof': typeOfInstanceOf,
'property lookup': propertyLookup,
'typeof with instanceof with short circuit': typeOfInstanceOfFail,
- 'instanceof that fails': instanceOfFail,
'typeof function': typeOfFunction,
'instanceof function': instanceOfFunction,
'empty': empty})).run();
Modified: openlaszlo/branches/devildog/test/smoke/all_setters.lzl
===================================================================
--- openlaszlo/branches/devildog/test/smoke/all_setters.lzl 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/test/smoke/all_setters.lzl 2008-03-19 15:01:29 UTC (rev 8315)
@@ -35,55 +35,55 @@
// tester.setAttribute("yscale",1);
<!-- do all the tests -->
- //assertEquals(tester.getAttribute("clip"), tester.clip);
- assertEquals(tester.getAttribute("x"), tester.x);
- assertEquals(tester.getAttribute("y"), tester.y);
- //assertEquals(tester.getAttribute("width"), tester.width);
- //assertEquals(tester.getAttribute("height"), tester.height);
- assertEquals(tester.getAttribute("rotation"), tester.rotation);
- assertEquals(tester.getAttribute("opacity"), tester.opacity);
- //assertEquals(tester.getAttribute("alpha"), tester.alpha);
- assertEquals(tester.getAttribute("visible"), tester.visible);
- //assertEquals(tester.getAttribute("align"), tester.align);
- //assertEquals(tester.getAttribute("valign"), tester.valign);
- //assertEquals(tester.getAttribute("source"), tester.source);
- assertEquals(tester.getAttribute("bgcolor"), tester.bgcolor);
- //assertEquals(tester.getAttribute("resource"), tester.resource);
- //assertEquals(tester.getAttribute("clickable"), tester.clickable);
- //assertEquals(tester.getAttribute("pixellock"), tester.pixellock);
- //assertEquals(tester.getAttribute("cursor"), tester.cursor);
- //assertEquals(tester.getAttribute("fgcolor"), tester.fgcolor);
- //assertEquals(tester.getAttribute("font"), tester.font);
- //assertEquals(tester.getAttribute("stretches"), tester.stretches);
- assertEquals(tester.getAttribute("play"), tester.play);
- //assertEquals(tester.getAttribute("selected"), tester.selected);
+ //assertEquals(tester["clip"], tester.clip);
+ assertEquals(tester["x"], tester.x);
+ assertEquals(tester["y"], tester.y);
+ //assertEquals(tester["width"], tester.width);
+ //assertEquals(tester["height"], tester.height);
+ assertEquals(tester["rotation"], tester.rotation);
+ assertEquals(tester["opacity"], tester.opacity);
+ //assertEquals(tester["alpha"], tester.alpha);
+ assertEquals(tester["visible"], tester.visible);
+ //assertEquals(tester["align"], tester.align);
+ //assertEquals(tester["valign"], tester.valign);
+ //assertEquals(tester["source"], tester.source);
+ assertEquals(tester["bgcolor"], tester.bgcolor);
+ //assertEquals(tester["resource"], tester.resource);
+ //assertEquals(tester["clickable"], tester.clickable);
+ //assertEquals(tester["pixellock"], tester.pixellock);
+ //assertEquals(tester["cursor"], tester.cursor);
+ //assertEquals(tester["fgcolor"], tester.fgcolor);
+ //assertEquals(tester["font"], tester.font);
+ //assertEquals(tester["stretches"], tester.stretches);
+ assertEquals(tester["play"], tester.play);
+ //assertEquals(tester["selected"], tester.selected);
<!-- do it again with hardcoding -->
- //assertEquals(1, tester.getAttribute("clip"),"clip");
- assertEquals(1, tester.getAttribute("x"),"x");
- assertEquals(1, tester.getAttribute("y"),"y");
- // assertEquals(1, tester.getAttribute("width"),"width");
- // assertEquals(1, tester.getAttribute("height"),"height");
- assertEquals(1, tester.getAttribute("rotation"),"rotation");
- assertEquals(1, tester.getAttribute("opacity"),"opacity");
- // assertEquals(1, tester.getAttribute("alpha"),"alpha");
- assertEquals(1, tester.getAttribute("visible"),"visible");
- // assertEquals(1, tester.getAttribute("align"),"align");
- // assertEquals(1, tester.getAttribute("valign"),"valign");
- // assertEquals(1, tester.getAttribute("source"),"source");
- assertEquals(1, tester.getAttribute("bgcolor"),"bgcolor");
- // assertEquals(1, tester.getAttribute("resource"),"resource");
- // assertEquals(true, tester.getAttribute("clickable"),"clickable");
- // assertEquals(1, tester.getAttribute("pixellock"),"pixellock");
- // assertEquals(1, tester.getAttribute("cursor"),"cursor");
- // assertEquals(1, tester.getAttribute("fgcolor"),"fgcolor");
- // assertEquals(1, tester.getAttribute("font"),"font");
- // assertEquals(true, tester.getAttribute("stretches"),"stretches");
- // assertEquals(1, tester.getAttribute("play"),"play");
- // assertEquals(1, tester.getAttribute("selected"),"selected");
- // assertEquals(1, tester.getAttribute("xscale"),"xscale");
- // assertEquals(1, tester.getAttribute("yscale"),"yscale");
+ //assertEquals(1, tester["clip"],"clip");
+ assertEquals(1, tester["x"],"x");
+ assertEquals(1, tester["y"],"y");
+ // assertEquals(1, tester["width"],"width");
+ // assertEquals(1, tester["height"],"height");
+ assertEquals(1, tester["rotation"],"rotation");
+ assertEquals(1, tester["opacity"],"opacity");
+ // assertEquals(1, tester["alpha"],"alpha");
+ assertEquals(1, tester["visible"],"visible");
+ // assertEquals(1, tester["align"],"align");
+ // assertEquals(1, tester["valign"],"valign");
+ // assertEquals(1, tester["source"],"source");
+ assertEquals(1, tester["bgcolor"],"bgcolor");
+ // assertEquals(1, tester["resource"],"resource");
+ // assertEquals(true, tester["clickable"],"clickable");
+ // assertEquals(1, tester["pixellock"],"pixellock");
+ // assertEquals(1, tester["cursor"],"cursor");
+ // assertEquals(1, tester["fgcolor"],"fgcolor");
+ // assertEquals(1, tester["font"],"font");
+ // assertEquals(true, tester["stretches"],"stretches");
+ // assertEquals(1, tester["play"],"play");
+ // assertEquals(1, tester["selected"],"selected");
+ // assertEquals(1, tester["xscale"],"xscale");
+ // assertEquals(1, tester["yscale"],"yscale");
</method>
</class>
@@ -103,29 +103,29 @@
// tester.setAttribute("selectable",1);
tester.setAttribute("bgcolor",1);
- //assertEquals(tester.getAttribute("label"),tester.label);
- assertEquals(tester.getAttribute("text"),tester.text);
- //assertEquals(tester.getAttribute("fgcolor"),tester.fgcolor);
- //assertEquals(tester.getAttribute("font"),tester.font);
- assertEquals(tester.getAttribute("fontsize"),tester.fontsize);
- assertEquals(tester.getAttribute("fontstyle"),tester.fontstyle);
- assertEquals(tester.getAttribute("resize"),tester.resize);
- assertEquals(tester.getAttribute("yscroll"),tester.yscroll);
- assertEquals(tester.getAttribute("xscroll"),tester.xscroll);
- //assertEquals(tester.getAttribute("selectable"),tester.selectable);
- assertEquals(tester.getAttribute("bgcolor"),tester.bgcolor);
+ //assertEquals(tester["label"],tester.label);
+ assertEquals(tester["text"],tester.text);
+ //assertEquals(tester["fgcolor"],tester.fgcolor);
+ //assertEquals(tester["font"],tester.font);
+ assertEquals(tester["fontsize"],tester.fontsize);
+ assertEquals(tester["fontstyle"],tester.fontstyle);
+ assertEquals(tester["resize"],tester.resize);
+ assertEquals(tester["yscroll"],tester.yscroll);
+ assertEquals(tester["xscroll"],tester.xscroll);
+ //assertEquals(tester["selectable"],tester.selectable);
+ assertEquals(tester["bgcolor"],tester.bgcolor);
- // assertEquals(1, tester.getAttribute("label"),"label");
- // assertEquals("newText", mdtester.getAttribute("text"),"text");
- // assertEquals(1, tester.getAttribute("fgcolor"),"fgcolor");
- // assertEquals(1, tester.getAttribute("font"),"font");
- // assertEquals(1, tester.getAttribute("fontsize"),"fontsize");
- // assertEquals("bold", tester.getAttribute("fontstyle"),"fontstyle");
- // assertEquals(1, tester.getAttribute("resize"),"resize");
- // assertEquals(1, tester.getAttribute("yscroll"),"yscroll");
- // assertEquals(1, tester.getAttribute("xscroll"),"xscroll");
- // assertEquals(1, tester.getAttribute("selectable"),"selectable");
- assertEquals(1, tester.getAttribute("bgcolor"),"bgcolor");
+ // assertEquals(1, tester["label"],"label");
+ // assertEquals("newText", mdtester["text"],"text");
+ // assertEquals(1, tester["fgcolor"],"fgcolor");
+ // assertEquals(1, tester["font"],"font");
+ // assertEquals(1, tester["fontsize"],"fontsize");
+ // assertEquals("bold", tester["fontstyle"],"fontstyle");
+ // assertEquals(1, tester["resize"],"resize");
+ // assertEquals(1, tester["yscroll"],"yscroll");
+ // assertEquals(1, tester["xscroll"],"xscroll");
+ // assertEquals(1, tester["selectable"],"selectable");
+ assertEquals(1, tester["bgcolor"],"bgcolor");
</method>
</class>
</library>
Modified: openlaszlo/branches/devildog/test/smoke/getters-setters.lzl
===================================================================
--- openlaszlo/branches/devildog/test/smoke/getters-setters.lzl 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/test/smoke/getters-setters.lzl 2008-03-19 15:01:29 UTC (rev 8315)
@@ -4,7 +4,7 @@
.setters for those attributes.
-->
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2006 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2006, 2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
@@ -32,10 +32,10 @@
</view>
<method name="testGettersOnView">
- assertEquals(tester.getAttribute("x"), tester.x);
- assertEquals(tester.getAttribute("y"), tester.y);
- assertEquals(tester.getAttribute("width"), tester.width);
- assertEquals(tester.getAttribute("height"), tester.height);
+ assertEquals(tester["x"], tester.x);
+ assertEquals(tester["y"], tester.y);
+ assertEquals(tester["width"], tester.width);
+ assertEquals(tester["height"], tester.height);
</method>
<method name="testSettersOnView">
@@ -43,10 +43,10 @@
tester.setAttribute("y", tester.y+152);
tester.setAttribute('height', 314);
tester.setAttribute("width", 159);
- assertEquals(tester.getAttribute("x"), tester.x);
- assertEquals(tester.getAttribute("y"), tester.y);
- assertEquals(tester.getAttribute("width"), tester.width);
- assertEquals(tester.getAttribute("height"), tester.height);
+ assertEquals(tester["x"], tester.x);
+ assertEquals(tester["y"], tester.y);
+ assertEquals(tester["width"], tester.width);
+ assertEquals(tester["height"], tester.height);
</method>
</class>
Modified: openlaszlo/branches/devildog/test/smoke/regression.lzl
===================================================================
--- openlaszlo/branches/devildog/test/smoke/regression.lzl 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/test/smoke/regression.lzl 2008-03-19 15:01:29 UTC (rev 8315)
@@ -144,7 +144,7 @@
<method name="testInitOrder">
this.names = [ 'a' , 'b' , 'c' , 'd' , 'e' ]
for ( var i =0; i < names.length; i++ ){
- new slowinit( this, { name : names[ i ] } );
+ new lz.slowinit( this, { name : names[ i ] } );
}
</method>
<method name="tearDown">
@@ -276,7 +276,7 @@
<dataset name="bug577" src="../resources/xml/http.xml"/>
<class name="bug_577" extends="TestCase">
<method name="testLocalDS">
- assertUndefined(canvas.datasets.bug577.getAttribute('type'))
+ assertUndefined(canvas.datasets.bug577['type'])
</method>
</class>
@@ -285,8 +285,13 @@
<class name="class_623">
<attribute name="bar"/>
<method name="setBar" args="newValue">
- // uncommenting this line fixes the next one: this.bar = 1234;
- bar = newValue;
+ // Because of lossage in swf runtime with implicit-this and LHS,
+ // we can't reference bar without this:
+ if ($as2) {
+ this.bar = newValue;
+ } else {
+ bar = newValue;
+ }
</method>
<method name="getBar">
return bar;
@@ -296,8 +301,10 @@
<class name="bug_623" extends="TestCase">
<class_623 id="obj"/>
<method name="testSetGet">
- obj.setBar(1);
- assertEquals(1, obj.getBar());
+ var unique = {}
+ obj.setBar(unique);
+ assertSame(unique, obj.getBar());
+ assertUndefined(global['bar']);
</method>
</class>
@@ -385,7 +392,7 @@
<mynode name="myinstance"/>
<method name="testNode">
- assertTrue(myinstance instanceof mynode);
+ assertTrue(myinstance instanceof lz.mynode);
assertTrue(myinstance instanceof LzNode);
assertFalse(myinstance instanceof LzView);
</method>
@@ -738,7 +745,7 @@
<class name="bug_1843" extends="TestCase">
<view name="cv" bgcolor="teal" width="100" height="50" clickable="true"/>
<method name="testClickability">
- assertTrue(cv.getAttribute("clickable"))
+ assertTrue(cv["clickable"])
</method>
</class>
@@ -772,7 +779,7 @@
</handler>
<method name="applyData" args="d">
- classroot.assertTrue(this.gotinit)
+ classroot.assertTrue(this.gotinit, "applyData called before oninit")
this.setAttribute('value', d);
</method>
</class>
@@ -798,11 +805,11 @@
fdel = new LzDelegate(this, "fail", tr, "oninit")
return
}
- else delete fdel
+ else delete this.fdel
setResult(tr)
result.currentTest = "bug_2029"
- super.fail(msg)
+ super.fail.apply(this, arguments)
</method>
<toggle name="local" datapath="localdata:/value/text()"/>
<toggle name="remote" datapath="remotedata:/mydata/value/text()"/>
@@ -820,7 +827,7 @@
<view name="lview"/>
<method name="testSrc">
lview.setSource('http:../resources/swf/logo.swf')
- assertNotUndefined(lview.getAttribute('resource'), 'Source attribute undefined!')
+ assertNotUndefined(lview['resource'], 'Source attribute undefined!')
</method>
</class>
@@ -878,7 +885,7 @@
<simplelayout spacing="5"/>
<inputtext datapath="bug2239:/item/text()" name="tbox" width="200"/>
<method name="testWidth">
- assertEquals(200, tbox.getCloneNumber(0).getAttribute('width'))
+ assertEquals(200, tbox.getCloneNumber(0)['width'])
</method>
</class>
Modified: openlaszlo/branches/devildog/test/smoke/smokecheck.lzx
===================================================================
--- openlaszlo/branches/devildog/test/smoke/smokecheck.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/test/smoke/smokecheck.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -119,7 +119,7 @@
<bug_1899/>
<bug_2029/>
<bug_2113/>
- <bug_2125/>
+<!-- Broken: LPP-5160 <bug_2125/> -->
<bug_2131/>
<bug_2223/>
<bug_2225/>
@@ -137,6 +137,6 @@
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
Modified: openlaszlo/branches/devildog/test/swf9/hello.lzx
===================================================================
--- openlaszlo/branches/devildog/test/swf9/hello.lzx 2008-03-19 13:05:07 UTC (rev 8314)
+++ openlaszlo/branches/devildog/test/swf9/hello.lzx 2008-03-19 15:01:29 UTC (rev 8315)
@@ -84,6 +84,7 @@
<text fontsize="11">aaa bbb ccc ddd eee fff ggg hhh iii jjj kkk lll mmm nnn ooo ppp qqq</text>
</view>
+<!--
<view id="mystate" x="650" y="80" onclick="this.mystate.apply()" >
<state name="mystate">
<view width="50" height="50" x="50" y="40" bgcolor="#ccccff"
@@ -94,6 +95,7 @@
<view width="50" height="50" bgcolor="#ffcccc"/>
<text name="t1">Click me to apply state</text>
</view>
+-->
<text fontsize="11" width="200" x="500" y="160" id="multi" resize="true"
multiline="true"
More information about the Laszlo-checkins
mailing list