one reference type not updating

aronmatthew

Well-known member
Joined
Aug 5, 2019
Messages
56
Programming Experience
Beginner
Here a sub set from _shelters is added to groupList. Then each reference in groupList is tagged to its own button. In this case when user clicks the button the reference is updated in the next dialog. When the dialog returns the value is not updating in _shelters, only when the value is the first index of groupList. I see no reasonable explanation for this one case only unless the cast from the button Tag could be causing a problem. Unless an exception is being thrown in the next dialog possibly. Will have to double check. But it's updating in the groupList so that's not likely either.

1745371773282.png


using first index of groupList here is a problem while the remaining indexes are updating ok in the same case
current value
1745372225252.png

groupList value
1745372292561.png

_sheltersValue
1745372348954.png
 
Last edited:
Without seeing your code for your _Fshelter form and how to updates the _shelters, it is impossibe to tell.

What is the relationship of _shelters and _shelter? How does a _shelter instance get added into what is presumably a _shelters collection?

Currently, as it stands now, is even hard to tell how _Fshelter knows about groupList.

To make matters worse, your naming convention is unconventional to say the least. The typical naming convention is that a leading underscore prefix means that a variable is a member of the containing class, but as I vaguely recall when I pointed this out years ago, you said that you like using your own naming convention, where in your case the leading unscore is for private class. Does that mean that _shelters is also a class and not a reference to a collection?

Also, please post code as text in code tags, not a screenshots.
 
The base reference simply just failed to update when both sub references did in this one case only what broke the link to the base reference in this one case is still unknown after stepping through all code.
 
Without seeing your code for your _Fshelter form and how to updates the _shelters, it is impossibe to tell.

What is the relationship of _shelters and _shelter? How does a _shelter instance get added into what is presumably a _shelters collection?

Currently, as it stands now, is even hard to tell how _Fshelter knows about groupList.

To make matters worse, your naming convention is unconventional to say the least. The typical naming convention is that a leading underscore prefix means that a variable is a member of the containing class, but as I vaguely recall when I pointed this out years ago, you said that you like using your own naming convention, where in your case the leading unscore is for private class. Does that mean that _shelters is also a class and not a reference to a collection?

Also, please post code as text in code tags, not a screenshots.

_shelters is the base list where from references are added to groupList. In this one case only when a reference is updated it is only updated in groupList. Although this case can be reduced to simple example successfully similar to the remaining cases here. I can't seem to figure why it fails in this case only.
 
Back
Top Bottom