Hi Andreas, Andreas Neumann <[EMAIL PROTECTED]> wrote on 06/07/2006 11:51:09 AM:
> I can confirm that try/catch now works with SVN. Good. > As I understand, the current implementation of Batik always reacts like > if suspendRedraw()/unsuspendRedraw() would be called. It does not update > the screen while it is executing a script. The second sentence is true, Batik never updates the screen while it is executing a script. The first part is not, in theory script could call 'suspendRedraw', set a timeout, let the script function exit, then sometime later in the timeout call 'unsuspendRedraw', Batik would likely redraw once the script function exited even though it should not... > Does Batik allow to update the screen on demand? It doesn't yet support > SVGSVGElement.forceRedraw() - is there any other method as a workaround? No there is currently no way for script to trigger a repaint in the middle of script execution. I should say that implementing these methods probably would not be particularly hard (Batik already suspends redraws in some cases, so just setting a Boolean should suffice for suspend/unsuspend, forceRedraw is mostly just calling the existing 'repaint' method on the UpdateManager. Since they seem like they might start being useful it may be worth trying to implement them... > >>My problem is that some browsers implement suspendRedraw and others > >>don't and I have to test if the method is available. > >> > >>I tried with try/catch but it did not work either. > >> > >> > > > >Yeah, it?s not ideal that those methods are throwing Errors instead of > >some other RuntimeException. I?ve just made a change in SVN for them to > >throw UnsupportedOperationExceptions instead, which makes them > >capturable from script. > > > >This probably doesn?t help you, however, if you want to support any > >older version of Batik. I don?t think there?s a reasonable way of > >sniffing the Batik version, either. > > > > > > > > > -- > ---------------------------------------------- > Andreas Neumann > Institute of Cartography > ETH Zurich > Wolfgang-Paulistrasse 15 > CH-8093 Zurich, Switzerland > > Phone: ++41-44-633 3031, Fax: ++41-44-633 1153 > e-mail: [EMAIL PROTECTED] > www: http://www.carto.net/neumann/ > SVG.Open: http://www.svgopen.org/ > Carto.net: http://www.carto.net/ > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
