Greg Pierce’s blog
September 4, 2007
My long-time friend and fellow music freak John “JP” Palmer is now working the 4-6am free-form programming slot on Tampa’s WMNF 88.5 Community Radio. This probably provides him a bit more satisfying creative outlet than his day job as a Bank Vice-President…at least, I assume it must to make the hours worth it.
Luckily, the show will be available via online archives for a week following the broadcasts.
Posted in Family and Friends, Music | No Comments »
August 30, 2007
I’ll be presenting at the Servoy Virtual User Group next week. Not sure my presentation skills are all that great, but I’m sure I’ll manage. Not exactly a high pressure environment. Big thanks to Adrian for organizing the event.
Posted in Servoy | No Comments »
August 24, 2007
That’s how many little, tiny screws it takes to replace the hard drive of a MacBook Pro. Not for the faint hearted. Took me about 20-25 minutes start to finish.
Posted in Apple | 2 Comments »
August 22, 2007
So far so good. Refurbished priced suckered me. Still getting used to the keyboard, but it’s good enough to type this much. It’s slightly right handed, but I’m used to getting screwed as a lefty.
Posted in Misc | No Comments »
August 16, 2007
I’m very proud to have a friend like Seth Dillingham. He’s really pouring a tremendous amount of effort into raising funds for charity. Today marks the beginning of a series of auctions of donated Mac software he’s organized. Proceed from all the auctions will directly benefit cancer research.
Cancer research rocks, too! I don’t mean that as a joke. I’m alive today because of it. It’s one of the great killers that we’ve made real strides to defeat — largely thanks to the great amount of funding that’s been thrown at the problem through generous people who give time and money to charity efforts.
So, long story short, if you have a Mac, you owe it to yourself to place some bids. It’s a win-win.
Posted in Apple, Family and Friends | 1 Comment »
August 11, 2007
As the rest of the family is off at a birthday party for a few hours, I had a chance to play with new iLife some. The result is a simple photo movie of Leo.
I’m probably missing a few things about how the new iMovie is suppose to work, but wow it is a dramatic step backwards in terms of capabilities from the prior version. Long term the library integration is great, and it’s dead easy for the basics, but there’s not a timeline. Detail level editing is gone. Effects are gone. Precision control of titles/transition is gone. Also, it appears though you can export it to Final Cut XML, Final Cut Express doesn’t support appear to support opening that for editing.
The integration with iPhoto is nice. This movie is only photos, no video. I edited the photos in Photoshop (as external editor for iPhoto), duped one and created the “sketched” version for the lead-in, then dropped them all into the iMovie project. There’s a nice little editor for the “Ken Burns” zooming effect, but things like how long a photo shows, and how long transitions run are all set on a project level, not a “per photo” level.
Also I fired up GarageBand to lay record the guitar part. Added the iMovie as a movie track to get the timing — but then I was left with no way to tie those in iMovie. I was left having to export the movie from GarageBand, and put it back in iMovie as a complete clip to publish it to the .Mac web gallery. Weird.
Anyway, I’m happy with the net result considering I only put in about 2 hours no the project, including selected and editing the photos, composing-rehearsing-record the music. And the web gallery is slick, particularly for photos.
Posted in Family and Friends | No Comments »
August 10, 2007
The new DotMac upgrades are great. 10 gig of storage is awesome, but watch out.
I noticed I was running really low on disk space on my MacBook Pro the other day, much lower than I realized. After digging around to free up space, I found that since the .Mac update, the sync’d local copy of my iDisk is now 10 gig! — even though I only have about 150 meg up there. It’s located in ~/Library/Mirrors. If you have an iDisk, you may want to turn off local syncing in the .Mac system pref pane and kill that file to save some disk space.
Posted in Apple, Mac OS X | No Comments »
August 9, 2007
Looks like I’m not the only one playing with editing my Servoy code in TextMate. Here’s a sample bundle that shows how you can use snippets to easily build some of your common code blocks.
Posted in Servoy | No Comments »
It’s Katie’s birthday, today. Hope you have a good one, sweetie!
Posted in Family and Friends | No Comments »
August 6, 2007
Using global methods for form events provides a simple way to build consistent interfaces across your solution while maintaining DRY principals. Servoy's latest 3.5 release includes form event templates, which makes it even easier to apply a set of global events to new forms. There's always cases, however, where you have behaviors that are specific to particular forms and can't be abstracted to globals. This is a perfect opportunity to use callbacks.
So my solution to making a maintainable set of generic global form events is based on turning the events into a set of callbacks on forms that follow a basic naming convention, and if they callbacks are defined, they are called -- if not, the default event behavior is used. For those who just want to cut to the chase, I've included a demo solution for download -- just import into Servoy 3.5:
demo_form_events download
First, you'll need methods to determine if a form exists, and if a method by a particular name is defined on that form. Here are mine:
JavaScript:
-
// form_exists - returns boolean
-
eval('forms.'+arguments[0]);
-
return forms[arguments[0]] ? true : false;
JavaScript:
-
// form_has_method - returns boolean base on form/method name passed
-
var frmName = arguments[0];
-
var methodName = arguments[1];
-
-
if( !globals.form_exists(frmName) )
-
return false;
-
return utils.stringLeft( typeof(forms[frmName][methodName]), 7 ) == 'functio' ? true : false;
Now you can utilize those methods to check if the callbacks you want to use are defined on a form, and call them in your global form events. Here's an example global form event method for the "onNewRecord" event:
JavaScript:
-
// form_event_newRecord
-
// get calling form name...
-
var frm_name = application.getMethodTriggerFormName();
-
-
// use new security methods to check if the user can create a record
-
if( !security.canInsert(currentcontroller.getServerName(), currentcontroller.getTableName() ) )
-
{
-
plugins.dialogs.showErrorDialog( "Error", "Permission error", "OK" );
-
return;
-
}
-
// if a 'canInsert' method is defined, call it -- it should return a boolean
-
if( globals.form_has_method( frm_name, 'canInsert' ) )
-
{
-
if( !forms[frm_name].canInsert() )
-
return;
-
}
-
// this is optional, depending on your requirements
-
databaseManager.saveData();
-
-
// if 'form_event_newRecord' is defined on the form, use it to create the record
-
// otherwise, use the controller.newRecord default
-
if( globals.form_has_method( frm_name, 'form_event_newRecord' ) )
-
forms[frm_name].form_event_newRecord();
-
else
-
forms[frm_name].controller.newRecord(false,true);
-
// if 'form_event_initRecord' is defined, call it. use this callback to set values on the record
-
if( globals.form_has_method( frm_name, 'form_event_initRecord' ) )
-
forms[frm_name].form_event_initRecord();
-
return;
The demo solution also has examples for 'onDeleteRecord' and 'onRecordSelection' -- the later I use to implement record-level security through callbacks. I have a full set of the methods for all standard events which I utilize in my solutions. Then, I just don't really think about events -- just that I have a callback chain. The callback chain in the above 'onNewRecord' example is: 'canInsert' (return false to prevent creation), 'form_event_newRecord' (override the default controller.newRecord behavior), 'form_event_initRecord' (set default values on the new record).
I'm interested to hear if people are doing similar things, or think this is a valueable technique.
Posted in Servoy | 1 Comment »
August 4, 2007
The Asylum Street Spankers' tribute to magnetic ribbons is brilliant. Love these guys. Watch some of their other ones while you're there.
Posted in Humor, Music | No Comments »
August 2, 2007
ABC's come up with something to look forward to in summer fill-in programming.
Posted in TV | No Comments »
August 1, 2007
Posted in Humor | No Comments »
I'm really tired of seeing this guy:

He's everywhere. I see him on website support pages all over. I see him on printed documentation. I guess he's "Support Guy #1" in some stock photo collection or something...but I don't really care to see him anymore!
Posted in Humor | 1 Comment »
July 28, 2007
I bought a new Ducane Stainless Grill today at Home Depot. The old grill more or less disintegrated, so it was necessary. I decided to get one that would last this time around. This is about the least expensive one you can buy that really well constructed out of exclusively decent grade stainless steel.
It did pretty well on the turkey breasts and zucchini tonight -- though it always takes a while to get a feel for a new grill.
Posted in Family and Friends | No Comments »
« Previous Entries Next Entries »