Question about Csla 3.8b1

Question about Csla 3.8b1

Old forum URL: forums.lhotka.net/forums/t/7794.aspx


CyclingFoodmanPA posted on Thursday, October 15, 2009

Ok, I completed a small application utilizing Csla 3.7.1 and when 3.78b1 was released, I copied the application to another directory and linked with the Csla assemblies (both .NET and SL).  The application is a Silverlight 3.0 application and upon compiling, I am getting a number of errors pertaining to the XAML controls.  For example an error is as follows:

Error 44 The property 'Resource' does not exist on the type 'Button' in the XML namespace 'clr-namespace:Csla.Silverlight;assembly=Csla'. D:\VisualStudio\2008\CSLAVersions\3.8b1\BelAirPricingEF\BelAirPricing\DataEntryControls\NYMEXPricing\NYMEXHistory315Control.xaml 99 8 BelAirPricing

for the control line:
csla:InvokeMethod.Resource="{StaticResource NYMEXHistory315}"

Did something for Silverlight radically change in 3.8b1?

CyclingFoodmanPA

CyclingFoodmanPA replied on Thursday, October 15, 2009

More confusion!  I run the Rolodex example utilizing Csla 3.8b1 and it compiles, but I get runtime errors on the RanksEditor.xaml control on the line
csla:InvokeMethod.Resource="{StaticResource RanksData}"

I got a couple of other runtime errors also, but I wanted to keep it on the same statement - csla:InvokeMethod.Resource as the previous one. 

Any ideas anyone?

CyclingFoodmanPA

 

sergeyb replied on Thursday, October 15, 2009

What errors are you seeing?

 

Sergey Barskiy

Principal Consultant

office: 678.405.0687 | mobile: 404.388.1899

Magenic ®

Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation

 

From: CyclingFoodmanPA [mailto:cslanet@lhotka.net]
Sent: Thursday, October 15, 2009 11:33 AM
To: Sergey Barskiy
Subject: Re: [CSLA .NET] Question about Csla 3.8b1

 

More confusion!  I run the Rolodex example utilizing Csla 3.8b1 and it compiles, but I get runtime errors on the RanksEditor.xaml control on the line
csla:InvokeMethod.Resource="{StaticResource RanksData}"

I got a couple of other runtime errors also, but I wanted to keep it on the same statement - csla:InvokeMethod.Resource as the previous one. 

Any ideas anyone?

CyclingFoodmanPA

 



RockfordLhotka replied on Thursday, October 15, 2009

There are definite breaking changes in the XAML controls going into 3.8. This includes InvokeMethod, which no longer has a 'Resource' property. Instead InvokeMethod binds to the current DataContext and invokes methods on that object.

Jack replied on Thursday, October 15, 2009

Rocky,

Just to confirm - does the object in the DataContext have to derive from a ViewModel<T>?

I'm only planning on exposing my ViewModel<T> derived models as child properties on my UI View.  I had always assumed yes but I hadn't plugged anything in yet.

Thanks

jack

RockfordLhotka replied on Friday, October 16, 2009

I don’t think anything requires the use of ViewModel<T> - that’s just a helper to make it easier to create a viewmodel object.

 

InvokeMethod and Execute have minimal requirements about the method signatures of the methods they can invoke, but that’s true of any similar MVVM UI component, and has no dependency on ViewModel<T>.

 

CyclingFoodmanPA replied on Friday, October 16, 2009

Ok, this answers a number of questions.  I am on a roll now and will stick with 3.7.1 for the production app. I am working on, but will play with 3.8b1 as I always like to play with the latest and greatest.

Keith

Copyright (c) Marimer LLC