Was iterating through the controls in a window. Crash.
The problem seems to be that doing
for each dc as DesktopControl in self.controls
// do something useful here
next
does not work if there is a DesktopContainer. It appears a DesktopContainer is not a DesktopControl. The issue is that the documentation states that self.controls consists of DesktopControls.
I was able to work around this by iterating through the controls using self.controlAt(i). It was then possible check the type before attempting to do something with it.
For each o As Object in self.Controls
If o isA DesktopControl Then
Var dc As DesktopControl = DesktopControl(o)
break
ElseIf o IsA DesktopContainer Then
Var dct As DesktopContainer = DesktopContainer(o)
Break
Else
MessageBox "What is that?"
Quit
End
Next
I appears I still have editing permissions on https://docs.xojo.com/ - if you tell me what needs changing…
Or is that not the corrent docs site any more? There were so many, I’ve lost track.
Seriously, when it was a Wiki that some of us were trusted with to edit, I often fixed things right when I saw them. This going thru a “feedback” report is not something I’d ever do - too much hassle, and they it still may not happen, or done wrong.