Design Time problem with Complex Business Object


Author
Message
Ertan Deniz
Ertan Deniz
StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)
Group: Forum Members
Posts: 163, Visits: 493
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.
Attachments
error.bmp (83 views, 932.00 KB)
Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
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

Ertan Deniz
Ertan Deniz
StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)
Group: Forum Members
Posts: 163, Visits: 493
I've got the error at the design time.
Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
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

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
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.

Ertan Deniz
Ertan Deniz
StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)StrataFrame User (179 reputation)
Group: Forum Members
Posts: 163, Visits: 493
Thanks.

I've checked DesignMode and null value.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search