Re: Tcl/Tk - Observations from a newbie.

From: Victor Wagner (vitus_at_45.free.net)
Date: 08/23/04


Date: Mon, 23 Aug 2004 05:48:05 +0000 (UTC)

Sektor van Skijlen <ethouris@wp.spamu.lubie.nie.pl> wrote:
> I'd rather propose somethink like "actions" in Qt, that is, objects, which
> bind the keyboard shortcut, menu entry and toolbar button.

This can be quite easily implemented in pure Tcl. I've written something
alike for my last project.

There was a concept of "operation" which have name, command and keyboard
shortcut as properties. Operations can be enabled and disabled.

If you want to add operation to menu, just say
operationMenu $menu and it would perform $menu add command with all
appropriate parameters, and also remember than this menu entry should be
enabled/disabled along with entire operation.

Same thing with operationButton command, which allows to specify
alternate (typically shorter) text, and/or image.
If either of them is specifed, full name of operation is used as tooltip
for button.

There is also commands to disable/enable groups of operations.

May be I should polish this code and submit it to something like tklib.

 

-- 
As pointed out in a followup, Real Perl Programmers prefer things to be
visually distinct.
             -- Larry Wall in <199710161841.LAA13208@wall.org>


Relevant Pages

  • Re: Error IDLIST
    ... Without digging into much details here, first that comes to my mind: ... - You misspelled the entry point name. ... No need to specify the path to ncpa.cpl. ... - Please test the command with CMD at run time first to see if it works on your image. ...
    (microsoft.public.windowsxp.embedded)
  • Re: can someone explain crontab to me better?
    ... Those entries have nothing to do with duration. ... The entry of you would run every two hours or better every even hour and then ... > when you specify minutes, does it mean the command is run every X ...
    (freebsd-newbies)
  • Re: ie6sp1 : Repair Function Blocked - Anyone know of a fix?
    ... Robert Aldwinckle wrote: ... >> Unfortunately am having a bit of difficulty with GetVers. ... > for command itself not to the thing it is being used to execute. ... Ran Registry Find - one entry: ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: ie6sp1 : Repair Function Blocked - Anyone know of a fix?
    ... I already explained that that command cannot ... work because there is no DllRegisterServer entry point in that module. ... there is a DllInstall entry point there. ... NTx uses the registry value. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Messages at form closing?
    ... the user's entry. ... > Save command buttong, so I coded my own that updates to the degree I ... One one of the subforms is a command ... >>> Change the data in the field or fields that contain the duplicate data, ...
    (microsoft.public.access.modulesdaovba)