Solved

saving set of sets property  larger than  > 4byte

Posted on 1997-04-02
5
142 Views
Last Modified: 2010-04-06
I have made set of set type and tried to use in Published property, but published property won't let use set properties which is larger than 4byte.
What shall I do to make this property saved to DFM file?

you can try out this by defining a set type which has more set numbers than 32, like "TMySet" then define another 'set of' type like "TMySets = set of TMySet"
0
Comment
Question by:RogerKim
  • 3
  • 2
5 Comments
 
LVL 3

Expert Comment

by:sperling
ID: 1335101
Delphi 1 or 2?

Regards,

Erik.
0
 

Author Comment

by:RogerKim
ID: 1335102
delphi 2.0
0
 

Author Comment

by:RogerKim
ID: 1335103
delphi 2.0
0
 

Author Comment

by:RogerKim
ID: 1335104
delphi 2.0
0
 
LVL 3

Accepted Solution

by:
sperling earned 200 total points
ID: 1335105
property SomeSet : TSomeSet read FSomeSet write FSomeSet stored true;

Declare property like this in *public* section. It's just not possible to use it in the published section, but appending a "stored true" will at least save it.

To access it at design time, you need to create some bogus properties.

e.g, you have Options : TOptions in public section

Declare "Options1 : TOptions1" and "Options2 : TOptions2" in published section, append a "stored false" to these.
TOptions1 should include one half of the TOptions set, and TOptions2 the other half.

In the "Options1Set" and "Options2Set" methods, modify the value of the original "Options".

This is the simplest way to get access to set properties larger than 32 bit. Run-time, you'll ofcourse still be able to access the original Options property.

Another approach would be to implement your own property editor, and publish a bogus property which you use as a reference to the actual set value. This is quite some work, though.


Regards,

Erik.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

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…
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 Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

821 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