String [message #1706603] |
Fri, 28 August 2015 06:04  |
Eclipse User |
|
|
|
Hi all,
I'm trying to launch some methods on Strings in the Gendoc script sth like this
...
[if (lAbs.client.qualifiedName.equalsIgnoreCase(lClass.qualifiedName))]
...
or
...
[if (lAbs.client.qualifiedName->equalsIgnoreCase(lClass.qualifiedName))]
...
but I get the following failure message
The execution of a script failed: Error during generation of Gendoc script :Invalid Expression Type: Bag(Boolean) should be Boolean
...
or
The execution of a script failed: Error during generation of Gendoc script :Cannot find operation (equalsIgnoreCase(String)) for the type (Bag(String))
...
Thx David
|
|
|
Re: String [message #1706617 is a reply to message #1706603] |
Fri, 28 August 2015 07:52   |
Yves BERNARD Messages: 190 Registered: July 2014 |
Senior Member |
|
|
Hi David,
The point is that lClass appears to be a collection (a "Bag") and so, even if this bag contains only one element, lClass.qualifiedName() result in a collection of the same kind (i.e. "Bag) of Strings.
So, you need to change from Bag to a single element. They are number of ways to do it. Basically, you would like to get the unique element of a Bag. This can be done either before you get the qualified name (e.g. lClass->asSequence()->first()) or after (e.g. lClass.qualifiedName->asSequence()->first())
Yves
Yves
[Updated on: Fri, 28 August 2015 07:53] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03759 seconds