Solved

Saving PUBLIC PROPERTY to Delphi form file (dfm )

Posted on 1997-04-02
1
582 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
javiertb earned 100 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

688 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