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: 2012-01-27 09:25:24
Posts: 3, Visits: 149
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: 2 days ago @ 17:12:46
Posts: 417, Visits: 2 529
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, PeterMorris

Permissions Expand / Collapse

All times are GMT +1:00, Time now is 3:20

Powered By InstantForum.NET v4.1.4 © 2012
Execution: 0,219. 7 queries. Compression Disabled.