Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

BaldManTom

by BaldManTom (Friar)
on Jun 05, 2006 at 18:22 UTC ( [id://553672]=user: print w/replies, xml ) Need Help??

QA by training. I enjoy playing around and writing little "one off" type s‎crip‎ts that serve a small, specific purpose, though I'm trying my hand at larger projects.

Miscellaneous Things to Remember

Padre and Wx on Mac OS X (10.5)

I had a heckuva time getting Padre running on my Mac. I now wish I'd saved some of the errors I'd gotten for posterity, perhaps I'll be able to do so should I ever blow away the OS and start over. But, here's what I did to get things working.

wxWidgets - I downloaded the source from the main wxWidgets site and compiled and installed. When I did a vanilla compile and install, Alien-wxWidgets (see below) found my wxWidgets intallation, but noted that there was no support for 'gl', 'media', or 'stc'. Documentation is pretty lacking regarding the build options for wxWidgets, but I found that I could use --with-opengl and -enable-mediactrl to enable 'gl' and 'media'. So, the command line I used with the configure s‎crip‎t is:
../configure --with-opengl --enable-mediactrl
Then make and make install to get the core stuff installed. That left 'stc' which I found under contrib/src but didn't know how to install. I finally figured out that when I ran the configure s‎crip‎t, additional Makefiles got created in a 'contrib' subdirectory. So, after make install, I did the following

make -C contrib/ make -C contrib/ install

Which got me the rest of the way home.

Padre Dependencies - This gave me fits. Since I had tried installing Padre previously, I had also previously installed all the other dependencies. After a lot of trial and error, I ended up blowing away all traces of Alien-wxWidgets, Wx, Wx-Perl-ProcessStream and Wx-Perl-Dialog. When installing Alien-wxWidgets, I just chose to use the wxWidgets installation I had just built. Once I did that, my life suddenly became much easier. The only thing I had to force-install was Wx-Perl-ProcessStream, as my Mac seemed very unhappy about it.

Padre Itself - Once all the dependencies were out of the way, Padre itself installed with no issues. The only change I needed to make was to the padre startup s‎crip‎t, to use 'wxPerl' instead of 'perl'.

OpenOffice::OODoc Oddities

These may not be odd, nor may they be issues with OpenOffice::OODoc and are simply me being an idiot, but I've spent lots and lots of time working around these issues, so I want to record what I've done so I'll remember next time.

Creating Styles - For some reason, when I create a new style using the $doc->createStyle method, properties that I specify are not applied. Instead, I have to first create the style, then update it, as such:

$c->createStyle ( "FixedWidth", family => 'paragraph', parent => 'Standard', properties => { } ); $c->updateStyle ( "FixedWidth", properties => { -area => 'text', 'style:font-name' => 'Courier New', 'fo:font-size' => '10pt', } );

Then my style is happy.

Encoding - If my document needs some encoding other than the default (which is 'iso-8859-1'), I should specify that when creating the document object:

my $doc = OpenOffice::OODoc->new( file => $fn, create => 'text', local_encoding => 'utf-8', );

That worked rather nicely for me.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-03-28 16:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found