you shouldn't need to do that. runXPath isn't intended for that use, but 
it's an ok workaround. Can you please file a bug?
A

On Jan 23, ChrisK wrote:

> Calling this.cloneManager.runXPath() from a replicated view seems to fix this
> issue for me.  By calling runXPath() am I messing with anything I shouldn't if
> I plan to use lazy replication?
> 
> Could it be possible that the pointer returned by dupePointer() doesn't have
> events registered on the dataset correctly, and hence doesn't know to tell the
> clone manager to re run the xpath?
> 
> -chrisk
> 
> On Jan 23, 2006, at 10:31 AM, ChrisK wrote:
> 
> > Thanks Adam,
> > 
> >  I've made the modification you suggested (inline below) and I'm still
> > having the same problem.  Any other ideas?
> > 
> > thanks
> > 
> > -chrisk
> > 
> > <canvas>
> > 
> > 
> >    <dataset name="foo">
> >        <items>
> >            <item vis="1"/>
> >            <item vis="1"/>
> >            <item vis="0"/>
> >            <item vis="0"/>
> >            <item vis="0"/>
> >            <item vis="0"/>
> >            <item vis="0"/>
> >        </items>
> >    </dataset>
> > 
> > 
> >    <view>
> >        <view width="5" height="5" bgcolor="red">
> >            <datapath xpath="foo:/items/[EMAIL PROTECTED] = '1']" 
> > rerunxpath="true"/>
> >        </view>
> >        <simplelayout axis="y" spacing="2"/>
> >    </view>
> > 
> > 
> >    <datapointer id="mydp" xpath="foo:/items"/>
> > 
> >    <button x="50" text="add more boxes">
> > 
> >        <method event="onclick">
> >            var dp = mydp.dupePointer();
> >            dp.selectChild();
> > 
> >            while( dp.selectNext() ) {
> >                dp.setNodeAttribute('vis', "1");
> >            }
> > 
> >        </method>
> >    </button>
> > 
> >    <button x="50" y="30" text="show data in debugger">
> >        <method event="onclick">
> >            Debug.write( mydp.serialize() );
> >        </method>
> >    </button>
> > 
> > </canvas>
> > 
> > 
> > On Jan 23, 2006, at 10:26 AM, Adam Wolff wrote:
> > 
> > > this is almost certainly a type mismatch; 1 != "1"
> > > 
> > > Try
> > >    dp.setNodeAttribute('vis', "1" );
> > > 
> > > A
> > > 
> > > On Jan 23, ChrisK wrote:
> > > 
> > > > In the following example, I've set the datapath to replicate views for
> > > > the
> > > > data nodes that have vis="1".
> > > > 
> > > > This works initially, but when I modify the dataset at runtime (add
> > > > boxes
> > > > button) so that all data nodes have vis="1", the new views are not
> > > > replicated
> > > > as expected.
> > > > 
> > > > Am I doing something wrong?  Is there a way to force the replication to
> > > > kick
> > > > off again?
> > > > 
> > > > thanks in advance.
> > > > 
> > > > -chrisk
> > > > 
> > > > <canvas>
> > > >   <dataset name="foo">
> > > >       <items>
> > > >           <item vis="1"/>
> > > >           <item vis="1"/>
> > > >           <item vis="0"/>
> > > >           <item vis="0"/>
> > > >           <item vis="0"/>
> > > >           <item vis="0"/>
> > > >           <item vis="0"/>
> > > >       </items>
> > > >   </dataset>
> > > > 
> > > > 
> > > >   <view>
> > > >       <view width="5" height="5" bgcolor="red">
> > > >           <datapath xpath="foo:/items/[EMAIL PROTECTED] = '1']"
> > > > rerunxpath="true"/>
> > > >       </view>
> > > >       <simplelayout axis="y" spacing="2"/>
> > > >   </view>
> > > > 
> > > > 
> > > >   <datapointer id="mydp" xpath="foo:/items"/>
> > > > 
> > > >   <button x="50" text="add more boxes">
> > > > 
> > > >       <method event="onclick">
> > > >           var dp = mydp.dupePointer();
> > > >           dp.selectChild();
> > > > 
> > > >           while( dp.selectNext() ) {
> > > >               dp.setNodeAttribute('vis', 1);
> > > >           }
> > > > 
> > > >       </method>
> > > >   </button>
> > > > </canvas>
> > > > 
> > > > _______________________________________________
> > > > Laszlo-user mailing list
> > > > [email protected]
> > > > http://www.openlaszlo.org/mailman/listinfo/laszlo-user
> > 
> > _______________________________________________
> > Laszlo-user mailing list
> > [email protected]
> > http://www.openlaszlo.org/mailman/listinfo/laszlo-user
> 
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user

Reply via email to