Sunday, August 6, 2017

Why My Next Software Product Will Be Windows VCL Only

I started this blog back in 2009 as I slowly emerged from a severe case of burn-out. From that first day I've been consistently saying I'm working on an update to one of my software products. And I'm still saying that today. I'm like the Rip Van Winkle of Delphi programming. I basically dropped off the face of the Delphi coding world, woke up from an 8 year technology nap, and have been in a learning fog ever since.

I have been procrastinating at every turn, about every tool, and every methodology. The bottom-line is... I can't make a decision. Check out this common theme among some of my posts going back quite some time.

How do you get past the Analysis to Paralysis when working on a new project?
https://softwareengineering.stackexchange.com/questions/155621/

What is The Best Database for Delphi Desktop Applications that Supports Stored Procedures?
https://stackoverflow.com/questions/1619887/

I Took A Little Walk-About - But I'm Back (Shit or get of the pot)
http://capecodgunny.blogspot.com/2011/08/i-took-little-walk-about-but-im-back.html

Last week I heard about Warren Buffett's 25-5 Rule.  I've never heard it put quite that way before. Anyway, it got me to change my attitude about decision making.

For example:

Should the new release of my Zilch software be Windows?
Windows and Mac?
Windows, Mac, iOS, Android?
What about the Web version?

ENOUGH!

I'm going Windows VCL Only! Period. I made the decision and it's final. Making decisions is so liberating.

  • I am the most proficient with Delphi VCL.
  • I have a distribution channel and payment gateway for Windows already in-place. 
  • I have 25 years worth of Windows customers I can market my software upgrade to.
  • I can use the current development tool chain I already have.

2017 is the 25th anniversary of my original product launch. I need to get busy working on the things that matter most and ignoring everything else if I hope to get it released this year.

I don't care if the Warren Buffett story is true or not. It's a good thing. I encourage all of you to have a look at it.

Cheers!

Semper Fi,
Gunny Mike





Saturday, August 5, 2017

Error: Cannot Restore Form State--No TRzRegIniFile Component Specified

It's been a while since I fired up Delphi, about three months. And you know, it's true what they say "If you don't use it you loose it". I love my Raize Components now called Konopka VCL Controls, they make a lot of things very easy. For example, automatically remembering the size and position of form windows. I've used this dozens of times. It's a no-brainer.

So today, I was playing around with the DBGrid, trying different things. I created a new project with a Form and a Data Module. Added a lookup field to the grid. Just having fun and experimenting with stuff. One of the things I wanted to do but haven't got around to yet, was save the column widths of the grid after they've been resized. I find it annoying always having to resize the columns every time a program runs. That will be for another day.

Anyway, I decided I wanted to start by saving the state of the Main form window, just like I've done in the past. Drop a RzRegIniFile component on the Data Module. Drop an RzFormState component on the Main form. Set the RzFormState.RegIniFile property to the DM.RzRegIniFile component. And Voila... Done! Right!

NOT!

I kept getting the following error: "Cannot Restore Form State--No TRzRegIniFile Component Specified".



I'm going back and forth like a madman, checking things on the Data Module and the Main form. I tried dropping and re-adding the components. Nope. I started googling the error... nothing. Then it hits me. It's got to be a timing thing.

Yup! I opened the source file for the project and sure as shit, the Data Module was being created after the Main form.
begin
  Application.Initialize;
  Application.MainFormOnTaskbar := True;
  Application.CreateForm(TForm4, Form4);
  Application.CreateForm(TDataModule5, DataModule5);
  Application.Run;
end.
I moved the creation of the Data Model before the Main form and bingo... works like a champ!
begin
  Application.Initialize;
  Application.MainFormOnTaskbar := True;
  Application.CreateForm(TDataModule5, DataModule5);
  Application.CreateForm(TForm4, Form4);
  Application.Run;
end.
I'm amazed how quickly I lost sight of this little detail. I was only away from Delphi for maybe three months. Gee Whiz.

Enjoy!

Semper Fi,
Gunny Mike