Forum OpenACS Development: Re: ad_page_contract to be used on includes

Collapse
Posted by Jun Yamog on
Hi Dave,

I have done the checking on the clobber on the latter part of the patch.  So its in there already.  Since after making the patch.  The default value override the local var value.  Hehehe.

Hi Peter,

We actually use pretty much all except adding an if.  And 2 procs to set and check the status of ad_conn was added.  Also I think it will be redundant if the case is like this:

ad_page_contract {} {foo:notnull}

ad_include_contract {} {foo:notnull}

All,

I will create a new patch that has a switch.  I think that would be best.

How about this:

ad_page_contract {} {} {} -some_nice_name_that_says_apply_contract_to_includes_too

Hmmm maybe

ad_page_contract {} {} {} -apply_to_page_n_includes

How about that?

Collapse
Posted by Tom Jackson on

I hope this discussion can somehow be condensed into a TIP, because, in my opinion, mucking _at all_ with ad_page_contract is a big deal. ad_page_contract is _not_ broken, and I believe I have shown a much better method of creating an include that results in a re-useable page.

Even if the result of this experiment is that ad_page_contract appears on the exterior to work the same, it seems odd to have it work one way or another depending on the context it appears to be in. And it will need to do this extra work of figuring out where it is at, for every page, and every variable. Debugging may also become an issue, and it already is difficult to trace problems.