Forum OpenACS Q&A: Re: Re: Tutorial package confusion

Collapse
Posted by Joe Cooper on
Thanks for the pointer to the ad_form docs, Harish. Very useful. I had been reading about the old form generator procedures...ad_form looks much nicer.

Since the item_id is required (and should be), my question becomes, "Why was the tutorial and test case written without the item_id included in the call to mfp::note::add?" Was there a time when this variable magically followed the object around? I'm an utter newbie to both OACS and TCL, so forgive me if I'm being daft...I'm just trying to wrap my head around the design of OACS so I can get started on some simple apps of my own.

On a related note, since the :key needs to get passed around when dealing with ad_forms, how does one write a test case for an ad_form procedure. A grep of the test directories in the current OACS version turns up no obvious cases of ad_form tests. Can someone point me to a test suite that includes tests for ad_form procedures?

Specifically, I guess just a pointer for how to fix the provided test case in the tutorial so that it can pass the item_id would be sufficient to make the test tutorial make sense.