Solved

saving set of sets property  larger than  > 4byte

Posted on 1997-04-02
5
136 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
Comment Utility
Delphi 1 or 2?

Regards,

Erik.
0
 

Author Comment

by:RogerKim
Comment Utility
delphi 2.0
0
 

Author Comment

by:RogerKim
Comment Utility
delphi 2.0
0
 

Author Comment

by:RogerKim
Comment Utility
delphi 2.0
0
 
LVL 3

Accepted Solution

by:
sperling earned 200 total points
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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 The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

772 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

10 Experts available now in Live!

Get 1:1 Help Now