Wednesday, May 28, 2008

June Photo of the Month


Copyright © 2008 Chris Bensen. All rights reserved.


This photograph of McWay Falls at Sunset is located on the scenic California Big Sur and can be found on page 5 of Nature Photographer summer edition. The photo looks great big! Big Sur is one of my favorite locations to visit.

Monday, May 12, 2008

Friday, May 9, 2008

Illusion Blog

Illusion Sciences is an amazing blog posting an illusion per week with an explanation of what makes it happen. Head on over and be amazed!

Embarcadero Day 3

I've received quite a few emails and a couple comments about my post yesterday "Goodbye Borland Hello Embarcadero Day 2". It's obvious that my dry sense of humor was lost on nearly everyone. Obviously people thing I'm stupider than I look. Wait, that didn't come out right. My spelling comment of Embarcadero was a joke! My attempt at humor. Sorry if it confused anyone. Yes I can pronouns Embarcadero and yes I can spell it. But it does take a bit of thinking to get it right. Maybe I'm pathetic at spelling (which is true) or maybe your just great at it and won the spelling B! I even know that Embarcadero meant "warf" in spanish. There's a lot of things called Embarcadero in San Francisco and here's a map to the new Head Quarters. Especially compared to CodeGear, Embarcadero is a mouthful.

But seriously, I guess my point is if this is the biggest issue, then everything will be just fine!

Thursday, May 8, 2008

Goodbye Borland Hello Embarcadero Day 2

Yesterday was an amazing day. You can read all about it on various blogs David I, Allen Bauer, Nick Hodges, Marco Cantu, Greg Keller and my very short first post on the subject. You can also read the largest newsgroup post about it here.

I wanted to write a bit more than my very brief post yesterday about my day 2 on the whole subject. Well first off, I can finally spell Embarcadero. Now I just fumble on it a little bit. It's a finger twister, but eventually it rolls off the left hand.

Everyone in the office appears to be happy about the sale. The first thing said to me this morning was "Good morning fellow Embarcaderian".

I've worked at Borland for a long time now so I'm sad to say goodbye to Borland. But I'm excited to say hello to Embarcadero. Change can lead to new opportunities and possibilities. Looking at the Embarcadero portfolio of software and knowing what we have at CodeGear the future looks bright. I can't wait to meet all my new coworkers. When's the party?

Wednesday, May 7, 2008

Embarcadero Technology Agrees to Purchase CodeGear

I'm sure you've already read that today a couple press releases announced that Embarcadero Technology has signed a definitive asset purchase agreement with Borland to purchase CodeGear. I won't bother reiterating all the facts so you can read all about it here here, and here. You can even read about it on Wikipedia here and here.

I just had a great chat with Jim Douglas who sits just down the hall from me about the "deal". Embarcadero Technology is a private company which is a new adventure for me that I look forward to. CodeGear and Embarcadero Technology compliment one another very well so I'm convinced that this is a good opportunity for everyone involved.

Now back to Tiburón.

Friday, April 25, 2008

Delphi put by ref properties

In Delphi 6 and earlier there was a an unintended compiler feature, put by ref properties. It allowed properties to be passed by references. Here is an example:


function GetCount: Integer;
procedure SetCount(var Value: Integer);

property Count: Integer read GetCount write SetCount;

It was decided that the setter property by reference wasn't safe so starting with Delphi 7 this became a compiler error. But this is a requirement for COM so the compiler option {$VARPROPSETTER ON} was introduced to enable the put by ref behavior. At the top of each _TLB.pas file generated you will see this compiler directive.

Wednesday, April 23, 2008

Upgraded to Leopard

Everything I needed to upgrade to Leopard now supports Leopard. So I bought a new 1TB Wester Digital Caviar hard drive and installed it in minutes in my MacPro. It really was the easiest hard drive install I've ever done. Leopard was just as simple. Put the DVD in the drive, hold down the C key to boot from the optical drive and then run the install. How the heck are you supposed to know to hold down the C key unless you read the directions? Typical Apple, make the most common things easy and the slightly harder things buried. Last I ran the user migration assistant which moved everything over to the new hard drive. Easiest new install of an OS I've ever experienced. And nearly everything is migrated over. I've never had that experience with a new install of Windows.

I ran into a few oddities:

- Safari had some funniness with the bookmark bar where some of my links showed up in a couple locations.
- My Wacom tablet driver didn't have sufficient privileges to run.
- The default output for the sound was changed to the internal speaker not the line out to my desk speakers.

But that's it so far. I'm sure something else will crop up.

The first strange thing I noticed is quick viewing items on the desktop opens the quick view window on the secondary monitor. I only turn on my second monitor when I'm reviewing a large photo-shoot so this is kind of a problem.

This is the first OS upgrade I've ever had where the new OS was faster than the previous one on the same hardware. Okay, I got a new hard drive, but I don't think that is coming into play here. Things are just snappier.

I still have to test out all my applications. I'm running the first update now so I'll know more tomorrow.

Tuesday, April 22, 2008

BusySync for Mac

For a while now I've been trying to find a good way to keep the Missus' and my calendar's in sync. One of my fellow CodeGear Mac heads mentioned BusySync so I gave the trial a whirl. It just worked out of the box as easy as could be and kept our Macs iCals in sync. The only problem left was knowing my schedule when I'm not at home. Lots of people suggested getting an iPhone and that'd be great if I weren't a Verizon customer and switching over to AT&T wouldn't cost me over $50 per month more than what I pay now. Then I'd still have to carry it and I'm at work most of the time when I need to know my schedule anyway. Then BusySync just got cooler and released BusySync 2.0 that syncs with Google Calendar. Hot diggity dog, it works swimmingly! They also have a discount going on right now. If you use a Mac and need to sync your calendars on two or more Macs then give it a try.

Thursday, April 17, 2008

Delphi Tips and Tricks: Model View

I've been using the model view quite a bit lately and it's a little uh, well, ugly and difficult to navigate. There is an option, although not widely known and a bit burried, that makes the model view a whole lot more usable. Although this option isn't "preferred by modelers" it sure does help us coders use it.

To enable the simplified Model View go to Tools | Options, scroll down the tree to Together | Default | Diagram | Model View and change View type from Model-centric to Simplified.



Updated: Here are two screen captures from the Model View before and after toggling the option. This is after creating a new Delphi VCL Application. Can you figure out which one is which?



Tuesday, April 15, 2008

Delphi Tips and Tricks: Import Component Wizard



The Import Component Wizard supports copy (CTRL + C). If I press CTRL + C on the dialog above I get "Active Setup Control Library, Version 1.0, C:\WINDOWS\SysWOW64\asctrls.ocx" in my clipboard buffer. Kinda handy.

Friday, April 11, 2008

Writing a Delphi Menu Item Plugin

Trying to figure out the Delphi Open Tools API can be a daunting task. Here is a bit of code to get a menu item into the Delphi IDE's main menu. Please note that I didn't test this code and you will want to reorganize it a bit.


unit ComStdReg;

interface

uses Menus, ActnList;

type
TMyMenus = class
private
FMenuItem: TMenuItem;
FMenuAction: TAction;

procedure DoExecute(Sender: TObject);
procedure DoUpdate(Sender: TObject);
public
constructor Create;
destructor Destroy; override;
end;

implementation

uses ToolsAPI;

constructor TMyMenus.Create;
var
MenuService: INTAServices;
begin
MenuService := BorlandIDEServices as INTAServices;

if MenuService <> nil then
begin
MenuItem := TMenuItem.Create(nil);
MenuAction := TAction.Create(nil);
MenuItem.Action := MenuAction;
MenuItem.Name := 'MyMenuItem';
MenuActiond.Caption := 'My Menu Item';
MenuAction.OnExecute := DoExecute;
MenuAction.OnUpdate := DoUpdate;
MenuAction.Enabled := False;

// Only set this if you want to allow F1 when the mouse if over the menu item.
MenuAction.HelpContext := 0;

// Tell the menu service which item to place your menu item after. This will
// place your menu item after Component | Installed Packages.

MenuService.AddActionMenu('ComponentPaletteItem', MenuAction,
MenuAction);
MenuService.UpdateMenuAccelerators(MenuService.MainMenu);
end;
end;

destructor TComMenus.Destroy;
begin
FMenutItem.Free;
FMenuAction.Free;
inherited;
end;

procedure TComMenus.DoExecute(Sender: TObject);
begin
// DoExecute is called when the the menu item is clicked.
end;

procedure TMyMenus.DoUpdate(Sender: TObject);
begin
// DoUpdate is called when the menu is displayed.
// Here you will want to set FMenuAction.Enabled to True or False or
// FMenuAction.Visible to True or False. I personally don't like it when menu
// items hide so don't change visible.

end;