Re: How to pass an object from inside its own method to a helper function

Liste des GroupesRevenir à cl tcl 
Sujet : Re: How to pass an object from inside its own method to a helper function
De : mark (at) *nospam* qtrac.eu (Mark Summerfield)
Groupes : comp.lang.tcl
Date : 11. Jul 2024, 12:42:36
Autres entêtes
Message-ID : <1C6dnZup-smxWBL7nZ2dnZfqnPudnZ2d@brightview.co.uk>
References : 1 2 3
User-Agent : Pan/0.154 (Izium; 517acf4)
On Thu, 11 Jul 2024 13:12:52 +0200, Schelte wrote:

[snip]
Or less hacky:
 
proc make_file_menu {app} {
     .menu.file add command -command [list $app on_quit] \
        -label Quit -underline 0 -accelerator Ctrl+Q
}
 
Originally you had $app inside curly braces, which prevented it from
being substituted at definition time. At execution time, the app
variable was out of scope.

Thank you, that works great.

Date Sujet#  Auteur
11 Jul 24 * How to pass an object from inside its own method to a helper function5Mark Summerfield
11 Jul 24 `* Re: How to pass an object from inside its own method to a helper function4Mark Summerfield
11 Jul 24  `* Re: How to pass an object from inside its own method to a helper function3Schelte
11 Jul 24   `* Re: How to pass an object from inside its own method to a helper function2Mark Summerfield
11 Jul 24    `- Re: How to pass an object from inside its own method to a helper function1Ralf Fassel

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal