Re: Implicit initialization is EVIL!

2011-07-08 Thread Andrew Berg
On 2011.07.07 12:29 PM, rantingrick wrote: So you prefer to close a gazillion windows one by one? If so, why not just code the GUI correctly from the start; by creating separate transactions? Thereby reducing the number of windows a user must juggle? FYI: You know the user complexity of a GUI

Re: Implicit initialization is EVIL!

2011-07-08 Thread rantingrick
On Jul 7, 8:25 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: rantingrick wrote: On Jul 7, 12:34 am, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: The important thing is that it's okay for an app to stay alive until its *last* top level window is closed. I partially

Re: Implicit initialization is EVIL!

2011-07-08 Thread Steven D'Aprano
rantingrick wrote: On Jul 7, 8:25 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: rantingrick wrote: On Jul 7, 12:34 am, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: The important thing is that it's okay for an app to stay alive until its *last* top level window is

Re: Implicit initialization is EVIL!

2011-07-07 Thread rantingrick
On Jul 7, 12:34 am, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: rantingrick wrote: Yes but what benefit does that gain over say, Tkinter's design (because that has been your argument). Like I said, it's a tangential issue. Agreed. The important thing is that it's okay for an app to

Re: Implicit initialization is EVIL!

2011-07-07 Thread Chris Angelico
On Fri, Jul 8, 2011 at 3:29 AM, rantingrick rantingr...@gmail.com wrote: So your argument is:     A window hierarchy is bad because if your application requires a user to open a gazillion windows (read as: designed poorly) --each representing completely different transactions-- and if you

Re: Implicit initialization is EVIL!

2011-07-07 Thread Steven D'Aprano
rantingrick wrote: On Jul 7, 12:34 am, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: The important thing is that it's okay for an app to stay alive until its *last* top level window is closed. I partially disagree with Greg on this. This is not the only model: on the Apple Mac, or any

Re: Implicit initialization is EVIL!

2011-07-07 Thread Gregory Ewing
rantingrick wrote: So you prefer to close a gazillion windows one by one? If I want to close all the windows, I can use the application's Quit or Exit command, or whatever the platform calls it. (Note that if there is a separate instance of the application for each window -- as was suggested

Re: Implicit initialization is EVIL!

2011-07-06 Thread Gregory Ewing
rantingrick wrote: What he means is that On Mac, if you close all windows, the application is still running. Then that is NOT closing windows that is only ICONIFIYING/HIDING them. No, the windows really are closed. They no longer exist in any way. The application is still running, though,

Re: Implicit initialization is EVIL!

2011-07-06 Thread Gregory Ewing
rantingrick wrote: And how do you EXPLICITY quit the application? Using its Quit menu command. But that's Mac-specific, and not central to the discussion. On Linux and Windows, an application will usually exit when its last window is closed. Either way, there is no need for a privileged main

Re: Implicit initialization is EVIL!

2011-07-06 Thread rantingrick
On Jul 6, 1:12 am, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: rantingrick wrote: What he means is that On Mac, if you close all windows, the application is still running. Then that is NOT closing windows that is only ICONIFIYING/HIDING them. No, the windows really are closed. They no

Re: Implicit initialization is EVIL!

2011-07-06 Thread Steven D'Aprano
rantingrick wrote: If you design a GRAPHICAL user interface, then once the GRAPHICAL part is removed (window), why do need the main code to stick around? Open your mind to ideas that go beyond your simple window-centric paradigm! There is more to graphical user interfaces than windows! In

Re: Implicit initialization is EVIL!

2011-07-06 Thread rantingrick
On Jul 6, 9:32 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: rantingrick wrote: If you design a GRAPHICAL user interface, then once the GRAPHICAL part is removed (window), why do need the main code to stick around? Open your mind to ideas that go beyond your simple

Re: Implicit initialization is EVIL!

2011-07-06 Thread Steven D'Aprano
rantingrick wrote: In the Mac OS GUI, an application can have a menubar and no windows. Windows come and go as needed, but the menubar stays until the users quits the application. That's just window visibility (whether by hiding or destroying) under the veil of a detached UI window manager

Re: Implicit initialization is EVIL!

2011-07-06 Thread Chris Angelico
On Thu, Jul 7, 2011 at 1:10 AM, rantingrick rantingr...@gmail.com wrote: On Jul 6, 9:32 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: Open your mind to ideas that go beyond your simple window-centric paradigm! Correction: Window-Centric GUI paradigm! BIG DIFFERENCE. There

Re: Implicit initialization is EVIL!

2011-07-06 Thread Andrew Berg
On 2011.07.06 11:11 AM, Steven D'Aprano wrote: The Dead Window Sketch == As much as I hate it when people feed trolls, that was pretty funny. -- http://mail.python.org/mailman/listinfo/python-list

Re: Implicit initialization is EVIL!

2011-07-06 Thread Waldek M.
Dnia Wed, 6 Jul 2011 08:10:27 -0700 (PDT), rantingrick napisał(a): In the Unix/Linux world, there is a graphical application called xkill which has no menus and no windows, all it has is a mouse cursor! No, it does not run in the background: it is a foreground app. Wow nice corner case. Can

Re: Implicit initialization is EVIL!

2011-07-06 Thread Tim Chase
On 07/06/2011 11:24 AM, Chris Angelico wrote: On Thu, Jul 7, 2011 at 1:10 AM, rantingrickrantingr...@gmail.com wrote: Wow nice corner case. Can you come up with at least five of them though? You and I both know that the vast majority of GUI's require visible windows. Five corner cases. Okay.

Re: Implicit initialization is EVIL!

2011-07-06 Thread Steven D'Aprano
Andrew Berg wrote: On 2011.07.06 11:11 AM, Steven D'Aprano wrote: The Dead Window Sketch == As much as I hate it when people feed trolls, that was pretty funny. Thanks. Re the troll-feeding, every few months I get a strange seizure in my brain that compels me to interact

Re: Implicit initialization is EVIL!

2011-07-06 Thread Chris Angelico
Five more good entries (though I think #8 and #9 are mostly covered already). But hey, we have at least an octagon to work in. On Thu, Jul 7, 2011 at 3:37 AM, Tim Chase python.l...@tim.thechases.com wrote: I think there are sufficiently many edge cases this formerly-square room is starting to

Re: Implicit initialization is EVIL!

2011-07-06 Thread rantingrick
On Jul 6, 11:11 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: The Dead Window Sketch == [snip] ## The Roman Stawman Sketch ## [cmp.lang.python]: (The trolls are gathered and a righteous man speaks.)

Re: Implicit initialization is EVIL!

2011-07-06 Thread Andrew Berg
On 2011.07.06 01:19 PM, rantingrick wrote: ## The Roman Stawman Sketch ## Nice try, but you have to use a Monty Python sketch (and you have to spell correctly :-P ). -- http://mail.python.org/mailman/listinfo/python-list

Re: Implicit initialization is EVIL!

2011-07-06 Thread Ian Kelly
On Wed, Jul 6, 2011 at 12:36 PM, Andrew Berg bahamutzero8...@gmail.com wrote: On 2011.07.06 01:19 PM, rantingrick wrote: ##  The Roman Stawman Sketch ## Nice try, but you have to use a Monty Python sketch (and you have to spell correctly :-P ).

Re: Implicit initialization is EVIL!

2011-07-06 Thread MRAB
On 06/07/2011 20:15, Ian Kelly wrote: On Wed, Jul 6, 2011 at 12:36 PM, Andrew Bergbahamutzero8...@gmail.com wrote: On 2011.07.06 01:19 PM, rantingrick wrote: ## The Roman Stawman Sketch ## Nice try, but you have to use a Monty Python sketch

Re: Implicit initialization is EVIL!

2011-07-06 Thread Chris Angelico
On Thu, Jul 7, 2011 at 5:15 AM, Ian Kelly ian.g.ke...@gmail.com wrote: On Wed, Jul 6, 2011 at 12:36 PM, Andrew Berg bahamutzero8...@gmail.com wrote: On 2011.07.06 01:19 PM, rantingrick wrote: ##  The Roman Stawman Sketch ## Nice try, but you

Re: Implicit initialization is EVIL!

2011-07-06 Thread Gregory Ewing
rantingrick wrote: Yes but what benefit does that gain over say, Tkinter's design (because that has been your argument). Like I said, it's a tangential issue. The important thing is that it's okay for an app to stay alive until its *last* top level window is closed. There doesn't have to be

Re: Implicit initialization is EVIL!

2011-07-05 Thread Robin Becker
On 03/07/2011 23:21, Chris Angelico wrote: . var(0x14205359) x # Don't forget to provide an address where the object will be located x=42 did you forget to specify the memory bank and computer (and presumably planet etc etc) -molly-coddled-ly yrs- Robin Becker --

Re: Implicit initialization is EVIL!

2011-07-05 Thread Gregory Ewing
rantingrick wrote: You say root windows are bad however any parent-child relationship has to BEGIN somewhere. There's no need for *toplevel* windows to be children of anything, though. HOWEVER any of the windows ARE in fact instances of Tk.Toplevel[1]. So they ARE all equal because they all

Re: Implicit initialization is EVIL!

2011-07-05 Thread Gregory Ewing
rantingrick wrote: Most applications consist of one main window (a Tkinter.Tk instance). You've obviously never used a Macintosh. On the Mac, it's perfectly normal for an application to open multiple documents, each in its own window, with no one window being the main window. Any of them can

Re: Implicit initialization is EVIL!

2011-07-05 Thread Steven D'Aprano
Gregory Ewing wrote: rantingrick wrote: Most applications consist of one main window (a Tkinter.Tk instance). You've obviously never used a Macintosh. On the Mac, it's perfectly normal for an application to open multiple documents, each in its own window, with no one window being the

Re: Implicit initialization is EVIL!

2011-07-05 Thread Chris Angelico
On Wed, Jul 6, 2011 at 12:25 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Gregory Ewing wrote: You've obviously never used a Macintosh. On the Mac, it's perfectly normal for an application to open multiple documents, each in its own window, with no one window being the

Re: Implicit initialization is EVIL!

2011-07-05 Thread nn
On Jul 4, 11:35 am, Robin Becker ro...@reportlab.com wrote: On 03/07/2011 23:21, Chris Angelico wrote: . var(0x14205359) x   # Don't forget to provide an address where the object will be located x=42 did you forget to specify the memory bank and computer (and

Re: Implicit initialization is EVIL!

2011-07-05 Thread Robin Becker
On 05/07/2011 16:33, nn wrote: .. Ah, I see we have a mainframe programmer among us ... :-) so long since I manipulated the switches of that old pdp-8 -anciently yrs- Robin Becker -- http://mail.python.org/mailman/listinfo/python-list

Re: Implicit initialization is EVIL!

2011-07-05 Thread rantingrick
On Jul 5, 10:17 am, Chris Angelico ros...@gmail.com wrote: It's actually quite easy to implement this, even if you _are_ forced to have one primary window. You just have an invisible primary whose sole purpose is to be the application, and then everything else is secondary windows. Kinda

Re: Implicit initialization is EVIL!

2011-07-05 Thread rantingrick
On Jul 5, 11:00 am, Web Dreamer webdrea...@nospam.fr wrote: What he means is that On Mac, if you close all windows, the application is still running. Then that is NOT closing windows that is only ICONIFIYING/HIDING them. Let's use the correct lingo people! --

Re: Implicit initialization is EVIL!

2011-07-05 Thread rantingrick
On Jul 5, 6:14 am, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: rantingrick wrote: Most applications consist of one main window (a Tkinter.Tk instance). You've obviously never used a Macintosh. On the Mac, it's perfectly normal for an application to open multiple documents, each in

Re: Implicit initialization is EVIL!

2011-07-05 Thread Chris Angelico
On Wed, Jul 6, 2011 at 8:42 AM, rantingrick rantingr...@gmail.com wrote: Chris are you playing devils advocate (for my team). I am confused? :-) I say whatever I choose to say. Don't pigeon-hole me into on your team or not on your team or devil's advocate or whatever. And at two in the morning,

Re: Implicit initialization is EVIL!

2011-07-05 Thread rantingrick
On Jul 5, 6:20 pm, Chris Angelico ros...@gmail.com wrote: On Wed, Jul 6, 2011 at 8:42 AM, rantingrick rantingr...@gmail.com wrote: [...] On Jul 5, 11:00 am, Web Dreamer webdrea...@nospam.fr wrote: What he means is that On Mac, if you close all windows, the application is still running.

Re: Implicit initialization is EVIL!

2011-07-05 Thread Chris Angelico
On Wed, Jul 6, 2011 at 9:47 AM, rantingrick rantingr...@gmail.com wrote: Then that is NOT closing windows that is only ICONIFIYING/HIDING them. Let's use the correct lingo people! Actually, it IS closing those windows. Why wouldn't it be? [...] The memory used by that window can be

Re: Implicit initialization is EVIL!

2011-07-05 Thread rantingrick
On Jul 5, 6:54 pm, Chris Angelico ros...@gmail.com wrote: To do what for me? Close windows? Reclaim memory? Terminate applications? I don't understand your bogglement. ClaimA: I made claim that Tkinter's window hierarchy is not only normal, but justified in modern GUI programming. ClaimB: You

Re: Implicit initialization is EVIL!

2011-07-05 Thread Chris Angelico
On Wed, Jul 6, 2011 at 10:15 AM, rantingrick rantingr...@gmail.com wrote: On Jul 5, 6:54 pm, Chris Angelico ros...@gmail.com wrote: To do what for me? Close windows? Reclaim memory? Terminate applications? I don't understand your bogglement. ClaimA: I made claim that Tkinter's window

Re: Implicit initialization is EVIL!

2011-07-05 Thread rantingrick
On Jul 5, 7:34 pm, Chris Angelico ros...@gmail.com wrote: Actually, everything you do requires the underlying window manager, otherwise you're just painting your own pixels on the screen. And I never said that this model was possible in some and not others. (Although it's a bit harder with

Re: Implicit initialization is EVIL!

2011-07-04 Thread Gregory Ewing
rantingrick wrote: Unlike most GUI libraries the Tkinter developers thought is would just wonderful if the root GUI window just sprang into existence if the programmer somehow forgot to create one. IMO the real problem here is the existence of a privileged root window at all. No GUI platform

Re: Implicit initialization is EVIL!

2011-07-04 Thread Chris Angelico
On Mon, Jul 4, 2011 at 6:33 PM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: rantingrick wrote: Unlike most GUI libraries the Tkinter developers thought is would just wonderful if the root GUI window just sprang into existence if the programmer somehow forgot to create one. IMO the real

Re: Implicit initialization is EVIL!

2011-07-04 Thread rantingrick
On Jul 4, 3:33 am, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: IMO the real problem here is the existence of a privileged root window at all. No GUI platform I know of has any such concept (except for a desktop window that represents the whole screen, which is not the same thing). All

Re: Implicit initialization is EVIL!

2011-07-04 Thread rantingrick
On Jul 4, 3:44 am, Chris Angelico ros...@gmail.com wrote: I don't know Tkinter, but from the look of the example code, he's creating a Label that's not attached to a window, and then packing it into nothing. The toolkit kindly creates him a window. Is that the root GUI window that he means? A

Re: Implicit initialization is EVIL!

2011-07-04 Thread Chris Angelico
On Tue, Jul 5, 2011 at 1:19 AM, rantingrick rantingr...@gmail.com wrote: But let's dig a little deeper here. Your comment suggests that you personally need to create multiple windows for your applications. Is this correct? If so i pity any users of such application as they would be thoroughly

Re: Implicit initialization is EVIL!

2011-07-04 Thread rantingrick
On Jul 4, 10:40 am, Chris Angelico ros...@gmail.com wrote: Uhh, sorry. No. There are plenty of good reasons for one application to make multiple top-level windows, and if I ever find myself using a toolkit that makes this difficult, I'll either be hacking the toolkit or using a different one.

Re: Implicit initialization is EVIL!

2011-07-04 Thread rantingrick
oops. should have used symmetric_difference! a.symmetric_difference(b) set(['_w', '_setup', 'report_callback_exception', '_do', '__getattr__', 'loadtk', '_loadtk', 'readprofile']) -- http://mail.python.org/mailman/listinfo/python-list

Re: Implicit initialization is EVIL!

2011-07-04 Thread Chris Angelico
On Tue, Jul 5, 2011 at 1:46 AM, rantingrick rantingr...@gmail.com wrote: On Jul 4, 10:40 am, Chris Angelico ros...@gmail.com wrote: Uhh, sorry. No. There are plenty of good reasons for one application to make multiple top-level windows, and if I ever find myself using a toolkit that makes

Re: Implicit initialization is EVIL!

2011-07-04 Thread rantingrick
On Jul 4, 11:01 am, Chris Angelico ros...@gmail.com wrote: On Tue, Jul 5, 2011 at 1:46 AM, rantingrick rantingr...@gmail.com wrote: On Jul 4, 10:40 am, Chris Angelico ros...@gmail.com wrote: Uhh, sorry. No. There are plenty of good reasons for one application to make multiple top-level

Re: Implicit initialization is EVIL!

2011-07-04 Thread Chris Angelico
On Tue, Jul 5, 2011 at 3:09 AM, rantingrick rantingr...@gmail.com wrote: On Jul 4, 11:01 am, Chris Angelico ros...@gmail.com wrote: This is not a modal dialog; it's not even a modeless dialog - it's a completely stand-alone window that can be moved around the Z order independently of the

Re: Implicit initialization is EVIL!

2011-07-04 Thread rantingrick
On Jul 4, 12:41 pm, Chris Angelico ros...@gmail.com wrote: For another example, look at where web browsers are going. By your description, one instance of a browser should work with precisely one document (which in this case would be a web page). That's how browsers were in the early days,

Re: Implicit initialization is EVIL!

2011-07-04 Thread Chris Angelico
On Tue, Jul 5, 2011 at 5:30 AM, rantingrick rantingr...@gmail.com wrote: Umm, if you want to see where things are going you should learn about the inner workings of chrome which actually spawns a new process for every tab created; which has the benefit of avoiding application lock up when one

Implicit initialization is EVIL!

2011-07-03 Thread rantingrick
Tkinter has a major flaw and this flaw has been with us for many many years. What is the flaw? Well the title says it all folks... IMPLICIT INITIALIZATION IS EVIL. Still confused, well let me explain. Unlike most GUI libraries the Tkinter developers thought is would just wonderful if the root GUI

Re: Implicit initialization is EVIL!

2011-07-03 Thread Chris Angelico
On Mon, Jul 4, 2011 at 8:11 AM, rantingrick rantingr...@gmail.com wrote: A new user should learn from day one the hierarchy of a GUI. -root window -optional widgets --optional sub windows ---optional widgets ---and on and on You're forgetting all the other crucial parts of the hierarchy. A

Re: Implicit initialization is EVIL!

2011-07-03 Thread Roy Smith
In article mailman.588.1309731711.1164.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: var(0x14205359) x # Don't forget to provide an address where the object will be located x=42 After all, everyone's gotta learn about segfaults some day! 0x14205359 is more likely to