Leonardo Mateo escreveu:
Leo,On Thu, Sep 18, 2008 at 12:58 PM, Paulo Scardine <[EMAIL PROTECTED]> wrote:Leo, You are right, as any dataset instantiated will include an entry in "canvas.datasets" object. You are also correct about datasets declared in the canvas being global to the whole application. However, you may find useful the fact that you can refer to a locally declared dataset preceding the datapath declaration with "local:", for example: <canvas> <view name="outerview"> <dataset name="localds"/> <view name="siblingview" datapath="local:parent.localds:/root/path"><!-- this works --> <dataset name="localds"/> </view> <view name="anothersiblingview" datapath="local:this.localds:/root/path"> <!-- this issues WARNING: local dataset "[this, localds]" not found in .anothersiblingview --> <dataset name="localds"/> </view> <view name="innerview1" datapath="local:parent.localds:/root/path" /><!-- this works... --> <view name="innerview2" datapath="local:parent.siblingview.localds:/root/path" /><!-- this also works... --> </view> </canvas> In the debugger, a line like "for(i in canvas.datasets) { Debug.write(i, canvas.datasets[i], canvas.datasets[i].parent.name); }" will show 3 entries: __U28.localds «lz.dataset#9| <localds/>» anothersiblingview __U22.localds «lz.dataset#30| <localds/>» siblingview __U18.localds «lz.dataset#31| <localds/>» outerview It is nice to have local datasets, because you dont have to worry about name clash issues, but this holds the inconvenience that you need to know the relative path (parent.parent.this.those) for the given dataset beforehand. Thanks, -- Paulo Scardine Anyway, this is just my short experience on OL and don't know what the theory says... |
- [Laszlo-user] [Laszlo-dev] How do I read the app query args... André Bargull
- Re: [Laszlo-user] [Laszlo-dev] How do I read the app q... Henry Minsky
- Re: [Laszlo-user] [Laszlo-dev] How do I read the a... Max Carlson
- [Laszlo-user] How can I construct a datapath f... Paulo Scardine
- Re: [Laszlo-user] How can I construct a da... Paulo Scardine
- Re: [Laszlo-user] How can I construct... Paulo Scardine
