I.T. Discussion Community!
-Collapse +Expand
KB
   ► KB ► > Destructor Posts  Print This     

Destructor Posts

"Destructor" Knowledge Base Posts

More...
  KB Article    

Wes Peterson
1. TDBGrid: Rerarranging Columns at Will

Delphi's TDBGrid is an incredibly useful component; one you'd expect to find in any professional development tool.

One of it's handy behaviors is that users can click in column headers and drag to rearrange column ordering to their liking.

Unfortunately, TDBGrid doesn't offer the developer any really easy way to rearrange grid columns from code. This is inconvenient because you might offer the user a choice of various columns upon which they can search, and it would be nice to make their chosen column the leftmost - at least. Often it makes sense to rearrange other columns as well.

This little class allows you to do that.

It has no exposed methods, and only two properties, so it's incredibly easy to use.

Read on to learn how it works and to get the code.

Posted to KB Topic: Using Controls
7 years ago

Article
Nothing New Since Your Last Visit
9222
Hits

Pascal and Delphi Coding

Mike Prestwood
2. Member Method

Also known as a Class Method.

A code routine that belongs to the class or an object instance (an instance of the class). Methods that belong to the class are called class methods or static methods. Methods that belong to an object instance are called instance methods, or simply methods.

When a method returns a value, it is a function method. When no value is returned (or void), it is a procedure method.

Methods frequently use method parameters to transfer data. When one object instance calls another object instance using a method with parameters, you call that messaging.

Posted to KB Topic: Object Orientation (OO)
11 years ago, and updated 11 years ago
(1 Comments , last by Andrew.S2 )

Definition
Nothing New Since Your Last Visit
9431
Hits

Coding & OO

Mike Prestwood
3. Delphi Prism Finalizer (finalize())

Unlike Delphi, Delphi Prism uses the .Net garbage collector to free managed object instances. Prism does not have nor need a true destructor.

In .Net, a finalizer is used to free non-managed objects such as a file or network resource. Because you don't know when the garbage collector will call your finalizer, Microsoft recommends you implement the IDisposable interface for non-managed resources and call it's Dispose() method at the appropriate time.

Posted to KB Topic: OOP
11 years ago, and updated 11 years ago

Code

Article
Nothing New Since Your Last Visit  
20130
Hits

Delphi Prism

Mike Prestwood
4. Delphi Constructors (constructor)

In Delphi, use the constructor keyword to signify which method or methods are constructors for a class. It is traditional but not required to use a procedure called Create.

In addition to having multiple named constructors, you can overload constructors.

Posted to KB Topic: OOP
12 years ago, and updated 11 years ago
(3 Comments , last by LatonyaH.D.L )

Code

KB Post
Nothing New Since Your Last Visit  
18067
Hits

Pascal and Delphi Coding

Larry J. Rutledge
5. Components 101: Form Size Limiting

Windows sends the WM_GETMINMAXINFO message when the user tries to resize a window either by clicking the maximize button or dragging the borders of the window. By creating a suitable message-response method, you can specify the minimum and maximum window sizes for that form.

Posted to KB Topic: Using Controls
12 years ago, and updated 11 years ago

Article
Nothing New Since Your Last Visit
9252
Hits

Pascal and Delphi Coding
More...

"Destructor" Message Board Posts


Thread 3 of 3

C.Oberhaus
class constructors and destructors
Hi again, , Also been having wierds with class destructors (and constructors)., , When I declare a new class, I need to overwrite the 'create' and 'free' procedures don't I (if I want to alter them). But my compiler (Delphi 5 standard) doesn't like the 'override' keyword after the definition!! Is this because i am not inheriting my class from a parent class?, , As well as this, 'free' doesn't like override, but it also crashes if the implementation of 'free' has the command 'inherited free;', , , , TmyClass = class, constructor create; override; // error: 'cannot override a static method', destructor free; override; // error: 'cannot override a static method', end;, , constructor TmyClass.create;, begin, inherited create;, end;, , destructor TmyClass.free;, begin, inherited free; // causes 'external exception at address FFFFFF', end; , , , Any ideas?, , thanks in advance, Pea
Posted to MB Topic: Delphi News / Other « Delphi Board
14 years ago
2 replies. Last post:

wpantoja
{Too Long!}
14 years ago
Nothing New Since Your Last Visit
1532
Hits

Thread 2 of 3

gordon
Creating Container Classes
{Too Long!}
Posted to MB Topic: Delphi News / Other « Delphi Board
14 years ago
Nothing New Since Your Last Visit
1658
Hits

Thread 1 of 3

gordon
Creating un imported CoClass Routines
{Too Long!}
Posted to MB Topic: Delphi COM / ActiveX / DCOM « Delphi Board
14 years ago
3 replies. Last post:

gordon
{Too Long!}
14 years ago
Nothing New Since Your Last Visit
2987
Hits


Icon Legend:
Recent or not:
- Recent activity (within last two weeks).
- No activity last two weeks.
 Since your last logged visit:
- New to you or updated since your last visit (sign in now to activate).
- NOT new to you since your last visit (sign in now to activate).

Follow PrestwoodBoards on: 


©1995-2020 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech