RE: [SetupXP] The two styles for handling activation refusal

2003-07-22 Thread Morrison, John
Gary R. Van Sickle wrote: Throwing an exception would indicate a problem actually, if you want to get all by-the-book about it. I'm with Gary here, I'd prefer see an exception thrown for a problem. Unless there's some issues with using exceptions that I don't know about... (which, given

Re: [SetupXP] The two styles for handling activation refusal

2003-07-22 Thread Max Bowsher
Gary R. Van Sickle wrote: I'm still letting you guys fight this out, but I'm going to snipe from the sidelines ;-): ... I once again leave you two to fight it out while I get some actual code written. That's not particularly helpful, Gary. Anyway, as per what I said in what I snipped above, I

RE: [SetupXP] The two styles for handling activation refusal

2003-07-21 Thread Morrison, John
Robert Collins wrote: On Mon, 2003-07-21 at 04:17, Gary R. Van Sickle wrote: Unless there will ever be a need to ask a page whether it would take activation in the future, but not activate it immediately, even if it is possible to do so, I think the 2 calls should be merged. Will there ever

RE: [SetupXP] The two styles for handling activation refusal

2003-07-21 Thread Robert Collins
On Mon, 2003-07-21 at 17:32, Morrison, John wrote: Would... if (canActivate()) OnActivate() be better? (although the OnXXX functions always make me think that they should be callbacks.) Yes - I was simply leaving method names alone until I had an answer on the ordering breaking

RE: [SetupXP] The two styles for handling activation refusal

2003-07-21 Thread Robert Collins
On Mon, 2003-07-21 at 15:25, Gary R. Van Sickle wrote: Well, my current code appears to work if changed to do that. But then OnAcceptActivate() is equivalent to my original return value changes (i.e. just leave OnActivate() empty and OnAcceptActivate() is your message handler). Maybe I'm not

Re: [SetupXP] The two styles for handling activation refusal

2003-07-21 Thread Max Bowsher
OK, this is a general reply to multiple messages. I still believe bool OnActivate() to be the better option - here's why: The if(canActivate()){OnActivate()} scheme makes 2 method calls where only one is required. It also opens the possibility for OnActivate to be called when activation is not

Re: [SetupXP] The two styles for handling activation refusal

2003-07-21 Thread Max Bowsher
Gary R. Van Sickle wrote: I'll do my best to get something up yet tonight. Again though Max, please keep in mind that I posted the SetupXP stuff mainly so people could try out the now-proven-to-not-work-right XP theme feature, not because I had loads of time to get back on the

Re: [SetupXP] The two styles for handling activation refusal

2003-07-21 Thread Robert Collins
On Tue, 2003-07-22 at 00:02, Max Bowsher wrote: OK, this is a general reply to multiple messages. I still believe bool OnActivate() to be the better option - here's why: The if(canActivate()){OnActivate()} scheme makes 2 method calls where only one is required. Premature optimisation.

RE: [SetupXP] The two styles for handling activation refusal

2003-07-21 Thread Gary R. Van Sickle
I'm still letting you guys fight this out, but I'm going to snipe from the sidelines ;-): [snip] I do not see bool OnActivate() as being confusing, nor as less intuitive that firing 2 event handlers consecutively. There is only one handler. I'm glad that it wouldn't confuse you though :}.

RE: [SetupXP] The two styles for handling activation refusal

2003-07-20 Thread Gary R. Van Sickle
Robert Collins wrote: On Sat, 2003-07-19 at 23:40, Max Bowsher wrote: Gary's current SetupXP patchset calls 2 member functions on page activation: OnActivate (returns void), and OnAcceptActivation (returns bool). I think this is unnecessarily messy. AFAICS, OnAcceptActivation only exists

RE: [SetupXP] The two styles for handling activation refusal

2003-07-20 Thread Gary R. Van Sickle
I cannot think of one. It exists soley to give OnActivate a default return code. It *can't* be called anywhere else, since in the general case, OnAcceptActivation won't know if it needs to refuse activation until after OnAccept is called. OnActivate -- Gary R. Van Sickle

Re: [SetupXP] The two styles for handling activation refusal

2003-07-20 Thread Max Bowsher
Gary R. Van Sickle wrote: Gary's current SetupXP patchset calls 2 member functions on page activation: OnActivate (returns void), and OnAcceptActivation (returns bool). I think this is unnecessarily messy. AFAICS, OnAcceptActivation only exists to prevent the need to change the return type of

Re: [SetupXP] The two styles for handling activation refusal

2003-07-20 Thread Max Bowsher
Gary R. Van Sickle wrote: Robert Collins wrote: On Sat, 2003-07-19 at 23:40, Max Bowsher wrote: Gary's current SetupXP patchset calls 2 member functions on page activation: OnActivate (returns void), and OnAcceptActivation (returns bool). I think this is unnecessarily messy. AFAICS,

RE: [SetupXP] The two styles for handling activation refusal

2003-07-20 Thread Robert Collins
On Mon, 2003-07-21 at 04:17, Gary R. Van Sickle wrote: Unless there will ever be a need to ask a page whether it would take activation in the future, but not activate it immediately, even if it is possible to do so, I think the 2 calls should be merged. Will there ever be such a case?

Re: [SetupXP] The two styles for handling activation refusal

2003-07-20 Thread Robert Collins
On Mon, 2003-07-21 at 06:44, Max Bowsher wrote: Gary R. Van Sickle wrote: On unknown, Max Bowsher wrote: I would very much prefer changing OnActivate to return bool, combining the purpose of both functions. Yes, this does require changes in all derived classes, but the changes are

RE: [SetupXP] The two styles for handling activation refusal

2003-07-20 Thread Gary R. Van Sickle
Gary R. Van Sickle wrote: Gary's current SetupXP patchset calls 2 member functions on page activation: OnActivate (returns void), and OnAcceptActivation (returns bool). I think this is unnecessarily messy. AFAICS, OnAcceptActivation only exists to prevent the need to change the return

RE: [SetupXP] The two styles for handling activation refusal

2003-07-20 Thread Gary R. Van Sickle
Gary R. Van Sickle wrote: [snip] Gary, I don't think the clarity of setup's code is trivial. And, I can't imagine that any project would accept a monolithic patch encompassing multiple concepts. I'm not referring to multiple concepts, I'm referring to this OnAcceptActivation() thing. Like I

RE: [SetupXP] The two styles for handling activation refusal

2003-07-20 Thread Gary R. Van Sickle
[snip] I cannot think of one. It exists soley to give OnActivate a default return code. It *can't* be called anywhere else, since in the general case, OnAcceptActivation won't know if it needs to refuse activation until after OnAccept is called. Hmm. My intention when I suggested a

Re: [SetupXP] The two styles for handling activation refusal

2003-07-19 Thread Max Bowsher
Robert Collins wrote: On Sat, 2003-07-19 at 23:40, Max Bowsher wrote: Gary's current SetupXP patchset calls 2 member functions on page activation: OnActivate (returns void), and OnAcceptActivation (returns bool). I think this is unnecessarily messy. AFAICS, OnAcceptActivation only exists to