Thoughts from Dan Miser RSS 2.0
 Wednesday, December 14, 2005
Version 10.0.2151.25345 of midas.dll is available on my web site at http://www.distribucon.com/midas.html.

It should be backwards compatible with older Delphi versions. If you run into any problems with this new version, I highly recommend that you enter the issue into QC. MIDAS continues to get good bug fixes due in large part to people posting their issues in QC.

Have fun!

Wednesday, December 14, 2005 3:43:00 PM (Central Standard Time, UTC-06:00)  #    Comments [3] -
Delphi
My co-worker, Jeff Chojnacki, bumped into this problem today. Basically, if you have a 2-tier setup with ClientDataset, DatasetProvider, SQLQuery, etc., and have code that looks similar to this:

   cds1.Close;
   q1.SQL.Text := 'SELECT * FROM COUNTRY WHERE COUNTRY LIKE :COUNTRY';
   q1.Params.ParamByName('COUNTRY').AsString := eCountry.Text+'%';
   cds1.Open;

you will find that the data in cds1 never updates. IOW, if you first pass an 'A', and then pass an 'F', the data will always return as if you are passing the 'A' param.

I used Jeff's test-case and did some debugging and found a work-around, and I believe, the true solution. The work-around is to just call cds1.Params.Clear after cds1.Close. The solution is that TDatsetProvider is returning ptInput Params improperly in DoGetRecords. For all of the gory details, see QC 22335. Hopefully this gets resolved in Update 2.

Wednesday, December 14, 2005 1:57:00 PM (Central Standard Time, UTC-06:00)  #    Comments [4] -

Bob Swart just posted this link to the DevCon05 videos. Not all sessions have Camtasia sessions, but this is a great start since Borland has never done anything even close to this before. John Kaster has mentioned before that QC ratings and comments help drive the funding and content on BDN. If you find this content the least bit valuable, take the time to comment and/or rate. Maybe next year we'll get Camtasia coverage for the entire conference!
Wednesday, December 14, 2005 10:23:00 AM (Central Standard Time, UTC-06:00)  #    Comments [1] -

 Wednesday, December 07, 2005
I'll leave the fun of the Big Feature Writeups (e.g. Live Templates) to others in the blogoshpere that have already started to cover some of the new features of Delphi 2006. Instead, I'll cover some of the more mundane, but very useful new features of Delphi 2006.

Method navigation is described in the "What's New in Developer Studio 2006" file like this: "You can quickly navigate between methods in your source code using a series of hotkeys". You use hotkeys like CTRL+ALT+Up-arrow and CTRL+ATL+Down-arrow to move from one method to the next in a given unit. CTRL+ALT+Home and CTRL+ALT+End take you to the first and last method - respectively - in the unit. There is also the concept of Class Locking which will only let you navigate with those hotkeys within the current class. The documentation on how to toggle this feature is incorrect, though. The correct way to do this is to position your caret in the IDE somewhere in a class, then press CTRL+Q, followed by just the letter L. After you have enabled class lock, you are constrained to method navigation only within that class.

Note: This worked for me with the IDE Classic editor setting. I'm not sure how it works with other settings.

Wednesday, December 07, 2005 1:18:00 PM (Central Standard Time, UTC-06:00)  #    Comments [0] -
Delphi
 Thursday, November 24, 2005
When using a DateTimePicker control, MS assumes that the numeric part groupings (i.e. hour, minutes, seconds, etc.) are entered using 2 digit numbers. However, this means that the text in the control and the DateTime property can often get out of sync.

Take the example where you are just editing a Time and the text of the control is set to "12:00:00 PM". At this point, the DateTime and the text are the same. If you edit the '12' portion by typing '8', no OnChange event occurs, and furthermore, if you try to evaluate the DateTime property at this point it will still be the value for '12:00:00 PM' (e.g. Use a TSpeedButton to evaluate the property since it doesn't make the DateTimePicker lose focus). If you were to type '08' instead, things would be fine. Also, if you were to use the arrow keys to select the minutes part, or tab out of the control, things would be fine. It's just the one case I mentioned above that doesn't work like I would expect.

In order to solve this for my needs, I just did a DateTimePicker1.Perform(WM_KILLFOCUS, 0, 0) before evaluating the DateTime property. Since the control was on a popup window that was going away anyway, any side-effects of doing this won't really apply.

Thursday, November 24, 2005 11:21:00 AM (Central Standard Time, UTC-06:00)  #    Comments [2] -

 Monday, October 31, 2005
I just got a new Dell Latitude D810. It absolutely flies. However, I was getting very weird playback when playing certain WMV files (e.g. ECO is Child's Play or the PDC sessions). The playback was twinged with orange, and lime green, and other colors where I couldn't see the video. I felt like firing up some Jefferson Airplane to complete the effect. ;-)

To solve this, I ended up opening WMP9, going to Tools | Options | Performance and turned the Video acceleration setting down to None. Problem solved.

Monday, October 31, 2005 10:05:00 AM (Central Standard Time, UTC-06:00)  #    Comments [9] -

 Saturday, October 29, 2005
A version of LINQ that is compatible with the RTM version of VS2005 has been released on this page.
Saturday, October 29, 2005 9:00:00 AM (Central Standard Time, UTC-06:00)  #    Comments [0] -
LINQ
 Saturday, October 22, 2005
This post doesn't contain any actual technical information. I'm making this post in order to help a Borland R∓D person to debug a very minor, but somewhat irritating problem with the Welcome Page. The problem pops up if you have a post that has <pre> and <code > tags in a post that gets summarized. Here's a sample.


procedure ScrollToLineCol(AMemo: TCustomMemo; Line, Col: integer);
var
  Len: integer;
  AdjCol: integer;
  CharNum: integer;
begin
  if AMemo = nil then
    Exit;

  // Find the character number of the line requested
  CharNum := AMemo.Perform(EM_LINEINDEX, Line, 0);

   // Make sure we keep the column in this line
   Len := AMemo.Perform(EM_LINELENGTH, CharNum, 0);
   if Len > Col then
     AdjCol := Col
   else
     AdjCol := Len;

  // Add the column to the caret position
  AMemo.SelStart := CharNum + AdjCol;
  AMemo.Perform(EM_ScrollCaret, 0, 0);
end;

Hopefully, this makes it easy to debug now! :-)

Saturday, October 22, 2005 12:06:00 PM (Central Standard Time, UTC-06:00)  #    Comments [2] -

 Friday, October 21, 2005
Borland is doing another 24 hours of Delphi on October 24. I'm on from 9:50am-10:20am CDT that morning (for non-US readers, check the BDN article for time conversions)I'll be talking about migration considerations for Delphi 2006, including changes to VCL, DBX, and DataSnap. I'm excited about getting a chance to share some of the things that I've learned about Delphi 2006 and pass on my very favorable experience with that product. Hopefully you can come away from my talk with a few time saving tips when migrating your applications to Delphi 2006. Looking forward to seeing you online that day!
Friday, October 21, 2005 10:16:00 AM (Central Standard Time, UTC-06:00)  #    Comments [0] -
Delphi
 Monday, October 03, 2005
Since Allen Bauer spilled the beans that FastMM4 will be the default memory manager in DeXter, we have switched over to FastMM4 for all of our applications. These applications are heavily threaded MIDAS/COM servers, with internal COM/DLL references. The switchover has been a real eye-opener. Using the debug version of FastMM in order to pinpoint memory leaks, we have found some (more than a couple, but less than "a lot" :)) places throughout all of the applications where we were forgetting to free memory. Another benefit is that the servers have been performing much better under stress than they used to.

In addition, Pierre has been absolutely fantastic. I've had several email exchanges with him, and he is always willing to take bug reports and get fixes, in addition to implementing feature requests. My company has donated to the FastMM project, and I am adding another donation from my pocket since I think this is such a great tool, and a worthwhile thing to support. I would highly recommend that you check this out, and if you find it useful, throw a donation his way!

Monday, October 03, 2005 12:17:00 PM (Central Standard Time, UTC-06:00)  #    Comments [3] -

Navigation
Archive
<December 2005>
SunMonTueWedThuFriSat
27282930123
45678910
11121314151617
18192021222324
25262728293031
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: 310
This Year: 25
This Month: 0
This Week: 0
Comments: 605
All Content © 2008, Dan Miser
DasBlog theme 'Business' created by Christoph De Baene (delarou)