29 January 2008

Ext 2.0 Plugin for Aptana

Just something neat I found via an Aptana forum post at http://forums.aptana.com/ -- just download the file from here [http://orsox.mocis.at/download.php?view.1], unzip it, and copy the .JAR file into your Aptana plugins folder.

Then, just go to ""Window > Preferences", and in that window, just expand Aptana > Editors > JavaScript > Code Assist", and enable the Ext 2.0 option.

It's not perfect, but it's still pretty neat to see Ext methods and properties popping up as suggestions when you're programming. ^_^

25 January 2008

Shavian Alphabet

Shavian Alphabet

I do believe that anyone learning English as a second language should learn it using this -- trust me, it'd actually be easier.

24 January 2008

Wow... (Aptana)

So, I was trying out the FOSS "Aptana" IDE, and I was typing in a JavaScript file, and I typed a object name, and it brought up a little box with possible properties and methods to use (just like in the Domino Designer!), and it was really, really cool, and if you're coding JavaScript for Notes/Domino and you're tired of the cruddy JavaScript support, then you should really, really try this thing. That's all.

18 January 2008

Fun with ExtJS 2.0 Forms -- Radio Button Idiosyncrasies

As of late I've been working heavily with ExtJS 2.0's Form and Panel objects, and like I've said before, they're really cool. With ExtJS 2.0's new "component" system, you create form and page objects all at will, and just stick them wherever you want to -- the core Ext code takes care of the rest. It really is quite amazing, and shows the type of coding prowess that the ExtJS team have at their disposal.

That being said... nothing's perfect. :P The release is currently at "2.0", so that means, of course, that we're all awaiting a "2.1" to fix a few bugs here and there.

Ext.form.Radio, in particular, has quite a few little things that are "funny" with it -- namely, the fact that the "check" event only fires once, the very first time the radio button is checked... now, to those that know the HTML DOM, you may argue that this could in someway be the intended function, as all objects in a Radio input are essentially part of the same input object, and since a Radio object can't be "unchecked," that this is preferable behavior.

Well, whatever the actual intent was, one of the team members of Ext posted a fix here:
Ext.override(Ext.form.Radio, {
onClick : function() {
if(this.el.dom.checked != this.checked) {
var els = this.el.up('form').select('input[name='+this.el.dom.name+']');
els.each(function(el) {
if(el.dom.id == this.id) {
} else {
}, this);

Include this, and your "check" listener will now fire, and you can adjust things depending upon which choice is currently selected in the radio button. This was especially useful, since I've got some particular fieldsets that I want to stay hidden if the user doesn't need them (not just collapsed -- I've learned to just hide things completely, so that the wandering eyes of a user don't see something, even if it's optional...).

Also, when dealing with hide-whens and fields, in Ext 2.0, if you call "hide()" on a particular field, it doesn't hide the label as well. Jack Slocum himself actually posted a pretty good reason for this, but it's still somewhat counterintuitive, so someone posted a pretty good fix:

Ext.override(Ext.form.Field, {
showContainer: function() {
// show entire container and children (including label if applicable)

hideContainer: function() {
this.disable(); // for validation
// hide container and children (including label if applicable)

setContainerVisible: function(visible) {
if (visible) {
} else {
return this;

Ext.form.Field.prototype.onRender =
Ext.form.Field.prototype.onRender.createSequence(function(config) {
if (this.hideContainerOnRender == true) {

Now, instead of calling "hide()" on a field, just call "hideContainer()" and it'll do probably what you were wanting it to do. ;)

There's also some other issues with radio buttons, but I'm still researching if they're because of actual bugs or errant behavior, or because of my ignorance on the fundamental nature of radio inputs (namely, why if a radio button hasn't been selected or checked, that Ext.form.BasicForm.isValid() still returns true).

There's also a problem where, if you've got input fields inside fieldsets and you hide the fieldset without first hiding the input field, that the input field still tries to validate.

That make any sense? :P I've got a fix for that one, but I'll refrain from posting it just yet, because I'm almost sure that there's something that I'm missing.

16 January 2008

Using "Column Tree" Example in Ext 2.0 with a Domino Server

Didn't know if anyone else had this problem (it may be specific to the way the Domino server I use was set up), but to get the "Column Tree" example to work with our server I had to change a line:

Right after Line 33 of "/examples/tree/column-tree.js", add "requestMethod: 'GET'" -- that's it.

Apparently, my Domino server blows up whenever a JSON file is requested with anything other than a "GET" command. Who know, eh? Either way, it works fine now. I don't know if you might have to do this with all tree panels, but I guess I'll find out as soon as I start workign with them again.

Now, a lot of these examples don't work on a stock Domino server, because they use PHP, but they work on the ExtJS.com site, if you need them.

11 January 2008

Figures: Steampunk Justice League Modded Action Figures

Gaslight Justice League
Figures: Steampunk Justice League Modded Action Figures

These are really, really cool. (The Superman and Flash models exceedingly so.)

This guy does a lot of custom action figure work, including some neat ones featuring characters from Dune. [Found via Gizmodo]

02 January 2008

2007 Year-End Roundup

Hmm... let me think. What have I accomplished (programming-wise) over the past year?

1) Using the ExtJS SDK
This is the one that I'm most proud of -- there's no way to fully describe just how much using ExtJS has improved my web applications.

The look of the package is wonderful -- never again will programmers like myself be guilty of delivering a product that works wonderfully but looks like absolute shite. :P

2) Abstracting the Notes/Domino Document Creation on the Web
While I'm still finishing this up, I've managed to almost fully abstract the document creation process for web applications under domino -- no more needing to load a full HTML page to create a document anymore. (This went hand in hand with using ExtJS, since its <form> engine uses XHR almost completely.)

3) "Modularizing" my JavaScript Files
Basically, using OO-programming. :p

I know -- something I should've been doing years ago. However, like most things, you can never truly realize the amazing benefits of something until you've started doing it yourself. (Like brushing your teeth, or using a knife and fork -- stuff like that.)

4) Keeping My Personal Workspace Clean
This is a personal joke for people who know what my workspace looks like. :P

About next year? I shy away from calling anything a "resolution" (from what I've seen, "resolutions" that people make for new years usually always fail), so I'll just say that here are things I'd like to do:

1) Try and remember to take a quick walk around the floor or just stretch my legs every two hours or so -- if you've got a desk job, you should realize how important this is.

2) Ask my team head for another monitor for my station -- seriously, have you ever worked at a workstation with two monitors? The amount of time you save and the increased productivity you get from it is nothing short of astounding.

3) Start releasing more code on the internet for others to use -- I've got tons saved up, if I could only get it looking nice (and not a mess), I'd release it. :P

Here's to a good year.