haplo_3
12-11-2007, 08:55 PM
i wonder if someone experience this problem,
working with replication is not so smooth as i thought.
sometimes i need to append a child to a dataset, this will cause a view to replicate itself for example if i append the following child (<main>)
<main>
<photo href="mypho.jpg"/>
<photo href="mypho.jpg"/>
<shape />
<shape />
</main>
and then i have
<photo datapath="mydata:/main/photo"/>
<shape datapath="mydata:/main/shape" />
i have few problems with this
1) how can i know when the views finish to replicate themself?
when can i make sure that photo AND shape are fully inisitanated?
i saw in the developer guide explanation of how to build a delegate to the last replicated init and then call a method
but its getting more involve when i have 4-5 different views which are replicated from the same dataset
2) i have difficult time to determine when the replication happen
in my example the user may drag one shape to the design , if there's only 1 shape in the dataset it will not create replicationManager if the user drag more then 1 shape replicationManager will happen and i need to handle it differently.
its a little bit difficult to maintain,
thanx
working with replication is not so smooth as i thought.
sometimes i need to append a child to a dataset, this will cause a view to replicate itself for example if i append the following child (<main>)
<main>
<photo href="mypho.jpg"/>
<photo href="mypho.jpg"/>
<shape />
<shape />
</main>
and then i have
<photo datapath="mydata:/main/photo"/>
<shape datapath="mydata:/main/shape" />
i have few problems with this
1) how can i know when the views finish to replicate themself?
when can i make sure that photo AND shape are fully inisitanated?
i saw in the developer guide explanation of how to build a delegate to the last replicated init and then call a method
but its getting more involve when i have 4-5 different views which are replicated from the same dataset
2) i have difficult time to determine when the replication happen
in my example the user may drag one shape to the design , if there's only 1 shape in the dataset it will not create replicationManager if the user drag more then 1 shape replicationManager will happen and i need to handle it differently.
its a little bit difficult to maintain,
thanx