Mads Lindstrøm | 2 Aug 2007 15:12
Picon
Favicon

Segmentation fault when setting listbox items within a listbox event handler

Hi all

If I run the following program:

{-# OPTIONS -fglasgow-exts #-}

module Main where

import Graphics.UI.WX

main = start $
    do w  <- frame [text := "ListBox Event Handling"]
       p  <- panel w []
       listBox  <- multiListBox p [ items := [ "Foobar" ] ]
       set listBox [ on select := do set listBox [ items := [ "foo", "Bar"] ]
                                     propagateEvent
                   ]
       set w [ layout := container p $ widget listBox
             ]

and click on the listbox item "Foobar", the program crashes with:

(L:6279): Gtk-WARNING **: unable to find signal handler for object(GtkListItem:0x8425e40) with
func((nil)) and data(0x845ac18)

The problem is that I change the listbox items from within a listbox
event handler. Do anybody know if this expected behavior or is it a bug
somewhere in WxHaskell, Wxwindows, or GTK?

Of cause I can use this clumsy workaround:
(Continue reading)

Jeremy O'Donoghue | 2 Aug 2007 16:03
Picon

Opinions... to support wxWidgets 2.8 properly or not

Hi all,

I've been busy with little time for wxHaskell for a few months.
However, I have been (slowly) working in the background, and I'm 90%
ready with a couple of fairly large patches.

The first should be (relatively) uncontentious. It's a unified build
system which works the same way on all platforms/compilers. It is not
the subject of this mail.

The larger issue is that I have the beginnings of *proper* (i.e. not
in wxWidgets 2.4 compatibility mode) support for wxWidgets 2.8.4 ready
to check in. I've wrapped all of the essential API changes, but have a
few more 'nice to have' items still to go (they would appear in
Graphics.UI.WxCore - there are rather only very minor changes at the
Graphics.UI.Wx level).

That's the good news. The bad news is that this would once and for all
break compatibility with wxWidgets 2.4.2 as there have been many
changes in wx in the almost four years since it was released.

So before committing what will be a sizeable patch, and one which
breaks API compatibility in some areas, I'd like a straw poll of
users' opinions as to what we should do. The options are:

Try to support latest wxWidgets
- Advantages
  - We benefit from bugfixes and improvements in the base GUI library
  - Simpler for new users, as getting 'historical' versions of wxWidgets means
    you must compile it for yourself (which is non-trivial) as opposed to using
(Continue reading)

Eric Y. Kow | 2 Aug 2007 20:38
Picon
Gravatar

Re: Opinions... to support wxWidgets 2.8 properly or not

> Try to support latest wxWidgets

I think we might as well do this... already our 2.6 target is out of
date.  And making people install the old version seems like a hassle.
Basically, whatever is the most convenient for the most people.

There was some concern about breaking Windows, however... is that still
an issue?

--

-- 
Eric Kow                     http://www.loria.fr/~kow
PGP Key ID: 08AC04F9         Merci de corriger mon français.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
Jeremy O'Donoghue | 2 Aug 2007 21:32
Picon

Re: Opinions... to support wxWidgets 2.8 properly or not

On 02/08/07, Eric Y. Kow <eric.kow@...> wrote:
> > Try to support latest wxWidgets
>
> There was some concern about breaking Windows, however... is that still
> an issue?

I'm doing 90% of the work on Windows - using Visual Studio Express
(which is the most likely configuration for most people, I suspect) -
so at least I have that base covered.

I will do some testing on OS X as well, mainly to ensure that I
haven't irretrievably broken the build system on Unix targets.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
Mads Lindstrøm | 2 Aug 2007 21:34
Picon
Favicon

Re: Opinions... to support wxWidgets 2.8 properly or not

Hi

Jeremy O'Donoghue:
> That's the good news. The bad news is that this would once and for all
> break compatibility with wxWidgets 2.4.2 as there have been many
> changes in wx in the almost four years since it was released.
> 
> So before committing what will be a sizeable patch, and one which
> breaks API compatibility in some areas, I'd like a straw poll of
> users' opinions as to what we should do. The options are:

I think we should go with latest version.

In the future it might be a good idea to aim for the two latest major
versions, as not all users can easily install the latest. But for now, I
think we can live with only 2.8.something. And then keep supporting it
until 3.2.something comes out. Or maybe we should support 2.8 until X
number of months after 3.0 comes out.

Greetings,

Mads Lindstrøm

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
shelarcy | 3 Aug 2007 04:49
Picon
Gravatar

Re: Opinions... to support wxWidgets 2.8 properly or not

Hi Jeremy,

On Thu, 02 Aug 2007 23:03:22 +0900, Jeremy O'Donoghue
<jeremy.odonoghue@...> wrote:
> So before committing what will be a sizeable patch, and one which
> breaks API compatibility in some areas, I'd like a straw poll of
> users' opinions as to what we should do. The options are:
>
> Try to support latest wxWidgets

I also vote to support latest version.

> - Advantages
>   - We benefit from bugfixes and improvements in the base GUI library
>   - Simpler for new users, as getting 'historical' versions of wxWidgets means
>     you must compile it for yourself (which is non-trivial) as opposed to using
>     the version 'packaged' for your OS.

Because I think these advantages are important for users.

> - Disadvantages
>   - Due to changes in the way finalization is done in wxWidgets, it would no
>     longer be possible to use wxHaskell properly from GHCi as the underlying
>     wxWidgets library would be left in an unsuitable state once the first wxApp
>     event loop terminates.

> Decide once and for all that wxHaskell is based on wxWidgets 2.4.2
> - Advantages
>   - GHCi works properly, at least on some platforms

(Continue reading)

shelarcy | 3 Aug 2007 05:53
Picon
Gravatar

drag & drop support

Hi all,

Does anyone try to add drag & drop support?
I heard that Gtk2Hs 0.9.12 added this feature.

http://www.haskell.org/pipermail/libraries/2007-July/007711.html
http://www.haskell.org/pipermail/libraries/2007-July/007810.html

So I tried adding this feature to wxHaskell, current a few weeks.
Attached are drag & drop event module, and test sample that is
made by modifying ImageViewer sample.
(This file isn't good example, because drag & drop event
only made dialogbox instead of doing reasonable act.)

And if there is already someones work, please let me know it.
Because if it's good enough, I want to stop duplicate work
and make patch sooner by using it.

Best Regards,

--

-- 
shelarcy <shelarcy    hotmail.co.jp>
http://page.freett.com/shelarcy/
Attachment (DragAndDrop.hs): application/octet-stream, 7778 bytes
Attachment (ImageViewer.hs): application/octet-stream, 5506 bytes
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
(Continue reading)

shelarcy | 3 Aug 2007 06:12
Picon
Gravatar

Re: Segmentation fault when setting listbox items within a listbox event handler

Hi Mads,

On Thu, 02 Aug 2007 22:12:48 +0900, Mads Lindstrøm <mads_lindstroem <at> yahoo.dk> wrote
> (snip)
>
> and click on the listbox item "Foobar", the program crashes with:
>
> (L:6279): Gtk-WARNING **: unable to find signal handler for object(GtkListItem:0x8425e40) with
func((nil)) and data(0x845ac18)
>
> The problem is that I change the listbox items from within a listbox
> event handler. Do anybody know if this expected behavior or is it a bug
> somewhere in WxHaskell, Wxwindows, or GTK?

What version of GTK and wxGTK do you use?

This problem doesn't occur in my environments on wxNSW 2.6.4,
wxMSW 2.4.2 and wxMac 2.6.3.

Best Regards,

--

-- 
shelarcy <shelarcy    hotmail.co.jp>
http://page.freett.com/shelarcy/

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
(Continue reading)

Mads Lindstrøm | 3 Aug 2007 11:14
Picon
Favicon

Re: Segmentation fault when setting listbox items within a listbox event handler

Hi Shelarcy

> Hi Mads,
> 
> On Thu, 02 Aug 2007 22:12:48 +0900, Mads Lindstrøm <mads_lindstroem <at> yahoo.dk> wrote
> > (snip)
> >
> > and click on the listbox item "Foobar", the program crashes with:
> >
> > (L:6279): Gtk-WARNING **: unable to find signal handler for object(GtkListItem:0x8425e40) with
func((nil)) and data(0x845ac18)
> >
> > The problem is that I change the listbox items from within a listbox
> > event handler. Do anybody know if this expected behavior or is it a bug
> > somewhere in WxHaskell, Wxwindows, or GTK?
> 
> What version of GTK and wxGTK do you use?
GTK version 2.8.20 and wxGTK 2.6.3. And I am running Debian Linux.

> 
> This problem doesn't occur in my environments on wxNSW 2.6.4,
> wxMSW 2.4.2 and wxMac 2.6.3.
> 
> 
> Best Regards,
> 

Greetings,

Mads
(Continue reading)

shelarcy | 3 Aug 2007 14:56
Picon
Gravatar

darcs patch: Fix broken wxc-2.4 Visual Studio Project (and 3 more)

Attachment (darcs4bc989): application/octet-stream, 288 KiB
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

Gmane