Thoughts from Dan Miser RSS 2.0
 Monday, April 11, 2005
Unlike my last entry, I would classify this one as a bug.

If you use a TPageControl, and you set certain Tabsheets to invisible, and then you set the OwnerDraw property to true on the PageControl (like the code listed below), you will not get the proper page selected. This is due to a new method, TPageControl.SetTabIndex, that doesn't take visible tabs/pages into account before trying to set the PageControl.ActivePage property. In Delphi 6, this method didn't exist, and everything worked fine. However, in Delphi 2005, things are different. When you set OwnerDraw, the underlying window is recreated. During the destroy of the window, the current tab index is saved off so that it can be restored when the window is later recreated. It is at this point that the new SetTabIndex method is called, and in that method, notice that no effort is made to determine that any tabs have been set invisible, therefore, the wrong page is selected.

The simple workaround is to set OwnerDraw in the DFM, or at the very least, set OwnerDraw prior to setting any tabs to invisible.


Tabsheet2.TabVisible := false;
Pagecontrol1.ActivePage := Tabsheet4;
Pagecontrol1.OwnerDraw := true;

I also submitted this to Quality Central (QC) as issue 11978. You will find a test case in that entry, too.

Lastly, thanks to both Chris Hesik (Borland) for helping me out with some debugger issues, and Rich Werning for helping debug this to the point where we could come up with a valid test case.

Monday, April 11, 2005 4:08:00 PM (Central Standard Time, UTC-06:00)  #    Comments [0] -
Delphi
 Tuesday, April 05, 2005
Here's an interesting change between Delphi 6 and Delphi 2005 in the VCL. Take the following code snippet where SQLQuery1.SQLConnection = nil:
SQLQuery1.SQL.Text := 'select * from MyTable where ID = :ID';
SQLQuery1.Params.ParamByName('ID').DataType := ftInteger;

In Delphi 6, everything works fine. In Delphi 2005, TSQLQuery.QueryChanged has been updated to use TSQLQuery.SetParamsFromSQL internally. This means that if you don't have a SQLConnection assigned when updating the query text, then the params will be cleared. This means that an exception will be thrown when trying to do the ParamByName call.

I'm not sure that this would qualify as a bug, per se, but it definitely changes your application's behavior when all of these circumstances are present.

Tuesday, April 05, 2005 2:24:00 PM (Central Standard Time, UTC-06:00)  #    Comments [1] -
Delphi
Michael Slinn is the new Sr. Product Manager for Delphi, C++, C# and .NET at Borland (wow, that's a mouthful for a title!). I have enjoyed reading his blog posts, his replies to comments, and his posts in the newsgroups. He asked about the top 10 things that can be done to market Delphi, so I came up with this one idea that I thought was worth sharing.

Thesis: I believe the IDE and personalities should be broken out into separate SKUs.

Since the Galileo IDE can support multiple languages, it might make more sense to break up the SKUs better. With VS.NET, you buy VS.NET and get VB.NET, C#, and C++ - whether you want them all or not. My thought is that you could have the IDE be sold as the base item. It would contain things like source code integration, StarTeam integration, Caliber/RM integration, Refactoring, and maybe some more core bits. The personalities could then be sold as add-on packages. Delphi would contain Win32 and .NET. The C# personality would be separate from that, as would the C++ personality. Each personality would be sold as Pro, Enterprise, or Architect. The add-on packages would plugin to the main IDE and contain all of the bits that pertain to that personality (e.g. VCL, VCL.NET, debugger, designers, etc.).

While this would be more work initially for Borland, I think the benefits would be huge over the long-run. If someone reports a bug in the IDE that is truly an IDE bug, the IDE can be fixed and a patch released and you would get that fix for all personalities. If there is a bug in a personality, just update the personality. If the fix touches both, then both parts can be updated. This independence would be ideal for the consumer. For example, if there is a bug that is causing IDE performance bottlenecks, the consumer may be forced to wait for an entirely new release of Borland Developer Studio (BDS), since fixing those problems may require breaking changes to the interface compatibility initially released with Delphi 2005. By adopting this model, Borland could start to release more frequent patches, and also dedicate resources to the appropriate codebase based on SKU sales and profitability.

I could also see a tool used in the Borland R&D department where you would have dependancy graphs used to tell the team which files would be affected by a specific change. For example, pretend there is a unit named "CoreIDEServices.pas" that needs a patch. The developer would fix the patch, run the tool, and it would say that the only file that needs to be updated is coreide90.bpl. Perhaps a VCL for Win32 bug fix would result in only the PAS file, DCU file, and corresponding BPL file needing deployment.

People have been asking for the VCL to be more of an "a la carte" model forever. This could be a step in that direction. I'm not advocating that this be done today. Iron out some of the current problems, but keep an eye on this model. I think it would serve everyone well.

Tuesday, April 05, 2005 8:35:00 AM (Central Standard Time, UTC-06:00)  #    Comments [2] -
Delphi
 Wednesday, March 30, 2005
Somewhere along the way of installing and customizing Delphi 2005 with update 2, various 3rd party packages, and customizations, I lost the ability to view the contents of the Delphi 2005 help file. In order to get this functionality back, I used this fix:
"c:\Program Files\Borland\BDS\3.0\Help\Common\regHelp 7"

After this command executed and the help was rebuilt, everything was fine again.
Wednesday, March 30, 2005 9:27:00 AM (Central Standard Time, UTC-06:00)  #    Comments [3] -
Delphi
 Wednesday, March 23, 2005
I went to a meeting yesterday where the topic was the Enterprise Library offering from Microsoft. To get a feel for what Enterprise Library is all about, take a look at the Webcasts on the right-hand side of this page.
Wednesday, March 23, 2005 7:49:00 AM (Central Standard Time, UTC-06:00)  #    Comments [0] -

 Monday, March 21, 2005
I just heard about the new changes to BorCon. Some background: To my best guess, I've been a speaker at 6 or 7 BorCons. There were also 2 that I was asked to speak at that I had to turn down. I've also attended 2 or 3 more BorCons as an attendee, so I've been around the proverbial BorCon block.

The new BorCon format has a good side: it appears that Borland is getting back to their roots in making this more of a developer-centric event.

On the bad side, speakers will no longer be given their extremely modest stipend, but more importantly, Borland will not cover travel or hotel expenses for their speakers.

My take on this is that this move will kill BorCon. It looks like others are in violent agreement with me on the ramifications of this move. I'm sorry to see this happen, as I absolutely love BorCon. I sent a polite response to the Call For Papers explaining that I will not be speaking this year, nor will we be sending 2 other attendees to the event. My fear is that this will be nothing more than a glorified user group meeting. Don't get me wrong - user group meetings are valuable, but they are not BorCon. There is no accountability to keep speakers in line (what if they miss a deadline? what if they just don't bother to show up without telling anyone?). Dr. Bob - a long-time fixture at BorCon - also appears to be taking a pass on BorCon this year.

As the infomercial says, "Stop the insanity!!"... :-(

Monday, March 21, 2005 1:59:00 PM (Central Standard Time, UTC-06:00)  #    Comments [0] -

 Thursday, March 10, 2005
Jeremy North just released version 2 of his Delphi Configuration Manager (DCM). It's a tool that helps you optimize your Delphi IDE by creating profiles that load specific packages. So, if you have one client that uses one set of packages, and another that uses a different set, you can set up 2 different profiles and only load the packages that you need depending on which client you're working on currently. The main feature that I like in this version is that run-time packages are also available to be controlled in a profile. Give it a look. Very well done.
Thursday, March 10, 2005 9:51:00 AM (Central Standard Time, UTC-06:00)  #    Comments [0] -
Delphi
 Tuesday, March 08, 2005
Google Desktop Search has made it's way out of beta and is now a released product. It looks like it has become way more flexible, too. The biggest complaint I had was the lack of file extension support, which was sort of tied to the fact that there was no SDK. They re-architected this area, and now have support for plugins (including, a Trillian plugin) and allow developers to create plugins via the SDK. More information on developing plugins can be found here. They also expanded the default set of files that are indexed to include (among others) MP3 and PDF files. I also really love the DeskBar to gain easy access to searches.

My buddy, Rich Werning, and I were talking about some possible plugins that we may develop after we convert the SDK files to Delphi:

  • ZIP plugin - Scan through ZIP files to find items inside a ZIP
  • Blog/FeedDemon plugin - Search your locally downloaded blog entries, and have it take you to the original author's page when an item is found
  • Database plugin - Not entirely certain on this one, but if you provided a full connection string, maybe you could search a DB schema for fields/tables/etc. Or maybe even search a table for specific text.

I'll certainly blog anything we do on this front.

Tuesday, March 08, 2005 8:48:00 PM (Central Standard Time, UTC-06:00)  #    Comments [0] -
Delphi
Kostas Terzides has started playing with DataSnap recently. He contacted me to add his his DataSnap components to MidEss. I'm hoping his addition to the project will energize it once again. Thanks for volunteering, and welcome!
Tuesday, March 08, 2005 9:44:00 AM (Central Standard Time, UTC-06:00)  #    Comments [0] -
DataSnap
Navigation
Archive
<April 2005>
SunMonTueWedThuFriSat
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2008
Dan Miser
Sign In
Statistics
Total Posts: 307
This Year: 22
This Month: 1
This Week: 1
Comments: 604
All Content © 2008, Dan Miser
DasBlog theme 'Business' created by Christoph De Baene (delarou)