PSN Account

I've had the PS3 for a year now, I finally got around to signing up on the website.

One from the archives

Ever notice this phenomenon:
Friday mornings usually, there will be a clear passing lane on the left side, and yet there will be a line of around 10 cars driving 50 mph in the right lane??

I call this phenomenon : Hung Over

Originally Added 7/11/2003 9:22:54 AM (I still have that database and website code... I can import the database soon for browsing)

Another gem, posted July 7th, 2004. It was about the dude at the bank being way too friendly and always wanting to talk to me. This was Bank of America (or Fleet, at the time) in Wayne, PA.

"He then has to shake your hand on the way out, saying "Thanks for stopping in!" Like, I'm gonna keep the check in my pocket and never deposit it."

God this is brilliant:
Recursion
I recurse like a sailor
Added 12/29/2004 5:18:32 PM

The Best Diet Ever

Not. For the past 3 months I've been on somewhat of a diet, but for the past 3 weeks, I really started pursuing "thinness". My goal is to be at 170, or lose 30 pounds, by the time I reach the age of 30. I think it can be done, and I've put a lot of money into making sure I can do it. First I bought a blender. The BlendTec Total Blender. It was expensive but it really works like all those videos of that guy blending iPhones say it works. I bought a digital scale. I bought a lot of fruits which I'll do every two or so weeks. And I bought a lot of granola, which will get me through the morning and will be half of my dinner every day. So far I've seen a steady decrease in my weight on my new scale. Here's my plan:

Eat not a lot of calories a day. A granola bar, a salad for lunch, a granola bar and a small dinner every day. Those granola bars are 150 calories and they fill me up for a good four hours.

Work out a few times a day. Since I still smoke (another part of my weight loss plan), I can't do 30 or 40 pushup or pullup sets every two hours. In fact, I can still only do about 4 pullups in one set! I'm getting a lot stronger though. 10 pushups right now is my max. Take the dog for a brisk walk and do 10 pushups right afterwards. Then watch tv for a bit, go upstairs and do my normal amount of pullups.

From Thursday of last week up til Monday morning, I was losing a pound a day! Then Labor Day happened and I gained 2 pounds! I had a hamburger, a hot dog, some corn, and lots of chips and salsa with cream cheese. But after a short nap (it was the most I've eaten in 3 weeks, I was tired!), I did 10 pushups. Then got my hair cut.

If you want to try this diet out, it's open source! Eat a Kashi GoLean bar with coffee, half and half, and sugar (I won't make any sacrifices regarding coffee!). This is also delicious since coffee and chocolate are brilliant together. For lunch get a small chicken Caesar salad (don't skimp! Dressing, cheese, bread crumbs). For dinner, have a turkey sandwich on one slice of 12 grain bread cut in half and another Kashi. Basically, I could give a flying f%#@ what food tastes like, or how varied my meals are. Really, I don't care. They're just something to get us through the day, not part of the day.

Workout schedule: When I wake up, I do my pullups and get a shower and go to work. At work, run up stairs and walk briskly to go pick up your salad. Usually I get a diet iced tea with lunch. When I get home from work I spread out the workout like I mentioned above. Walk in the door, pullups. Rest for 20-30, pushups. Before bed I do 10 upbeat pushups and my regular pullups (I try not to mention more than once how many of these I can do right now :) It's embarrassing), although I might do less because I just did 10 exhausting pushups. And of course take the dog for a brisk walk. It's good to get a fast dog.

That's it! Before I really started this, I was at 210 in mid June before Jamaica. Thursday when I got the scale I weighed in at 198. Monday morning I was at 193.5. Then I gained 2 pounds at the barbecue! Oh well, as long as I stick to the workout.

The real method behind my madness is to not have to work out too briskly and let my lack of previous binge eating (I would never eat between meals or eat fast food or anything really junky, but I would eat a lot...) replaced by very light but satisfying eating lose the pounds for me. It's really a mix of the two. Since I smoke I wouldn't have the breath right now to work out enough to lose the weight if I kept on my normal eating habits. That's really all I have been trying to say :) Enjoy.

Fantasy Football Team 2008

Here's the rundown

Maurice Jones-Drew RB JAC
Wes Welker WR NE
Brandon Jacobs RB NYG
Jay Cutler QB DEN
Eagles DEF PHI
Anthony Gonzalez WR IND
Todd Heap TE BAL
Jon Kitna QB DET
Niel Rackers K ARI
Isaac Bruce WR SF
Chester Taylor RB MIN
Owen Daniels TE HOU
Eddie Royal WR DEN
Leon Washington RB NYJ
Raiders DEF OAK
John Kasay K CAR

I had 8th pick, I kept Eagles D so it moved up from 6th to 5th round. If I keep them again, it's a 1st round. The draft was a good time as usual, just very frustrating to sit there and wait for your pick to come up. Picking is fun though, and the last few rounds fly, even though I still did pretty good in those last four to five rounds. I'm happy with my draft. Barring injuries, suspensions, and under-performance, it should represent a good chunk of my team at the end of the season.

Jamaica Trip: The Flights

It may have been a previously little known fact, but I am terrified of flying. The last time I was on a plane was when I was three and I thought it was a ride. Because you usually have no concept of the world when you're little. I thought maybe Disney World was at the airport and we just flew around for a little bit and landed, then went into the park. I remember about 5 seconds of this flight, leaning over my brother Scott and looking down out the window.

When I knew I was flying to Jamaica, I was nervous for a little while. About two weeks before, I talked to my Mom who works for our doctor, about possibly getting something to settle my nerves for the flight. We made an appointment and the doctor gave me some Xanax (can't wait to see what kind of traffic I get with that name on here). I told him I needed just 4, with his description of "take 1-2 every four hours". He gave me 10. I left for the airport from my parents' house (my Dad drove), at about 4 in the morning and got there at about 4:30.

There was a short line, and Mike and Amanda, Amanda, Becky, and parents and other family were in line ahead of some other people. I said hi and went to the back. I showed my passport and driver's license and got my ticket and headed to security.

This is where I totally screwed up! I had worn shorts with zippers in them, I had my phone and ipod in my pockets, my wallet has metal on it, I have a chain on my neck. Short version, I had to get swept with the wand and padded down while Mike waited for me, laughing at me. Secondly, they took my iPod and phone and put them in what I can only describe as a dog water bowl. After I was done getting swept, I asked the guy where my iPod and phone were, and he said "go check with your friend, he may have picked it up". Nope, I told him. I was like WTF. When I asked Mike about it he was like WTF. But he had it up at the desk. Thank God! I couldn't deal without music and just Xanax. They did spot one threat on me and he had to deal with it. At the last minute of packing, I was frantically going around throwing stuff in my carry-on that I might need, including a big squeeze bottle of sun tan lotion. I read the warnings that the travel agent sent, including "no liquids over 3oz" but totally forgot. He said "you're not allowed to have this", I said "take it". Get me the f#@$ out of here!

Waiting at the gate was fun. I had popped a Xanax about 30 minutes before, waiting til I got on the plane to take my second one. It's like a drunk feeling. At this point I had put the pills in my carry-on... whoops. This turned out fine though. As the plane boarded, I was just trying to do what the people in front of me were doing since it was my first time. I didn't want to hold anyone up as I got to my seat, so I just threw my bag, and the pills, in the overhead, and sat down to get out of the way as quickly as possible. I was on the window seat, which was great for my claustrophobia! It's mild. I sat and waited for takeoff.

Taking off went without a hitch. As the plane was getting ready to leave, I put my headphones and some Bob Marley on, the stewardess came by and said no. Damn. Takeoff with no tunes. Brutal. So I just got my camera ready and snapped some shots and a video of takeoff. At about 7:40 in the morning, this was an awesome sight! The only thing that really worried me was we were heading up and suddenly went DOWN a few feet. My throat quickly made some room for my heart and stomach and anything else that wanted to go up there. I was a little nervous. Hurry up and hit 37,000 feet!

I managed to fall asleep for a little while after we passed Virginia. The whole flight was estimated to take 3 hours and 5 minutes. This was after about 45 minutes or so. I forget at this point, plus I was on Xanax :) We hit some very gentle turbulence, where the seatbelt signs would turn on. It really didn't bother me. I fell asleep kinda looking out the window at the land. When I woke up probably 2 hours later, we were over WATER! I was like WHERE THE F#@% AM I?!?! I got nervous for a little while, and the Xanax had worn off. The captain came on shortly after and said we had just passed over Cuba, and the next land we'll see is Jamaica! Sweet!

Landing was freaking awesome. We were flying South, obviously, and the airport at Montego Bay faces west to east. We took this huge turn left and that is just about the freakiest thing ever. It just kept turning. Please stop turning or we'll be upside down soon. It finally flattened out and we went down for a very smooth landing, which I also video taped. Very smooth and the captain certainly knows what he is doing.

The way back to Philadelphia was a blur. Our flight had been delayed 2.5 hours. During this time, I popped a Xanax, spent $15 at the bar, popped another one, ended up sitting next to a very nice Jamaican girl going to Philly, I fell asleep leaning against the seat in front of me listening to classical music, woke up with my legs very tense and not feeling good at all. I woke up because the girl in front of me moved her seat up... WTF I'm sleeping here! Since my legs were so tense, I bit half a pill and tried to relax. The 2.5 pills did the trick. Along with the drinks. I got to my parents house and fell asleep in a few minutes. Next up, Jamaica Mon!

Jamaica Trip: The food

At Sandals Grande Ocho Rios, you are treated to a number of different restaurants with different specialties. They are open at slightly different times for all those important meals of the day. The food, with a few notable exceptions from people who didn't like their FREE desserts, was exceptional. (Technically it's not free, but you know what I mean).

My roommate and I were early risers, waking up most days by 7. I woke up for an hour usually at around 4am every day. I would wake up, look at the clock, and it was 4am. It was odd, but really the only time I could connect to the internet with no problems. Breakfast wouldn't start until 7:30, so of course by this point we're starving, because to get a timely dinner in on the previous night, you'd have get there 15 minutes before the restaurant you wanted to go to opened. Breakfast at 7:30 was less of an issue. We'd get there and there'd be maybe 10-20 people total, and it's a buffet, so you just grab a plate and in about 5 minutes you have a delicious meal, coffee, and water sitting in front of you.

The buffet breakfast was pretty amazing. While Ryan, my roommate, would get lots of fruit and two omelettes, I would just get everything that interested me. Chicken for breakfast? Why not. They always had bacon, sausage, some form of potato (hash browns, home fries, etc), and two domes at the buffet would be different every day. I always got pineapple and another fruit. The water there was delicious and ice cold. And the first day I asked the waiter if the coffee they were serving us was "Blue Mountain" and he said "Yeah Mon!" I think they just cater to your wishes and tell you what you want to hear. It was delicious though. We'd then go back to the room for an hour or so then meet up with everyone at the pool or beach for another hour or two. Then came lunch.

Lunch was pretty good most times. We would still mostly go to the buffet since it was quick and pretty good. I forget if we tried a non-buffet lunch. I'm sure we did, but I forget at this point. Lunch is when the buffet had a ton of different salads, like tuna salad, chicken Caesar, different pasta salads. One day they had Jerk Chicken which is a specialty dish of Jamaica. I was talking to Casper, the wedding photographer, and I just said "This jerk chicken and pork that they have in the resort is bullshit, huh?" He was like "Yah Mon". You could pick up real jerk at the various jerk centres and stores that they have along the highway between the airport and the resort. I didn't try any real jerk. That's a shame. After lunch we'd go to the pool again and start drinking usually. The pool is where it's at.

Thankfully for the casual dress code at the resort, you would just have to pack a pair of shorts if you didn't want to go back to your room to change for dinner. And it was amazing. Amazingly slow. If you went to a sit down and served dinner there, you could expect to just sit there for two hours and talk to everyone. Courses would come out every 30 minutes or so, and you'd eat it in about 2 minutes. This is what the appetizers looked like. Although delicious, you can tell they're very very small. Which is fine, because 3 - 4 small courses add up to a decent meal. The place that picture was taken was called the Reef Terrace or Terrace Reef. Something like that. I got Jerk Beef. It was delicious and the plate was square. They are all artistic about their meals, something you would see in places where a single meal is like $30 and up. And you're sitting there in your shorts, sandals and a t-shirt most times. It's really relaxing.

One time, we ate so early and were drinking so much that we were starved. We swam in the pool and hot tub all night, and at 9:30 or so, a stand near the pool opened up. It had nachos, pizza, and other delicious hand foods. I got nachos with sour cream, guacamole, jalapeno peppers, and salsa. Two plates. I was hungry.

The one place we ate it was required to dress up. And by dress up, I mean no shorts. Of course, I didn't pack anything in terms of nice clothes except my one red golf shirt, so I would have been SOL if it weren't for the tuxedo rentals! I used the white pants, my red golf shirt, and my sneakers, and passed the excruciating judgment that was placed on me as I walked in the place. It was a 100% improvisation and it worked pretty damn well. When Zatko gets back, he'll put up some decent pictures of it. He had also not packed any pants and was forced down the same road I was. Apparently Amanda had him pack half a suitcase of towels and towels were provided at every pool and in your shower, it turned out. That was one thing that I forgot and it turned out OK.

That about does it for the food. Obviously, there's not a lot of adjectives to use when describing food. I forget what I ate specifically but can tell you I was never disappointed. It was good. That's about all I can say, you have to go there yourselves :)

And so my photography hobby begins...

While in Jamaica, I noticed how much fun Mike and Jared were having with their DSLR cameras, and I wanted to get in on the action. I will be keeping a log here for just that purpose, and uploading the photos I take to Flickr and displaying them here with the details of the photo. I've been reading up on some things, but also bought a book to help me out. I got a Nikon D40 with the default load-out, an 8GB memory card, a bag for it, and the book which is on exposure. I'll probably read around the web as well and maybe try out some trial versions of professional photo software like Aperture from Apple or Lightroom from Adobe. Jared uses Lightroom, Mike uses iPhoto which is a basic photo application. Aperture is cheaper than Lightroom but only available on a Mac which is perfect since I use one :) But I'll try them out. It should be fun. I've been into photography for a while but never really fed my interests.

I did have a camera in 4th or 5th grade, though. A really old one. I went to Notre Dame and took a photo of the gold dome they have and it turned out really good, like a post card. They also had these giant sand dunes that I took a few pictures of. We had the big red van back then. That was fun.

So I'm giving it another whirl. We'll see how it turns out. Hopefully better than my drawing experiment a year or so ago :)

Back from Jamaica!

I'll be making a series of posts, but the first one is about scuba diving. Enjoy!

I was a bit nervous about it. Heading to the pool for the training, I was like I'm gonna drown. But they make you swim 8 laps around the pool without touching the side or bottom, and that pretty much got rid of the nervous feeling and made me exhausted instead :) Then you watch a video that teaches you some of the things that you will need to do. After that they suit you up, put you in the pool, then you try breathing underwater. That was crazy!

Of course, there are about 10 tricks that you need to know to stay alive while 40 feet below. The guy, Pablo, a Jamaican, taught you three of the ones that we'll need for a short, 30 minute excursion underwater. They were how to clear your mask if it gets filled with water, how to put your mouth piece back in if it gets knocked out or you lose it, and the last was how to equalize your pressure in your ears so you can go down 40 feet and feel perfectly comfortable. Then in the pool, they teach you this and Pablo watches each person as they do it at least twice perfectly. After that, Pablo made us swim from the shallow end to the deep end in a circle as long as we wanted, and practice equalizing our pressure. I swam in the pool for about 10-15 minutes, practicing these different techniques.

When we went on the dive, I was nervous again. They put an anchor in the water, you grab onto the rope and head down slowly, equalizing as you go, every 3-4 feet or so. It was very slow. You get down there, then go into what's called a "scuba chain", locking arms with everyone. This was uncomfortable since you're just kneeing there waiting for everyone, and when you're not moving, the bubbles you blow out just go in your face and you can't see anything. Then we went off to the reefs. So many colorful fishes and the water was beautiful. The one guy was taking pictures, and we managed to get one with the three of us that went down there. Overall it was an incredible time and I can't wait to do it again :D

I'll be posting that picture as soon as I get it from Zatko. In the meantime, check out the images as they get uploaded from the people that went. We have a Flikr group called "Zatko Wedding".

The Wedding Party

Heading to Jamaica!

Zatko, Amanda, Jared, Kris, and some other dudes and gals, including parents, are going down to Jamaica tomorrow at 7:25 AM! We'll be arriving somewhere where a bus can take us to Sandals at Ocho Rios by bus presumably. We'll probably be at our hotel by 1pm hopefully. I have to be at the airport at about 4:30am officially, but might be getting there by 5am. There will be an butt ass ton of pictures when I get back. Probably on my facebook profile and I'll link them here. I'm long overdue for a vacation. Peace.

Eclipse bombed on me

Thankfully, I was able to find the answer to my problem in German! Here is the forum I read. I found a lot of English speaking topics with the error message I was getting, but they were having slightly different problems. Basically, I renamed the file in the ".safetable" folder, reimported my project, and everything's fine. Weird. Good thing, too, I've been getting tons of comment spam on my pictures because I haven't implemented my anti-spam mechanism on there. I will employ the same method I use here.

Spore Creature Creator!!

I removed the contents of this post because it had an old spore thing in it, and its html sucked, and messed up my new page... Sorry

Age verification is dumb

How many times do you go to watch a video on a site that's not porn and it asks you for your date of birth? There's plenty of videos out there that do that... video games are the ones that annoy me the most. Especially since the sites that I watch videos on, I am registered for and my date of birth is stored with my profile. Sometimes it's just a 3 box combo of month, day and year where you have to type, other times it's 3 drop down boxes where what is automatically selected is January 1, 2004. Other times it's 3 drop downs for month day and year but no default date is selected. On GameTrailers.com, these are the least annoying. They don't have verification code built in so you can just press "OK" and it'll let you watch the video without selecting anything. On the ones with the 3 drop downs where January 1 2004 is automatically selected, I just drop the year down to 1980 or earlier, even though 1990 will suffice now (jeez, people born in 1980 are already 28). The only ones that get my real date of birth are the text box variations where it's easy to type. Seriously, the drop downs gotta go.

These are so dumb and annoying. But I guess you gotta be responsible. Annoyingly responsible to those who could watch R rated movies for 12 years now. To those who can buy anything where an age restriction is in place. To those of us who could almost run for president of the USA (35 is the minimum if I recall correctly). The only thing I can't buy, age-wise, is a house in my parents' community because you have to be 55 or older.

But I guess you gotta be responsible. You definitely want to make it a good warning that you should be of X years (13 for PG-13, 17 for R, etc) before you watch the movie, play the game, drink the beer, etc. But of those, I think it's only actually illegal to drink if you're not old enough. Still, those sites should save your birthday as a cookie or something so you don't have to enter it 120 times. That can't be used to track anything that they wouldn't already know or could even get any information from... how many people were born on March 23, 1979? Well, I guess, how many people were born on March 23, 1979 in the IP range that I use? Probably far less. But still. Hold onto my date of birth or make it so if I just press "OK" I get to watch it anyway :) I like that bug.

New Server!

This new server is about 4 times more powerful than my previous server, but for the same price. I will now definitely be putting lots of new stuff up on here to get the full use out of it. I have my subversion server running off of it, and again, an open invitation to anyone who wants all the free awesome code they can handle :P

Be wary of hosting companies installing MySQL for you. They might install the latest version of it (5.x), but in my.cnf specify that it should use the old password hashing method, the insecure one used before MySQL 4.1. This old method only generates a hash 16 bytes long, whereas the new one is 41 bytes (with a leading *). I did notice it but didn't think anything of it until I tried to login to my website here to post a new item. I had just finished getting all of my passwords for my websites input too. This required looking in the config file that I read to connect to the database to get the current password out, then running "grant all privileges on database.* to 'user'@'localhost' identified by 'password'" for each one. Ridiculous. I think I got them all right on the second go, I didn't feel like reading in the config files again. This site works, and so does Jim and Kate's site (which is awful and is long overdue for an upgrade). Vacre Tei works too. Stringed.org might work but not all of the name servers are pointed correctly yet, so I can't see it. It might work for you, it worked at the office.

Also, if you get "Can't connect to MySQL" and it's running, chances are it isn't allowing networking. I just commented out those two lines (old-passwords and skip-networking) and if I got all the passwords right, everything should work fine. Overall, the transition from the old server went without a hitch, but was a pain in the ass. Here's the breakdown:

  1. Zip up the websites on May 24 and promise not to upload any new files because then they'd also have to be pushed over.

  2. Zip up the databases and promise not to make any new posts or anything.

  3. Zip up tomcat since I don't want to have to reconfigure it

  4. Download them (the size of jasontconnell.com gzipped up is currently over 600 MB)

  5. Upload everything to the new server.

  6. Extract everything where it belongs.

  7. Update the MySQL passwords

  8. Set JAVA_HOME

  9. Hope it works


There were some other steps in there and perhaps at a later date I will be willing to tell them, but that's the gist of it. Enjoy!

Fixed my event class

Here's the updated code which should work all the time.

var EventList = new Array();
var g_eventIndex = 0;

function Event(obj, type){
if (obj._eventIndex){
if (EventList[obj._eventIndex][type]) return;
}
else
obj._eventIndex = g_eventIndex++;

if (typeof(EventList[obj._eventIndex]) == "undefined")
EventList[obj._eventIndex] = new Array();

EventList[obj._eventIndex][type] = true;
this.handlers = new Array();
this.type = type;
this.obj = obj;
this.obj._event = new Array();
this.obj._event[type] = this;

if (typeof(this.obj.addCustomEvent) != "function"){
this.obj.addCustomEvent = function(type, fn){
if (typeof(fn) == "function"){
this._event[type].handlers.push(fn);
return true;
}
return false;
}
}

this.raise = function(sender, args){
for(var i = 0; i < this.handlers.length; i++){
this.handlers[i](sender, args);
}
}
}

// addEvent(obj, "event", func);


function addEvent(obj, evType, fn, useCapture){
if (typeof(obj._eventIndex) == "number" && EventList[obj._eventIndex][evType] && obj.addCustomEvent){
var r = obj.addCustomEvent(evType, fn);
return r;
}
else if (obj.addEventListener){
obj.addEventListener(evType, fn, useCapture);
return true;
} else if (obj.attachEvent){
var r = obj.attachEvent("on"+evType, fn);
return r;
} else {
alert("Handler could not be attached");
}
}


Now it will handle events of the same name in different objects. I just didn't want to have to come up with different names for events in different objects that did nearly the exact same thing.

I was reading a bit on the internets about how people do this type of thing. I read a post on Yahoo! that said the YUI event handling mechanism is "only 2KB". This is 55 lines with liberal white spacing. The thing about computer science is that sure, there might be something out there that does what you need it to do, and you can get it for free, but it's gonna do tons of other stuff that you really don't need. Not yet anyway. Same goes for software in general. If you need a simple photo editor, you're not gonna pay $600 for Photoshop when iPhoto will do (part of a $79 package with tons of other neat software, which also is overkill if you don't need that other stuff). So, if I need something very specialized, small, and easy to use, I'll write it. If you need this as well, feel free to use mine directly or for knowledge. It's not big or special, but will be used as part of a big and special project :) That will come soon.

More awesome free code!

I just have to ask that you send $5 to me via email. Thanks.

It turns out that I needed a way to raise events in my pager from the last post. Like when the page changed, I wanted to display "Page 3 of 5 (9 elements)" (for my test size of 2 elements per page (not likely to happen)). But also, for future reference, if say, to save on load times, only load X pages, we'll call it 5, at a time, so 10 elements, so then when they got to page 4 or 5, the non-pager code can load 10 more elements asynchronously, and call refresh on the pager to update the page count etc. Here's the event object:

var EventList = new Array();

function Event(obj, type){
if (EventList[type]) return;
EventList[type] = true;
this.handlers = new Array();
this.type = type;
this.obj = obj;
this.obj._event = new Array();
this.obj._event[type] = this;

if (typeof(this.obj.addCustomEvent) != "function"){
this.obj.addCustomEvent = function(type, fn){
if (typeof(fn) == "function"){
this._event[type].handlers.push(fn);
return true;
}
return false;
}
}

this.raise = function(sender, args){
for(var i = 0; i < this.handlers.length; i++){
this.handlers[i](sender, args);
}
}
}

// addEvent(obj, "event", func);


function addEvent(obj, evType, fn, useCapture){
if (EventList[evType] && obj.addCustomEvent){
var r = obj.addCustomEvent(evType, fn);
return r;
}
else if (obj.addEventListener){
obj.addEventListener(evType, fn, useCapture);
return true;
} else if (obj.attachEvent){
var r = obj.attachEvent("on"+evType, fn);
return r;
} else {
alert("Handler could not be attached");
}
}


Yup, it only handles on event per object right now. That's easily remedied if I use something other than "obj._event". Like this.obj._event = new Array(); this.obj._event[type] = this;. Will do that soon. UPDATE: Fixed that, and used the EventList array to keep track of custom events, and modified the addEvent function to use that and see if it's a custom event first. This way, if I add custom events to a "div" html element, it will work, whereas before it would have evaluated one of the other ones (attachEvent or addEventListener) before it would have added the event where I wanted it. UPDATE 2: Damn, that still has a shortcoming. To be fixed later, like Tuesday. I'm booked this weekend. If you can point out the shortcoming, I'll give YOU $5 :P A hint would be that you don't have to worry about "click" events, only custom events... but damn near everything has a "click" event.

Notice that I modified the "addEvent" function that I shamelessly stole from QuirksMode.org to check if the object that we're adding the event to has an "addCustomEvent" function on it. If it does, call it, which is added to the object when it creates a new event. This is how the pager uses it:

function Pager(){
this.init = function(divid){
...
this.textspan = null;

this.onPageChanged = new Event(this, "pageChanged");
addEvent(this, "pageChanged", this.internalOnPageChanged);
this.initialized = true;
}
...

this.pageChanged = function(pageNumber){
// change page functionality here...

this.onPageChanged.raise(this, { page : this.currentPage, pages: this.pageCount, total: this.elementCount});
}

...

this.internalOnPageChanged = function(pager, args){
if (pager.textspan){
clearChildren(pager.textspan);
pager.textspan.appendChild(document.createTextNode("Page " + (args.page+1) + " of " + args.pages + " (" + args.total + " elements)"));
}
}



I removed unnecessary code but you get the idea. As always, I found code online to do it, but it was too complicated (KISS = Keep it simple stupid). If I have to add to it I will but it doesn't have to solve all of my problems right now. In my html page that is apart from the pager, I add another handler for "pageChanged" to just test it out. Integrating it seamlessly with the "addEvent" function is crucial, so now I just use the same exact syntax for every event, whether it's custom or not. So this works perfectly:

addEvent(window, "load", loaded);
var pager = new Pager();



function loaded(){
pager.init("pager");
addEvent(pager, "pageChanged", pagerPageChanged);
loadNotes();
}

function pagerPageChanged(p, args){
var i = args.page;
//alert("page changed : " + args.page + " of " + args.pages + " pages, " + args.total + " elements in all");
}


That's from "index.html" because I don't need any kind of server side scripting language with my new Ajax framework. And it's loading data, saving data, deleting data, even will begin to authenticate users soon, on the server. This keeps the custom code on the server down to 0 lines. Yup, no lines of Java pertaining to a "Notes" application (basic and without user authentication or authorization). I like writing Java but this will make things quicker :) When I incorporate YUI! into it, it'll even be beautiful. Ahh, until that day.