From: Jimmy Z. <cra...@co...> - 2007-04-10 03:56:18
|
setCursorPosition() and getCursroPosition() have been added in CVS but the benefit of unbind() is still not clear if GC of VTDnav is the goal then one can simply call "setCursorPosition()" on a different VTDNav object and the mission is accomplished without having a unbind method for bookMark... ----- Original Message ----- From: "Rodrigo Cunha" <rn...@gm...> To: "Jimmy Zhang" <cra...@co...> Sent: Thursday, April 05, 2007 2:41 AM Subject: Re: [Vtd-xml-users] Random Access Proposal (take 2) > Jimmy Zhang wrote: > > > What if a bookmark object is created, but not yet bind to a non-null > VTDNav object... > > That's for unbind, right? The unbind rationale is to allow GC of VTDNav > objects while still allowing easy reusing of bookmark. Obviously you could > bind them to a dummy VTDNav instead, but that's a kludge, and requires > more processing. Or you could allow binding to null, but that could lead > to unnoticed errors. > > > recordCursorPosition() and setCursorPosition() would throw > NullPointerException.. would that bother you? > > No, that's what would happen really, and seems perfectly correct. > > -- > Rodrigo > > |