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 Mar 2009 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
  March 2009 - Delphi Edition (762 of 4,803 subscribers receive this group's content.) Year 11 Issue 3  
Your full service technology partner!


Expert guidance from working professionals!
Wes Peterson
Internet Marketing topic:
Make Other Web Sites Drive Up Yours: Do-it right!
by Wes Peterson

Having lots of other web sites host links to your site is a great way to make search engines regard your site as important, or relevant.  It helps ensure high visibility for your site when Internet visitors use search providers to find content related to your site.

There are several ways to accomplish this, but you must tread carefully: The wrong techniques can backfire - with serious consequences.

WinForms topic (classic post):
A 10 Minute C# Winforms Quick Start
by Mike Prestwood

The ButtonsCS project. Create a classic "Hello, World" application using Visual Studio .Net with C# syntax. Requires either the full version or Visual C# Express Edition.


IT Water-Cooler for Power-Users topic (classic post):
Work Ethic v2: Attention Control
by Wes Peterson

Work Ethic v1 was about working hard, and working long. Straw-boss managers tried to boost productivity by cracking the whip. And it worked, up to a point, in certain sectors.

In recent years, the concept of "working smarter, not harder" has gained acceptance. It is, howver, just the harbinger of Work Ethic v2.

Work Ethic v2 is about an always "on" work force: People that have mastered control of attention, and are gratified by being in "the now."

Here we talk about how to get there.






 Delphi Group Top 
Visit Group | My Group Settings
Tool Basics topic (classic post):
Record Keystrokes
by Daniel Kram

You can record a series of keystrokes to be played back for quick changes in code. Use Ctrl+Shift + R to begin recording, Ctrl+Shift+R again to stop the recording, then Ctrl+Shift+P to play recording.


OOP topic (classic post):
Delphi Class Helpers (class helper for)
by Mike Prestwood

Delphi allows you to extend an existing class without using inheritance. Buggy in 2005 and not officially supported but stable and usable in 2006 and above. You declare a class helper similiar to how you declare a class but use the keywords class helper for.

  • You can name a helper anything.
  • Helpers have access only to public members of the class.
  • You cannot create an object instance directly from a class helper.
  • self refers to the class being helped.

 Monthly Delphi Lesson
OOP Topic:
Code Snippet of the Month

Delphi for Win32 supports abstract class members using the abstract keyword. You can even instantiate instances of a class that contains abstract members. Then you override each abstract member in a descendant class with Override. Delphi does not support setting an entire class as abstract. You can create an abstract class (a class with one or more abstract methods), but there is no way to tell the compiler to not allow the instantiation of the abstract class. Delphi does not support abstract member properties directly. To implement an abstract properity, make use of abstract methods. That is, you can read a GetPropertyX abstract function and write to a SetPropertyX abstract procedure. In effect, creating  an abstract property.

TCyborg = class(TObject)

public
  procedure Speak(pMessage: String); virtual; abstract;
  procedure Walk; virtual; abstract;
end;
 
TSeries600 = class(TCyborg)

public
  procedure Speak(pMessage: String); override;
  procedure Walk; override;
end;
Language Basics Topic:
Definition of the Month: Delphi Module
A unit. A unit is defined in its own source file (a .PAS file) that contains types (including classes), constants, variables, and routines (functions and procedures). Each unit begins with unit UnitName; where UnitName must match the filename (minus the .PAS extension). The .PAS unit files are compiled into Delphi Compiled Units with a .DCU extension. A Delphi program is constructed from units. Specifically, the .DCU files are linked into your application. The Delphi compiler is very fast because it only recompiles units that have changed. You can force Delphi to recompile all units with a build all.
Delphi for Win32 Topic:
Documented Error of the Month: Program or unit recursively uses itself
Error:

[DCC Fatal Error] Program or unit 'Buttons' recursively uses itself

Explanation:

You cannot create a Delphi unit with the same name as is already in use. For example, do not create a buttons.pas unit for your application because the VCL already has a Buttons.pas unit. The solution is to rename your unit.

Delphi for Win32 Topic:
Resource Link of the Month: CodeGear Blogs

Here you will find blogs from David I, Nick Hodges (Delphi Product Manager), and many other notable Delphi enthusiasts.

Using Controls Topic:
FAQ of the Month: Using Delphi's TColorGrid
Question: How do you specify which color to use with TColorGrid from the samples page? Why isn't it documented?

Answer:

Use the public methods ForegroundColor and BackgroundColor. For example, in the OnChange event of a ColorGrid component you could do the following:

procedure TForm1.ColorGrid1Change(Sender: TObject); 
begin
   Edit1.Font.Color := ColorGrid1.ForegroundColor;
   Edit1.Color := ColorGrid1.BackgroundColor;
end;

None of the components on the "Samples" page are documented.

Tool Basics Topic:
Tip of the Month

To insert a GUID into code using the Delphi Editor, use Control + Shift + G.

['{BB45987C-0552-415F-A439-636A87E9F4E2}']

 

However, if you are using either the Visual Studio or Visual Basic key mapping emulation, use Control + Alt + G.



Editor's Final Word


Quote from Shaw

If you have an apple and I have an apple and we exchange apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.


George Bernard Shaw

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


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