Author: jcrowley
Date: 2007-08-16 19:36:17 -0700 (Thu, 16 Aug 2007)
New Revision: 6100
Modified:
openlaszlo/branches/wafflecone/demos/calendar/cal-data.lzx
openlaszlo/branches/wafflecone/demos/calendar/eventselector.lzx
Log:
Change 20070816-jcrowley-k by [EMAIL PROTECTED] on 2007-08-16 17:00:53 EDT
in /Users/jcrowley/src/svn/openlaszlo/wafflecone
for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone
Summary: Calendar demo presents no sample data; 'p is null' warnings in
Wafflecone Calendar
New Features:
Bugs Fixed: LPP-4504, LPP-4514
Technical Reviewer: henry
QA Reviewer: pbr
Doc Reviewer:
Documentation:
Release Notes:
Details: The reason it wasn't loading was because of changes to
data handling. I managed to fix that, and to fix the
subsequent lock-up that resulted.
We might still want to examine why the lock-up occurred
in SWF, but not in DHTML, but for now, this solves this
particular Calendar-specific bug.
UPDATE: Okay, think I've hammered down all the Debugger
warnings about 'p is null'.
Tests: Run Calendar demo in SWF. Notice that a) data loads, and
b) the app doesn't lock up and throw out a "script
taking too long"-type error.
Also: In Debugger, notice an absence of warnings about
'p is null'.
Modified: openlaszlo/branches/wafflecone/demos/calendar/cal-data.lzx
===================================================================
--- openlaszlo/branches/wafflecone/demos/calendar/cal-data.lzx 2007-08-17
01:02:14 UTC (rev 6099)
+++ openlaszlo/branches/wafflecone/demos/calendar/cal-data.lzx 2007-08-17
02:36:17 UTC (rev 6100)
@@ -8,14 +8,11 @@
<script>
var dataloader = null;
</script>
- <datasource name="http">
- <dataset name="serverdata"
- ondata="if (!dataloader) return; dataloader.run()" />
- </datasource>
+ <dataset name="serverdata" type="http"/>
<!-- controls loading of server data; once data has loaded calls
notifies localdatacontroller -->
- <datapointer name="dataloader" xpath="serverdata:/*" >
+ <datapointer name="dataloader" xpath="serverdata:/*" ondata="this.run()">
<attribute name="reqq" value="[]"/>
<attribute name="requestrunning" value="false"/>
@@ -44,8 +41,8 @@
var nr = this.reqq.shift();
//Debug.write( "make request " + nr );
this.requestrunning = true;
- http.serverdata.setAttribute( "src", nr );
- http.serverdata.doRequest();
+ serverdata.setAttribute( "src", nr );
+ serverdata.doRequest();
</method>
<method name="enqueueRequest" args="r">
@@ -62,7 +59,11 @@
this.setXPath( "eventdata:/vcalendar/year" + yr + "/month" + mo );
//this is unfortunate, but there's no easy way to see if this
//succeeded as v1
- return this.getNodeName() == "month"+mo;
+ if(this.p != null){
+ return this.getNodeName() == "month"+mo;
+ } else {
+ return false;
+ }
</method>
</datapointer>
@@ -75,8 +76,11 @@
while ( ptr.getNodeCount() == 1 ){
var op = this.p;
- this.setXPath( ptr.getNodeName() );
- if ( this.getNodeName() != ptr.getNodeName() ){
+ if(ptr.p != null){
+ this.setXPath( ptr.getNodeName() );
+ }
+ var thisgnn = (this.p == null ? null : this.getNodeName());
+ if ( thisgnn != ptr.getNodeName() ){
this.setPointer ( op );
break;
}
Modified: openlaszlo/branches/wafflecone/demos/calendar/eventselector.lzx
===================================================================
--- openlaszlo/branches/wafflecone/demos/calendar/eventselector.lzx
2007-08-17 01:02:14 UTC (rev 6099)
+++ openlaszlo/branches/wafflecone/demos/calendar/eventselector.lzx
2007-08-17 02:36:17 UTC (rev 6100)
@@ -118,7 +118,9 @@
//Debug.write("selectData: "+e);
//Debug.write ("selectData Deselecting: "+
//currenteventDP.serialize());
- currenteventDP.setNodeAttribute( "selected" , false );
+ if(currenteventDP.p != null){
+ currenteventDP.setNodeAttribute( "selected" , false );
+ }
e.datapath.setNodeAttribute( "selected" , true );
</method>
_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins