Bug Report B134126
Visible to All Users

After extending the Application Model with incorrect schema, ModelEditor cannot be opened, even if I remove incorrect code

created 16 years ago

Hi
when i double click at a model inside IDE i get an object or referenc not set
here is the stack

Show previous comments (2)
T T
Tolis Bekiaris [DX-Squad] 16 years ago

    Hi Anatol
    please do the following

    1. Create a new modele
    2. at a new view controller add
         public override Schema GetSchema()
              {
                  string CommonTypeInfos = @"<Element Name=""Application"">
                          <Element Name=""BOModel"" >
                              <Element Name=""Class"" >
                                  <Element Name=""HiddenControlllers"">
                                      <Element Name=""Item"" KeyAttribute=""Name"" DisplayAttribute=""Name"" Multiple=""True"">
                                <Attribute Name=""Name"" IsReadOnly=""true"" IsLocalized=""False"" RefNodeName=""/Application/ActionDesign/Controllers""
                                              Required=""True""/>
                           </Element>
                                  </Element>
                              </Element>
                          </Element>
                      </Element>";
                  return new Schema(new DictionaryXmlReader().ReadFromString(CommonTypeInfos));
              }
    3. Build module and save the new solution file
      4.Double clicke Model and editor opens
      5.Go to Application/BOModel/AboutInfo Node and right click and choose Add HiddenControllers
      6.Go to Application/BOModel/AboutInfo/HiddenControllers right click and choose add item
      7.Check that the name attribude combobox does not have the required values cause of a wrong schema implementations
      8.Close Model editor without saving
      9.Double click the Model Editor again and u get the exception
      10.Close the solution
      11.reopen the solution and double click the Model the exception is still there
      12.close the solution and delete the solution file (*.sln)
      13.Open the cproj file and the exception dissapear
      hope u can reproduce that
    Anatol (DevExpress) 16 years ago

      Hello Apostolis,
      Thank you for your instructions, it allowed me reproduce the problem. In my opinion the fact that the Model Editor cannot be opened for the incorrectly extended model is not a bug. But the problem is that after removing incorrect code, the Model Editor still cannot be opened, and this behavior looks incorrect. We are working on this problem, and will provide you a solution ASAP.
      Thanks,
      Anatol

      Anatol (DevExpress) 16 years ago

        Hello Apostolis,
        We've found the cause of the problem. When you close the Model Editor, the last focused node is saved, and when you try to open the ME again, it cannot set focus to this node, because the schema is incorrect. It causes the exception. When you close the solution, the last focused node is saved to the *.suo file, that's why deleting this file fixes the problem. Unfortunately, we cannot provide you with a workaround. Currently, if you need to extend the schema, I suggest that you remove focus from the unchecked nodes when you close the Model Editor, to avoid this problem.
        Thanks,
        Anatol

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.