Solved

saving set of sets property  larger than  > 4byte

Posted on 1997-04-02
5
146 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Reconfigure Delphi Install? 2 61
Convert MS Word document to a PDF file 9 91
RESTRequest Parameter 4 43
Delphi: barcode reading on android platform 1 51
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

829 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