Heinrich Apfelmus | 17 Apr 2012 21:47
Picon
Favicon
Gravatar

Issues with GHCi support and TextCtrl

Hello,

I'm currently updating  reactive-banana-wx  to use the new  wx-0.90 
branch and I've encountered a few issues with GHCi support and TextCtrl 
widgets.

GHCi support is currently a mixed blessing on MacOS X. It works the 
first time but tends to crash when trying to call the start function 
again. Of course, this is not unexpected, but maybe it's possible to fix 
it to some extend. I had similar problems when dealing with the OpenAL 
or the GLFW frameworks, the "solution" was often to simply skip the 
termination routines. Not pretty, but it works.

On that note, the  EnableGUI  trick is very cumbersome, it would be 
nicer if this could simply be integrated into wxHaskell, i.e. calling 
the  start  function will immediately enable the GUI thing. I can try to 
look into this.

The more important issue is that TextCtrl widgets have changed their 
behavior: the  entry  function will now create a multiline widget! To 
create a single-line text entry widgets, I have to use the  textCtrlEx 
function with flag 0 . This is extremely weird. Also, the latter widget 
sometimes crashes on me when trying to set the text, but the former 
doesn't. This is so weird that I can't even tell whether the problem is 
likely with wxWidgets or with the Haskell bindings.

Best regards,
Heinrich Apfelmus

--
(Continue reading)

Jeremy O'Donoghue | 18 Apr 2012 07:17
Picon

Re: Issues with GHCi support and TextCtrl

Hi

On 17 April 2012 12:47, Heinrich Apfelmus <apfelmus-1pFVYSAoaJAREI5ypv3d1g@public.gmane.org> wrote:
GHCi support is currently a mixed blessing on MacOS X. It works the
first time but tends to crash when trying to call the start function
again. Of course, this is not unexpected, but maybe it's possible to fix
it to some extend. I had similar problems when dealing with the OpenAL
or the GLFW frameworks, the "solution" was often to simply skip the
termination routines. Not pretty, but it works.

Thanks for looking at this. I'll look into your workaround suggestion.
 
On that note, the  EnableGUI  trick is very cumbersome, it would be
nicer if this could simply be integrated into wxHaskell, i.e. calling
the  start  function will immediately enable the GUI thing. I can try to
look into this.

Thanks again.

The more important issue is that TextCtrl widgets have changed their
behavior: the  entry  function will now create a multiline widget! To
create a single-line text entry widgets, I have to use the  textCtrlEx
function with flag 0 . This is extremely weird. Also, the latter widget
sometimes crashes on me when trying to set the text, but the former
doesn't. This is so weird that I can't even tell whether the problem is
likely with wxWidgets or with the Haskell bindings.

This is a strange one - I don't think we have changed any code in this area. I'll check it out though.

Jeremy
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev

Gmane