Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Annoying parsing bug in VS.NET
Message
From
10/09/2004 14:53:34
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Annoying parsing bug in VS.NET
Miscellaneous
Thread ID:
00941170
Message ID:
00941170
Views:
45
I am pretty new to MM, but my colleague and I recently discovered an annoying bug in the VS.NET parser. We are both running MS VS.NET 2003.

What we found was, that if we were registering a business object on a winform derived directly from OakLeaf.MM.Main.Windows.Forms.mmMaintenanceForm, if we registered the object with the form in the form's constructor using,

this.testBizObj = (aBizObj)this.RegisterPrimaryBizObj(new aBizObj());

We could bind a DataGrid control by clicking on the "…" button in the DataGrid's Binding Source property and selecting aBizObj.

If a blank was inserted before the new, however, so that the code looked like,

this.testBizObj = (aBizObj)this.RegisterPrimaryBizObj( new aBizObj());

then aBizObj no longer appeared in the Binding Source Selection dialog. Further, manually typing aBizObj's classname into BindingSource and aBizObj.TableName into the BindingSourceMember property didn't bind the DataTable in aBizObj to the DataGrid.

Removing the superfluous blank fixed the problem. It seems to be a parsing bug in VS.NET 2003. I wanted to post it in this forum in case anyone else came across it, since we spent a while scrutinizing the constructor for aBizObj and wondering where we went wrong.

My colleague likes the open, airy style of,

this.testBizObj = ( aBizObj ) this.RegisterPrimaryBizObj ( new aBizObj() );

while I am more compact. For other claustrophobic coders, be warned.
David S. Alexander
Kettley Publishing
20271 SW Birch Street, 2nd Floor
Newport Beach, CA 92660-1752
Next
Reply
Map
View

Click here to load this message in the networking platform