Wouldn't we need to link the update to the 'upds relation of Task?
This does not quite work :(
(menu "Tasks"
(idForm ,"Tasks" '(choTsk) 'nr '+Tsk T '(may Delete) '((: nr))
(--)
(<grid> 2
"Name" (gui '(+E/R +Cue +TextField) '(nm : home obj) "Name" 40)
"Desc" (gui '(+E/R +TextField) '(dsc : home obj) 40)
"Update" (gui '(+TextField) 30)
(gui '(+Button) "Update"
'(new! '(+Update) 'dsc (val> (field -1))) ) )
(--)
(gui '(+Set +E/R +Chart) '((L) (filter bool L)) '(upds : home obj) 1
'( (U I) (with U (list (: dsc) )) )
'( (L U) (cond
(U (put!> U 'dsc (car L)) (and (; U dsc) U) )
(L (new! '(+Update) 'dsc (car L))))))
(<table> NIL NIL
'((NIL "Updates"))
(do 8
(<row> NIL
(gui 1 '(+View +TextField) 30)
)))))
On Tue, Oct 29, 2019 at 9:53 AM Alexander Burger <[email protected]>
wrote:
> Hi Kashyap,
>
> > I added index to +Update and the UI started giving me a drop down with
> the
> > existing updates. That made me realize that what I really want is for the
> > updates to show up uneditable
> > ...
> > #(gui 1 '(+Obj +TextField) '(dsc +Update) 30) ))
> > (gui 1 '(+View +TextField) 30) ))
>
> Good.
>
>
> > And I'd like an additional text field for the new update. The idea being
> > that whenever I update a task I can provide comments in the update. I
> don't
> > suppose I even need a chart in that case. How would I create a textfield
> > and bind it to updates such that it works for adding a new update?
>
> The most general solution is perhaps a +TextField and a +Button for the
> update.
> The button can do with the text whatever is needed.
>
> For example, creating a new object:
>
> (gui '(+TextField) 30)
> (gui '(+Button) "Update"
> '(new! '(+Update) 'dsc (val> (field -1))) )
>
> or add something to the object in the current form:
>
> (gui '(+TextField) 30)
> (gui '(+Button) "Update"
> '(put!> (: home obj) 'someProperty (val> (field -1))) )
>
> ☺/ A!ex
>
> --
> UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe
>