in reply to perlTk Type Tutor - useful for learning a DVORAK keyboard layout

First, PodMaster++!

Second, the switching of the keyboard didn't work because your SwitchLayout function takes a HoH as argument, while your menu-commands only supplies a single hash. It works like a charm if you would change lines 305/306 to:

$f->command(-label=>'QWERTY', -command=>[\&SwitchLayout, $a=>\%QWERTY] +); $f->command(-label=>'DVORAK', -command => [\&SwitchLayout, $a=>\%DVORA +K]);
(Yes, I misabused the global $a for this purpose ;-)

Hope it helps,

-- JaWi

"A chicken is an egg's way of producing more eggs."

Replies are listed 'Best First'.
Re: Re: perlTk Type Tutor - useful for learning a DVORAK keyboard layout
by PodMaster (Abbot) on Jan 26, 2003 at 13:46 UTC
    Thanks.

    I guess I was thinking $f (the ~Layout menu) would be the first thing passed ~ anyway, I've updated the original post and fixed sub SwitchLayout, and all the calls to it ;)(no dumb 2arg blah)

    Now I can work on some kind of prompting wizard type dealie (now type 'A', and 'A' would light up)


    MJD says you can't just make shit up and expect the computer to know what you mean, retardo!
    ** The Third rule of perl club is a statement of fact: pod is sexy.