Günther Schmidt | 2 Feb 22:35 2009

getAbsoluteFilePath, getApplicationDir, getApplicationPath, neither working?!

Hi,

none of the above functions seem to be working, how can I then find where  
the exe is? Copyfile is not very reliable when I pass it relative paths.

Günther

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
Henk-Jan van Tuyl | 3 Feb 23:51 2009
Picon

Re: getAbsoluteFilePath, getApplicationDir, getApplicationPath, neither working?!

On Mon, 02 Feb 2009 22:35:44 +0100, Günther Schmidt
<redcom@...>  
wrote:

> Hi,
>
> none of the above functions seem to be working, how can I then find where
> the exe is? Copyfile is not very reliable when I pass it relative paths.
>
> Günther
>

   currentDirectory  <- System.Directory.getCurrentDirectory

Convert the relative path to an absolute path with:
   canonicalizedPath <- System.Directory.canonicalizePath ".."

There is also System.Directory.findExecutable to find an executable by  
name, in the search path, but this is not a reliable way to find your  
application.

--

-- 
Met vriendelijke groet,
Henk-Jan van Tuyl

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

(Continue reading)

G?uenther Schmidt | 4 Feb 01:55 2009

Re: getAbsoluteFilePath, getApplicationDir, getApplicationPath, neither working?!

Hallo Henk-Jan,

moi weer van jou te hooren.

Well actually none of the below solutions does give me the result I 
need, but this does:

    System.Win32.getModuleFileName nullPtr

That was given to me by jeffz on irc and made me want to marry him :-)

It works quite nicely, and really solves the problem of finding files 
relative to exes dir when the exe is not called from the directory it's in.

Haartelik bedankt,

Günther

Henk-Jan van Tuyl schrieb:
> On Mon, 02 Feb 2009 22:35:44 +0100, Günther Schmidt 
> <redcom@...> wrote:
>
>> Hi,
>>
>> none of the above functions seem to be working, how can I then find 
>> where
>> the exe is? Copyfile is not very reliable when I pass it relative paths.
>>
>> Günther
>>
(Continue reading)

Chris Casinghino | 5 Feb 05:42 2009
Picon

"Controls" and "Print" examples not working

Hi all,

It seems the darcs version solves the problem I reported last week
(see the "GTK initialization failure" thread).  Thanks, whoever fixed
this.

Now I am experimenting with some of the different examples in the
samples/wx directory.  Most of them work fine.  However, Controls.hs
segfaults immediately, and Print.hs segfaults if I try to use any of
the print options from the menu.

Unfortunately, I'm completely new to wxwidgets and wxhaskell, so even
locating specific parts of these files that might be to blame has been
a problem.  Can any one else confirm (or refute) this behavior?
Anyone know what might be causing it?

Thanks for your help!

--Chris Casinghino

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
Eric | 14 Feb 01:31 2009

Trying to size a window

Dear all,

I have written the following code to display a top level window with 
width and height 1000 :

gui = do
    f <- frame [size := Size 1000 1000]
    return()

When i run the program, however, the window appears larger for a second, 
and then returns to te default, smaller size. Anyone know what's going on?

Eric M.

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
Eric Kow | 14 Feb 11:36 2009
Picon

cabal install insists on reinstalling wxcore

So I've got this program GenI

  darcs get http://code.haskell.org/GenI

If I try to cabal install it:

  cd libGenI; cabal install; cd ..;
  cd GenI;    cabal install; cd ..

cabal-install tries to install wxcore even though it already is
installed (and in my user package database, for what it's worth)

Has anybody else run into this kind of problem?  Is this something we've
already dealt with?

For now the solution seems to be for me to install GenI by hand (sigh)

I realise it may be a cabal-install issue, and the wxHaskell build instructions
mention some problems in the cabal-install dependency tracking.  Do we have
anything more specific?  Bug numbers?  Is this something I should be mailing
the cabal-install folks about?

Thanks!

Eric

PS: cabal-install --dry-run output below

-----------------8<--------------------------------------------

(Continue reading)

Henk-Jan van Tuyl | 15 Feb 00:33 2009
Picon

Re: cabal install insists on reinstalling wxcore


On Sat, 14 Feb 2009 11:36:51 +0100, Eric Kow <eric.kow@...> wrote:

> So I've got this program GenI
>
>   darcs get http://code.haskell.org/GenI
>
> If I try to cabal install it:
>
>   cd libGenI; cabal install; cd ..;
>   cd GenI;    cabal install; cd ..
>
> cabal-install tries to install wxcore even though it already is
> installed (and in my user package database, for what it's worth)
>
> Has anybody else run into this kind of problem?  Is this something we've
> already dealt with?
>

I have had the same after the command:
   cabal install --global wxFruit
after downloading Yampa, wxCore was "installed" again (it actually  
failed), the same version as already installed.

Regards,
Henk-Jan van Tuyl

--
http://functor.bamikanarie.com
http://Van.Tuyl.eu/
(Continue reading)

Günther Schmidt | 15 Feb 00:31 2009

Size of an entry field

Hi,

how can I set the visible size of an entry field?
In pixels or in characters.

Günther

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
Henk-Jan van Tuyl | 15 Feb 18:17 2009
Picon

Re: Size of an entry field

On Sun, 15 Feb 2009 00:31:11 +0100, Günther Schmidt
<redcom@...>  
wrote:

> Hi,
>
> how can I set the visible size of an entry field?
> In pixels or in characters.
>
> Günther

At 

http://hackage.haskell.org/packages/archive/wx/0.10.2/doc/html/Graphics-UI-WX-Controls.html#5

I see that the text entry widgets have Dimensions in their list of  
instances; one of the methods of Dimensions will probably do it.

--

-- 
Met vriendelijke groet,
Henk-Jan van Tuyl

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

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
(Continue reading)

G?uenther Schmidt | 15 Feb 18:30 2009

Re: Size of an entry field

Hi Henk Jan,

I've found out by now what works:

    static $ minsize (sz 40 (-1)) $ widget

Günther

Henk-Jan van Tuyl schrieb:
> On Sun, 15 Feb 2009 00:31:11 +0100, Günther Schmidt 
> <redcom@...> wrote:
>
>> Hi,
>>
>> how can I set the visible size of an entry field?
>> In pixels or in characters.
>>
>> Günther
>
> At 
>
http://hackage.haskell.org/packages/archive/wx/0.10.2/doc/html/Graphics-UI-WX-Controls.html#5 
> I see that the text entry widgets have Dimensions in their list of 
> instances; one of the methods of Dimensions will probably do it.
>

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
(Continue reading)


Gmane