On 24/08/11 14:58 -0700, Ian Wilson wrote:
> On Wed, Aug 24, 2011 at 1:52 PM, Cédric Krier <[email protected]> wrote:
> 
> > On 24/08/11 13:05 -0700, Ian Wilson wrote:
> > > On Wed, Aug 24, 2011 at 12:13 PM, Cédric Krier <[email protected]
> > >wrote:
> > >
> > > > On 24/08/11 11:34 -0700, Ian Wilson wrote:
> > > > > 4. I think also there were special data items passed to the states
> > > > depending
> > > > > on the type of state, and depending on if the models were persistent
> > or
> > > > not.
> > > > >  How can we get a better handle on that as well?  Should that be its
> > own
> > > > > data structure or solved with well defined method/function arguments
> > per
> > > > > state?
> > > >
> > > > I don't understand.
> > > >
> > >
> > > What arguments do the 3 types of methods take: default, next_state,
> > action?
> >
> > Nothing.
> >
> 
> I don't understand, I think I am missing something.  How will a next_state()
> make a choice with no inputs?  Can you provide a short example of a next
> state method that uses the prior form whose model is not persisted in the
> database permanently to make a decision about the next state?

Because it will be possible to access to the forms.

> >
> > >  I remember the inputs being real weird for models that are
> > > not persistent in the database, like a list of tuples where the first
> > entry
> > > is 'add' or 'create', etc.
> >
> > As it is describe before the form fields will be accessed like a
> > BrowseRecord.
> >
> > > Also what about printing?  Is that covered by the StateAction ?
> >
> > Yes of course.
> >
> > > The old
> > > design had it factored into its own state.
> >
> > No.
> >
> 
> It seems to be factored into its own state here, is it not in a later
> version ?
> 
> http://hg.tryton.org/tryton/file/672b92df1ff4/tryton/gui/window/wizard.py#l103

I think it was wrong to separate action from print. print is an action like
others.


-- 
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: [email protected]
Website: http://www.b2ck.com/

Attachment: pgpwS7xNwlYxX.pgp
Description: PGP signature

Reply via email to