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
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
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
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
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
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
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
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.
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
:}.
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
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
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
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,
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?
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
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
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
[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
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
19 matches
Mail list logo