I see!!! ... Is +E/R restricted to making bi-directional connection with
the *ID only? My task.l looks like this now and I've +E/R to wire up the
'ttl rel of Task but I was not sure if I could do the same with the 'tgs
rel as well - full code is here -
https://github.com/ckkashyap/picolispAppPractice/tree/master/step04 (I am
doing a step by step incremental app :) - just so I have a log of
everything).
(de updateTags (L)
(for I (get *ID 'tgs) (lose!> I))
(for I L
(put!> *ID 'tgs (new! '(+Tag) 'tsk *ID 'nm (or (db 'nm '+TagNm I)
(new! '+TagNm 'nm I) ) ) ))
L
)
(action
(html 0 Ttl "@lib.css" NIL
(idForm "TITLE" '(choTask) 'nm '+Name *CanEdit *CanDelete
'("The " (: ttl) " Title")
(<grid> 2
"Title" (gui '(+E/R +Cue +TextField) '(ttl : home
obj) "title" 40)
"Tags" (gui '(+Init +Set +ListTextField) (extract
'((Tg) (get (get Tg 'nm) 'nm)) (get *ID 'tgs)) '((L) (updateTags L))
'(","," ") 40 )
)
)
)
)
On Fri, Dec 6, 2019 at 11:41 PM Alexander Burger <[email protected]>
wrote:
> On Sat, Dec 07, 2019 at 08:10:56AM +0100, Alexander Burger wrote:
> > > "Title" (gui '(+E/R +TextField) '(ttl : home obj) 40)
> > > and
> > > "Title" (gui '(+Init +Set +TextField) (get *ID 'ttl) '((X) (put!> *ID
> 'ttl
> > > X)) 40)
> > > are equivalent inside an idForm?
> >
> > No, +E/R, +Init and +Set are all different.
>
> Getting something equivalent to the +E/R form is not trivial. It needs at
> least
>
> (gui '(+Set +Chk +Val +TextField)
> '((Val Dn) # 'Dn' is not needed here (only in charts)
> (=: er Val)
> (and
> (not (: lock))
> (eval (: erObj))
> (put!> @ (: erVar) Val) )
> (extra Val Dn) )
> '(or
> (extra)
> (and
> (eval (: erObj))
> (mis> @ (: erVar) (val> This)) ) )
> '(()
> (let Val (extra)
> (if (= Val (: er))
> (get (eval (: erObj)) (: erVar))
> Val ) ) )
> 40 )
>
> but this is not complete, as the GUI object is not properly initialized
> (class
> variables 'erObj' and 'erVar' and more, see the parent classes +/R (and
> +Able).
>
> You see, +E/R is a fairly complicated beast ;)
>
> ☺/ A!ex
>
> --
> UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe
>