GSoC 2014 - Interactive Port Command and
Clemens Lang
cal at macports.org
Thu Mar 20 04:10:41 PDT 2014
Hi,
> On 2014-3-20 12:29 , Marcus Santos wrote:
> > Can you help me with some questions I have about base/src/port/port.tcl and
> > base/src/macports1.0.tcl?
> >
> > First of all I need to understand how they work together and what is the
> > role of each one. I have been around the code of the progress bar to
> > understand how it works and trying to realize how can I do the interaction
> > between the user and macports, and where to assess the input from the
> > user. Second, how can I use the interface of macports1.0 to allow asking
> > user questions?
>
> [...]
>
> You wouldn't really use macports1.0 to ask the user questions, that
> would be the role of the new interactive UI that you're going to write.
> You would attempt to do things using the macports1.0 API, then if they
> don't succeed, you would examine the error code and offer the user
> appropriate choices depending on the situation.
>
> You may or may not need to modify macports1.0 to give the front end more
> information to support this.
Actually I was thinking of modifying port.tcl in a way that passes a callback
to macports1.0 that would subsequently be used in every situation where asking
the user a question makes sense. Of course that should only be done when there
is a callback function (i.e. only when port.tcl is used interactively).
So, you'd have to identify:
- What requirements and API would such a conversation function have
- Where can this be used and what type of feedback should the user be able
to provide? Yes/No questions? Choices from a list of options? Dot graphs?
(the latter would be a little unexpected, though ;))
More information about the macports-dev
mailing list