Arie Middelkoop | 2 Feb 2007 14:31
Picon

Re: Strange polygon behaviour


Hi,

I managed to fix the problem of incorrect polygon drawing on 64-bit
machines. It is basically a similar fix of what I send in a long time
ago, but it has portability issues with respect to win32:

A simple fix is to change (in wxc/src/ewxw/eljdc.cpp) the cast to (int*)
to the cast to (intptr_t*). On a 64-bit machine, this will cause a
correct read of the 64-bit int (provided by the Haskell world) and
truncates it to a 32-bit int required by wxWidgets.

What I remember is that intptr_t is not defined in win32. How was this
solved previous time?

Greetings,
Arie
shelarcy | 2 Feb 2007 15:46
Picon
Gravatar

Re: Strange polygon behaviour

Hi Ari,

On Fri, 02 Feb 2007 22:31:03 +0900, Arie Middelkoop <ariem@...> wrote:
> I managed to fix the problem of incorrect polygon drawing on 64-bit
> machines. It is basically a similar fix of what I send in a long time
> ago, but it has portability issues with respect to win32:
>
> A simple fix is to change (in wxc/src/ewxw/eljdc.cpp) the cast to (int*)
> to the cast to (intptr_t*). On a 64-bit machine, this will cause a
> correct read of the 64-bit int (provided by the Haskell world) and
> truncates it to a 32-bit int required by wxWidgets.
>
> What I remember is that intptr_t is not defined in win32. How was this
> solved previous time?

inttypes.h doesn't exist in Visual C++ 7 (Visual Studio 2003).
But intptr_t is available by io.h.

So I added compilation flag to build both gcc and Visual C++.

http://sourceforge.net/mailarchive/forum.php?thread_id=31202423&forum_id=34197
http://darcs.haskell.org/wxhaskell/wxc/include/wrapper.h

Best Regards,

--

-- 
shelarcy <shelarcy    capella.freemail.ne.jp>
http://page.freett.com/shelarcy/

-------------------------------------------------------------------------
(Continue reading)

arie | 2 Feb 2007 16:47
Picon

darcs patch: fix-polygon-behaviour-64

Fri Feb  2 16:45:17 CET 2007  ariem@...
  * fix-polygon-behaviour-64
  Fixed issue 'Strange polygon behaviour on 64-bit machines'
  reported by Chris Mears at 14 Dec 2006.

  Problem: the arrays inspected by the wxDC_Polygon function
  are assumed to contain 32-bits ints. On 64-bit machines
  these are actually 64-bits ints.

  Fix: (a bit of a hack...) the code now assumes that the
  arrays contain intptr_t values. This type represents ints
  of the same number of bits as the Haskell ints (on 32-bit
  and 64-bit machines). The code now dereferences each element
  in the array correctly, but still truncates the possibly
  64-bit value to a 32-bit value. This is not a problem
  in practice.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
(Continue reading)

Conal Elliott | 14 Feb 2007 01:28
Gravatar

doc file name changes??

Am I imagining or did haddock doc file names just get changed from "http://wxhaskell.sourceforge.net/doc/Graphics-UI-WX-Attributes.html " to "http://wxhaskell.sourceforge.net/doc/Graphics.UI.WX.Attributes.html" (etc)?  My auto-generated doc links from Phooey to wxHaskell are now all broken.  See http://darcs.haskell.org/packages/phooey/doc/html/Graphics-UI-Phooey-Imperative.html

Thanks,  - Conal

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Eric Kow | 14 Feb 2007 10:47
Picon
Gravatar

Re: doc file name changes??

On 2/14/07, Conal Elliott <conal <at> conal.net> wrote:
> Am I imagining or did haddock doc file names just get changed from
> "http://wxhaskell.sourceforge.net/doc/Graphics-UI-WX-Attributes.html
> " to
> "http://wxhaskell.sourceforge.net/doc/Graphics.UI.WX.Attributes.html"
> (etc)?

It might be the other way around (i.e. haddock now generates links
with dashes instead of dots).
I haven't updated the API links on the wxhaskell site yet; have you
upgraded haddock recently?

If you could maybe cook up a little shell script to symlink all the
foo-bar to foo.bar, I could run it so that the links work.  When
wxhaskell 0.10 gets released, I can then run the script 'backwards' so
that the foo-bars are the official ones and the 'foo.bar's are the
symlinks.

Or you could pass in params to keep the dots for now (and the switch
to dashes once the release comes out)

[oh and on a random note, Phooey, GuiTV, etc is on my list of things
I'd like to learn about Someday...]

--

-- 
Eric Kow                     http://www.loria.fr/~kow
PGP Key ID: 08AC04F9         Merci de corriger mon français.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
wxhaskell-users mailing list
wxhaskell-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users
Wolfgang Jeltsch | 14 Feb 2007 18:47

building problems

Hello,

I use wxWidgets-GTK as currently provided by Debian testing which is
version 2.6, probably with Unicode support.  My Haskell compiler is GHC 6.6 
but this shouldn’t matter at the moment.

I configured wxHaskell using the 	--prefix, --with-opengl and --package-conf 
options.  When running make afterwards, I received the output which is 
attached to this e-mail.  Can anybody tell me what’s wrong here and how I can 
work around these problems?

Best wishes,
Wolfgang
Attachment (make-output): text/x-objcsrc, 3500 bytes
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Jeremy O'Donoghue | 14 Feb 2007 22:21
Picon

Re: building problems

Hi Wolfgang,

On 14/02/07, Wolfgang Jeltsch <4f4t8snn@...> wrote:
> Hello,
>
> I use wxWidgets-GTK as currently provided by Debian testing which is
> version 2.6, probably with Unicode support.  My Haskell compiler is GHC 6.6
> but this shouldn't matter at the moment.
>
> I configured wxHaskell using the        --prefix, --with-opengl and --package-conf
> options.  When running make afterwards, I received the output which is
> attached to this e-mail.  Can anybody tell me what's wrong here and how I can
> work around these problems?

This looks as though it is a Unicode issue - problems with wxString
usually are. Basically on non-unicode builds the underlying type is a
char * and on Unicode builds it is defined as a suitable pointer for
Unicode strings. Try adding (or removing) --with-unicode from
wxHaskell command line.

running '<path-to>/wx-config --list' will tell you whether you need to
build for Unicode or not.

Regards
Jeremy

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Doaitse Swierstra | 16 Feb 2007 13:40
Picon

bus error

When trying to run even the smallert wx program in my Mac OS X 10.4, Intel:

module Main where
import Graphics.UI.WX
import EnableGUI

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]

I get:

koshka:~/Desktop/TestWX doaitse$ ghci -package wx -fglasgow-exts  Main.hs
   ___         ___ _
  / _ \ /\  /\/ __(_)
/ /_\// /_/ / /  | |      GHC Interactive, version 6.6, for Haskell 98.
/ /_\\/ __  / /___| |      http://www.haskell.org/ghc/
\____/\/ /_/\____/|_|      Type :? for help.

Loading package base ... linking ... done.
Loading package haskell98 ... linking ... done.
Loading package wxcore-0.10.1 ... linking ... done.
Loading package wx-0.10.1 ... linking ... done.
[1 of 2] Compiling EnableGUI        ( EnableGUI.hs, interpreted )
[2 of 2] Compiling Main             ( Main.hs, interpreted )
Ok, modules loaded: EnableGUI, Main.
*Main> enableGUI >> main
*Main> enableGUI >> main
Bus error
koshka:~/Desktop/TestWX doaitse$


So note that the first time the button appears, but the second time I try to run it I get the bus error.

This doesn't look good to me ;-{{, but I have no idea what to do next?

The other unhealthy thing is that if I comment out the EnableGUI and use ghc, I get:

koshka:~/Desktop/TestWX doaitse$ ghc -package wx Main.hs
koshka:~/Desktop/TestWX doaitse$ /usr/local/wxhaskell/bin/macosx-app -v Main         
creating resource:
> /Developer/Tools/Rez -t APPL Carbon.r  -o Main
creating app directories:
- Main.app
- Main.app/Contents
- Main.app/Contents/MacOS
- Main.app/Contents/Resources
creating package info:
- Main.app/Contents/PkgInfo
done.

koshka:~/Desktop/TestWX doaitse$ open Main
2007-02-16 13:38:46.947 open[1770] LSOpenFromURLSpec() returned -10661 for application (null) urls file://localhost/Users/doaitse/Desktop/TestWX/Main.
koshka:~/Desktop/TestWX doaitse$


Anyone any ideas?

 Doaitse





On Oct 22, 2006, at 4:18 PM, Mads Lindstrøm wrote:

Hi all

Is there anybody who has an example of using context sensitive popup
menus?

I am especially interested in an example with a listbox, where one can
right-click an element and get a popup menu.


Greetings,

Mads Lindstrøm



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
_______________________________________________
wxhaskell-users mailing list

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Doaitse Swierstra | 16 Feb 2007 14:14
Picon

Re: bus error

ad 1) It has been pointed out to me that you can call the enableGUI >> main only once; otherwise you get the problem I had

ad 2) I made a mistake in thinking that the a.out would always be used. So bad reading of the instructions from my side. Sorry.

 Doaitse


On Feb 16, 2007, at 1:40 PM, Doaitse Swierstra wrote:

When trying to run even the smallert wx program in my Mac OS X 10.4, Intel:

module Main where
import Graphics.UI.WX
import EnableGUI

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]

I get:

koshka:~/Desktop/TestWX doaitse$ ghci -package wx -fglasgow-exts  Main.hs
   ___         ___ _
  / _ \ /\  /\/ __(_)
/ /_\// /_/ / /  | |      GHC Interactive, version 6.6, for Haskell 98.
/ /_\\/ __  / /___| |      http://www.haskell.org/ghc/
\____/\/ /_/\____/|_|      Type :? for help.

Loading package base ... linking ... done.
Loading package haskell98 ... linking ... done.
Loading package wxcore-0.10.1 ... linking ... done.
Loading package wx-0.10.1 ... linking ... done.
[1 of 2] Compiling EnableGUI        ( EnableGUI.hs, interpreted )
[2 of 2] Compiling Main             ( Main.hs, interpreted )
Ok, modules loaded: EnableGUI, Main.
*Main> enableGUI >> main
*Main> enableGUI >> main
Bus error
koshka:~/Desktop/TestWX doaitse$


So note that the first time the button appears, but the second time I try to run it I get the bus error.

This doesn't look good to me ;-{{, but I have no idea what to do next?

The other unhealthy thing is that if I comment out the EnableGUI and use ghc, I get:

koshka:~/Desktop/TestWX doaitse$ ghc -package wx Main.hs
koshka:~/Desktop/TestWX doaitse$ /usr/local/wxhaskell/bin/macosx-app -v Main         
creating resource:
> /Developer/Tools/Rez -t APPL Carbon.r  -o Main
creating app directories:
- Main.app
- Main.app/Contents
- Main.app/Contents/MacOS
- Main.app/Contents/Resources
creating package info:
- Main.app/Contents/PkgInfo
done.

koshka:~/Desktop/TestWX doaitse$ open Main
2007-02-16 13:38:46.947 open[1770] LSOpenFromURLSpec() returned -10661 for application (null) urls file://localhost/Users/doaitse/Desktop/TestWX/Main.
koshka:~/Desktop/TestWX doaitse$


Anyone any ideas?

 Doaitse





On Oct 22, 2006, at 4:18 PM, Mads Lindstrøm wrote:

Hi all

Is there anybody who has an example of using context sensitive popup
menus?

I am especially interested in an example with a listbox, where one can
right-click an element and get a popup menu.


Greetings,

Mads Lindstrøm



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
_______________________________________________
wxhaskell-users mailing list

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
wxhaskell-users mailing list

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Wolfgang Jeltsch | 16 Feb 2007 18:23

Re: building problems

Am Mittwoch, 14. Februar 2007 22:21 schrieben Sie:
> […]

> This looks as though it is a Unicode issue - problems with wxString
> usually are. Basically on non-unicode builds the underlying type is a
> char * and on Unicode builds it is defined as a suitable pointer for
> Unicode strings. Try adding (or removing) --with-unicode from
> wxHaskell command line.

Hello,

thanks for this.  But what do you mean with “wxHaskell command line”?  Do you 
mean the ./configure command line for wxHaskell?  Alas, wxHaskell’s configure 
script doesn’t have an option “--with-unicode”.

> running '<path-to>/wx-config --list' will tell you whether you need to
> build for Unicode or not.

I need to.

> Regards
> Jeremy

Best wishes,
Wolfgang

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
wxhaskell-users mailing list
wxhaskell-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users

Gmane