This is intended for a post-4.0.0 fix.
The way the ooDialog code is structured makes it easy to create the wrong ooDialog class instance for dialog controls.
An ooDialog dialog control object is created from the resource ID and what the programmer says the object is. For instance:
rb = self~getRadioControl(400)
to get a RadioButton object.
But, if the 400 ID is actually the ID of say, a list-view control, then we end up with an object that has the methods of a RadioButton object, but actually maps to list-view control. This causes incorrect results for most method invocations on the object, to say the least.
ooDialog already has the paradigm of returning .nil for a request to 'get' some type of control when the request is made before the underlying dialog has been created. With the new APIs this can be easily extended to check that the underlying dialog control will actually map to the ooDialog object requested. Return .nil if it doesn't.