Recommendation needed how to implement a special delete behaviour
 
CapableObjects Forums
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        


«««123

Recommendation needed how to implement a... Expand / Collapse
Author
Message
Posted 2010-03-10 03:59:05
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Today @ 05:01:26
Posts: 129, Visits: 4 817
Here is my IDataErrorInfo wrapper stuff for Eco. The sample project is fairly cheesey because I was just slapping a simple view to show the object in error and some quick and dirty ways to make it happy. Add a line and see if you can make it error free - if you can the Constrained Save button will come on.

There is one thing I am really not happy with but just could not figure out how to do better and still get this in tonight. I am using a timer event to fire running the dirty objects and test their Constraints because I could not find an Event in any of the Eco services that fired everytime any attribute or association changes on any object. I kind of concluded that there may have never been a request by anyone to get that - and I didn't want to take the time to add my own object by object watcher. Maybe I just missed it and someone can tell me about a way to do this. I guess I also assume that a stack of subscriptions would do the trick but again that is more than I wanted to do for this sample.

Also, the Command wrapper I have is all WPF specific so I will have to make a WPF sample to show how that works.

Rick Weyrauch

Post #4987
Posted 2010-03-12 03:31:15
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: Today @ 05:01:26
Posts: 129, Visits: 4 817
Got some advice (thanks Demitry) and through a little Eco magic, and some of my own, I have removed the timer crap from the sample. A new and improved sample is now attached.

I didn't add many comments and there may be a need to use Weak References that I have not explored yet - the way I did it I htink they might not be necessary.(?)

Enjoy...

Rick Weyrauch

  Post Attachments 
Sample.zip (5 views, 41,00 KB)

Post #5000
« Prev Topic | Next Topic »

«««123

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 4:05

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