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

Robert Collins rbcollins@cygwin.com
Tue Oct 7 00:11:00 GMT 2003


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>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20031007/f09ca53b/attachment.sig>


More information about the Cygwin-apps mailing list