I think this is simply an area that hasn't been tested and so has suffered some breakage. There's no reason this couldn't be fixed, and with a proper unit test it should stay fixed.

I'd suggest that at a minimum you file a JIRA bug (http://www.openlaszlo.org/jira). Bonus points for including a unit test using the LzUnit facility that demonstrates the failure. 

If you can't wait until someone on the team has time to look at the problem, you can also consider fixing it yourself. I think we'd be happy to take such a fix for the Sage release, which is scheduled for release this calendar quarter. 

jim

On Jan 4, 2006, at 12:22 PM, Bryan Barkley wrote:

Since extending datasets doesn't seem to be supported can anyone offer any suggestions for handling common operations across datasets such as the situation David describes?

Subclassing dataset could also be useful to provide default error handling behavior as well as changing the root src attribute as described in this forum thread: http://www.laszlosystems.com/developers/community/forums/showthread.php?s=&threadid=2219

All of these cases are aspects that would be somewhere between difficult and inconvenient to maintain if they can't be factored into a common code location.

I have tried nesting datasets in a datasource that had onerror and ondata handlers; that didn't seem to work. The only other thing I can think of is finding all datasets at startup and programmatically registering event handlers with them. This seems pretty hackey.

Anyone have a good solution?

Thanks,
   Bryan

On 1/3/06, Buckler, David <[EMAIL PROTECTED]> wrote:
Thats a very interesting idea and I could see how that could cross the streams.  The reason why I am trying to extend the dataset is to overload the doRequest() to include user name/password query parameters for authentication on every request.  So unfortunately a local dataset wont fix my problem but thanks for the help.
David


From: Henry Minsky [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 03, 2006 2:04 PM
To: Buckler, David
Cc: [email protected]
Subject: Re: [Laszlo-user] Extending Dataset Class in 3.1.1

This might be some fallout from the change which added "local datasets" to the compiler.

You can now say put datasets inside of instances or classes like below. I wonder if
local datasets might be able to be used in your application instead of extending dataset?




  <view name="somedata" layout="axis: y" bgcolor="#cccccc">
    <method event="onclick">
        Debug.write(this.lds);
    </method>
    <dataset name="lds">
        <foo>bar</foo>
    </dataset>
    <text>local dataset</text>
    <method reference="lds" event="oninit">
      <![CDATA[
      Debug.write("somedata test data loaded", this);
      if (this.lds.serialize() != '<lds><foo>bar</foo></lds>') {
      Debug.error("somedata serialized data does not match expected value");
      }
      ]]>
    </method>
  </view>

On 1/3/06, Buckler, David <[EMAIL PROTECTED]> wrote:
In 3.0.2 I was be able to extend the dataset class, albeit with a load of compilation warnings, but it would still work.  Now I am moving to 3.1.1 and this "feature" no longer works.  Any ideas?
 
<canvas>

<class name="myds" extends="dataset"/>
<myds name="z">
    <node>Hello Moto</node>
</myds>
 
<text datapath="z:/node/text()"/>
 
</canvas>
 

_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user





--
Henry Minsky
Software Architect
[EMAIL PROTECTED]


_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user



_______________________________________________
Laszlo-user mailing list

_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user

Reply via email to