To prevent possible data loss before loading the designer, the following errors must be...

  • Thread starter Thread starter Kanjoo Imran
  • Start date Start date
K

Kanjoo Imran

Guest
I had written a code a couple of months ago and had used sqlce. Now I have lost the code and I have decompiled the code from exe using Telerik just decompiler. Now the Sulition is building well and shows all of the forms etc. But when I open the designer it says

To prevent possible data loss before loading the designer, the following errors must be resolved:

The variable items3 is either undeclared or was never assigned.

The variable dropDownItems is either undeclared or was never assigned.

etc although in my code all of the above variables are declared and values have been assigned. A part of the code showing the declaration of the above varialbes are like this

ToolStripItemCollection items3 = this.menuStrip1.Items;
ToolStripItem[] toolStripItemArray = new ToolStripItem[] { this.phoneToolStripMenuItem,this.loadNumbersToolStripMenuItem,this.generateNumbersToolStripMenuItem,this.optionToolStripMenuItem, this.optionsToolStripMenuItem,this.helpToolStripMenuItem };
items3.AddRange(toolStripItemArray);

ToolStripItemCollection dropDownItems = this.phoneToolStripMenuItem.DropDownItems;
ToolStripItem[] toolStripItemArray1 = new ToolStripItem[] { this.detectToolStripMenuItem, this.connectToolStripMenuItem, this.disconnectToolStripMenuItem };
dropDownItems.AddRange(toolStripItemArray1);

ToolStripItemCollection toolStripItemCollections = this.loadNumbersToolStripMenuItem.DropDownItems;
ToolStripItem[] toolStripItemArray2 = new ToolStripItem[] { this.fromFileToolStripMenuItem, this.fromGroupToolStripMenuItem, this.oLXDataToolStripMenuItem };
toolStripItemCollections.AddRange(toolStripItemArray2);

I think the parameters have been declared and assigned values but I dont know why it is giving such errors.

Work around:

I have removed the bin, closed the designer, cleaned the solution and tried rebuild but not successful. I will appreciate if any body help me resolve this issue.



The variable toolStripItemCollections is either undeclared or was never assigned.

Continue reading...
 
Back
Top