Information générale
Catégorie:
The Mere Mortals .NET Framework
>>Jeff,
>>
>>>I think I've successfully built the Jump Start for Windows Forms Application in C# (everything except this error handling works).
>>>
>>>In the final step (Testing the Customer Orders Form - C#) when I clear out the Customer ID field and press the save button I get the following:
>>>
>>>Object reference not set to an instance of an object.
>>> at OakLeaf.MM.Main.Windows.Forms.mmBusinessForm.SetErrorProvider(mmErrorProviderArgs arg)
>>> at OakLeaf.MM.Main.Windows.Forms.mmBusinessForm.DisplayErrorProviderRules(mmBusinessRuleBase bizRule)
>>> at OakLeaf.MM.Main.Windows.Forms.mmBusinessForm.DisplayBrokenRules(mmBusinessRule bizRule)
>>> at OakLeaf.MM.Main.Windows.Forms.mmBusinessForm.PostSaveProcessing(mmBusinessObject bizObj, String tableName, mmSaveDataResult result)
>>> at OakLeaf.MM.Main.Windows.Forms.mmBusinessForm.Save(mmBusinessObject bizObj, String tableName)
>>> at OakLeaf.MM.Main.Windows.Forms.mmButtonHelper.SaveHandler(Object button, String bindingSource, String bindingSourceMember, mmBaseBusinessObject& bizObj)
>>> at OakLeaf.MM.Main.Windows.Forms.mmButtonSave.mmButtonSave_Click(Object sender, EventArgs e)
>>
>>Looks like you're getting an error when trying to display a broken rule. I recommend setting a breakpoint in mmBusinessForm.SetErrorProvider() to see what is causing the error. Do you know which rule is being broken and why?
>>
>>Best Regards,
>*******************************************
>*******************************************
>*******************************************
>Kevin,
>
>I'm really new at this and I'm quite confused.
>
>To trace through mmBusinessForm.SetErrorProvider don't I need to add that project to my solution? I've done and I get the following error when I build:
>
>Error 1 Cryptographic failure while signing assembly 'C:\Program Files\Mere Mortals .NET Framework 2008\Mere Mortals Framework\obj\Debug\OakLeaf.MM2008.Framework.dll' -- 'Error reading key file 'c:\Program Files\Mere Mortals .NET Framework 2008\Mere Mortals Framework\keyPair.snk' -- The system cannot find the file specified. ' Mere Mortals Framework
*******************************************
*******************************************
*******************************************
Ok, I reviewed your videos and found out how to exclude a project from the Build process. I can build, but I cannot edit mmBusinessForm.cs to put the breakpoint in because I get the following error:
The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes in the file: mmBusinessForm --- The base class 'OakLeaf.MM.Main.Windows.Forms.mmEntityBusinessForm' could not be loaded. Ensure the assembly has been referenced and that all projects have been built.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement