locked
ExpenseSample EditPart non-display RRS feed

  • Question

  • Hi,

     

    I am currently working through the ExpenseSample, "Testing the EditPart Part".

     

    When I replace

     

    <my:LineItemPart Name="LineItemPart" xmlns:my="clr-namespace:ExpenseApp" />

     

    with

     

    <my:EditPart Name="EditPart" xmlns:my="clr-namespace:ExpenseApp" />

     

    the application shell display is empty.

     

    Any ideas?

     

     

    Upon closer inspection I noticed the app does not get past this point.

     

            private Expense.IExpenseDataService DataService
            {
                get
                {
      *****  return ((Expense.IExpenseDataService)(this.GetServiceDependency(typeof(Expense.IExpenseDataService), false)));
                }
            }

     

    Thanks

    Monday, August 13, 2007 11:49 AM

Answers

  •  

    Hello,

     

    I was able to repro this issue, including the failure at the point you identify. For me, the cause of the problem was that I'd skipped an earlier step, and neglected to add the data service to Application.xaml (see the 1a document, step 11 in the "To add the services" procedure). This caused the DataService property to return null.

     

    I'm not sure if this is the solution for you, but it seems like there's a reasonable chance that it is. If it isn't, I recommend that you retrace your steps and make sure you didn't skip any other steps. It sometimes happens that accidentally skipping a step will lead to strange issues that are hard to diagnose.

     

    Let me know if this doesn't solve the problem and I will continue to investigate.

     

    Regards,

     

    Karl Erickson

    Acropolis UE

    Friday, August 17, 2007 11:22 PM

All replies

  •  

    Hello,

     

    I was able to repro this issue, including the failure at the point you identify. For me, the cause of the problem was that I'd skipped an earlier step, and neglected to add the data service to Application.xaml (see the 1a document, step 11 in the "To add the services" procedure). This caused the DataService property to return null.

     

    I'm not sure if this is the solution for you, but it seems like there's a reasonable chance that it is. If it isn't, I recommend that you retrace your steps and make sure you didn't skip any other steps. It sometimes happens that accidentally skipping a step will lead to strange issues that are hard to diagnose.

     

    Let me know if this doesn't solve the problem and I will continue to investigate.

     

    Regards,

     

    Karl Erickson

    Acropolis UE

    Friday, August 17, 2007 11:22 PM
  • Hi Karl,

     

    I somehow managed to place the MSExpense.sdf in the wrong folder.

     

    Many thanks for the tip.

     

     

    Tuesday, August 21, 2007 12:18 PM