In writing my first script for Rose, I am attempting to set the
ContainerClass field for a Java model. Once I have access to the role
which I wish to change this value, but I am having difficulty. I am
pretty sure that I need to create a new attribute and then do a
OverrideProperty("Java", "ContainerClass", "myClass") on the attribute.
Then, by adding this attribute to the role this should make the change
take effect in the model. I am able to change the attribute with the
OverrideProperty method, however I cannot seem to attach the attribute
to a role. What name and value do I give this attribute after it is
created?
Here is some of my code where 'matchRole is the role I wish to alter.
Dim newAttr As Attribute
Set newAttr = ????
'The following line give me an error.
newAttr.OverrideProperty("Java", "ContainerClass",
containerType(current))
'This should then work.
matchRole.Keys.Add newAttr
'Set the cardinality of the association.
matchRole.Cardinality = "0..n"
'Change the contained class.
matchRole.SupplierName = containedClass(current)
Any help is appreciated. Thank you.
David Knight
************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Admin.Subscription Requests: [EMAIL PROTECTED]
* Archive of messages:
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*
* To: [EMAIL PROTECTED]
* Subject:<BLANK>
* Body: unsubscribe rose_forum
*
*************************************************************************