From: SourceForge.net <no...@so...> - 2010-02-22 17:03:53
|
Bugs item #2533788, was opened at 2009-01-24 12:59 Message generated for change (Settings changed) made by miesfeld You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=684730&aid=2533788&group_id=119701 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: External Functions >Group: Next Release >Status: Open Resolution: Fixed Priority: 5 Private: No Submitted By: Mark Miesfeld (miesfeld) Assigned to: Mark Miesfeld (miesfeld) Summary: ooDialog can create wrong object type for controls Initial Comment: 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. ---------------------------------------------------------------------- Comment By: Mark Miesfeld (miesfeld) Date: 2009-07-13 17:29 Message: Committed revision 4913. Moved all of the 'getControl' logic of the AdvancedControls class into a native API method. That way, the code has access to the real type of the underlying Window control If the actual type does not match the requested type, then .nil is returned. This is logically the same as the user requesting a control with an invalid resource ID. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=684730&aid=2533788&group_id=119701 |