Index Out of Range Exception


Author
Message
Nikki Chase
Nikki Chase
StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)
Group: Forum Members
Posts: 13, Visits: 18
I am evaluating your Framework and really have enjoyed playing with it all weekend. I have a simple form set up and when I add a new record and then undo before saving I recieve an Index out of Range Exception.

I looked at your sample app which behaves properly and think I have thing's configred the same however I can't seem to find the problem. Any ideas on what may be wrong.

Also are parent-child-grandchild BO relationship's supported on one entry form?

Great Job so far!! I tried to use Mere Mortals and I guess I am just not that good of a developerSmile

Gary C Wynne
Gary C Wynne
StrataFrame Beginner (30 reputation)StrataFrame Beginner (30 reputation)StrataFrame Beginner (30 reputation)StrataFrame Beginner (30 reputation)StrataFrame Beginner (30 reputation)StrataFrame Beginner (30 reputation)StrataFrame Beginner (30 reputation)StrataFrame Beginner (30 reputation)StrataFrame Beginner (30 reputation)
Group: Forum Members
Posts: 26, Visits: 236
Hi Nikki

>I have a simple form set up and when I add a new record and then undo before saving I recieve an Index out of Range Exception.

I believe that the version of the framework you have is likely the cause of this issue. I had a similar problem a few months ago that I reported to the StrataBoys and they promptly fixed it Smile

So, don't worry, it's likely that you aren't doing anything wrong.

>Also are parent-child-grandchild BO relationship's supported on one entry form?

This is just a conceptual hurdle really. You could have more or less any depth of relationship on any form. In a SF business object, you have the concept of a "parent BO". So, a grandchild BO has a parent; a child BO has a parent and so on. When you try to create this sort of relationship on a form, the main thing you have to consider is the propagation of the parent's primary key as the foreign key in the child BO. If the relationships are set up between the BOs, then SF will take care of this for you in inasmuch as SF will force a parent record to be committed before the child, if the child is relying on the parent's PK for its own FK value. This is usually the case if you are using something like SQL server and PKs are being generated by the use of identity columns in the SQL server tables. So, the PK/FK issues are taken care of for you by SF.

Another thing to consider is the reselection of your grandchild records if you move a child record, and the reselection of child records if you move the parent record. This can be achieved by a couple of carefully placed "Navigated" event handlers. When the parent record moves, you handle this event and reselect the child records. When each child record moves, you handle that BO's navigated event and reselect the grandchild records.

I say "reselect" here deliberately. In SF, you can have a parent BO effectively "filter" matching child records. However, this is filtering existing records in the child BO, if you want to get the "latest" child records on the server, then you would need to Fill or Append these records from the server into the child BO.

>Great Job so far!! I tried to use Mere Mortals and I guess I am just not that good of a developer

Its got precious little to do with how good a developer you are. IMHO, Mere Mortals is not intuitive or easy to learn for a new user. So, don't beat yourself up about it Wink

Best

-=Gary


StrataFrame Team
S
StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Nikki,



Yes, there is an issue in that pre-release of the framework with the refreshing of the bound controls... the ListChanged event is handled differently by the CurrencyManager and it tries to refresh the bound controls before the CurrentRowIndex has been set to a valid record. We've fixed the problem, and it will be released with the official 1.4 release which is scheduled for Friday.



Ben
Nikki Chase
Nikki Chase
StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)StrataFrame Beginner (13 reputation)
Group: Forum Members
Posts: 13, Visits: 18
Thanks Gary,

I really do like this Framework it reminds me of when I first started using Max Frame in VFP. I  

I was very eager when I head about Mere Mortals and then discouraged, but after playing with this framework I am excited about .Net once again.

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