I have to begin by apologizing. ColdFusion Builder is - already - a pretty darn cool tool. While it still has warts (and to be fair, it is still in beta), it has been my day to day programming tool for a few months now. One of the cooler features of CFB is how easy it is to extend it with custom extensions. You can find a bunch on RIAForge now. Unfortunately for them, though, I'm releasing an extension today that makes all of them pointless. (Warning, the size of this SWF is rather large - I recorded it on a large screen.)
Removed...
Ok, so if you watched the video and returned, sorry to waste your time. I do have one redeeming point to this blog entry. You may have noticed that the file I was editing in the video was refreshed automatically. Extensions can do this, but there is a typo in the documentation. In order to refresh the file that was right clicked on, you can use the following code (taken from the 'fix bugs' extension):
<cffile action="read" file="#myfile#" variable="code">
<cfset code = "<cftry>#code#<cfcatch></cfcatch></cftry>">
<cffile action="write" file="#myfile#" output="#code#"> <cfsavecontent variable="res">
<cfoutput>
<response>
<ide>
<commands>
<command type="refreshfile">
<params>
<param key="filename" value="#myfile#" />
<param key="projectname" value="#projectname#" />
</params>
</command>
</commands>
</ide>
</response>
</cfoutput>
</cfsavecontent> <cfheader name="Content-Type" value="text/xml"><cfoutput>#res#</cfoutput>
<cfsetting enablecfoutputonly="true" showdebugoutput="false">
<cfparam name="ideeventinfo">
<cfset data = xmlParse(ideeventinfo)>
<cfset myFile = data.event.ide.projectview.resource.xmlAttributes.path>
<cfset projectName = data.event.ide.projectview.xmlAttributes.projectname>
Specifically, I believe the docs say to use <command name="refreshfile">, while what you really want is type instead.
Archived Comments
Excellent work Ray.
I do hope you realise that you have just made yourself, and me, and every other cf dev redundant. A trained chimp can now build in cf.
Thanks.
Umm yeah....I'll take that Final Option with bacon and....umm....more bacon please.
You know what's better than bacon?
More bacon.
Bacon wrapped in bacon...
The Final Option should link to a "That was easy" button.
How do I send you my $1k? Is this a per install license or per app i'm building license? This is going to solve ALL of my problems... Yes, all of them.
Steve, I believe I said 8k. But for you, I'll make it 7999. Just for opening day though.
If I sell one license, I may be able to buy a Apple Tablet.
Ray, $8.000 is cheap for an extension that allows you to order pizza via your IDE!
Well in that case, make it two licenses. What a deal! By the way, here's an absolutely legitimate and real sneak preview of the Apple Tablet. http://www.youtube.com/watc...
Today I haven't heard single joke...and I prefer at least per day. After seeing this, I really don't need any. You made my day :)
Thanks :):)
This proves that you are in fact a genious
I'm sold, as long as the "Final Option" option allows me to view the real-time Domino's order status.
This proves, in fact, that I come up with silly stupid ideas some times. Then again, that can be some of the most fun code to write.
Add a make pretty button option and I am sold. On a side note formatting in cfbuilder is terrible.
[in Mr. T voice] You CRAZY, FOO!
man, I was so excited!
I gotta get on board with Builder though. I fired it up once and jumped back to dreamweaver. Not sure what I'm missing, but something good I am sure.
Darn it Ray! You've gone and made me order a pizza :)
That made my day. I needed a smile and you gave me that.
This will solve all my cf problems. Wow, thanks for this great solution.
Has any gotten the "openfile" command to work? This is key for the extension I am working but I cannot seem to get to to work. I even used Ray's sample code above and just change the type attribute.
Kurt, I got it to work. It is important that you ONLY send the filename XML:
<param key="filename" value="#myfile#" />
if you are sending the full path. For refresh, it worked ok with fullpath in filename and the projectname. When I switched to openfile, it didn't work until I commented out the projectname key. It _should_ be ignored (imho).
Wow this is great that did the trick. I found it to also work when I included the full path to the file. We need to file this as a documentation bug because it really through me off. Really they just need to add a few examples of each type and that would probably be enough (at least after they fix the "type" attribute omission).