Re: [wxhaskell-users] Custom events

2011-10-30 Thread Henning Thielemann

On Sun, 30 Oct 2011, Henning Thielemann wrote:

> Recently on this list it was suggested to use
>
>   myEventId = wxID_HIGHEST+1
>
> for custom events and register them as menu events.
>
>   http://snipplr.com/view/17538/
>
>
> Now I added menus to my application and I got the strange behaviour that
> selecting a certain menu item (the second one of all items) let my
> application freeze. I found out that this could be solved by choosing a
> different EventId. So is the id wxID_HIGHEST+1 really free for use? How
> can I safely choose an id that is free for custom use? Is it sensible to
> consider custom events as menu events?

I found in Graphics.UI.WXCore.Types:

varTopId :: Var Id
varTopId
   = unsafePerformIO (varCreate (wxID_HIGHEST+1))

It looks like wxID_HIGHEST+1 is alreay used by wxhaskell. How can I make 
sure that I do not clash with id's used by wxhaskell in future?

--
Get your Android app more play: Bring it to the BlackBerry PlayBook 
in minutes. BlackBerry App World™ now supports Android™ Apps 
for the BlackBerry® PlayBook™. Discover just how easy and simple 
it is! http://p.sf.net/sfu/android-dev2dev
___
wxhaskell-users mailing list
wxhaskell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users


[wxhaskell-users] Custom events

2011-10-30 Thread Henning Thielemann

Recently on this list it was suggested to use

   myEventId = wxID_HIGHEST+1

for custom events and register them as menu events.

   http://snipplr.com/view/17538/


Now I added menus to my application and I got the strange behaviour that 
selecting a certain menu item (the second one of all items) let my 
application freeze. I found out that this could be solved by choosing a 
different EventId. So is the id wxID_HIGHEST+1 really free for use? How 
can I safely choose an id that is free for custom use? Is it sensible to 
consider custom events as menu events?

I don't understand much of these id's. Without these custom events you do 
not have to bother with id's in wxhaskell.

--
Get your Android app more play: Bring it to the BlackBerry PlayBook 
in minutes. BlackBerry App World™ now supports Android™ Apps 
for the BlackBerry® PlayBook™. Discover just how easy and simple 
it is! http://p.sf.net/sfu/android-dev2dev
___
wxhaskell-users mailing list
wxhaskell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users