|
|
|
Re: [ATL] Problem with stereotype?s property with several values [message #97051 is a reply to message #96925] |
Thu, 11 December 2008 13:41 |
Tristan Faure Messages: 460 Registered: July 2009 |
Senior Member |
|
|
did you try to do debug() after your select maybe you should do a
first() after the select to specify that you want a value and not a
selection
self.getValue(self.getAppliedStereotype(stereotype),tag)
==> sequence
self.getValue(self.getAppliedStereotype(stereotype),tag)->select(c | c =
'value_2')
==> sequence
self.getValue(self.getAppliedStereotype(stereotype),tag)->select(c | c =
'value_2')->first()
==> value
Rasha a écrit :
> I try to copy a class according to the value of its stereotype�s
> property. There is no problem if the property has only one value. But if
> it has more than one value, I want to check if a specific value exists
> among these values.
>
> Property = [value_1, value_2, value_3] If Property has value_2, I�ll
> copy this class.
>
> The getValue() method returns in this case a sequence of value. I want
> to iterate over this sequence to check if value_2 exists.
> In another word, I need to iterate over the result of this method
> self.getValue(self.getAppliedStereotype(stereotype),tag)
> I tried to use
> self.getValue(self.getAppliedStereotype(stereotype),tag)-> select(c | c
> = 'value_2')but it didn't create a target model and didn't raise any
> errors.
>
> Thanks Tristan for your help,
>
> Rasha
>
>
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03964 seconds