Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: How can I implement myClass.AllInstances?

1 view
Skip to first unread message

Peter Morris

unread,
Jan 15, 2007, 10:41:05 AM1/15/07
to
Why would you want to do that when ECO already has a Class.allInstances
operation?


Pete


jiapi...@qq.com

unread,
Jan 16, 2007, 7:15:15 AM1/16/07
to
"Peter Morris 写道:

"
> Why would you want to do that when ECO already has a Class.allInstances
> operation?
>
>
> Pete
Thanks.
Surpose have a enum type as myEnum , I can set expressionhandle's
expression to "myEnum.allInstances", At runtime ,Eexpressionhandle get
all myEnum vlues.So I want implement a Non ECO class like this,.
Assume have a Non ECO class :
public class MyEnumClass {
public static ArrayList list; //Save MyEnumClass object list
....
}

I want an expressionhandle with set expression to
MyEnumClass.allInstance , I'll get MyEnumClass's list values;
My problem is how to implement the MyEnumClass, if I can set
ExpressionHandle's expression to MyEnum.allinstances

Jan Nord閚 (CodeGear)

unread,
Jan 18, 2007, 1:45:37 AM1/18/07
to
jiapi...@qq.com wrote:

> I have a class :
> public class myClass{
> ...
> public static ArrayList myList; //myList include all instance
> myClass
> }
>
> Put a expressHandle in a Form, I set expression to
> "myClass.allinstance"
>
> How can i get myList array
>
>
> Sorry,I have poor englis.

I am not sure what you are asking here.

One possibility is that you want have the equivalent of "AllInstaces"
from code rather than in OCL, another that you have a non-Eco class,
where you are maintaining a list of all instances, and what it to be
usable from OCL.

--
Jan Nordén
Architect, ECO Team

0 new messages