IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
Delphi
Search Delphi Group:

Advanced
-Collapse +Expand Delphi To/From
To/FromCODEGuides
-Collapse +Expand Delphi Store
PRESTWOODSTORE

Prestwood eMagazine

October Edition
Subscribe now! It's Free!
Enter your email:

   ► eMag   Print This    All Groups  
View Group Edition:
Full Edition Your Edition || Prev Next || Subscription Center

Prestwood IT Newsletter Aug 2008 Issue - Delphi Edition

Subscribe!

Start subscribing now! It's free!

Each month on or after the 1st, and only once a month, we will send you content from up to 5 community groups. If you select this Delphi group, you'll receive the following content below mixed in with the other groups you elect to include.

Prestwood eMag
Our monthly opt-in coupons+newsletter.
portal.prestwood.com
  August 2008 - Delphi Edition (762 of 4,803 subscribers receive this group's content.) Year 10 Issue 8  
Your full service technology partner!


Expert guidance from working professionals!
Role-Based Tech Talk topic:
Crash, Bomb, Hang, and Deadlock
by Scott Wehrly
This article explores and defines the following terms: crash, bomb, hang, deadlock, exception, fatal error, and blue screen of death.





 Delphi Group Top 
Visit Group | My Group Settings
OOP topic (classic post):
A 10 Minute Your First Delphi Class Quick Start
by Mike Prestwood

Beginners example of creating and using a class. Early versions of Delphi use the standard OO private, protected, and public visibility specifiers plus add published for RTTI info. Later versions of Delphi add strict private and strict protected for a true OO implementation.


 Monthly Delphi Lesson
Using Data Topic:
Code Snippet of the Month

I always found the sleep command in ObjectPAL very useful. The following code does about the same thing in Delphi. It makes use of GetTickCount which is a Win32 API call that retrieves the number of milliseconds that have elapsed since the system was started, up to 49.7 days.

procedure TUtils.Delay(MillisecondsDelay: Integer);

var
   FirstTickCount: LongInt;
begin
   FirstTickCount := GetTickCount;
   repeat 
       Application.ProcessMessages;
   until ((GetTickCount-FirstTickCount) >= Longint(MillisecondsDelay));
end;
OOP Topic:
Definition of the Month: Strict Visibility
The Strict specifier tightens up the scope for private and protected. With Strict Private, members within a class are visible ONLY within the class declared and Strict Protected are visible only within the class declared and descendent classes. Without strict, private and protected members can also be seen by all classes declared in the same unit (friendly classes). The Strict specifier was introduced with Delphi for .Net preview in Delphi 7 in an update to the .Net compiler preview and with Win32 in Delphi 2005 to fully comply with the .NET CLS. Delphi's traditional private specifier maps to the CLR's assembly visibility and the protected specifier maps to the CLR's assembly or family visibility.
Delphi for Win32 Topic:
Resource Link of the Month: GExperts

I recommend GExperts for one simple reason: I'm addicted; I can't live without it.

GExperts is a collection of incredibly useful plug-ins for the Delphi IDE. There are too many to list, so I'll mention just a couple of my favorites:

Replace Components: Select one or more controls on a form, choose GExperts "Replace Components," and you're presented a dialog that allows you to select a replacement component from a very smart drop-down. As GExperts replaces the selected component(s), it also preseves as many properties as possible.

Component to Code: Select a component on one of your forms or data modules, select GExperts "Component to code," and all the code necessary to create that component in explicit code is magically placed on the clipboard.

MessageDlg builder: While in the Delphi code editor, simply hit Crl-D. GExperts pops up a dialog in which you can type in text to be displayed, choose which buttons to include, choose an icon for your MessageDlg, and even test it. Clicking OK inserts the appropriate MessageDlg call right into your code.

Oh. Did I mention that GExperts is free? Don't start Delphi again without first downloading and installing GExperts. You'll be hooked, too.

OOP Topic:
Question: Why do I have to specify virtual when creating an abstract method? Why not just abstract?

Answer:

For abstract methods, you must specify either regular virtual with the virtual keyword or dynamic virtual with the dynamic keyword. In Delphi for Win32, virtual methods are optimized for speed and dynamic methods are optimized for size. The Delphi help indicates to use virtual for most situations. 

It is true that the compiler could make virtual the default and therefore optional but requiring one or the other is consistent with Object Pascal's strong typing.



Editor's Final Word

Prestwood Computer Store - Visit Store Now!

Check out our enhanced store! We've added thousands of items!

Mike Prestwood About our Prestwood Computer Store!
In addition to offering our own products and services, we offer thousands of items including software, books, computer accessories, and accessories for your iPod, iPhone, Blackberry, Zune, etc. All at rock bottom prices.

--Mike Prestwood

Check out our store and help support this eMag and our online community!

Sales Website: www.prestwood.com Or visit our legacy sales site: 
legacy.prestwood.com


©1995-2021 Prestwood IT Solutions.   [Security & Privacy]