Forum OpenACS Development: Re: Functions in .xql files...

Collapse
Posted by Jun Yamog on
Hi Don,

Thanks, I got a better understanding of what you want.

Regarding the proc to upload a file.  Well its already in a tcl proc.  And you are right that this is a good place to use tcl.  Since I can detect the mime type and insert a new one if needed, the whole upload is in a transaction, etc.  So the programer calls in a tcl proc, passes in the title, upload_file name, etc.  Its actually close to the file storage upload thingy, but instead of using PL/SQL and tcl, I used tcl and simple query and inserts.

The Tcl-based service contract is something that will be a good next to do.  (Although I am still a long way from that) Right now its on a primitive SC.  The packages are binded by a CR folder id.  Or maybe not binded,  I can't quite explain it.

The CMS ability to create the form depending on the content type is really great.  Deds also did the same for his classifieds modules.  Although both did not make use of ad_form, the standard form builder.  I think it can be possible by using ad_form -extend.  There should be standard way of storing what widget to use for a field.  I think right now some packages already store the widget type (forgot where the table is).  Something like in ad_form "foo_field:text(auto)" maybe helpful.  Auto widgets will look at the db on what widget foo_field is supposed to use.  Or something like that.  Atleast the design is enough to be easy, and also easy to override in case it really needs to.