Daily Archive for May 27th, 2008

MySQL Temporary Table reference limitation

A TEMPORARY table is a table that is bound to a connection and is dropped when that connection is closed. It seems like this would just be a normal table with some meta data attached to it indicating the connection it is bound to. I suppose for some reason it is more complicated than that… seems unnecessarily so…

Anyways, the limitation is that you cannot refer to a given temporary table more than once in a single query.  If you do you will get a “Can’t reopen temporary table” error. So, for instance you cannot insert into a temporary table some data that you select from it in in the same query. This limitation has bit me several times.

The bug is here: http://bugs.mysql.com/bug.php?id=10327

Continue reading ‘MySQL Temporary Table reference limitation’

ExtJS ComboBox Replacement

I consider myself to be an expert in ExtJS. However, there is one component that I have to lookup how to use just about every single time I use it: Ext.form.ComboBox. For me, the default implementation just doesn’t cut it. There are a number of problems I have all the time:

  1. Forgetting to set “mode” to remote when I provide a store that is obviously “remote”
  2. Drop-down list width sometimes is smaller than the combo box itself
  3. I hate having to setup a store every time I need a remote ComboBox
  4. After the store loads, the value in the input box is not automatically replaced with displayValue

Maybe these issues are more my issues, but I maintain that ComboBox is one of poorer ExtJS components. Here is my replacement:

Please see the new code here: Update to ComboBox Replacement

Use it like this:

[-]View Code JAVASCRIPT
var combo1 = new com.succinctllc.form.ComboBox({
  displayField:'name',
  valueField:'id',
  url:"/path/to/dataSource"
});

Edited to set lastQuery properly so ComboBox does not load the store twice when autoLoad is set to true (default).

Stark Industries - Entrance into Madness

This is going to be my first non technical series. I really want to illustrate some insanely frustrating, almost funny (if it wasn’t so maddening) experiences. If you guys have ever read The Daily WTF, this is my personal experience with some WTF’s.

After graduation I took a job at… we will call it Stark Industries. I spent nearly 6 months waiting for my security clearance. During this time I read documentation, did code reviews, and watched A LOT of YouTube. Continue reading ‘Stark Industries - Entrance into Madness’