New Posts New Posts RSS Feed: Design Time Data
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Design Time Data

 Post Reply Post Reply
Author
mikedfox View Drop Down
Newbie
Newbie


Joined: 29-Apr-2010
Posts: 21
Post Options Post Options   Quote mikedfox Quote  Post ReplyReply Direct Link To This Post Topic: Design Time Data
    Posted: 29-Apr-2010 at 8:46am
I am using a library which allows for separate services to be called at runtime and design time. This allows me to have my view model return design time data, so that in the designer and blend I can see sample data.
 
Unfortunately, I'm not sure how to make this work with ideablade. At design time, how do I create a dummy object? Anything referencing an EntityManager breaks with
 

Object reference not set to an instance of an object.

at IdeaBlade.Core.IdeaBladeConfig.GetDefaultInstanceForEnvironment() at IdeaBlade.Core.IdeaBladeConfig.InitializeFromSource() at IdeaBlade.Core.IdeaBladeConfig.Initialize() at IdeaBlade.Core.IdeaBladeConfig.get_Instance() at IdeaBlade.Core.IdeaBladeConfig.AssertNonDefaultVersion(Boolean throwIfDefault) at IdeaBlade.EntityModel.EntityManager..ctor(Boolean shouldConnect, String dataSourceExtension, EntityServiceOption entityServiceOption) at IdeaBlade.EntityModel.EntityManager..ctor(Boolean shouldConnect) at DataModel.PowerBillEntityManager..ctor(Boolean shouldConnect) in C:\Documents and Settings\foxm1\My Documents\Visual Studio 10\Projects\SilverlightApplication1\DataModel\PowerBillData.IB.Designer.cs:line 37 at DataModel.State.CreateDesignTime() in C:\Documents and Settings\foxm1\My Documents\Visual Studio 10\Projects\SilverlightApplication1\DataModel\State.cs:line 42 at SilverlightApplication1.Services.DesignTimeDataService.GetStates(ObservableCollection`1 stateList) in C:\Documents and Settings\foxm1\My Documents\Visual Studio 10\Projects\SilverlightApplication1\SilverlightApplication1\Services\DesignTime\DesignTimeDataService.cs:line 35 at SilverlightApplication1.ViewModels.HomeViewModel.GetData() in C:\Documents and Settings\foxm1\My Documents\Visual Studio 10\Projects\SilverlightApplication1\SilverlightApplication1\ViewModels\HomeViewModel.cs:line 68 at SilverlightApplication1.ViewModels.HomeViewModel.OnServicesInjectedOverride() in C:\Documents and Settings\foxm1\My Documents\Visual Studio 10\Projects\SilverlightApplication1\SilverlightApplication1\ViewModels\HomeViewModel.cs:line 57 at MEFedMVVM.Common.BaseViewModel.OnServicesInjected() in D:\installs\MEFedMVVM\MEFedMVVM-47585\MEFedMVVMDemo\MEFedMVVM\Common\BaseViewModel.cs:line 24 at MEFedMVVM.ViewModelLocator.BasicViewModelInializer.TryInjectingServicesToVM(IViewModelMetadata vmMetaData, Object vm, Object containerContext, IEnumerable`1 dataServicesFactories) in D:\installs\MEFedMVVM\MEFedMVVM-47585\MEFedMVVMDemo\MEFedMVVM\ViewModelLocator\ViewModelInializer.cs:line 75

Any ideas? I'd hate to lose the ability to see design time data.

Back to Top
WardBell View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 31-Mar-2009
Location: Emeryville, CA,
Posts: 338
Post Options Post Options   Quote WardBell Quote  Post ReplyReply Direct Link To This Post Posted: 29-Apr-2010 at 6:01pm
Sorry Mike. I ran into this myself and reported it. We are working on it and hope to have it fixed for our next DF 2010 release.
 
I think the problem only exists in SL; it might work in WPF but I haven't checked yet.  I know it worked in DF 2009 with WPF.
 
Regret the inconvenience. Bear with us. Thanks.
Back to Top
WardBell View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 31-Mar-2009
Location: Emeryville, CA,
Posts: 338
Post Options Post Options   Quote WardBell Quote  Post ReplyReply Direct Link To This Post Posted: 05-Aug-2010 at 8:41pm

This issue was resolved in DF 6.0.4. You can now make the web-model assembly name different from the silverlight-model assembly name. AND YOU SHOULD.

Remember: the NAMESPACE must be the same for both SL and Web models but the ASSEMBLY NAMES can and SHOULD DIFFER.
 
If you wrote your application with a template prior to 6.0.4, you'll want to fix the assembly names by hand. This problem should "magically" disappear.
 
The new templates preserve different assembly names for the SL and Web projects.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down