OCL variables in ViewModels
 
CapableObjects Forums
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



OCL variables in ViewModels Expand / Collapse
Author
Message
Posted 2010-07-28 09:51:00
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 2 days ago @ 08:42:05
Posts: 3, Visits: 84
Hi!
How can i assign some TYPED (=not string) initial value to my ViewModel OCL-variable in a ViewModel?

- I have a "CreatedAt: DateTime" attribute on my class. In a ViewModel, I use a vCreatedAtateTime variable, and should be initialize it some value, like Today, Now etc. The string value '1234-05-06' works fine, but this not the true, ideal solution.

- What means the "UserData" column in the ViewModel editor?



Sorry for my english, please.
Thanks -- Gabor
Post #5428
Posted 2010-07-29 11:07:59
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: Today @ 10:28:49
Posts: 173, Visits: 2 010
For any ViewModelUserControl you are using there will be a property called ViewModel that returns a Eco.ViewModel.Runtime.ViewModel

And this class has a GetOclVariableValueFromName method that returns the IElement that represents the variable.

Just go ctrl.ViewModel.GetOclVariableValueFromName("TheVar").AsObject=DateTime.Now

Post #5430
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: HansKarlsen, Jonas Hogstrom

Permissions Expand / Collapse

All times are GMT +1:00, Time now is 8:09

Powered By InstantForum.NET v4.1.4 © 2010
Execution: 0,172. 15 queries. Compression Disabled.