This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [setup PATCH] Rework do_download [next_dialog removal (2b)]


On Tue, 2003-09-30 at 21:49, Max Bowsher wrote:
> Robert Collins wrote:
> > On Thu, 2003-07-31 at 08:16, Max Bowsher wrote:
> >> And another...
> >
> > This seems more complex than the previous code. You're moving window
> > specific code from the specific class into the generic threebar class.
> > This doesn't seem right to me.
> 
> I think the code I moved is better classified as program flow logic.
> threebar.cc is already our main controller of program flow once the initial
> few pages of settings are complete. At the moment, as individual window is
> handling decisions on what to display next - *that* doesn't seem right to
> me - it's exactly what wantsActivation was introduced to avoid.
>
> I can agree that threebar.cc isn't the most elegant place to be handling
> program flow, but that fact doesn't reduce the merits of tidying and
> collecting program flow logic into a central location.

Well program flow is basically an application script. Moving anything
more into threebar would be a mistake IMO. Some screens are bundled
together: the script should see them as a single entity. Other screens
are independent and the script needs to know to tie them together and
provide ordering.

I have no burning desire to remove next_dialog the wrong way.
wantsActivation was introduced to avoid centralised decisions AND to
avoid screen awareness of the sequence of unrelated screens. It's
achieved that.

This particular change is simply shifting the awareness of the program
flow from a generic core component to a generic GUI component. Thats not
a win.

Vague handwaving description follows.

Create a class GUIController.
Give it a method such as 
sheetid nextCommand(currentSheetID)

in nextCommand, put all the switching and conditional logic your heart
desires.

Rob


-- 
GPG key available at: <http://members.aardvark.net.au/lifeless/keys.txt>.

Attachment: signature.asc
Description: This is a digitally signed message part


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]