Solved

Saving PUBLIC PROPERTY to Delphi form file (dfm )

Posted on 1997-04-02
1
549 Views
Last Modified: 2010-04-03
I'm tring to save public property values into dfm file and it just won't work.

if you find keyword "stored " in help file you will see Examples list
below...
-----------------------------------------------------------
Example

The following code shows a component that declares three new
properties. One is always stored, one is never stored, and the third
is stored depending on the value of a Boolean method:

type
  TSampleComponent = class(TComponent)
  protected
    function StoreIt: Boolean;
  public      { normally not stored }
    property Important: Integer stored True;      { always stored }
  published      { normally stored always }
    property Unimportant: Integer stored False;      { never stored }
    property Sometimes: Integer stored StoreIt;      { storage depends on
function value }
  end;
------------------------------------------------------------
which means if you use "stored"  you can store public property value
to dfm file.

but if you view dfm file in text, you can only see published property values being stored.

Is this a bug of help or delphi itself? Has anyone succeeded in storing public property values?

roger@medison.co.kr
0
Comment
Question by:RogerKim
1 Comment
 
LVL 2

Accepted Solution

by:
javiertb earned 100 total points
Comment Utility
I think this news extract will answer your question:

By definition, only published properties are stored in a DFM file.
That's the difference between public and published. If you want to store public information, you will need to override the
DefineProperties method, as explained in the online help and the
Component Writer's Guide.


0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now