[Mono-winforms-list] NullReferenceException calling SWF.Control.set_AccessibleRole
Rafael Teixeira
monoman at gmail.com
Wed Aug 30 14:13:21 EDT 2006
Hi Nick,
First, I think you can't disclose such details of infragistics and
.NET code, that you may be obtaining from disassembling their
assemblies. I'm quite sure their licenses prohibit it.
For what I can help...
> But in MWF.Control, as I'm sure you know, it's doing:
>
> public AccessibleRole AccessibleRole {
> set {
> AccessibilityObject.role=value;
> }
>
> That doesn't look like a problem unless the AccessibleObject is for some
> reason not getting initialized before the set.
AcessibilityObject is here a get acessor that lazily creates on first
usage such object using the protected virtual method
CreateAccessibilityInstance to do so, that is why I asked if it was
overriden, as the default implementation simply creates an instance of
the Control.ControlAccessibleObject class, and therefore it never
should return a null (it would throw some other exception if bad
things wen't wrong on creating it).
You could try to put breakpoints by running MWF on .NET/VS, or use
some tracing or console messages while running on Mono to help
pinpoint the location of the probable out-of-order initialization or
race condition.
The good thing about Mono is that you have the sources, so it may be
easier to find the problem and to devise/propose a solution...
:)
--
Rafael "Monoman" Teixeira
---------------------------------------
"The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man." George Bernard Shaw
More information about the Mono-winforms-list
mailing list