!7 // wrapper object! sclass Msg { O o; *() {} *(O *o) {} S text() { ret castGet(o, 'text); } } // wrapper object! sclass ItemPage { O o; *() {} *(O *o) {} S title() { ret castGet(o, 'title); } L comments() { ret mapWrap(Msg, (L) get(o, 'comments)); } void addComment(S text) { call(creator(), 'addProgramComment, programID(), o, text); } } svoid onItemPage(ItemPage page) { print("Found page: " + page.title()); for (Msg c : page.comments()) print("Found comment: " + c.text()); page.addComment("Kilroy was here"); } p { O main = creator(); L pages = cast call(main, 'list, 'ItemPage); new Matches m; print(n(pages, "page")); lock parentDBLock(); if (nempty(pages)) onItemPage(ItemPage(last(pages))); }