in reply to Re: Tk Text -font=>segfault
in thread Tk Text -font=>segfault

(nb. this is not a missing or misnamed font issue)

Oh no! Before i convince myself this is a 5.8.8 glitch and that i should upgrade, can someone with 5.10 on linux confirm igelkott's observation?

Replies are listed 'Best First'.
Re^3: Tk Text -font=>segfault
by BaldManTom (Friar) on Mar 27, 2008 at 23:04 UTC

    This may or may not help you much, as I don't have Linux. But I've tried the code provided on my Mac running both 5.8.8 and 5.10, and neither seg faults. However, neither does what's expected, either. I'm guessing that if the user types in the text fields in the tabs, the text is supposed to render as 12 point Courier, and that doesn't seem to work for me (didn't on my Windows box running strawberry perl 5.10, either).

    However, there's a workaround. Add use Tk::Font then change

    foreach (keys %pg) {$txt{$_} = $pg{$_}->Text(-font=>"courier-12")->pack()}

    to

    foreach (keys %pg) {$txt{$_} = $pg{$_}->Text()->pack(); $pg{$_}->Font(family=>'courier',point=>12)}

    and see if that gets you what you need.