vlsimpson has asked for the wisdom of the Perl Monks concerning the following question:
This is a Tkx editor (mentioned in a previous post Tkx: "invalid command error" OS X).
The code below works fine on XP but no menus are displaying on OS X (I don't have a Mac but I have couple of testers working with me on this).
The testers are getting no errors, the window pops up. The output from the Tkx::TRACE flag seems to indicate the commands are executing.
I've googled on this and couldn't find anything. And I'm (almost) certain I have the syntax correct.
I'm working with Perl 10/Tk 8.5.5. The Mackers are stuck with 8.4 Tk installed via CPAN (at least until I get them to upgrade ;)
Output from tk_windowingsystem() is aqua on OS X
I've also had them run the demo editor tkx-ed from the module with same results.
Thanks
use warnings; use strict; use Tkx; $Tkx::TRACE = 1; our $VERSION = "1.0.0"; my ($mw, $tw); $mw = Tkx::widget->new("."); $mw->configure(-menu => mk_menu($mw)); Tkx::wm_title($mw, "GutThing-$VERSION"); my ($height, $width, $wrap) = (20, 80, "none"); $tw = $mw->new_text( -height => $height, -width => $width, -wrap => $wrap, ); $tw->g_pack( -anchor => "center", -expand => 1, -fill => "both", ); $tw->g_focus; $tw->insert("end", "If you can read this it worked"); $tw->insert("end", " but I don't do much at the moment."); $tw->insert("end", " This is a long line that doesn't wrap."); $tw->insert("end", " We don't wrap our lines in this editor for PPing. +\n"); $tw->insert("end", "If you type here the line should scroll if you go +longer than window width.\n"); Tkx::MainLoop(); exit; sub mk_menu { my $mw = shift; my $menu = $mw->new_menu; my $file = $menu->new_menu( -tearoff => 0, ); $menu->add_cascade( -label => "File", -underline => 0, -menu => $file, ); return $menu; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tkx: Tkx editor doesn't display menus on OS X
by ikegami (Patriarch) on Nov 25, 2008 at 01:36 UTC | |
by vlsimpson (Beadle) on Nov 25, 2008 at 03:34 UTC | |
|
Re: Tkx: Tkx editor doesn't display menus on OS X
by jand (Friar) on Nov 25, 2008 at 22:41 UTC |