Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Thread Tools Display Modes
Old 11-23-2006, 03:22 AM
raghavganesh raghavganesh is offline
Junior Member
Join Date: Nov 2006
Posts: 29
Default registerclass


whether the above procedure registers the class to the unit,or the main form which use this procedures,or the application.
Reply With Quote
Old 11-24-2006, 01:17 AM
digitiger digitiger is offline
Senior Member
Join Date: Jan 2001
Posts: 716
Default RE: registerclass

Call RegisterClass to register a class with the streaming system. Form classes and component classes that are referenced in a form declaration (instance variables) are automatically registered. Any other classes used by an application must be explicitly registered by calling RegisterClass if instances are to be saved.

Once classes are registered, they can be loaded or saved by the component streaming system. IdentToInt returns nil (Delphi) or NULL (C++) when passed the class name of an unregistered class, and FindClass raises an exception for unregistered classes.

The AClass parameter is the class that is descended from TPersistent. Put the call to RegisterClass in a Register procedure. In Delphi, you can also put the call in the initialization section of the unit in which the class is defined. In C++, the call can also go in the namespace of the compilation unit that defines the class.

If the class is already registered, RegisterClass does nothing. If a different class with the same name is already registered, RegisterClass raises an EFilerError exception.
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

All times are GMT. The time now is 02:42 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.