chrstphrchvz / perl-tcl-ptk

Tcl::pTk - Interface to Tcl/Tk with Perl/Tk compatible syntax
https://metacpan.org/pod/Tcl::pTk
Other
8 stars 2 forks source link

method `Widget` unimplemented #16

Closed chrstphrchvz closed 2 years ago

chrstphrchvz commented 3 years ago

https://rt.cpan.org/Ticket/Display.html?id=129947#txn-1854150

…i.e. the inverse of PathName.

Is this really not already present? Although I'm not sure how common it is in Perl/Tk programs, there's multiple places internally where …->Widget($path) might be more useful instead of duplicating several lines each time to look up something from the widgets hash.

chrstphrchvz commented 2 years ago

Not sure if this can be implemented by relying on …->interp->widget(); there likely also has to be a check for whether the path exists. I would like to know how Perl/Tk implements …->Widget() before proceeding (edit: see Widget() in Tk.xs, WidgetRef() in tkGlue.c).