Solved

Saving PUBLIC PROPERTY to Delphi form file (dfm )

Posted on 1997-04-02
1
561 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
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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Wininet read php file from internet issue 6 92
Downloading email attachments 2 74
Magic Software info 18 132
Press three keys together and trigger a function 3 57
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…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

803 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