Solved

saving set of sets property  larger than  > 4byte

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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 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…
A short film showing how OnPage and Connectwise integration works.
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 …

914 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now