Click here to get back home

Installing Curses Module?

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Installing Curses Module? Jason Lowder 02-22-2008
Posted by Jason Lowder on February 22, 2008, 11:45 am
Please log in for more thread options
Hello,

Typically I install modules using the ActiveState package manager, but
when installing the Curses modules I've been downloading them and
unzipping the files into the Perl lib dir (package manager doesn't have
this module).

The sub components (Widgets) seem to be recognized just fine, but the
main Curses module is giving me grief. It doesn't seem to recognize the
.pm file. The widgets modules and main curses module are in different
folders in the lib dir if it matters. I've tried combining them with no
luck. I also notice there are a bunch of C files and what not in the
main module folder. Is there something I need to do to enable this
module? I didn't see any instructions and am at a loss for how to
proceed. I'm trying to use the Curses combo-list box widget in my Tk GUI..

Any help in getting this setup correctly would be greatly appreciated.

Thanks,

Jason

Posted by sisyphus on February 23, 2008, 3:06 am
Please log in for more thread options
wrote:
=2E
=2E
> I also notice there are a bunch of C files and what not in the
> main module folder. =A0Is there something I need to do to enable this
> module? =A0

Yes - those C files need to be compiled - copy'n'paste of the pm
file(s) will not suffice.

I think the best you will do for Curses on Win32 is:
ppm install http://www.bribes.org/perl/ppm/Curses.ppd

Curses does not build readily on Windows - in fact I was surprised to
see a ppm for it even existed.

Cheers,
Rob


Posted by Jason Lowder on February 23, 2008, 6:23 pm
Please log in for more thread options
Hi Rob,

Thank you, that seemed to take care of my main Curses module issue,
but... :-)

Now my Widgets module can't seem to find any of it components. When
typing out "use Curses::Widgets::" my IDE (Komodo Edit) shows me all the
various widget options, yet when I select one I receive an error.

This is what I see when trying to run my script with the example
combobox widget code.

Can't locate object method "ComboBox" via package "Curses::Widgets" at
C:\OpenPerlIDE\PerlScripts\Repository.pl line 37.

Is there something else I need to do in order to fully configure the
widgets modules? I've been looking online but can't find any
instructions on what to do. There doesn't appear to be a .ppd file for
the Widgets component.

Thanks again,

Jason

sisyphus wrote:
> wrote:
> .
> .
>> I also notice there are a bunch of C files and what not in the
>> main module folder. Is there something I need to do to enable this
>> module?
>
> Yes - those C files need to be compiled - copy'n'paste of the pm
> file(s) will not suffice.
>
> I think the best you will do for Curses on Win32 is:
> ppm install http://www.bribes.org/perl/ppm/Curses.ppd
>
> Curses does not build readily on Windows - in fact I was surprised to
> see a ppm for it even existed.
>
> Cheers,
> Rob
>

Posted by Jean-Louis MOREL on February 24, 2008, 5:44 am
Please log in for more thread options
jlowder@austin.removeme.rr.com a dit...
>
>Now my Widgets module can't seem to find any of it components. When
>typing out "use Curses::Widgets::" my IDE (Komodo Edit) shows me all the
>various widget options, yet when I select one I receive an error.
>
>This is what I see when trying to run my script with the example
>combobox widget code.
>
>Can't locate object method "ComboBox" via package "Curses::Widgets" at
>C:\OpenPerlIDE\PerlScripts\Repository.pl line 37.
>
>Is there something else I need to do in order to fully configure the
>widgets modules? I've been looking online but can't find any
>instructions on what to do. There doesn't appear to be a .ppd file for
>the Widgets component.
>

I added the module Curses::Widgets in my repository.
To install it:

ppm install http://www.bribes.org/perl/ppm/Curses-Widgets.ppd

The test script (seems to work fine):

http://www.bribes.org/perl/CursesWidgetsDemo.zip

HTH

--
J-L.M.
http://www.bribes.org/perl


Posted by Jason Lowder on February 24, 2008, 11:42 am
Please log in for more thread options
Thank you, but the same error exists.

I removed the Curses package altogether and ran the following:

C:\Perl\bin>ppm install http://www.bribes.org/perl/ppm/Curses.ppd

Downloading Curses-1.20...done

Unpacking Curses-1.20...done

Generating HTML for Curses-1.20...done

Installing to site area...done

6 files unchanged



C:\Perl\bin>ppm install
http://www.bribes.org/perl/ppm/Curses-Widgets.ppd

Downloading Curses-Widgets-1.997...done

Unpacking Curses-Widgets-1.997...done

Generating HTML for Curses-Widgets-1.997...done

Installing to site area...done

13 files installed

13 files unchanged

So far so good. The context checker seems to now like both the main and
widgets modules. I then execute my script and receive the following:

Can't locate object method "ComboBox" via package "Curses::Widgets" at
C:\OpenPerlIDE\PerlScripts\Repository.pl line 37.

$cb = $frame1->Curses::Widgets::ComboBox->new({

The line of failure is above ^. This is the same error as before.

I then downloaded the demo script you provided a link to. On two
different machines it fails. Depending on the editor I run from, I
either receive a crash in the Perl Command Line Interpreter, or when
using Komodo Edit, I receive a return error code of -1073741819.
Running directly from the command line just returns immediately.

I am running this on Windows.

Any other suggestions? Or for that matter is there another module I can
use for a drop-down list box?

Thank again,

Jason

Jean-Louis MOREL wrote:
> jlowder@austin.removeme.rr.com a dit...
>> Now my Widgets module can't seem to find any of it components. When
>> typing out "use Curses::Widgets::" my IDE (Komodo Edit) shows me all the
>> various widget options, yet when I select one I receive an error.
>>
>> This is what I see when trying to run my script with the example
>> combobox widget code.
>>
>> Can't locate object method "ComboBox" via package "Curses::Widgets" at
>> C:\OpenPerlIDE\PerlScripts\Repository.pl line 37.
>>
>> Is there something else I need to do in order to fully configure the
>> widgets modules? I've been looking online but can't find any
>> instructions on what to do. There doesn't appear to be a .ppd file for
>> the Widgets component.
>>
>
> I added the module Curses::Widgets in my repository.
> To install it:
>
> ppm install http://www.bribes.org/perl/ppm/Curses-Widgets.ppd
>
> The test script (seems to work fine):
>
> http://www.bribes.org/perl/CursesWidgetsDemo.zip
>
> HTH
>

Similar ThreadsPosted
curses module installation failed March 16, 2006, 1:26 pm
CDK vs Curses::UI April 15, 2005, 11:12 am
keylist for set_binding in Curses::UI February 7, 2005, 3:11 pm
Curses-perl that doesn't live up to it's name? November 10, 2006, 10:30 pm
Curses::Widgets::Menu Question May 11, 2005, 8:32 pm
Compile problem: Curses::Widgets September 24, 2007, 2:54 pm
Curses::UI::Widget - binding function keys July 18, 2006, 1:53 am
ANNOUNCE: Curses interface for Config::Model May 15, 2007, 7:20 am
SOLVED: Curses::Widgets Runtime Error October 13, 2007, 3:01 pm
ANNOUNCE: New release of Curses interface for Config::Model October 30, 2007, 8:12 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap