On Nov 30, 8:53 pm, petter <[email protected]> wrote: > (defview some-table-view (:type table :inherit-from '(:scaffold some)) > (field :order-by '(some field :desc)) > > But it does not seem to work.
There's no such argument right now, see http://viridian-project.de/~sky/user-guide.stx.html#Syntax.of.declarative.view.declaration for a list of the ones available. > Also what is the prefered method of showing something which is not an > actual field in the database? > > I have starttime and endtime in my db, but I would rather present the > starttime and the duration rather than endtime. I can make a duration > field and specify a reader or use the same reader for the endtime > field. In either case I seem to get problems when the user is trying > to sort using the field (the first will get a nil db field, the latter > will sort by endtime rather than duration). Yes, virtual fields (i.e. those with custom readers) don't benefit from sorting right now. This is a missing feature. > Or do I have to create extra fields containing redudant information in > my database? That would be a way to kludge around it. Why not create a view, in case you're using SQL? Leslie -- You received this message because you are subscribed to the Google Groups "weblocks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/weblocks?hl=en.
