Happy new year to everyone

Thanks to all the people that follow mytweets and blog posts. 2010 hasn't been the greatest of years for me personally but here is to 2011 being a lot better! (with more posts)

Posted: 31-Dec-2010

View: 2173

Permalink: here

CFTextMate new home

CFTextMate has a new temp home at cftextmate.andyjarrett.co.uk.

How come?

I am a massive TextMate fan on the Mac and and one of its strengths is in its extensibility and bundles. CFTextMate has always been a great add-on for working with CFML files but fell short when editing the new scripted components. Luckily Russ Johnson had figured out how to edit the main bundle and get some basic highlighting working. From here I wanted to take it a step further and update the bundle which is when I started down this path.

So where am I:

  1. Due to domain rights and some limbo weirdness I don't have access to cftextmate.(org|com) so cannot tell people about these updates there.
  2. I don't think I have been approved yet on the Google Groups so I cannot post there.
  3. I did speak to Rob Rohan who was last pushing out updates and I have forked his code and already made the initial adjustments that I wanted to do at https://github.com/andyj/CFTextMate
  4. I have created a site at http://cftextmate.andyjarrett.co.uk/ which I am hoping Google will pick up soon.
  5. I have set up a Twitter account at @cftextmate for updates
  6. I have created a Uservoice account at cftextmate.uservoice.com for suggestions (please go there and start adding bits)

The bundles have been updated so with some changes so you can download and check them out here.

So what now?

Though I am going to do my best to update the bundles this is still my first foray in to this kind of development so if anyone else wants to actively help the grab the code from Github, give it go, and send me a PULL request!. I am also looking at a complete re-rewrite from the ground up so I can split out CFML tags and CFML script for better management. Though at the moment I don't know whether that is the right direction to go? Generally there is still a lot of work to be done and depending on which route the project goes down will depend when the next update is out. For now at least it has a home and a way for the community to follow the project.

Posted: 29-Nov-2010

View: 2243

Permalink: here

FW/1 and redirect in the application.cfc

Chatting with AJ Mercer this morning (his evening) on getting redirect() to work in the Application.cfc for Framework One (FW/1). The code being he was using looked perfectly fine:

view plain print about
1rc.variableToPass = "me";
2redirect(variables.framework.home, 'all', 'variableToPass');

As I said this looked fine and works in the controllers but in the Application.cfc we just saw "&fw1pk=[some number]" appended to the URL. The fix was quite simple. The variable/structure RC is set as a shortcut to the Request.Context for the controllers but in the Application.cfc you need to reference Request.Context directly. The meant the above code changed to:

view plain print about
1request.context.variableToPass = "me";
2redirect(variables.framework.home, 'all', 'variableToPass');

and all worked fine.

As a side note the fix for this came from it being such a simple framework to hack in to and see whats happening over others with multiple core files and components. Recently my work ethics has changed a lot and in its place 2 components now stand, convention over configuration and simplicity both of which FW/1 fits the bill. So if you haven't spent 30 minutes looking at it do so and also check out the Google group at http://groups.google.com/group/framework-one

Posted: 03-Mar-2010

View: 2370

Permalink: here

CFEclipe 1.3.6 bug fix release

CFEclipse has released version 1.3.6 earlier. All bug fixes no new features on the 1.3.5 release. You can read more at http://www.cfeclipse.org/update/web/doc/intro/doc/new.html

Posted: 17-Feb-2010

View: 1567

Permalink: here

Using RegEx to cut down on code

I sometimes forget how useful/powerful RegEx can be. Take the following bit of CFIF logic

[sourcecode language="plain"] <cfset username = trim(form.uname) />

<cfif len(username) LT 4> <cfset errorMsg = "Your username is too short" /> <cfelseif NOT reFindNoCase("[\w]", username, 1, "false")> <cfset errorMsg = "Your username is too short" /> </cfif> [/sourcecode]

A quick regex guide: the "\w" reference stands for "word character", which translates to [A-Za-z0-9_] n.b.the underscore as well

You can actually add on to the regex and at the same time cut down a lot of the logic by doing the following:

[sourcecode language="plain" gutter="true" toolbar="true" wraplines="true"] <cfif NOT refindnocase("[\w]{4,}", username, 1, "false")> <cfset errorMsg = "Usernames must be 4 characters in length and contain [A-Za-z 0-9 _" /> </cfif> [/sourcecode]

The key is "{4,}". Using the curly braces to specify a specific amount of repetition of "word characters" and is equivilant to "len(username) LT 4"

Posted: 17-Jul-2009

View: 974

Permalink: here

CFEclipse 1.3.4 released

With the annual release of Eclipse Galileo the CFEclipse team have pushed out its latest release of CFEclipse 1.3.4!.

This update brings compatibility with Eclipse 3.4 and Eclipse 3.5 along with:

  • An updated CF8 Dictionary
  • Some mild updates to the parser
  • Mark occurrences of selected words (tag/variable/method/etc)
  • Integration with Eclipse's DocShare (optional)
  • Preference for modifying the browse url on unit tests to run unit tests
Thats just the tip of the iceberg though, check out the full list here

Available from the update site get it now http://www.cfeclipse.org/update

Posted: 25-Jun-2009

View: 1035

Permalink: here

My blog has moved

Please update your bookmarks and feeds for my site.

I now have a Mango Blog at:

http://www.andyjarrett.com/blog

Feed URL: http://feeds.feedburner.com/andyjarrett

Posted: 12-May-2009

View: 1926

Permalink: here

CFEclipse and Adobe CF Extensions in one download

In the first part of this 2 parter I mentioned the differences between the 2 ColdFusion plugins for Eclipse that are out there. Here I have put them into one zip file for you to download and install, it really couldn't be easier to check out the CF environment "everyone is using"*

Update: After a quick read of the EULA from Adobe, it appears that I was being a little naughty by bundling them together. Hence the quick removal/update of the original post (anyone who got here first was lucky). That doesn't mean that you still can't have a cracking CF dev environment. The zip I produced was files taken from 2 sources: Eclipse 3.3 and the ColdFusion Extensions for Eclipse and the CFEclipse download section of the site.

Posted: 20-Aug-2007

View: 5764

Permalink: here

Difference between CFEclipse and CF Extensions

This post is in two parts as I realised it's probably not good to bombard you with one longgggg post. The second part (which is the reason this post even exists) is about a new zip file that I have put together so you can download CFEclipse and Adobe CF Extensions in one go. This post first off covers the difference between them so you know what you are getting and why you want it;

Incase you don't know the CF Extensions are very different to the CFEclipse plugin for Eclipse but both are essential for your CF development environment.

Posted: 20-Aug-2007

View: 7541

Permalink: here

Eclipse local help system

Update: This appears to be on a different port for others. As Jax pointed out you can go: Eclipse, select Help -> Help contents to get there as well :o)

I was just going into some help files of Aptana when I came across the local address for the Eclipse Help system at: http://127.0.0.1:58041/help/index.jsp

In there was a wealth of information I just didn't know was on my hard drive ... though I suppose it depends on what plug-in's you've got installed but for me I had:

Posted: 24-Jul-2007

View: 4897

Permalink: here

More Entries