Editing Perspectives in Eclipse

If you're trying out CFBuilder, and at the same time still using CFEclipse, you may have been faced with this annoying situation where everytime you open Eclipse, you'll get something like this: <<<<ColdFusionBuilder>>>>. And it keeps adding on more perspectives every time you open either CFBuilder or CFEclipse.

Don't worry . . . there is a fix, according to JeffC in the #coldfusion channel. Simply go into Preferences, General, and open the Perspectives preference. Now you can get rid of all those unwanted preferences. Thanks, JeffC!

How to Access An Access Database Without Windows

There are many good tutorials out there that include a sample database for you to play with. Recently, Charles Arehart pointed out a good DevNet article about CF/lML processing by Nate Weiss. So, I went to download the pdf, and then proceeded to download the sample files. I noticed that there was an Access database included. Well. That could be an issue, being as I do not have Windows installed on this MBP, nor do I have the funds to buy it (much less obtain Access separately, if need be).

I wasn't entirely new to this situation; I had run into this in the past and was able to use an ODBC driver with the Apple Database Driver plugin in an early version of OS X. I can't recall the name of the company that created this particular driver, though. So it was off to Google for an answer to this question. Turns out, there is an answer and it's really simple.

First, you need to download RazorSQL, which is a commercial database program that can be used with RDBMs such as Access, MySQL, Oracle, and more; Windows, OS X, Linux and Solaris versions are available. There are specific directions for opening, reading and editing Access databases here. I went and downloaded the HXTT MS Access JDBC Driver. I then put the access folder into /Applications, and opened Connection Wizard, and set it up like so in this screenshot:

Razor Connect Wizard

And voila . . . I was able to access the database just fine, thus enabling me to extract the database structure and data in order to set up a MySQL version (or if you will, Derby).

I haven't tried StelsMDB MS Access JDBC Driver, but I'm sure this would work just as well. Hope this has been of help to you!

Comma-Delimited List of CF Tags

I've been trying out snippet programs in which to save my code bits for quick reference. I came across one - jCodeCollector. It looks like a great program to use. There's a Syntax Manager which is already set up for languages such as PHP and Ruby. However, there is no manager set up for ColdFusion.

But it's not too hard to create one. So, I did that. Next step - find a list of CF tags. That was a bit of a problem such lists mostly exist on Adobe's LiveDocs in table format. All I need is a comma-delimited list. Fortunately, I have an old printout of such a list in text format. I did a google search, since I had neglected to write the URL of the original site down. The original site is no longer up. But, with further sleuthing, I was able to find basically the same list but separated only one white space. Still, it's just what I needed and it was simple enough to do a grep search for " cf" and replace with ", cf". Notice that this list does not include new CF9 tags; you'll have to add it yourself.

For future reference, here's the list:

cfNTAuthenticate, cfSearch, cfabort, cfajaximport, cfajaxproxy, cfant, cfapplet, cfapplication, cfassociate, cfcalendar, cfchart, cfchartdata, cfchartseries, cfcol, cfcollection, cfcompile, cfcontent, cfcookie, cfdatasource, cfdatasourceallowedsql, cfdatasourceconnection, cfdatasourcepooling, cfdbinfo, cfdirectory, cfdiv, cfdocument, cfdocumentitem, cfdocumentsection, cferror, cfexchangeConnection, cfexchangeContact, cfexchangeMail, cfexchangecalendar, cfexchangerilter, cfexchangetask, cfexecute, cfexit, cffeed, cffile, cfflush, cfform, cfformgroup, cfformitem, cfftp, cfgraph, cfgraphdata, cfgrid, cfgridcolumn, cfgridrow, cfgridupdate, cfheader, cfhtmlhead, cfhttp, cfhttpparam, cfimage, cfinclude, cfindex, cfinput, cfinsert, cfinvoke, cfinvokeargument, cflayout, cflayoutarea, cfldap, cflocation, cflock, cflog, cflogin, cfloginUser, cflogout, cfloop, cfmail, cfmailparam, cfmailpart, cfmenu, cfmenuitem, cfmodule, cfobject, cfobjectcache, cfoldreport, cfoutput, cfparam, cfpdf, cfpdfform, cfpdfformparam, cfpdfparam, cfpdfsubform, cfpod, cfpop, cfpresentation, cfpresentationSlide, cfpresenter, cfprint, cfprocessingdirective, cfprocparam, cfprocresult, cfquery, cfqueryparam, cfregistry, cfreport, cfreportparam, cfschedule, cfselect, cfservlet, cfservletparam, cfsetting, cfsilent, cfslider, cfsprydataset, cfstoredproc, cftable, cftextarea, cftextinput, cfthread, cfthrow, cftimer, cftooltip, cftransaction, cftree, cftreeitem, cfupdate, cfwddx, cfwindow, cfx, cfxml, cfzip, cfzipParam,    

Testing

Testing uploading fro ecto

Code Generators and Dates

I've been working on an application (more about that later) and I've been using Illudium Code Generator to make CFCs for me.

I kept having issues with the Service layer and getting the error message "Bean creation exception in jobsearch.components.correspondenceService".  I tried tracking it down, tweaking some configurations to match the other templates that were working.  Someone in #coldfusion gave me a good debugging tip - createObject the problem components and do a dump.  Once I did so, it was immediately apparent just what the problem is. 

I use MySQL, and in two of the tables, I'm using a date field.  Here is how Illudium Code Generator sees these fields:

   view plainprintabout
 <cfargument name="responsedate" type="" required="false" />


For some reason, MySQL date fields do not get interpreted properly such that nothing is filled in for the type field. So, you must manually edit these fields, and also the CF_SQLTYPE fields.

Eclipse's Quirkiness

Somehow, I accidentally deleted the Eclipse folder I use most often when I was cleaning out my Eclipse installations. I tried restoring the folder from my Time Machine archive, but no, the wrong one.

Sigh . . . that meant that I would have to reinstall Eclipse. Herein lies my issue with the program - it's a real pita to install. And this time was no exception. Backtracking a bit, I had a bit of a struggle with getting Aptana to install. When I found out that Aptana 1.1.17 beta was available for use with Eclipse 3.4, I went to download it only to run into dependencies issues.

Yes, E3.4 now checks for dependencies on other plugins before it will let you install target plugins. To install Aptana, I had to follow instructions for plugging Aptana into an existing Eclipse configuration.

See the instructions for selecting General > Capabilites and checking the Classic Update box? Yep - you guessed it . . . if you install Eclipse 3.4 right from the download site, you're not going to see that in Preferences. No - it turns out that you also have to install Eclipse SDK, a tidbit which I only found out by searching the other threads at Aptana forums after my question went unanswered by the Aptana staff in the bug tracking system and in the forum. (Shouldn't they add that interesting tidbit on the "plugging Aptana" page? - Ed. Yes, they most definitely should!)

Okay . . . back on track now. After reinstalling Eclipse, then Aptana and CFEclipse, the next step was to install Subversive. Here again I ran into issues. SVN Kit 1.2.0 beta 4 was only available for install for use with OS X. So, I selected that and Subversive from the eclipse install site. Here I ran into yet another problem - the SVN Team Provider (Incubation), version 0.7.1.I20080612-1500 was incombatible with 1.2.0 and the install wouldn't proceed.

So, I had to do some googling and came up with this very helpful blog post. I followed the instructions that Craig Thomas provided in #12 comments. Back on track now. What I don't understand is why the "download.eclipse.org/technology/subversive/0.7/update-site/" isn't automatically refreshed to point to the new version.

Eclipse is nice enough, but it has its quirkiness that makes life miserable for the unsuspecting.

Tinkering with CSS

Cascading style sheets are great, but these are also a royal pain to deal with. Especially when the learning curve is steep. Fortunately, there are folks who are well-versed in CSS who write articles for us neophytes. One good resource is A List Apart.

Currently I'm working on a set of dye calculators for those of us who like to dye yarn, but don't like to deal with math that it requires to determine the amounts needed. I'll also be putting up some Google Adsense on this page, to generate a bit of revenue for myself. (Why do this? -Ed. Hey . . . why not? Everybody's doing it, so might as well see if it works here.)

There's going to be two columns, the Dye Calculator in the first column and the hopeully non-intrusive Google Adsense in the second column. This article, ""Multi-Column Layouts Climb Out of the Box"" gives me just what I needed to get the layout started.

The CF Talent Is Out There - If You Take a Chance

TomdeMan, I empathize with you about finding qualified employees. It's a really tough job, especially where your business' bottom line is at stake.

I am coming at this from the potential employee's perspective. Not all of us are fortunate enough to have employers who care enough to invest in continuing development. Yes, it may be on paper, but sometimes it's quite a struggle to get them to pay for needed training and not worth going through the hassle if there's no results. One may have to spend their own money getting needed education to remedy gaps in their knowledge - that's what I should have done, looking back. (Those of you starting out, don't rely entirely on the company to pay for tuition and training, but try to set aside a little money for that on your own.) I plan to remedy that once I get a job.

Also, some of us have a life outside work - we may be married with family, or single and trying to take care of our children. Compromises have to be made on a daily basis whether to go to the user group meeting or to go to that award ceremony at the grade school, or to spend time with one's spouse or significant other. Thank goodness for Connect presentations that are available on a 24/7 basis. Ironically, for me at least, this presents an additional barrier, since I'm deaf and the audio part is almost not accessible for me. It's very expensive to close-caption Connect presentations (quoted price is in the $300/hour range) and to date I haven't seen any CF-related presentations that are CC'ed.

As for certification, well, for some people it may be needed. Especially here in the DC Metro area where there seem to be quite a few contracting positions. Do I have it? No. Will I get it? Yes. But it may be a while, especially in light of recent conversation about the certification process for ColdFusion 8. It may be useless in that anyone can memorize the material and not apply in the real world where there are 10 different ways to slice out AJAX solutions. But it's certainly not useless to Human Resources folk who put out the job ads and sign off on the new employee hire for a government contract that requires certified developers.

I guess what I'm trying to say is, sometimes one just has to take a chance, take a deep breath and hire that candidate who has, at best, 50% of what you need. That person may turn out to be the best employee you've ever had in the long run.

Rebuilding My Eclipse Environment

After discovering that tag insight wasn't working for me in CFEclipse 1.3.2beta, I decided to roll back to the latest stable version.

It took several reinstalls of Eclipse Ganymede before I finally got back to how I like it set up. Eclipse is incredibly finicky in that aspect and that's the downside. If you look at plugins and features directories, you'll find tons and tons of files and subdirectories. And sometimes one little file somehow gets messed up and Eclipse has a conniption and refuses to display one of the perspectives properly.

One handy feature that seems to be overlooked is the ability to import and export lists of update sites such as CFEclipse and Aptana. If you look at Software Updates>Manage Software, you'll see that the default lists are set only to Ganymede Sites and a bunch of links pointing to download.eclipse.org. If you anticipate that you might have to trash an eclipse directory (or really, to have a backup list just in case), you should go to Export . . ., tick off the external site links you want to preserve. This will be saved in .xml format; give it a meaningful name such as EclipseBackup.xml or something like that if you think the default Bookmarks.xml name is too generic.

Then, should you need to reinstall Eclipse, you can simply go to Import . . ., navigate to your directory where you saved your .xml list, and select that. And bingo, your external sites are available, saving you minutes of looking for that website url and typing it in.

Next step - importing projects. Easily done. Not so easy to figure out - reconnecting SVN links. After some trial and error, and scouring Polarion's site, I finally figured it out. To save you the trouble, here's how to reconnect projects to SVN repositories:

Select a project, right-click and then select Team>Share Projects . . . Then, select SVN. In the next dialog window you should see the relevant repository location you're trying to reconnect the project to. Below, ""Use project settings"" is selected; you should be fine with this if you didn't delete .svn file from the directory. Then click on Finish; that should be all you need to do.

Obscure, Dead Languages

A long, long time ago, fresh from churning out static pages using the still brand-new HTML language, I was offered the opportunity to forage even further into programming by my former company. At the time we were using a proprietary scripting language that worked somewhat like ColdFusion, at a very basic level. In my spare time, I noodled around with it.

I hate doing math, but much of knitting relies on math (for instance, a sweater that is knit at 5 inches per inch as opposed to 6 inches per stitch, with a circumference totaling 250 stitches will result in two very different sizes, one of which, should you pick the wrong gauge, will swim on your designated recipient and will be quietly designated to the darkest corner of his closet). And so does dyeing. Say you have liquid totaling 100% with which to dye yarn. And you want to use two different colors such as magenta and turquoise to get that nice blue shade. And you want to make sure it doesn't come out too light - somehow I don't think Cousin Jim would appreciate a pastel-blue sweater.

So, I developed a web-based dye calculator using that dead, proprietary language. Here's what the code that did the calculations on the back-end looks like:

   view plainprintabout
 \r\n##VAR.oz.declare(##PARAM.oz##)##\r\n##VAR.gram.declare("""")##\r\n\r\n##VAR.volume.declare(##PARAM.volume##)##\r\n##VAR.percent.declare(##PARAM.percent##)##\r\n##VAR.gdp.declare("""")##\r\n\r\n##VAR.fiber.declare(##PARAM.fiber##)##\r\n##VAR.dos.declare(##PARAM.dos##)##\r\n##VAR.strength.declare(##PARAM.strength##)##\r\n##VAR.TempFibdos.declare("""")##\r\n##VAR.totsol.declare("""")##\r\n\r\n##VAR.TempColper1.declare("""")##\r\n##VAR.TempColper2.declare("""")##\r\n##VAR.colper1.declare(##PARAM.colper1##)##\r\n##VAR.colper2.declare(##PARAM.colper2##)##\r\n##VAR.stocksol.declare(##PARAM.stocksol##)##\r\n##VAR.colora.declare("""")##\r\n##VAR.colorb.declare("""")##\r\n\r\n<!REM These two IF statements converts from ounces to grams>\r\n\r\n<!IF ##PARAM.Action## .eq. ""Ounces to Grams"">\r\n <!IF ##PARAM.oz## .ne. NULL>\r\n ##VAR.gram.assign(##FUNC.math(""*"", ##VAR.oz##, 28, 1)##)##\r\n <!ENDIF>\r\n<!ENDIF>\r\n\r\n<!REM These two IF statements calculate the stock solution formula>\r\n\r\n<!IF ##PARAM.Action## .eq. ""Calculate Dye Powder"">\r\n <!IF ##PARAM.volume## .ne. NULL>\r\n ##VAR.volume.assign(##FUNC.math(""/"", ##VAR.volume##, 100, 2)##)##\r\n <!ENDIF>\r\n \r\n <!IF ##PARAM.percent## .ne. NULL>\r\n ##VAR.TempVar.declare(##VAR.volume##)##\r\n ##VAR.gdp.assign(##FUNC.math(""*"", ##VAR.TempVar##, ##VAR.percent##, 1)##)##\r\n <!ENDIF>\r\n<!ENDIF>\r\n\r\n<!REM These two IF statements calculate the fiber/total stock solution formula>\r\n\r\n<!IF ##PARAM.Action## .eq. ""Calculate Volume"">\r\n \r\n <!IF ##PARAM.fiber## .ne. NULL .and. ##PARAM.dos## .ne. NULL>\r\n ##VAR.TempFibdos.assign(##FUNC.math(""*"", ##VAR.fiber##, ##VAR.dos##, 2)##)##\r\n <!ENDIF>\r\n \r\n <!IF ##PARAM.strength## .ne. NULL>\r\n ##VAR.totsol.assign(##FUNC.math(""/"", ##VAR.TempFibdos##, ##VAR.strength##, 2)##)##\r\n <!ENDIF>\r\n<!ENDIF>\r\n\r\n<!REM These two IF statements calculate the % for 2 colors>\r\n\r\n<!IF ##PARAM.Action## .eq. ""Color Ratios"">\r\n <!IF ##PARAM.colper1## .ne. NULL .and. ##PARAM.colper2## .ne. NULL>\r\n ##VAR.TempColper1.assign(##FUNC.math(""/"", ##VAR.colper1##, 100, 1)##)##\r\n ##VAR.TempColper2.assign(##FUNC.math(""/"", ##VAR.colper2##, 100, 1)##)##\r\n ##VAR.colora.assign(##FUNC.math(""*"", ##VAR.TempColper1##, ##VAR.stocksol##, 1)##)##\r\n ##VAR.colorb.assign(##FUNC.math(""*"", ##VAR.TempColper2##, ##VAR.stocksol##, 1)##)##\r\n <!ENDIF>\r\n<!ENDIF>\r\n

Well, as I said, this language is dead, consigned to the dustbin of Obscure Historical Facts.

More Entries

BlogCFC was created by Raymond Camden. This blog is running version 5.9.5.003. Contact Blog Owner