Re: [Pharo-users] Trapping the Pharo window close event

2016-04-22 Thread Dimitris Chloupis
sorry meant to say Pharo is not lazy coder friendly by nature. On Fri, Apr 22, 2016 at 10:03 AM Dimitris Chloupis wrote: > Just for the record I am in agreement as I think most of us are about > this. > > But > > I think as a community must make one thing clear > > Pharo is environment meant

Re: [Pharo-users] Trapping the Pharo window close event

2016-04-22 Thread Dimitris Chloupis
Just for the record I am in agreement as I think most of us are about this. But I think as a community must make one thing clear Pharo is environment meant to be hacked. Its not always to do so but similarly to Squeak, the goal here is to give developers and environment that they can design

Re: [Pharo-users] Trapping the Pharo window close event

2016-04-21 Thread stepharo
Le 16/4/16 12:18, kmo a écrit : Well, my reply was rather tongue-in-cheek. I was mocking my own laziness and the laziness of developers like me. But really I have no problem in doing these things for myself. And I hope that soon I will be in a position to contribute to pharo myself. But you a

Re: [Pharo-users] Trapping the Pharo window close event

2016-04-21 Thread stepharo
Le 16/4/16 11:33, kmo a écrit : /Pharo is yours, so you can add it. :)/ Yes, but I don't want to add it. I expect it to be there out of the box. So you believe either is modern slavery or magic auto generation :D Seriously if you that need it are not ready to invest 30 min why me that does

Re: [Pharo-users] Trapping the Pharo window close event

2016-04-21 Thread stepharo
My point is that it is a proof that a library is not good when it forces users to redefined core code. Stef Le 15/4/16 23:06, Peter Uhnák a écrit : I did not really get it. Now I have the impression that changing the method definition shows that Pharo does not offer the correct p

Re: [Pharo-users] Trapping the Pharo window close event

2016-04-17 Thread Nicolai Hess
2016-04-14 19:57 GMT+02:00 kmo : > How do you get rid of that "Quit Pharo without saving message" that comes > up > when you try to close the Pharo window? I want to just let the user exit > without any message or perhaps replace the message with one of my own. > > > Aboiut what are we talking ? T

Re: [Pharo-users] Trapping the Pharo window close event

2016-04-16 Thread John Pfersich
> On Apr 16, 2016, at 03:30, Damien Pollet > wrote: > >> On 16 April 2016 at 11:33, kmo wrote: >> /Pharo is yours, so you can add it. :)/ >> >> Yes, but I don't want to add it. I expect it to be there out of the box. > > If you expect a perfect system out of the box, you will never get it.

Re: [Pharo-users] Trapping the Pharo window close event

2016-04-16 Thread kmo
Well, my reply was rather tongue-in-cheek. I was mocking my own laziness and the laziness of developers like me. But really I have no problem in doing these things for myself. And I hope that soon I will be in a position to contribute to pharo myself. But overriding the close event is something an

Re: [Pharo-users] Trapping the Pharo window close event

2016-04-16 Thread Damien Pollet
On 16 April 2016 at 11:33, kmo wrote: > /Pharo is yours, so you can add it. :)/ > > Yes, but I don't want to add it. I expect it to be there out of the box. > If you expect a perfect system out of the box, you will never get it. > think it's quite enough work for me to add my own code on windo

Re: [Pharo-users] Trapping the Pharo window close event

2016-04-16 Thread kmo
/Pharo is yours, so you can add it. :)/ Yes, but I don't want to add it. I expect it to be there out of the box. I think it's quite enough work for me to add my own code on window close. I don't want to have to write the framework for doing it as well. -- View this message in context: http://

Re: [Pharo-users] Trapping the Pharo window close event

2016-04-16 Thread Peter Uhnák
Ah, right, that certainly sounds interesting. :) Pharo is yours, so you can add it. :) We already have a SystemAnnouncer so maybe it would be quite easy to add… it might be a nice exercise to get a bit more familiar with the system. Peter On Sat, Apr 16, 2016 at 11:01 AM, kmo wrote: > The Dolp

Re: [Pharo-users] Trapping the Pharo window close event

2016-04-16 Thread kmo
The Dolphin approach was described by Estaban earlier in this thread. I've never used Dolphin myself so cannot expand on it. -- View this message in context: http://forum.world.st/Trapping-the-Pharo-window-close-event-tp4890079p4890281.html Sent from the Pharo Smalltalk Users mailing list archi

Re: [Pharo-users] Trapping the Pharo window close event

2016-04-16 Thread Peter Uhnák
What's Doplin's approach? Also adding a configuration option for this situation is rather trivial. On Sat, Apr 16, 2016 at 9:42 AM, kmo wrote: > As a developer you need to be able to control the program shut down. That > is > a given. > > I think I was expecting something like the Dolphin appro

Re: [Pharo-users] Trapping the Pharo window close event

2016-04-16 Thread kmo
As a developer you need to be able to control the program shut down. That is a given. I think I was expecting something like the Dolphin approach but it doesn't exist in pharo. Having to overwrite an existing method is not elegant but it works. A similar issue exists with Growl notifications - I

Re: [Pharo-users] Trapping the Pharo window close event

2016-04-15 Thread Esteban A. Maringolo
Maybe he refers to the option to abort the close request programmatically in an event based approach. Something like that UI close event is handled and triggers a "QuitSmalltalkRequested" event (or announcement) with a boolean value holder as argument, if no one handling such event/announcement ve

Re: [Pharo-users] Trapping the Pharo window close event

2016-04-15 Thread Peter Uhnák
> > I did not really get it. Now I have the impression that changing the > method definition shows that Pharo does not > offer the correct possibility. > Am I correct? > I disagree. Closing the window should not decide on it's own whether the session should be saved. Asking the user is the right t

Re: [Pharo-users] Trapping the Pharo window close event

2016-04-15 Thread stepharo
I did not really get it. Now I have the impression that changing the method definition shows that Pharo does not offer the correct possibility. Am I correct? Stef Le 14/4/16 20:58, Peter Uhnák a écrit : The closing is intercepted in PasteUpMorph>>windowEvent: from where this is called WorldS

Re: [Pharo-users] Trapping the Pharo window close event

2016-04-14 Thread kmo
Many thanks for that helpful and amazingly fast answer! -- View this message in context: http://forum.world.st/Trapping-the-Pharo-window-close-event-tp4890079p4890092.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] Trapping the Pharo window close event

2016-04-14 Thread Peter Uhnák
The closing is intercepted in PasteUpMorph>>windowEvent: from where this is called WorldState>>quitSession | save | save := self confirm: 'Save changes before quitting?' translated orCancel: [ ^ self ]. save ifTrue: [Smalltalk snapshot: true andQuit: true] ifFalse: [Smalltalk snapshot: false andQ