Date.parseLocale Bug In ASP.NET Ajax Control Toolkit

14 June 2007

So I ran into a weird one tonight. I have an ASP.NET page with a grid view and some text boxes. Two of the text boxes have CalendarExtenders on them. On initial load everything is peachy. But I select something in the Grid and fill in the values of the two text boxes on the server side...things go awry. I'm getting a javascript error, "Date.parseLocale is not a function".

There is a lengthy discussion of this in a post on the ASP.NET forums. Apparently this is a known issue. The last poster said it was fixed in a later version, but I'm using the latest and it definitely isn't.

However, one of the forum users posted a hack to get this working. And indeed it does. You just have to put this in the Page_Load function of the page that has the controls:

   1:  //Hack I found here: http://forums.asp.net/t/1068191.aspx
   2:  if (ScriptManager.GetCurrent(this.Page) != null)
   3:  {
   4:      if (!Page.ClientScript.IsStartupScriptRegistered("AjaxToolkitTempFix"))
   5:      {
   6:          Page.ClientScript.RegisterStartupScript(this.GetType(), "AjaxToolkitTempFix", "Date.parseLocale = function(s, f){return Date(s);};" + Environment.NewLine + "Sys.Debug = new Object();Sys.Debug.isDebug =  function(){return true};", true);
   7:      }
   8:  }
   9:  

Hope it works for you as well. Enjoy. I would put a note about how this doesn't work in the newest version and the hack is still necessary, but I kept getting a 404 when trying to login to the forums :)

Comments:3

Lawyers

11 June 2007

From my brother:

A man called a law office and said: "I want to talk to my lawyer."

The receptionist replied, "I'm sorry, but he died last week."

The next day he phoned again and asked the same question. The receptionist replied, "I told you yesterday, he died last week."

The next day the man called for the third time, once again asking to speak to his lawyer.

Annoyed, the receptionist said, "Look, I keep telling you, your lawyer died last week. Why do you keep calling?"

"Because I just love hearing it," the man replied.

Comments:0

Review of Archaeology Exhibit at Fair Park

08 June 2007

So around 4:00 on Tuesday my wife and I hit an exhibit showing at Fair Park here in Dallas. The exhibit is called "From Abraham To Jesus", though the Exhibit website calls it "Ancient Treasures of the Holy Land". It had materials from about 3000 BC to 30 AD.

Most of the exhibited items were real, though a few were admitted to be replicas of the real thing. Most of the earlier materials were crude pots and such, but that is to be expected. The Egyptian artifacts went back to roughly 3000 BC, though the biblical artifacts don't start till later (obviously, since Abraham wasn't till later). Artifacts came from Egypt, Canaan, Greece, Cyprus, Babylonia, Assyria, and maybe that's it.

There were a few highlights for me. The first one came when we went from the so-so quality middle-eastern pottery to the very well done Greek pottery. The contrast was obvious. Man those Greeks new what they were doing...

My second highlight was the ossuaries. Ossuaries are essentially ancient bone boxes. After someone died, they would be laid in a tomb for a while until their flesh completely rotted. Then to make room for more family members, their bones were moved to small stone boxes. These are the ossuaries. I would say that the ones they had on display (I believe there were three) were about 3 1/2 foot long, 1 1/2 foot wide, and 2 foot tall (that is guestimating).

The last ossuary was the most interesting of the three. It had writing on the top in two languages, and writing on the side in one. Before I talked to the curator about it I took a gander and recognized one of the inscriptions on the top easily. It was "ΑΛΕΧΑΝΔΡΟΥ;" (hope that unicode comes out for you). Roughly translated, that means "Of Alexander." At first I thought that meant "The Son Of Alexander", because that is exactly how you would see that written in many Greek texts. The other text on the top was clearly either Aramaic or Hebrew, but I couldn't make out much of it. The text on the side looked like uncial Greek, but I didn't make it out at first.

Then the curator chatted with us. It was his opinion that this was the ossuary of none other than the son of Simon the Cyrenian mentioned in Matt 27:32, Mark 15:21, and Luke 23:26. Mark 15:21 mentions that he had two sons, and one of their names was Alexander. I couldn't make out the Aramaic/Hebrew, but he said it was "son of Simon", and with that little bit of information it was easy to go "Oh, that text on the side is ΣΙΜΟΝ", or "Simon" (Sorry, don't have a convenient uncial unicode font:) ). I really have no clue if he is correct, but it was nice to look at it anyway. I try my best to be skeptical of these amazing finds these days since some are turning out to be wrong and/or forgeries. He named a couple familiar scholar names that supposedly agreed, so it is not too easy for me to dismiss. Regardless, I enjoyed the talk we had quite a bit.

The coolest thing there were two scraps from the one and only dead sea scrolls. I've never seen 2200 year old writings in the flesh. Have you? I own some 500 year old paper, but that doesn't really compare. On one of the fragments I could barely make out any glyphs at all. On the other I could make out quite a bit. The light was dim, so that made both of them quite difficult to look at. I was surprised at how small the writing was. Those scribes must have had good eyesight.

My only complaint about the exhibit was the audio tour. The did the audio explanations in story form, a grandfather archaeologist talking to his young granddaughter. Personally, I found it really cheezy. Kids might like it, but it irked me after a while and I just couldn't listen any longer. If you're an adult, I would recommend just reading the exhibit displays and looking at the goods.

I believe the tickets were around $16 for adults. There were discounts for students. I bet there were discounts for children. Given my interest in the subject matter, I thought it was well worth it. I expected more artifacts than they had, but I still have to give it a thumbs up.

Comments:0

ALT.NET - Some Great Ideas Guys, But Get Over It

05 June 2007

I have to agree with Jason on this one. A lot of the ALT.NET stuff I am seeing in the blogs and whatnot just seems foolish to me. There are a number of great tools or ideas in the list, but the approach is just silly. Roy gives a disclaimer of "I don't necessarily agree with the list here" and says he will post his thoughts later, but either way he is fanning the flames of thinking in trends and not thinking of what is actually best. I get this same feeling all the time when I listen to agile people. I usually end up agreeing with most of what they say, but they are so often too filled with zealousy that they have forgotten that you can still complete projects just fine without agile. Though I do think a more agile approach would often work great in development work, it is the attitude that is annoying.

Problem two with this list: who considers all this "hot". The bloggers? They make up a very small percentage of the programmers out there. Most of the programmers I run into are completely oblivious to what is happening in the .NET blogosphere. Even if that list is representative of the .NET blogging community (and I think only partially so), we are still dealing with a small minority of the population.

We are supposedly an industry of intelligent people. We have to be smart to deal with all this programming stuff, right? At least semi-smart? If so, let us pick technologies and practices with our head. Let us be able to look through the popular, the trendy, and whatnot, and apply all this in a much more sane manner. That's what they pay us the big bucks to do.

Comments:0

Books On Web and Greek

05 June 2007

I an a little behind on my book reviews, but I have three more up now. For my web developer readers there is Web Standards Creativity and The Principles of Beautiful Web Design. I liked one but not the other. How will you know? I guess you have to read my reviews to find out.

The other is for the Greek geeks out there. If you are well into the intermediate stage of your Greek or later, you might be able to get some good information out of Michael Palmer's Levels of Constituent Structure in New Testament Greek

Comments:0

I Am Spidermaninja

01 June 2007

The other night I was sitting with my family at the table and there was a fly that kept flying around. My daughter kept going on and on saying things like "Goway Bug!" (trans., "Go away bug!"), and asking over and over, "Hur mommy?" (trans., "Will the fly hurt mommy?"), "Hur daddy?" (trans., "Will the fly hurt daddy?"), "Hur Nanner?" (trans. "Will the fly hurt Jonathan?"), and "Hur Abby?" (trans. "Will the fly hurt me?"). She likes to cycle through the list of everyone at the table when a bug comes flying around.

It was at this point I sprung into action. Remember that scene from Karate Kid when Daniel grabbed a fly with chopsticks? Well, I was sitting there and the fly flew behind me. As the fly came back around I used what must have been my spider sense as it flew from behind my head, reached out, and in one attempt grabbed the fly out of mid-air, thereby saving my family from further anguish.

No, it wasn't luck. I'm Spidermaninja.

Fear me. 

Comments:0