Message412399
The TKApplication class is a subclass of NSApplication which adds both
attributes and methods. Those are used throughout the macOS port of Tk,
and as Ronald says, the unique instance of NSApplication in Tk is actually
a TKApplication. Every macOS Application must have a unique NSApplication
object which is referenced by the global variable NSApp. The TKApplication
subclass was part of the first Cocoa port of Tk, long before I became
involved, and it may have even been there in the Carbon days. Subclassing
NSApplication appears to be something that Apple expects.
I don't know enough about Categories to understand how they could be used
to solve this problem. Do they somehow make it possible to add new methods
and attributes to an existing NSApplication object at runtime? I have
always thought of them as being syntactical in nature, as opposed to
allowing runtime modifications of an object's class after the object has
been instantiated. But I am not an expert on Categories by any means.
- Marc
On Wed, Feb 2, 2022 at 1:54 PM Ned Deily <report@bugs.python.org> wrote:
>
> Ned Deily <nad@python.org> added the comment:
>
> Thanks for looking into this, Ronald. Before we close this as a Python
> issue, perhaps Marc might have a suggestion on what should be done here
> from a Tk perspective.
>
> ----------
> nosy: +culler
> status: pending -> open
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue46573>
> _______________________________________
> |
|
Date |
User |
Action |
Args |
2022-02-02 20:36:04 | Marc.Culler | set | recipients:
+ Marc.Culler, ronaldoussoren, ned.deily, culler, remyrfouquette |
2022-02-02 20:36:04 | Marc.Culler | link | issue46573 messages |
2022-02-02 20:36:04 | Marc.Culler | create | |
|