Context List
Posted: Thu Mar 31, 2005 10:29 pm
Is it possible to make a list of contexts? For example the following is a snippet of code (that obviously doesn't work) that i have written.
That is a scaled down version (for brevity's sake). Hopefully this gives a general idea of what I am trying to do. Can anyone advise me on the best approach?
Code: Select all
(context 'ITEM)
(set 'title "")
(set 'link "")
(set 'content "")
(set 'item_date "")
(set 'author "")
(context 'MY_CONTEXT)
(set 'items '())
(define (create_item this_item)
(new ITEM 'MAIN:item-obj)
;;Item Title
(set 'item_obj:title "some title")
;;Item Author
(set 'item_obj:author "some author")
;;Item Date
(set 'item_obj:item_date "some date)
;;Item Body
(set 'item_obj:content "foo body")
;;Item Link/URL
(set 'item_obj:link "some URL")
(cons items item_obj)
)
;;Have some method here that calls create_items multiple times