PDA

View Full Version : Contraining dataset of subview to parent


mr_fin
01-04-2005, 02:01 AM
Hi there

I am constraining a dataset of a subview to the value of a dataset of its parent view. The parent view initially has an empty dataset. This dataset will only be set when the user selects to view this view at which time a setDatapath event is sent. The subview's dataset then picks up the dataset of its parent which it is constrained to. This all works, however when the application starts, the debugger throws up a message:
"couldn't find dataset for Datapath for LzView name: categoryContent" - which I understand as it isn't set when the application starts, only when the user clicks to see that view.

Since the application is working I am inclined to just ignore this, although this is probably not good practice and may cause some problems later on. Does anyone have any advice on contraining a views dataset to another views dataset which is not initially set when the application loads?

Any advice would be appreciated.
Many thanks
mr_fin

mr_fin
01-05-2005, 02:00 AM
This posting has helped solve some of the issues I had above by creating a temporary dataset;

http://www.laszlosystems.com/developers/community/forums/showthread.php?s=&threadid=860

The parent view's datapath points to the temporary dataset which on oninit and subsequent subviews contrain to the parents datapath which is later changed with setDatapath()

Cheers
mr_fin