Jade's weblog Archive

Refreshing an ad_form

Ad_form has a facility for allowing you to pull in new values from the database while the form is being edited. This is a really cool feature if you know how to use it.

Basically, all you have to do is:

In the definition of your form, put in an html section

    {pm_task_id:integer(select),optional
        {section "Task"}
        {label "Subject"}
        {options {$task_options}}
        {html 
        {onChange "document.log_entry_form.__refreshing_p.value='1';
submit()"}
        }
        {value $pm_task_id}
    }
} 
In this case, the form is called log_entry_form. When you submit the form, it will show the form again, this time with the value for pm_task_id and the rest of the form set. I then have a section of my form that says:

if {[info exists pm_task_id]} {

extend the form here

}

This can allow you to do things like sub-categories with ad_form.

06:19 PM, 28 May 2004 by Jade Rubick Permalink | Comments (0)

How to deal with includes and URLs

When you have code in a /lib directory, and you want it to be called by any package, you need to make sure any links you return are relative to the package the /lib resides in. Let's say it's in package-A/lib and it's being called from package-B/www/myfile.tcl

Look a lars-blogger/www/blog.adp for a good example of how to deal with this.

05:31 PM, 27 May 2004 by Jade Rubick Permalink | Comments (0)

We hang out with Dean and Kerry

See the link below.

http://news.statesmanjournal.com/album/album.cfm?i=192&r=10

Look right above the woman in the white t-shirt: Kate, Jade, and Pam, in clockwise order. John Kerry came by about 10 minutes later. We all got to shake both of their hands. We were in a remote section, way behind where the speeches were made, but Pam got the rest of us to chant HOW ARD HOW ARD, until he came up. Then she started in on KER RY KER RY, and eventually he came up too. I don't think his security team was very pleased. It was like a rock concert, but it was also pretty amazing, because all of Pioneer Square was a sea of people -- so it was pretty neat to have them come right by where we were.

Howard Dean greets well wishers during presidential candidate John Kerryメs campaign stop in Portland. Dean, the Vermont governor, once was running against Kerry but now has thrown his support behind the Massachusetts senator.

LORI CAIN / Statesman Journal

08:08 PM, 18 May 2004 by Jade Rubick Permalink | Comments (0)

7 spen source strategies to competitive advantage [management.itmanagersjournal.com]

Interesting article.

12:46 PM, 17 May 2004 by Jade Rubick Permalink | Comments (0)

Visual essay on 1984 [www.dgp.utoronto.ca]

This was done by a friend of mine. I found it to be pretty powerful.

10:58 PM, 13 May 2004 by Jade Rubick Permalink | Comments (0)

Letter from a soldier stationed in Iraq

Sorry for the downer, but I need to tell everyone I can about what is going on...

We are losing the war. Yes, we beat their army, we crushed their government but right now we are losing the people. No one seems to show these people any respect, they are fed up and want us to go.

They are tired of us breaking in their doors at 3 in the morning. They are tired of us holding children in a school while the parents wait out side. They are tired of us firing rounds into their farms to register the guns.

They are tired of us driving across their land and destroying their crops.

They are tired of the roadblocks and having their cars searched.

We are treating everyone like the enemy right now because of a few bad guys running around causing trouble. People are being detained for having a spool of wire in their house, or because someone buried some bad stuff within a couple hundred meters of their house. People do not even want soldiers shopping in their stores anymore. A lot of innocent people are being shot by soldiers because of miscommunication or nerves, or because they were in the way of a bullet. I am beginning to worry
about what is going to happen here, are we going to be able to get out if we want to? It is turing into a Vietnam. I am here in the wire so I have very little say or very little opportunity to effect change. The men are not getting rest and they are getting jumpy and or bored which is not good for the Iraqi civilians. If you look at the polls, you will see the start of what I mean, it has gotten at least 30% worse here as far as the civilian attitude in the last week. I am questioning myself as an American soldier and I do not like that. If this keeps up, the Taji general population overall will want us gone. Without significant changes in attitude I think that things will be very bad within a month.

01:33 PM, 12 May 2004 by Jade Rubick Permalink | Comments (0)

Using TAGS files with emacs and OpenACS

[11:16] <bartt> You use a TAGS file for that.
[11:16] <bartt> Are you familiar w/ M-. ?
[11:16] > No, not really.
[11:17] <bartt> OK, let me publish some scripts I use to create TAGS files for OpenACS.
[11:17]         jadeforrest cheers :)
[11:17] <bartt> TAGS files are one of the best things about Emacs and VIM
[11:17] <SchemaThings> tks bartt!
[11:17] <SchemaThings> totally
[11:18] <SchemaThings> the toolmaster 9000
[11:18]         bartt setting up a ~/bin GNU Arch achive
[11:19] > I can't believe I was living without oacs.el before :)
[11:44] <bartt> OK, for those with tla, you can get otags & otags-site using:
[11:45] <bartt> tla get -A bart-arch@thecodemill.biz--2004 bin--main--0 bin
[11:45] <bartt> Do this in your ~ and then add ~/bin to your PATH.
[11:45]         bartt making a tar file of this archive.
[11:47] <bartt> You can download the tar file from: http://www.thecodemill.biz/repository/otags.tgz
[11:47] <bartt> Extract in ~ (creates ./bin)
[11:48] <bartt> Then run otags-site <path to your OpenACS server root>
[11:48] <bartt> E.g. otags-site /web/openacs-4
[11:48] <bartt> This will create 2 files in each package directory: TAGS and TAGS-TCL
[11:49] <bartt> Plus a master set of TAGS and TAGS-TCL files in server root.
[11:49] hazmat [~hazmat@pool-68-162-33-2.nwrk.east.verizon.net] has joined #openacs
[11:51] <bartt> TAGS contains tags of all TCL procedure definitions, XQL query definitions and all SQL package bodies.
[11:52] <bartt> TAGS-TCL contains tags of all TCL procedure definitions and XQL query definitions but not the SQL package bodies.
[11:52] <bartt> otags-site calls otags
[11:52] <bartt> otags is configured to index Oracle XQL files.
[11:53] <bartt> Change the regexp in otags to index PostgreSQL XQL files instead.
[11:53] <bartt> Re-running otags-site will update the TAGS and TAGS-TCL files.
[11:53] <bartt> To use these files press M-. in Emacs
[11:54] <bartt> Upon first use Emacs will ask for a TAGS file.
[11:54] <bartt> If you want to search the entire site you point it to the master TAGS file. E.g. /web/openacs-4/TAGS
[11:55] <bartt> If you want to limit your search to a single package point it to the package TAGS file. E.g. /web/openacs-4/packages/acs-tcl/TAGS
[11:55] <bartt> If you want to limit your search to on the TCL and XQL files of a single package point it to the package TAGS-TCL file. E.g. /web/openacs-4/packages/acs-tcl/TAGS-TCL
[11:55] <bartt> Let me know if you have any questions.
[11:57] <bartt> You can switch TAGS files in an Emacs session w/ M-x tags-reset-tags-table
[11:57] > Is this documented anywhere, or should I copy and paste from this session so I don't forget?
[11:57] <bartt> I haven't documented this. Most of it is documented in Emacs though.
[11:58]         bartt Reminds himself to write another article
[11:59] <bartt> C-h i
[11:59] <bartt> m emacs
[11:59] <bartt> m tags
[11:59] <bartt> Will get you to the tags documentation in Emacs
[11:59] <SchemaThings> tags is a standard feature of either editor if you can tag the body of stuff you're working with
[12:00] <SchemaThings> so the bartt tag generator is the custom code / technique here
[12:00] <dirkgomez> lars uses them in a very interesting way
[12:00] <SchemaThings> how so?
[12:01] <bartt> Also very useful: M-x tag-search and M-x tags-query-replace
[12:01] <bartt> Followed by M-,

01:52 PM, 11 May 2004 by Jade Rubick Permalink | Comments (0)

Use ad_url

Jeff pointed out I can say:

ad_url

instead of...

parameter::get_from_package_key -package_key acs-kernel -parameter SystemURL

Thanks, Jeff!

05:22 PM, 10 May 2004 by Jade Rubick Permalink | Comments (0)

Updated my site to OpenACS 5.04

Woohoo! :)

11:55 PM, 04 May 2004 by Jade Rubick Permalink | Comments (0)

I posted a script I used.

07:26 AM, 03 May 2004 by Jade Rubick Permalink | Comments (0)

XML

Notifications

You may request notification for Jade's weblog.

Syndication Feed

XML

Recent Comments

  1. Jade Rubick: And... yes and no
  2. Jade Rubick: Using hoptoad
  3. Jade Rubick: Much better
  4. Bodo Tasche: Link changed :)
  5. Bodo Tasche: Better commt emails. Now with color :)
  6. Jade Rubick: Filed a ticket
  7. Vinod Kurup: Wow
  8. Jade Rubick: Then what
  9. Paul Post: Percentages
  10. Paul Post: I might be an ENFJ?