PUT problem solved

I had a problem linking up dojo/xhrPut and Catalyst::Controller::REST. As always, the answer was in the documentation, but I didn’t see it.

Catalyst::Controller::REST docs say that:

The HTTP POST, PUT, and OPTIONS methods will all automatically deserialize the contents of $c->request->body based on the requests content-type header. A list of understood serialization formats is below.

And the docs for dojo/xhrPut point to those for dojo/xhrGet for parameters, which include:


A JavaScript object of name/string value pairs. These are the headers to send as part of the request. For example, you can use the headers option to set the Content-Type, X-Method-Override, or Content-Encoding headers of the HTTP request.

This parameter is optional

So all I had to do in my javascript code is

	    var xhrArgs = {
		url: ajaxurls.sort + '/' + editing.id,
		putData: dojo.toJson(data),
		handleAs: "json",
		headers: {'Content-Type':'application/json'},
		load: function(data){
		    // don't really need to do anything here
		    // uncomment for testing
                    // console.log("new sort order put to server");
		error: function(error){
		    alert('warning, edits were not saved properly.  Proceed with caution');
	    //Call the asynchronous xhrPost
	    var deferred = dojo.xhrPut(xhrArgs);

And the controller magically started to work as expected. Hooray, git commit and all that, but it is time to go to sleep and actually get things working some other day.


It’s a razor thin line, but obvious which side you’re on

So yesterday was the first day of Secret Santas at Grace’s school. Same dreadful drill as when we were kids…pick names out of a hat, get somebody you’re not friends with, and then try to think up gifts all week long. What with Nutcracker rehearsals and performances, I didn’t hear about it until Sunday night, but the girls and I had made cookies over the weekend so that seemed like an appropriate gift, fitting the “small, home made” type of requirements. So we got our act together, and Grace gave a decent gift. Continue reading

Finally on the air

My mother-in-law just got notified that her interview with Tavis Smiley is finally going to get aired Dec 11, and will subsequently be posted forevermore on-line!

Hello Ms. Tomblin,

I just wanted to reach out to you and let you know that your interview
with Tavis will be running on our show this weekend. You can likely
hear it on your local public radio station, or hear it on demand at our
website at www.tavissmileyradio.com.
It should be available by 12 noon PT on Friday (tomorrow).

I’m remembering the old days when we would tape interviews and songs off the of the radio on warbly cassette tapes. Good times.

A Flash-related browser crash ate my bug report to MooseX::Declare

ggghhhhaaaa. I hate flash. I really like http://proquest.safaribooksonline.com/, or rather, I used to love it, but now they’ve switched to Flash and it is hateful hateful hateful. But I still can’t stop using it because the information is so awesome and handy and because UCI has an account and it is right there waiting for me whenever I have a question. But then *bang* one page too many and firefox just blinks off my desktop.

Continue reading