• Home
  • About George
  • Contact Me
Blue Orange Green Pink Purple

CFAjaxProxy Problems or RTFM

So recently I’d been doing a cfselect box using bind to create my desired linked drop down.  The problem I was having was that I wanted to do a zebra stripe on the select after it had been loaded.  I could not find a way to attach the bind event to anything else so I [...]

Read More 0 Comments   |   Posted by George
Jul 20

CFGoogle – Now that’s neat

So I stumbled across this on my twitter feed while reading what Ray Camden had put up about the rework of the riaforge.org backend to incorporate the CFGoogle api interface written by Todd Sharp. It looks really need and could provide a great deal of use to us ColdFusion junkies out there. I say check it out!

CFSilence:
CFGoogle

RiaForge:
http://cfgoogle.riaforge.org/

Read More 0 Comments   |   Posted by George
Jun 29

DefaultProperties for ColdSpring Bean Factories

So I was playing with the defaultProperties configuration as mentioned on several sites, including this article by Dan Vega that got me going down the path. I wasn’t able to get it working at first, until I did a little messing around. Turns out that this:

1
2
3
      <entry key="devFilepath">
               <value>${baseFilepath}\logs</value>
      </entry>

Won’t work. The ColdSpring engine won’t find this as a configuration to populate. Instead, you have to make sure the whole space between the tags is what you want to have replaced, like so:

1
2
3
      <entry key="devFilepath">
               <value>${devFilepath}</value>
      </entry>

Hope that helps someone out!

Read More 0 Comments   |   Posted by George
Jun 17

datefield cfinputs and _f is undefined

So there have been two occasions I’ve run into this error on a page – and it’s very ambiguous and hard to track down both times I’ve experienced it.  Fortunately, both times have also involved a very easy solution once I looked through the page for the 40th time.  The first time I encountered this, the previous form designer had named both cfforms on the page the same thing.  While this worked, it’s never advisable.  By doing this, the cfcalendar script could not locate the item because it couldn’t track down the form properly.

The second time I ran into this – just a few moments ago – was the same problem surfacing because the declaration for the form had been placed inside the declaration for the table.

1
2
3
<table>
         <form></form>
</table>

This just did not sit well with the browser, being invalid and all.  Once I moved them outside of that formation and made it this:

1
2
3
<form>
      <table></table>
</form>

it worked like a champ.    Hopefully this helps someone out there with this error in the future!

Read More 5 Comments   |   Posted by George
Jun 01

Flash Builder 4 and ColdFusion for Flex

Saw this video through a link provided by Hal Helms (@halhelms) on Twitter.   Really interesting stuff about using the new Flash Builder 4 interface to import Coldfusion CFCs directly and then once you have them imported, wire them right into your Flash piece without writing any Flex code at all.

http://snurl.com/j7e56

Read More 0 Comments   |   Posted by George
May 14

Microsoft Access Truncating Memo Fields

Okay – so today one of the previous sites I had worked on was having difficulty because text was being truncated on a display section.  I looked in the database and sure enough all of the data was there, but when I ran the query that was on the page, I noticed that it was cutting off the data at about string length, 255 characters.  After some quick digging around, I came across this website:  http://allenbrowne.com/ser-63.html.  Well wouldn’t you know it.  I had a DISTINCT operator in my query, which was causing the field to be truncated down to string length.  Now that problem is solved, on to the next!

Read More 0 Comments   |   Posted by George
May 07

Limit on CFC Size?

So a few months ago I wrote a post about a java.lang.StackOverflowError I had experienced with Model-Glue and ColdSpring.   You can read about it here and here.  We it reared it’s ugly head again today.  I’m not sure exactly what is happening and maybe someone with a better knowledge of ColdSpring can help me out here.  I solved the problem by moving my new function into a different Service.cfc.  Why this worked?  I don’t know, but it seems that it has something to do with the size of the file.  It’s only running about 1500 lines in the service, but I have another service with more functions that runs 3000 lines of code.  But moving it out, definitely solves the ColdSpring compile error and allows me to move forward with development.

Any thoughts out there?

Read More 0 Comments   |   Posted by George
Apr 23

Design Considerations

So a few days ago a friend sent me this link from A List Apart that I found very useful In Defense of Eye Candy.  I found it a good read, and right on point.  There’s a lot to think about when it comes to good design.  I mean, when do we every see a bad looking site – aside from the original Plenty of Fish see this old version from the Internet Archive.  It worked because it was free.  Sometimes that helps out.  But I’m a developer – I can understand what the guy who designed Plenty of Fish was thinking.  Let’s get it working and take it from there.

To tie into this, I was recently reminded of an article I’d read quite some time ago when Hal Helms twitted about a design for developers article he’d come across.  It’s got some really good points in it.  Reset your styles so you’re forced to do things for yourself – which removes some of the unpredictability.  Set some line-height, etc.  I really enjoyed reading through it again.  I highly recommend it if you’re a developer and don’t know for sure what you’re doing when it comes to design.  My favorite point from the article by Stefano’s Linotype is when it mentions that most developers can look at two different designs and tell you which one is better.  We generally just don’t know how to do it for ourselves.

On a related note – if you’re as design challenged as I normally am, I recommend looking at templates to get an idea of what designers think looks good.  And then if you’re really feeling like taking the easy route – use the Skins from the YUI for your site.  Will give you some basic style without having to worry about what you’re truly doing.   They also have a reset stylesheet and a base stylesheet if you’re interested.

Read More 0 Comments   |   Posted by George
Apr 20

YUI Loader – “other is undefined”

So today I was getting the nice cryptic message of “other is undefined” when I was trying to call loader.require on an object.  Once I dug through my code I was trying to replicate from another section of the site, I realized that the details behind this was leaving out the loader.addModule section of code.  So if you come across this, take a look through your addModule sections to make sure you have all of the pieces you’re trying to add onto the code!

Read More 0 Comments   |   Posted by George
Apr 20

Replacement for JavaScript Split

So the other day I was working on some JavaScript processing and it was working great in Firefox.  When I went to use it in IE7 it didn’t do a darn thing right.  I couldn’t figure out what was going on until somewhere I read that the Split function wasn’t the same in all browsers.  That was one of those WTF moments for me, but after some digging I came across a script by Steve Levithan that really does the job well.  Since that site is currently down, I’m including a copy of the file here for people: NewSplit.js.  If you want to simply view and copy, here it is as well:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*
Cross-Browser Split 0.3
By Steven Levithan &lt;<a href="http://stevenlevithan.com">http://stevenlevithan.com</a>&gt;
MIT license
Provides a consistent cross-browser, ECMA-262 v3 compliant split method
*/
 
String.prototype._$$split = String.prototype._$$split || String.prototype.split;
 
String.prototype.split = function (s /* separator */, limit) {
// if separator is not a regex, use the native split method
if (!(s instanceof RegExp)) {
return String.prototype._$$split.apply(this, arguments);
}
 
varflags = (s.global ? "g" : "") + (s.ignoreCase ? "i" : "") + (s.multiline ? "m" : ""),
s2 = new RegExp("^" + s.source + "$", flags),
output = [],
origLastIndex = s.lastIndex,
lastLastIndex = 0,
i = 0, match, lastLength;</code>
 
/* behavior for limit: if it's...
- undefined: no limit
- NaN or zero: return an empty array
- a positive number: use limit after dropping any decimal
- a negative number: no limit
- other: type-convert, then use the above rules
 
*/
if (limit === undefined || +limit &lt; 0) {
limit = false;
} else {
limit = Math.floor(+limit);
if (!limit)
return [];
}
 
if (s.global)
s.lastIndex = 0;
else
s = new RegExp(s.source, "g" + flags);
 
while ((!limit || i++ &lt;= limit) &amp;&amp; (match = s.exec(this))) {
var emptyMatch = !match[0].length;
 
// Fix IE's infinite-loop-resistant but incorrect lastIndex
if (emptyMatch &amp;&amp; s.lastIndex &gt; match.index)
s.lastIndex--;
 
if (s.lastIndex &gt; lastLastIndex) {
// Fix browsers whose exec methods don't consistently return undefined for non-participating capturing groups
if (match.length &gt; 1) {
match[0].replace(s2, function () {
for (var j = 1; j &lt; arguments.length - 2; j++) {
if (arguments[j] === undefined)
match[j] = undefined;
}
});
}
 
output = output.concat(this.slice(lastLastIndex, match.index));
if (1 &lt; match.length &amp;&amp; match.index &lt; this.length)
output = output.concat(match.slice(1));
lastLength = match[0].length; // only needed if s.lastIndex === this.length
lastLastIndex = s.lastIndex;
}
 
if (emptyMatch)
s.lastIndex++; // avoid an infinite loop
}
 
// since this uses test(), output must be generated before restoring lastIndex
output = lastLastIndex === this.length ?
(s.test("") &amp;&amp; !lastLength ? output : output.concat("")) :
(limit ? output : output.concat(this.slice(lastLastIndex)));
s.lastIndex = origLastIndex; // only needed if s.global, else we're working with a copy of the regex
 
return output;
};
Read More 1 Comment   |   Posted by George
Apr 18

OO Form Processing

Read a few interesting posts recently about Object Oriented Form work. Going to have to try this out myself. Here are some examples if you’re interested:

http://www.halhelms.com/blog/index.cfm/2009/4/8/Form-Processing–the-OO-Way–the-Movie

http://www.bennadel.com/blog/1557-Object-Oriented-Form-Helpers-And-Reusing-Form-Validation-On-The-Client.htm

Read More 0 Comments   |   Posted by George
Previous Page 2 of 3 Next Page

Web Development By George

  • Pages
    • About George
    • Contact Me
  • Tags
    Access Ajax asp.net ColdFusion coldspring cross browser CSS Databases Design errors firefox Flash Flex Hosting html ie ie7 JavaScript Merge Model-Glue PCI Compliance Personal prototype script.aculo.us server monitor split function Subclipse Subversion tab tabview web service YUI
  • Archives
    • May 2010
    • April 2010
    • March 2010
    • February 2010
    • January 2010
    • November 2009
    • October 2009
    • August 2009
    • July 2009
    • June 2009
    • May 2009
    • April 2009
    • March 2009
    • February 2009
  • Search




Add to Technorati Favorites

  • Home
  • About George
  • Contact Me

© Copyright Web Development By George. All rights reserved.
Designed by FTL Wordpress Themes brought to you by Smashing Magazine

Back to Top