Forum OpenACS Q&A: Re: Search and OpenFTS

Collapse
11: Re: Search and OpenFTS (response to 10)
Posted by Tilmann Singer on
<blockquote> What is an object?  How do I load in the database?
</blockquote>

The answer to this can be found here: https://openacs.org/doc/openacs-4-6-3/tutorial.html

Also note that if you are getting started and only want to experiment with the system it is easier to use inline queries instead of putting them in xql files, which is only necessary when you plan to make your code multi-database aware.

Collapse
12: Re: Search and OpenFTS (response to 11)
Posted by James Bennin on
Thank you for your response. I understand that the xql files need to be reloaded. I also know that for certain packages, you need to put certain files on "watch". I tried developping some test script under the "notes" package under "/web/service/packages/notes". I wrote my scripts and I put them on "watch". When I tried to access that page this is the error I got:
invalid command name "-properties"
    while executing
"-properties {

    date:onevalue
    time:onevalue
    
}"
    ("uplevel" body line 13)
    invoked from within
"uplevel {
    	  ad_page_contract {
    Main view page for one project.

    @author James Bennin (jsb88@stlife.byu.edu)
    @creation-date 2003-08-14..."
    (procedure "code::tcl::/web/service0/packages/notes/www/testing" line 2)
    invoked from within
"code::tcl::$__adp_stub"
    invoked from within
"if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date
      adp_init tcl $__adp_stub
..."
    ("uplevel" body line 3)
    invoked from within
"uplevel {

    if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date
      adp_init t..."
    (procedure "adp_prepare" line 2)
    invoked from within
"adp_prepare "
    (procedure "template::adp_parse" line 30)
    invoked from within
"template::adp_parse [file root [ad_conn file]] {}"
    (procedure "adp_parse_ad_conn_file" line 7)
    invoked from within
"$handler"
    ("uplevel" body line 2)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
	$handler
      } ad_script_abort val {
	# do nothing
      }"
    invoked from within
"rp_serve_concrete_file [ad_conn file]"
    (procedure "rp_serve_abstract_file" line 60)
    invoked from within
"rp_serve_abstract_file "$root/$path""
    ("uplevel" body line 2)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
	rp_serve_abstract_file "$root/$path"
	set tcl_url2file([ad_conn url]) [ad_conn file]
	set tcl_url2path_info([ad_conn url]) [ad_conn path_inf..."

I am thinking my tcl is wrong.
ad_page_contract {
    Main view page for one project.

    @author James Bennin (jsb88@stlife.byu.edu)
    @creation-date 2003-08-14
    @cvs-id $Id: testing.tcl,v 1.1.1.1 2003/14/08 12:46:56 service0 Exp $

} {
    {one_user_id:integer,optional}
}

 -properties {

    date:onevalue
    time:onevalue

}

db_1row date_select {}
db_1row time_select {}

ad_return_template
What is the format(basic) of writting these tcl scripts? Is there a way to put the files under "/web/service/www/" under "watch" or I just have to reload the server everytime? Thank you James