Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Saving PUBLIC PROPERTY to Delphi form file (dfm )

Posted on 1997-04-02
1
Medium Priority
?
599 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 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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

636 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