Design Time problem with Complex Business Object
 
Home My Account Forum Try It! Buy It!
About Contact Us Site Map
StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Design Time problem with Complex Business...Expand / Collapse
Author
Message
Posted 04/02/2008 3:33:30 AM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: Today @ 9:35:22 AM
Posts: 115, Visits: 343
I have an complex Business Object called Companies with a property called rGroups. "rGroups" is also a business object. When I dropped complex Business Object on the form , I 've got the error msg in attached file.

  Post Attachments 
error.bmp (9 views, 932.87 KB)
Post #15311
Posted 04/02/2008 8:02:51 AM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Today @ 3:29:20 PM
Posts: 400, Visits: 1,612
Hi Ertan,

Based on your error, the rGroups BO is doing something that requires the CurrentRow to exist, since that is not the case "CurrentRowIndex: -1" then you get the exception.

Put some validation in your code to check for the BO.Count > 0 to avoid this kind of error.

Edhy Rijo
Progytech (Computer Consultants)
Post #15312
Posted 04/02/2008 8:16:24 AM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: Today @ 9:35:22 AM
Posts: 115, Visits: 343
I've got the error at the design time.
Post #15313
Posted 04/02/2008 8:31:01 AM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Today @ 3:29:20 PM
Posts: 400, Visits: 1,612
I assumed that you have added the custom property to your BO to handle your needs, then that code may be the one triggering the error when the BO is dropped on the form.  If that is the case could you please post the code you added to your BO to help us out identifying this situation?

Edhy Rijo
Progytech (Computer Consultants)
Post #15315
Posted 04/02/2008 9:18:30 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 11:13:06 AM
Posts: 4,104, Visits: 4,176
You need to probably test whether you are in design mode or not.  Also, you need to ensure that this object is created prior to be evaluated.  First, to determine if you are in design mode or not, use the Me.DesignMode property:

If Not Me.DesignMode Then
    '-- Place your logic here
End If

Secondly you have something that evaluating the property probably before it has been created.  This is not a complex property by any means, it is just a simple property exposing another BO.  So be sure that it has been set to a value prior to evaluation and do not let it be evauluated (at least the internal properties) at design-time if an object has not been set.

Post #15320
Posted 04/03/2008 1:26:50 AM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: Today @ 9:35:22 AM
Posts: 115, Visits: 343
Thanks.

I've checked DesignMode and null value.

Post #15360
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 5:33pm

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.141. 12 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.