[vtk-developers] Focus weirdness with vtkCanvas in Java

TINGAUD Frederic Frederic.TINGAUD at murex.com
Tue May 21 13:25:29 EDT 2013


Hi,

This one is a direct call to WinAPI's MessageBox (all errors in vtkWin32OpenGLRenderWindow are the same, in fact), so I don't think it can be disabled.

I spent a lot of time trying to track down the cause of this error in the past, with no success. As I found  a way to avoid them with the old vtkCanvas, I think I will stick to that as long as possible.

Regards,

 

Fred

 

De : Sebastien Jourdain [mailto:sebastien.jourdain at kitware.com] 
Envoyé : mardi 21 mai 2013 19:04
À : TINGAUD Frederic
Cc : vtk-developers at vtk.org
Objet : Re: [vtk-developers] Focus weirdness with vtkCanvas in Java

 

The error window can be disable (normally). For that look at the sample codes when we disable to output error window. 

You can even provide a file path that will be used to dump the error log into. (Provide null otherwise)

 

Seb

 

PS: For the ChoosePixelFormat, I don't have much idea, but if you figure out a fix please feel free to contribute.

 

On Tue, May 21, 2013 at 12:14 PM, TINGAUD Frederic <Frederic.TINGAUD at murex.com> wrote:

Hi,

 

I tried converting my code to use the new VTK6 java wrappers, and I couldn't have them to work under Windows.

Even the sample AwtConeRendering.java doesn't work on my machine, as it always ends up with the dreaded "ChoosePixelFormat failed" error dialog, during the first call to Render().

By the way, the fact that this particular error is signaled by an modal error dialog has been a major inconvenience for me since I use VTK. I had the error popping from time to time randomly during my automated tests and I never found a way to pass it correctly when it occurred, I have a robot clicking at the center of the screen when the test has been hanging for suspiciously too long, but the dialog can also appear behind the frame, in which case I am just doomed and I have to connect to the machine and unblock it manually.

 

Regards,

 

Fred

 

De : vtk-developers-bounces at vtk.org [mailto:vtk-developers-bounces at vtk.org] De la part de Sebastien Jourdain
Envoyé : jeudi 25 avril 2013 17:39


À : TINGAUD Frederic
Cc : vtk-developers at vtk.org
Objet : Re: [vtk-developers] Focus weirdness with vtkCanvas in Java

 

Yes I'm talking about them, but mostly the awt one unless you are using swt...

To use the swt one, you will need to provide enough information to cmake at build time...

 

Seb

 

On Thu, Apr 25, 2013 at 11:24 AM, TINGAUD Frederic <Frederic.TINGAUD at murex.com> wrote:

Hi,

 

Are you talking about the vtkAwtComponent /vtkSwtComponent? I didn't knew about them, it is cool to see that java wrapper are evolving! I will have a look at them.

 

Thanks,

 

Frederic

 

De : Sebastien Jourdain [mailto:sebastien.jourdain at kitware.com] 
Envoyé : jeudi 25 avril 2013 16:01
À : TINGAUD Frederic
Cc : vtk-developers at vtk.org
Objet : Re: [vtk-developers] Focus weirdness with vtkCanvas in Java

 

Hi Frederic,

 

I don't know what is the history of that method call.

Although, if you are using the latest VTK (the soon to be release), you should probably use the new set of rendering classes instead. They provide a cleaner and more flexible API.

 

To learn how to use them, just look at the sample codes that are available inside the Wrapping/Java directories.

 

Seb

 

On Thu, Apr 25, 2013 at 9:42 AM, TINGAUD Frederic <Frederic.TINGAUD at murex.com> wrote:

Hi all,

 

I was wondering why we have the following line in the code of vtkCanvas.java:

public void mouseEntered(MouseEvent e) {

  this.requestFocus();

  ...

 

It would make sense to me, if we had this requestFocus() in the mousePress event (even if java no longer needs it since some time), but in the mouseEntered event, it just seems wrong, as it stills the focus and puts on top any window containing vtkCanvas, as soon as you hover it.

Am I missing something here?

 

Regards,

 

Frederic

*******************************

This e-mail contains information for the intended recipient only. It may contain proprietary material or confidential information. If you are not the intended recipient you are not authorised to distribute, copy or use this e-mail or any attachment to it. Murex cannot guarantee that it is virus free and accepts no responsibility for any loss or damage arising from its use. If you have received this e-mail in error please notify immediately the sender and delete the original email received, any attachments and all copies from your system.


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtk-developers

 

*******************************

This e-mail contains information for the intended recipient only. It may contain proprietary material or confidential information. If you are not the intended recipient you are not authorised to distribute, copy or use this e-mail or any attachment to it. Murex cannot guarantee that it is virus free and accepts no responsibility for any loss or damage arising from its use. If you have received this e-mail in error please notify immediately the sender and delete the original email received, any attachments and all copies from your system.

 

*******************************

This e-mail contains information for the intended recipient only. It may contain proprietary material or confidential information. If you are not the intended recipient you are not authorised to distribute, copy or use this e-mail or any attachment to it. Murex cannot guarantee that it is virus free and accepts no responsibility for any loss or damage arising from its use. If you have received this e-mail in error please notify immediately the sender and delete the original email received, any attachments and all copies from your system.

 

*******************************

This e-mail contains information for the intended recipient only. It may contain proprietary material or confidential information. If you are not the intended recipient you are not authorised to distribute, copy or use this e-mail or any attachment to it. Murex cannot guarantee that it is virus free and accepts no responsibility for any loss or damage arising from its use. If you have received this e-mail in error please notify immediately the sender and delete the original email received, any attachments and all copies from your system.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20130521/a5675a85/attachment.html>


More information about the vtk-developers mailing list