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; }

In reply to Tkx: Tkx editor doesn't display menus on OS X by vlsimpson

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.