?
Solved

Saving PUBLIC PROPERTY to Delphi form file (dfm )

Posted on 1997-04-02
1
Medium Priority
?
603 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 200 total points
ID: 1335100
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses
Course of the Month14 days, 21 hours left to enroll

839 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