Monday, December 21, 2009

Happy Holiodays and my New Years Resolution

Happy Holidays to one and all!

It is a crazy time of year, but we should all try and remember what the season means (whatever that is for you!). For me, I am thankful for my wonderful Wife and daughter, they are the center of my world. I am thankful for the opportunities that I have had this year within the Adobe Community, and trying to expand my 'horizons'.

So, for my New Year's Resolution, I will try harder to blog more here. I am undertaking a project that I am looking forward to using CF9 on, and I am going to be using the Flex 4 Beta (hopefully not for too much longer!) Framework for the UI... Hopefully I will learn alot, and be able to pass some gems along to everyone!

Have a Safe and Happy Holiday Season!

Monday, October 5, 2009

I'm on ColdFusion 9, are you?

So, as everyone is well aware of by now. (I guess I am late to the party). COLDFUSION 9 is available! This release brings with it MANY improvements, and anyone who hasn't looked at CF in a while, well it is time to look again! My top features?

  • ORM
  • CFScript
  • Component improvements
  • Office integration
  • ColdFusion as a Service
Um, yeah, while you are downloading or installing CF9, don't forget to grab the ColdFusion Builder Beta as its integration with CF9 is superb! Oh, and head on over to riaforge.org and see some of the AMAZING extensions you can put into CFBuilder to make the development process, um, easier :)


Thursday, September 10, 2009

PDF Printing Follow-Up

So, I haven't had a chance to test this with CF9 yet to see if the problem still exists, or even if anyone but me thinks it is a problem, but I have at least worked through a process to not try and flatten a PDF that doesn't have any form fields.

So:


Pretty straight forward after all, but I am still going to look into the PDF functions with CF9 to see if they handle any of this stuff better. the errors thrown by are obtuse, and not really helpful. I would think that it would be able to continue processing if there were no fields to flatten, or it would be able to handle a PDF with no form fields a little differently (the error message is actually missing a space).

Anyways if anyone has been experiencing issues with PDFs with form fields and printing with CF8, I hope that this post and my last one will be helpful for you.

Wednesday, September 9, 2009

Weird PDF Printing issue - CF8

So, I have been trying to print off some PDF reports that are made with ActivePDF and Visual C++ 6, however, EVERY time that I print the PDF, parts of it are light blue/light grey, instead of black (as they appear when opening the PDF, in say Reader). Anyways, I have been banging my head on the wall for some time, and hitting up, well everyone I know and lots of folks that I don't to see if ANYONE had the answer... and I got very little.

A couple of weeks ago, Steve Withington offered his help with my issue. I sent him a sample PDF and the code etc. and the only thing that he noticed was form fields, and that the PDF had some that were 'read-only'. I thought, 'OK, I will set them to not be read only, and blamo, it'll print properly!'... uh, nope.

The long and the short of this story? ColdFusion does not play nice when printing with form fields in a PDF file. So, what do you have to do? well, use the command and that will remove the form fields from the PDF. Now, I don't know if this is a bug or not, cause nobody but me has ever experienced it :(... Maybe I should fire up my CF9 beta and see what happens?

The only thing that I have yet to figure out is how to determine if the PDF has form fields or not...

Thursday, August 27, 2009

ColdFusion Win7 Themepack

Well, as you can see from my last post I have made the move to Windows 7 (RC) (although I have already made the decision to get the full version when it comes out). One of the neat things about Windows 7, is what they call themepacks. A nice little way to bundle up some desktop images, sounds and desktop icons too. The images you can set to change at specific intervals.

As I said last time, I was making a ColdFusion themepack, which was composed of just some of the different backgrounds that Andy Matthews created for CF9/CFBuilder etc. as well as one that I did, just cause I thought it would be cool :)

I have now taken it one step further and added new desktop icons that are CF themed. There is a 'My Computer' icon, and icons for the Recycle bin (full and empty).

Here's the link to the download ~ 2.6 MB

And the My Computer/Recylce Empty and Recycle bin full captures (in case you don't have Win7 or you want to look before you leap)

Let me know what you think. Also the ICO files that are contained should work for Vista....

Cheers!

And as requested. a full screen - screenshot - here

Sunday, August 23, 2009

My Move to Windows 7

So, after one of the Updates for Windows XP, my system started to suck, horribly bad. It was slow, poor screen refresh etc. Which is not what I would expect from a laptop that is only 6 months old. I made the decision to do a clean install (which for me, was not an easy one, being in the middle of a huge project - but I fugured the delay caused by reinstalling the OS would be better than the delays caused by an unstable OS).

Anyways in prepping my system for the move (I had a few files to move over to an External HD) I was thinking about what else I could do. I was chatting with Paul Kukiel about some choices, as I was adding VMWare to the mix as well, so I could run Ubuntu if I felt like it. Paul suggested that I perhaps go with Windows 7. Well I was just in time! The download for the RC was taken down on August 20th. I made my download on the 19th!

So at 11pm on the 19th, I started, inserted the Win7 Disc (64-bit btw) and began the process. Now the format/install took maybe 30-40 minutes in total, I am sure it was done before midnight. I then spent the next couple of hours installing CF, CFBuilder, Flex3, downloading Office, VMWare, and getting more familiar with Windows 7. So, within about 3 hours, I had a working system again. (so I packed it in, although I felt like I could keep going, but figured I needed some sleep!)

Anyways, its been a few days now, and I have had a few issues, but in general Win 7 is quite nice, and fast! Of course the speed could be related to my change from 32-bit to 64-bit...

Now, the things that bothered me:
  1. Icon Size on the desktop - they were huge, and I could find NO way to reduce them, but Paul (who has been running Win7 successfully for some time now) said that it was a combination of holding the right-ctrl key and then using the mouse wheel to scroll out. I thought it was a bit weird, but it worked!
  2. Permissions! - Okay, I have never worked with Vista, but wow, the permissions thing (which will be advantageous I am sure) sucked! I copied all of my website data over etc, and I could not edit anything, as I wasn't the owner, so I had to take ownership, then restart (to apply that ownership change) then I had to change the permissions to allow the CREATOR/OWNER full control over the files. To allow me to change the permissions, I of course had to turn off UAC.
  3. UAC - I left it on while I was first setting up the system, because it seemed fine, but as soon as I needed to change the permissions on files, I HAD to turn it off. It really wasn't a big deal though
  4. Configuring the IIS to accept CF files. Pretty easy following Paul's guide, except that IIS still needs to be told about index.cfm, oh, and it didn't work the first time for me, so I had to remove IIS and then do it all again.
Now, for the things I like:
  1. Task bar - you can basically put all of your favorite programs down there, and access them via their icon. If there is more then one window open from the program you can access any of them visually
  2. 64-bit - OK, I was 32-bit before, and 64-bit is awesome!
  3. Themepacks - kinda ot important, but really cool. I have made a CF one, using the backgrounds that Andy Matthews made, as well as one of my own :). Maybe I will post it, although I think it needs a little more work.
  4. The fact that except for the touchpad and some of the HP drive guard stuff, all of the drivers were found without my interaction, and the system just worked. Which I thought was pretty damn sweet. I had just re-formatted a system at work (that didn't need anything carried over) and after the like hour of install, I still needed to get all the drivers so that the network/sound cards would work.
All-in-all, I am satisfied with my move to Windows 7, and it seems to be a nice stable, fast platform, with some nice improvements to my ability to manage programs etc. I think I am going to experience a productivity boost. Now I just need to replace my 2 - 2GB RAM sticks with 2 - 4 GB sticks :)


Monday, August 17, 2009

CFUnited 2009 - The cheap way

Alright, so, I was not able to attend CFUnited this year, although I REALLY wanted to! It just sounded sooo good, and following what people say on Twitter is not nearly as good as being there, or so I have heard!

Anyways, I am still attending, just after it is all done by using SlideSix, this is the BEST website for presentation sharing and it seems that the majority (if not all, I haven't done an in-depth comparison of sessions scheduled vs. presentations available) of presenters at CFUnited have posted their presentations to SlideSix.

It seems that the CFUnited site will also have all those presentations as well, although I would venture to say that SlideSix would make more sense, seeing as some of the presentations are already there. I think that the CFU gang should just upload them all there... (maybe Todd doesn't want that.. server overload :P)

Anyways, if you are like me and didn't get to go and have fun and get a head full while you were there, at least the presentations are available.... now to figure out how to get beer and the pool party over the internet....

Tuesday, July 21, 2009

SQLite and AIR

So, I am spending some time, playing with AIR and the built in SQLite database. I am working on a small project that is for my benefit, but hey, I may share it later on :)

Anyways, last night I was going through the examples on Tour de Flex, and I am the kinda guy that learns by example, so I just copied the code that was there, modified it for my liking, and then tried to run it. I continually got the 1009 error, you know the not really telling you what is wrong error.

Anyways, after a quick Twitter talk with Andy Matthews, Jason Dean and Simon Free I changed the extension of the SQLite database to something other than the .DB that was in the sample code.

Now, with further discussion, it seemed like this was something of a rarity, and no one seemed to know why it wasn't working. (i.e. a .DB extension worked for Jason, but not me, Andy had issues with the .DB extension at a point) It just really seemed odd.

So, I went a little deeper. It seems that if you already have a .DB extension registered on your computer, you cannot make the SQLite database use that extension! This causes some concern I would imagine for installing programs on certain computers. Who knows what kind of extensions ppl have registered. Of course, as Jason tested, you can make ANY extension for your SQLite database.

So, if you are having issues with creating your first ever SQLite database, this may be the problem, however un-illuminating the 1009 error is. All of my AIR programs are going to use the agfusion extension for their database... so you should come up with your own.

**After some further testing, it seems that it is not just due to the fact that the file is already registered, but more due to the fact that there are no actions associated with the file type.

If you go to Windows Explorer > Tools > Folder Options > File Types, you can see what actions are associated with each file extension, by selecting the file type and then hitting on Advanced. Now for me the .DB extension had no actions associated with it, due to, well who knows. Anyways, I guess the point is, is that it really should work, but I am still keeping my unique file extension, to make sure that it doesn't.

In the Ag industry there are programs that already use the DB extension (as witnessed) and if I am making an AIR app to do something, it needs to work regardless of what might have already happened to a system, so I will play it on the safe side!

Tuesday, July 7, 2009

AutLabs

As a follow up to last weeks post about onTap and frameworks, I am going to talk a bit more about Ike and his current project.

Ike was recently diagnosed with Aspergers Syndrome, which is on the Autistic Spectrum. Those diagnosed with Aspergers typically have a hard time with social interaction and that results in a hard time with employment. Without being able to really read facial expressions and the differences in body language, it handicaps you in the workplace. This is clearly seen by the fact that only one in five people diagnosed with Aspergers or Autism are employed... out of 40 million people who are affected by this, that leaves a lot to be desired.

Ike has decided to DO something about this, by starting a project called Autelligent Laboratories, which will focus on employing those on the spectrum. Now of course, they need help!

Please visit the website and then the wiki and find out how you can help. Ike is a great guy and should be commended for his efforts, and we should all support him in any way that we can!

He is trying to trade up for a book deal to help raise money for the project... is there something you can trade? Or do you have a funny story to contribute to the book?

Thanks for reading :)

Monday, June 29, 2009

Frameworks - onTap, and my decision

So, a few months ago, I started to look at frameworks that would help me out with a big site I have. now it is not like a ridiculously huge site, but for me it is big. I looked around and read up on some of the frameworks that there are. I think that I did a pretty decent job of searching through them all, and in the end I decided to use the onTap framework. there were these considerations that lead me to this decision:
  1. It supported internationalization, which is a huge plus for this site
  2. I could move my relatively large website over in a piecemeal fashion as it supports the fact that not all the pages need to be in the framework
  3. It has its own ORM with datafaucet
  4. It supports a plugin architecture so there are things I didn't have to develop
  5. It is dead simple to configure.... no xml
  6. All of your CFM files are compartmentalized in folders and you can seperate different page operations by the file structure.
  7. It uses/supports Lazy-Loading
  8. It was developed and is supported by Ike Dealey, who is a pretty damn smart guy... and I will do a follow up on my good friend Ike and his latest project...
All in all, the transition was pretty smooth, I am sure that I am not using the framework to its fullest potential, but some contractual problems with the client didn't give me enough time to move it over properly before rollout...

Live and learn I guess.

If you have any questions about onTap please let me know and I will share my experiences further.

Wednesday, June 24, 2009

FlexCF and Tutorial 19

Well, my Advanced Data Grid - Select All code is now available to view on the FlexCF website. It is there as tutorial #19. A big thanks to Paul Kukiel for putting it up there.

And I am happy to say that it is the first Flex 4 based tutorial on the website, so if you haven't had a chance to look at Flex 4 yet, here you are. It was build using the DCD functionality of Flex 4, which will Autogen the CFC for you. Now the autogen CFC is kinda verbose, and contains a few functions that you may or may not need, but the Flex4 Team gives you enough options for a Full CRUD with a few clicks of the mouse, and a little un-commenting!

Enjoy the tutorial, and of course View Source is enabled.

Any questions, you can find me...

Tuesday, June 23, 2009

SOnCFUG Meeting and CF9

Well tonight is the night. Yours truly will be presenting to the Southern Ontario ColdFusion User Group about CF9, Flex4, Flash Catalyst.

Check out our User Group page on Adobe Groups. To find out more, and RSVP! Start time is 6pm!

Monday, June 15, 2009

Selecting All Rows in an Advanced Data Grid

Well, I just spent waaay to long writing a little bit of AS to select/deselect all the cells in a datagrid/AdvancedDataGrid. Maybe I'm slow, and try stuff without really doing enough research, but either way, I had this super simple idea.

Why use an itemRenderer to get a check box in an AdvancedDataGrid, when it has a selectMode of 'multipleRows'? So, I wanted to select and Deselect all of the rows in a single click. I know, kinda crazy right?

Anyways, I did some Googling, and looked at FlexCF.com and found nothing that really helped with what I wanted. There was a tute on the Flex3 LiveDocs that related to getting the data from selected Cells, but not really what I wanted. Anyways, this is what I came up with:

The AdvancedDataGrid(ADG from now on) uses an array to store the data, and as a reference to what rows/cells are selected. So to get it to select them all? Well just create the correct array of course!

Code:

public function selecterOfAll():void
{
var selectedRows:Array = new Array(); //Define the array that will hold the values for selection
if (selectAllOutput.label == "Select All") //Test what the button says - default 'Select all'
{
for( var rows:int = 0; rows <>
{
//Loop over the rows that are in the Datagrid. the variable holds the ArrayCollection for the datagrid. should also be able to do ADG.rowCount
selectedRows[rows]=rows
//Make the selectedRows Array look like what the ADG expects
}
//Make the assignment happen - the 'magic' really
this.masterList.selectedIndices = selectedRows;
//Change the label to clear the selection
selectAllOutput.label = "Deselect All";
}
else //the label must say 'Deselect all'
{
//Update the label so that it will enter the loop above again
this.selectAllOutput.label="Select All";
//This is the best way I could find to clear the array
selectedRows = new Array();
//Update the ADG to have nothing selected
this.masterList.selectedIndices = selectedRows;
}
}

So, that is all well and good, but what if someone wanted to clear something that they had already selected? Well I need another button for that to call a similar bit of code. And of course, some people may want to go back to what they had already selected. Anyways, I am going to be working with the folks at FlexCF to get this up as a demo on their site, with perhaps some more of these goodies in there. Hope that this helps anyone, and of course I welcome feedback on my blogging style/content, I am still just getting the hang of this :).

Friday, June 12, 2009

How Easy is AIR?

Alright, so in the process of doing dev with Flex, there will most likely come an urge to write an AIR App, I mean it is easy enough to change the setting in Flex Builder, (when starting a project) or the simple switch to , and of course the fact that you can use HTML/JS to write an AIR app.

So, I gave into the temptation on the weekend. A client of mine was talking about doing some data comparison, and even emailed to ask if I had a good website for images of gauges... fine, a quick Google and I was done. Now, if you are a Flex Dev or are considering it, I recommend checking out Tour De Flex it is totally worth it. The AIR App has tons of sample apps, and demo code to get you started. I of course remembered that there were a few sample apps with gauges. :)

So, I decided that instead of just having static gauge images, I would write an AIR app that displayed the comparison in the guage form. I worked on it for about an hour, changing the gauge display, and hooking in multiple instances, not just a single Gauge, hooked in some static data, changed the chrome, and I think I had a pretty nice app, in an hour. It was just so cool.

I of course sent a screen shot along to the client with a 'What do you think of this?' kinda question, and they were floored. Now obviously for it to work the way it needs to work, I have to get a better understanding of the SQLite database that I can place behind this, but it can't be that much different, right?

Anyways, if you develop Flex, and you have never tried making an AIR App, just do it! It is easy and fun, and your mind will blossom with possibilities... mine has.

Wednesday, June 10, 2009

It's About Time

So, I have been around the block for a while now. People have been asking me if I have a blog for about a year. I guess it is time. I hemmed and hawed about doing this for a number of reasons (time, resources, interesting content..) and finally went the free route. I was going to do the whole domain thing, but not right now. Lets see how committed I am first.

So, who the heck am I?

I am a GIS Specialist who develops Web Apps for Agriculture in Ontario. I use ColdFusion and Flex, and just recently started down the AIR path (which is pretty damn sweet, if you need something like that... anyways, that is my first real blog post). I have been a CFer for about 9 years now I guess. I know no one has ever heard of me ;0)... I work at the largest privately owned Agricultural Testing laboratory in Ontario, we do a LOT of testing of anything to do with Agriculture, and it is interesting. In my role as GIS Specialist, I look after all of the mapping that needs to be done for our customers... the guys that use precision Ag technologies that is. I will go into what I actually do if people are really interested, but suffice it to say, that I make maps. I also do all the web development and IT work as well. We have a website that serves all of our analytical results and runs calculations on those results... All ColdFusion.

I am also partner in service firm that provides GIS softare and precision Ag hardware to growers. We also do web development for companies. Currently I am working an a traceability program for the largest vegetable processor in Ontario. Growers go on-line and enter data about their crops, and well.... lots of other stuff too. Interesting stuff, if you think it is :) (another blog post if folks are interested :p)

I am in the middle of redoing a legacy system written in Visual C++ 6 and converting it to a Flex CF app. It has been interesting so far, and Flex is providing most of what I need without have to override too many classes. That might change as I get more comfortable. I just wrote an AIR App over the weekend, it is of no use to the general public, but will serve its' purpose. Especially when I figure out how to print a report out of AIR.

So, what else? I have been married for almost 7 years to my lovely wife (Jill) and we have a recently turned 5 year old daughter (Brenna). We have two English Springer Spaniels (Maddison, 8, female, and Wesson, 2, male) and we live in a lovely little community in Southern Ontario. I have been at my current job for just over 6 years, and things just keep on changing.

I am the manager of the Southern Ontario ColdFusion User Group (SOnCFUG).

You can follow me on twitter @rob_parkhill and on google talk @ robert dot parkhill at gmail dot com.

I think that that is all for now. I hope to occansionally post something that you will find interesting.