Hi Tomas,

> (class +Ord +Entity)
> (rel nr  (+Need +Key +Number))
> (rel pos (+List +Joint) ord (+Pos))
> (class +Pos +Entity)
> (rel ord (+Dep +Joint) (art) pos (+Ord))

Oops, sorry for the confusion! A month or so ago I noticed that
"app/er.l" was not correct :-(

The current "testing" release contains the fixes. The above line must be

> (rel ord (+Dep +Joint) (itm) pos (+Ord))        # Order

'+Dep' takes a list of "dependent" relations, (itm) in this case. This
means, whenever the 'ord' relation of '+Pos' is cleared, so will
automatically be the 'itm' relation.

Clearing the 'itm' is necessary here, in order to remove this position
from the '+Ref' index. Otherwise, for example, a report listing all
sales for this item would show incorrect results.

> (class +Cat +Entity)
> (rel nr (+Need +Key +Number))
> (rel nm (+Ref +String))
> (rel it (+List +Joint) cat (+It))
> (class +It +Entity)
> (rel nr (+Need +Key +Number))
> (rel nm (+Sn +Idx +String))
> (rel cat (+List +Joint) it (+Cat))
>      (gui '(+E/R +Chart) '(it : home obj) 3 '((This) (list NIL This NIL)) 
> cadr)
>      (<table> NIL NIL '((btn) NIL (btn))
>         (do 6
>            (<row> NIL
>               (gui 1 '(+ChoButton) '(choIt (field 1)))
>               (gui 2 '(+Obj +TextField) '(nm +It) 40)
>               (gui 3 '(+DelRowButton))))
>            (<row> NIL NIL (scroll 6)))

Looks good, though I haven't tested it.

> I would like to be able to reorder items +It in a category +Cat.
> What else do I need to do except adding (gui 4 '(+BubbleButton)) ?

Nothing I can think of at the moment (except, as you know, the normal
administrative things like changing 3 -> 4 in the +Chart line).

> Is +Dep and (art) related to row reordering?

No, as changing the line does not cause any removal of relations.

- Alex

Reply via email to