Re: When is the UpdateManager definitely available?

Marco Herrn <[email protected]>
Newsgroups gmane.text.xml.batik.user
Message-ID <[email protected]>
Hi Jonathan,

thanks for your answer.
The gvgBuildCompleted is fired even earlier than gvtTreeRenderingCompleted.
So it may be a good option to use, but shouldn't help me with my exact
problem.
Maybe the answer from Thomas points to the right direction.


On Fri, Nov 02, 2012 at 04:53:37PM -0400, jonathan wood wrote:
>    Hi Marco, 
>      I use a slightly different overload:
>            canvas.addGVTTreeBuilderListener(new GVTTreeBuilderAdapter() {
>                @Override
>                public void gvtBuildCompleted(GVTTreeBuilderEvent e) {
>                    // do stuff                
>                }
>            });
>    On Fri, Nov 2, 2012 at 9:53 AM, Marco Herrn <[1][email protected]> wrote:
> 
>      Hi,
> 
>      I must push this mail again.
>      It now happened again multiple times to me, that the the method
>      canvas.getUpdataManager() returned null when the gvgTreeRenderer
>      completed.
>      It happens seldom, but it does happen.
> 
>      Please see again the code snipped in the quoted text.
> 
>      Is it a bug in batik? According to the javadoc of the getUpdateManager()
>      method I would expect that it is guaranteed that getUpdateManager()
>      won't
>      return null when being called after being informed of rendering
>      completion.
> 
>      Any help appreciated.
>      Regards
>      Marco
> 
>      On Fri, Jul 20, 2012 at 03:38:45PM +0200, [2][email protected] wrote:
>      > Hi I am using the following code:
>      >
>      > canvas.addGVTTreeRendererListener(new GVTTreeRendererAdapter() {
>      >         @Override
>      >         public void gvtRenderingCompleted(GVTTreeRendererEvent e) {
>      >          
>      canvas.getUpdateManager().getUpdateRunnableQueue().invokeLater(runnable);
>      >         }
>      >       });
>      >
>      > to do some changes in the DOM of an SVG document. I expected that the
>      > updatemanager is definitely available when gvtRenderingCompleted was
>      > called.
>      > However, it now happened at least once that I got a
>      NullPointerException
>      > on the line
>      >  
>      canvas.getUpdateManager().getUpdateRunnableQueue().invokeLater(runnable);
>      >
>      > So it seems that there is still no guarantee that the UpdateManager is
>      > available then. Am I missing something? Must I register on a different
>      > listener?
> 
>      ---------------------------------------------------------------------
>      To unsubscribe, e-mail:
>      [3][email protected]
>      For additional commands, e-mail:
>      [4][email protected]
> 
> References
> 
>    Visible links
>    1. mailto:[email protected]
>    2. mailto:[email protected]
>    3. mailto:[email protected]
>    4. mailto:[email protected]

-- 
Marco Herrn - IT-Berater Individualsoftware
(GnuPG/PGP encrypted mail preferred)
Key ID: 94620736
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.