Leo,

The problem is that in _javascript_ I can refer a parameter that points to a dataset object just like if the dataset was declared inside current class, but the notation "local:datasetname:/path" does not work.

<class name="myclass">
  <attribute name="remoteds"/>
  <dataset name="localds"/>
  <view datapath="local:remoteds:/path"/><!-- Do not work... -->
  <view datapath="local:localds:/path"/>
  <method name="init">
    Debug.write(remoteds); // This works!
    Debug.write(localds);
    super.init();
  </method>
</class>

I think  in this case the compiler do some search for "datasetname" in the subnode list of the given object, but don't look at the attribute list for dataset references with the same name.

I think it wold be nice if it searched in the attribute list also, because we could just point so some dataset without worrying about the relative path to the given dataset, which leads to better abstraction.

Thanks,
--
Paulo Scardine

Leonardo Mateo escreveu:
On Thu, Sep 18, 2008 at 10:32 AM, Paulo Scardine <[EMAIL PROTECTED]> wrote:
  
Hi guys,

This small testcase gives me "WARNING: local dataset "[ds]" not found in
«lz.view»":

<canvas>
 <class name="myclass">
  <attribute name="ds">
  <view datapath="local:ds:/resultset"/>
 </class>

 <view>
  <dataset name="myds1" src="" class="moz-txt-link-rfc2396E" href="http://localhost/mydata.php">"http://localhost/mydata.php"/>
  <dataset name="myds2" src="" class="moz-txt-link-rfc2396E" href="http://localhost/mydata.php">"http://localhost/mydata.php"/>
  <myclass ds="${parent.myds1}">
  <myclass ds="${parent.myds2}">
 </view>
</canvas>

What is the Laszlo way to achieve something like this?
    

I thinkk, you should declare something like:
<dataset name="ds" src="" />
before reference it anywhere




  

Reply via email to