This argument seems mere ‘lana caprina’.
Whatever the name we limited human beings give to an object (frame or anything else), any programming language assigns to it at the first occurrence an unique number (usually an integer or a long) and thereinafter always refers to it by that number. Try using GetId() at the first occurrence of your frame, then change its name with SetName() and use again GetI(): the result will be the same.
By the way, wx.Object who is the base class of wx.Window and wx.Frame, but is not normally used directly by us laymen, does NOT have an attribute SetName().
As you've seen from the messages here, there are lots of ways, but my
earlier suggestion:
Sorry, I wasn't clear: I don't want to link the two. I'd like to
understand how the two know about each other, since I don't see any
instruction that somehow links the app and the frame, hence how does
the app know that the frame was closed, and it should terminate the
application?
The demo code form the book you're looking at is simplified to the
easiest way to get an app up.
OK, so it doesn't really matter. The fuller code below does link the
two and makes sense to a newbie like me: