How to use DataContainerDefinition instruction properly via winwrapbasic

luisfernandomerlano shared this question 3 years ago
Answered

Hello experts,


I missing a lot the old mindmanger forum. My question is as follows:

I am programming with winwrapbaisc; and i am not able to use properly the instructions:

DataContainerDefinition,

CustomDataContainerDefinition

.CustomPropertyDefinitionCollection.

AddCustomPropertyDefinition

I want to add options in a property option list inside a datacontainer topic using this instructions; the idea is doing this programatically; does anyone can help me with an example about how to do this ?


thank you so much for your attention


regards


Luis

Replies (2)

photo
1

Hi Luis,

Maybe Nick Duffill can help you with this?

photo
2

Hello Luis

The attached macro file has example routines for finding, asserting, reading and writing an integer property. Hopefully you will be able to see how to work with other value formats from this example.

The CustomPropertyCollection is not indexed by URI, so to find properties you have to iterate over the collection.

The URI for a custom property only needs to be a unique string. URLs are often used, but this does not mean that there is anything at the other end of the URL. The URI and value should be XML-safe to avoid any problems with reading back what has been written especially if it contains any white space.

photo
1

Thanks a lot for your help Nick,

Despite your macro is a good example, i could not to apply this instructions in order to edit a type list property; i mean, i don´t want to create a new property type list; i currently want add new options in a property type list already created. For example if i have a type property list which its name is "cars" and the selection list had "Porsche" and "Ferrari" would wish to add new car names such as "Volkswagen", "Honda", "Ford"; but this time programmatically.

i was testing with correct constants such as "mmCustomPropertyFormatTypeList" and trying the method "AdListOption" but i was not able to make it worked.


I know how to create a new property; but my necessity is to add new options inside a type list property. I beg your pardon but i did not achieve this using your example. i'll be very thankfull if you could explain me this a little bit better.


regards


Luis

photo
1

Hello Luis

I am not sure what might be happening with your code. It is important to make sure that all the options added to a List property are unique. Duplicate options are added to the list but are not displayed.

I added a set of procedures for List properties in the attached example. The demo code asserts a List property the first time, then adds a new option to the list each time after that. If this does not run on your system please let me know if it stops with an error code.

photo
1

I want to thank you Nick your support it was great! finally i was able to make a list option porperty programmatrically!!


Thank you Nick you are the best!!


regards


Luis

---