I'll paste the output I get at the moment for review, non-link relations are
easy I think, I should have that covered so this is the output for a simple
(class +ArFeLink +Entity)
(rel article (+Ref +Link) NIL (+Article))
(rel feed (+Ref +Link) NIL (+Feed))
It is connecting articles and feeds.
First the menu:
(menu "Working with +ArFeLink"
(<h3> NIL "Select" " " "+ArFeLink")
(form 'dialog (choArFeLink)))
(<h3> NIL "+ArFeLink")
(<h2> NIL (<id> (: )))
(panel T (pack "+ArFeLink" " @1") '(T) '(choArFeLink) 'feed
"Article" (gui '(+ChoButton) '(choArticle (field 1)))
"Feed" (gui '(+ChoButton) '(choFeed (field 1))))
(<spread> NIL (editButton T)) ) ) )
And then choArFeLink:
(de choArFeLink (Dst)
"Feed" (gui 'feed '(+Var +TextField) '*ArFeLinkFeed 20)
"Article" (gui 'article '(+Var +TextField) '*ArFeLinkArticle 20)
(searchButton '(init> (: home query)))
(resetButton '(feed article query)))
(gui 'query '(+QueryChart) (cho)
((title +Feed @Feed (feed +ArFeLink)) (title +Article @Article
(article +ArFeLink)) )
(tolr @Article @@ article title)
(tolr @Feed @@ feed title))))
'((This) (list This (: feed) (: article) )))
(<table> 'chart "+ArFeLink"
(gui 1 '(+DstButton) Dst)
(gui 2 '(+ObjView +TextField) '(: title))
(gui 3 '(+ObjView +TextField) '(: title)))))
(newButton T Dst '(+ArFeLink)
Did I miss something?
On Sun, Jan 17, 2010 at 9:34 AM, Alexander Burger <a...@software-lab.de>wrote:
> On Sat, Jan 16, 2010 at 09:31:27PM +0100, Henrik Sarvell wrote:
> > Just one final question, here is a gui example from the demo app:
> > ...
> > '((This) (list This (: nr) This (: sup) (: sup ort) (: pr))) )
> > That last line seems to control what is shown in the columns of the
> > search result list,
> > that seems to imply some kind of convention at
> > work since (if that is the case) a call to This will display the 'nm
> > value, same goes for a plain (: sup) which will get the suppliers'
> > name. Correct or not?
> Absolutely correct. The above line puts a result list into the chart.
> Each element of that list must be of the proper type which the GUI
> element in that column expects.
> The code in the demo app for producing a single GUI line goes on as
> (<row> (alternating)
> (gui 1 '(+DstButton) Dst)
> (gui 2 '(+NumField))
> (gui 3 '(+ObjView +TextField) '(: nm))
> (gui 4 '(+ObjView +TextField) '(: nm))
> (gui 5 '(+TextField))
> (gui 6 '(+FixField) 2) ) ) )
> These six fields are in sync with the above data line
> This (: nr) This (: sup) (: sup ort) (: pr)
> That is, 'This' goes to the '+DstButton', so that this button contains
> the object, and can react appropriately to a click.
> The second element is the item number (: nr), a plain integer which is
> stored in a '+NumField'.
> Then 'This' is passed again, this time to an '+ObjView' text field, a
> field which holds an object and knows how to show it (here the name of
> the object (: nm)), and how to react on a click (jump to that object).
> Same goes for (: sup), the supplier. The '+ObjView' field displays the
> supplier's name, and jumps to that supplier if clicked.
> (: sup ort) is the city name in the supplier, a plain string. It is
> passed to a '+TextField'.
> (: pr) is the price and gets passed to a fixnum field with two decimal
> digits '(+FixField) 2'.
> > Btw I couldn't find the definition of (gui) despite doing a search in
> > the whole library, where is it?
> 'gui' is a function that gets defined at runtime, differently depending
> on whether the HTTP request is a GET or a POST. This happens in the
> 'let' statements in line 49 of "lib/form.l"
> (if *PRG
> (let gui
> ... ) )
> (set "*App")
> (let gui
> - Alex
> UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe