shelarcy | 2 Jan 2009 23:41
Picon
Gravatar

Re: Embedding toolbar icons into application using resource file

Hi,

On Mon, 29 Dec 2008 08:30:05 +0900, Bernd Holzmüller <bernd.holzmueller <at> ics-ag.de> wrote:
> Now, this seems not to be possible yet for toolbar icons. The function
> "toolMenu" expects a file path argument, and there is no other function
> that accepts a bitmap instead. I therefore suggest extending the file
> Graphics.UI.WX.Menu.hs by an additional function:
>   toolMenuFromBitmap :: ToolBar a -> MenuItem a -> String -> Bitmap b ->
> [Prop ToolBarItem] -> IO ToolBarItem
> The signature of the present toolMenu function is:
>   toolMenu :: ToolBar a -> MenuItem a -> String -> FilePath -> [Prop
> ToolBarItem] -> IO ToolBarItem
> whose definition would then just reduce to
>   toolMenu toolbar menuitem label bitmapPath props =
>     withBitmapFromFile bitmapPath $ \bitmap -> toolMenuFromBitmap
> toolbar menuitem label bitmap props

I added toolMenuFromBitmap function in the darcs repository, and I
replaced source and binary distribution by newer version now.

http://www.mail-archive.com/wxhaskell-devel <at> lists.sourceforge.net/msg00392.html

Replacing distribution isn't good solution. So, this is final change
before wxHaskell 0.11.0 release. If you want to use more new features,
please wait for next next version.

Best Regards,

--

-- 
shelarcy <shelarcy    hotmail.co.jp>
(Continue reading)

Jeremy O'Donoghue | 4 Jan 2009 16:19
Picon

ANN: wxHaskell 0.11.1

The wxHaskell development team is pleased to announce the release of
wxHaskell 0.11.1, a Haskell binding for the wxWidgets GUI library.

The Haskell support is built on a reasonably complete C language
binding, which could be used as the basis for wxWidgets support on other
languages/platforms which do not have easy mechanisms for linking with
C++ code.

The main highlights of wxHaskell 0.11.1 are: 

- Support for XRC resource files, allowing GUI design using a visual
tool. Note that this
   is currently not type safe, and programs will crash if a widget is
   not cast to the correct
   type on loading.
- Support for wxWidgets 2.8.x. Support for wxWidgets 2.4.2 is now
dropped and wxHaskell
   will not compile against versions of wxWidgets prior to 2.6. This
   means that exploratory
   development using GHCi is no longer possible. Workaround is to
   continue to use older
   wxHaskell versions.
- Support for GHC 6.10
- Preliminary support for Cabal / Hackage

The full list of changes is provided at the end of this mail.

Binary packages are available from the wxHaskell download site at
http://sourceforge.net/project/showfiles.php?group_id=73133, for the
following platforms:
(Continue reading)

Günther Schmidt | 4 Jan 2009 18:41

Samples compile, but won't run on Windows

Hi,

I just read the announcement for 0.11.1 and of course immediately  
downloaded it.

I'm using ghc 6.10 here and tried to run the samples. Now I did understand  
the wouldn't run in ghci and so I compiled them.

They do compile, the just won't run (on Windows XP), it immediately aborts  
with an error message about not being able to properly initialize the  
application.

What am I doing wrong?

Günther

------------------------------------------------------------------------------
shelarcy | 5 Jan 2009 01:00
Picon
Gravatar

Re: Samples compile, but won't run on Windows

Hi,

On Mon, 05 Jan 2009 02:41:59 +0900, Günther Schmidt <redcom <at> fedoms.com> wrote:
> I'm using ghc 6.10 here and tried to run the samples. Now I did understand
> the wouldn't run in ghci and so I compiled them.
>
> They do compile, the just won't run (on Windows XP), it immediately aborts
> with an error message about not being able to properly initialize the
> application.

Please show us your error messages. It seems that this problem is the
same as older version's problem. But we don't know this problem is
actually same without error message and error number.

http://haskell.org/haskellwiki/WxHaskell/Troubleshooting#Runtime_issues

Best Regards,

--

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

------------------------------------------------------------------------------
_______________________________________________
wxhaskell-users mailing list
wxhaskell-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users
Günther Schmidt | 5 Jan 2009 01:19

Re: Samples compile, but won't run on Windows

Hi,

this is a translation from the German error message:

"The application could not be properly initialized, click on OK to  
terminate the application".

Error Code: "0xc0150002".

Best regards

Günther

this is on Win XP Pro, ghc-6.10.1, latest binary package from your site.

Am 05.01.2009, 01:00 Uhr, schrieb shelarcy <shelarcy@...>:

> Hi,
>
> On Mon, 05 Jan 2009 02:41:59 +0900, Günther Schmidt
<redcom@...>  
> wrote:
>> I'm using ghc 6.10 here and tried to run the samples. Now I did  
>> understand
>> the wouldn't run in ghci and so I compiled them.
>>
>> They do compile, the just won't run (on Windows XP), it immediately  
>> aborts
>> with an error message about not being able to properly initialize the
>> application.
(Continue reading)

shelarcy | 5 Jan 2009 01:54
Picon
Gravatar

Re: Samples compile, but won't run on Windows

On Mon, 05 Jan 2009 09:19:59 +0900, Günther Schmidt <redcom <at> fedoms.com> wrote:
> this is a translation from the German error message:
>
> "The application could not be properly initialized, click on OK to
> terminate the application".
>
> Error Code: "0xc0150002".

Okay. How about install Microsoft Visual C++ 2008 SP1 Redistributable Package?

http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2&displaylang=en

Best Regards,

--

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

------------------------------------------------------------------------------
_______________________________________________
wxhaskell-users mailing list
wxhaskell-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users
Bernd Holzmüller | 6 Jan 2009 14:10
Picon

Re: [wxhaskell-devel] darcs patch: Add toolMenuFromBitmap function

Hi,

thanks for adding this function to enable adding bitmaps for tool bar 
items from a resource file.
I'm sorry to note that on my Windows XP the extension does not work. 
Perhaps you can add this to your bug list!?

In detail: In my application, I defined a function to use the new 
functionality like this:

myToolMenu tbar menuItem iconName = do
   icon <- iconCreateLoad iconName wxBITMAP_TYPE_BMP_RESOURCE (sz 16 16) -- does not display bitmaps!
   -- icon <- iconCreateLoad iconName wxBITMAP_TYPE_ICO_RESOURCE (sz 16 16) -- crashes!
   toolMenuFromBitmap tbar menuItem "" icon []

I observe the following behavior:
a) When using wxBITMAP_TYPE_BMP_RESOURCE the application starts, but no 
bitmaps are displayed for the tool items.
b) When using wxBITMAP_TYPE_ICO_RESOURCE the application crashes when 
starting

The resource file looks as follows:

ABOUT               ICON    DISCARDABLE     "bitmaps/about.ico"
CLOSETAB            ICON    DISCARDABLE     "bitmaps/closetab.ico"
...

which is compiled to a .o file using windres.exe from ghc-6.10.1\bin and 
the mingw gcc and then linked to the executable.
In contrast, setting the icon for the top level window using this method 
(Continue reading)

Jeroen Janssen | 6 Jan 2009 19:27
Picon
Favicon

Re: ANN: wxHaskell 0.11.1

Hi,

I tried compiling this program:

module Main where

import Graphics.UI.WX

main :: IO ()
main
  = start hello

hello :: IO ()
hello
  = do f    <- frame    [text := "Hello!"]
       quit <- button f [text := "Quit", on command := close f]
       set f [layout := widget quit]

with wxhaskell 0.11.0 (latest darcs version), ghc 6.8.3, libwxgtk 
2.8.7.1-0ubuntu3 on Kubuntu 8.04 and everything builds fine, but when I try 
to run it I get:

./wxhaskelltest: symbol lookup error: /usr/lib/libwxc-gtk2.8.7-0.11.0.so: 
undefined symbol: _ZNK7wxPanel14GetDefaultItemEv

Trying

strings /usr/lib/libwxc-gtk2.8.7-0.11.0.so | grep wxPanel14

gives:
(Continue reading)

Jeroen Janssen | 7 Jan 2009 20:44
Picon
Favicon

Re: ANN: wxHaskell 0.11.1

Follow-up:

With latest darcs version, showing revision 0.11.1 this time, this error does 
not occur any longer.  However, wxhaskell is still not working as now 
programs fail with:

(process:3353): GLib-GObject-CRITICAL 
**: /build/buildd/glib2.0-2.16.6/gobject/gtype.c:2248: initialization 
assertion failed, use IA__g_type_init() prior to this function

(process:3353): GLib-CRITICAL **: g_once_init_leave: assertion 
`initialization_value != 0' failed

(process:3353): Gdk-CRITICAL **: gdk_cursor_new_for_display: assertion 
`GDK_IS_DISPLAY (display)' failed

This happens for the example I mentioned in my previous e-mail but also for 
the examples included with wxhaskell (BoxedCombinator etc).

Any help with this?  The parameters stayed the same as in my previous e-mail 
(Ubuntu 8.04, wxwidgets/wxgtk 2.8.7 ubuntu version), I even tried updating to 
wxwidgets 2.8.9, but to no avail, same error.
I build wxhaskell with "cabal" install, followed by the cd wx en usual build 
process if that may be of any help.

Kind regards,

On Tuesday 06 January 2009 19:27:32 Jeroen Janssen wrote:
> Hi,
>
(Continue reading)

Henk-Jan van Tuyl | 10 Jan 2009 23:57
Picon

Exact fit of picture in bitmapButton


L.S.,

I created a bitmapButton as follows:

>   ok <- bitmapButton f [ on command := close f, picture :=  
> "button62.gif", text := "Ok" ]

The picture is not shown in full; how can I get this correct? I found out  
that wxPython has wx.BU_EXACTFIT to make the button exactly the size of  
the image; is there anything like that in wxHaskell?

--

-- 
Regards,
Henk-Jan van Tuyl

--
http://functor.bamikanarie.com
http://Van.Tuyl.eu/
--

------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB

Gmane