Mercurial > projects > dwt-mac
comparison dwt/accessibility/Accessible.d @ 129:ad4e1fe71a5a
Fixed runtime errors
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sun, 18 Jan 2009 18:39:46 +0100 |
parents | 07399639c0c8 |
children | 0ba75290f8ce |
comparison
equal
deleted
inserted
replaced
128:07399639c0c8 | 129:ad4e1fe71a5a |
---|---|
45 import dwt.accessibility.AccessibleListener; | 45 import dwt.accessibility.AccessibleListener; |
46 import dwt.accessibility.AccessibleControlListener; | 46 import dwt.accessibility.AccessibleControlListener; |
47 import dwt.accessibility.AccessibleTextEvent; | 47 import dwt.accessibility.AccessibleTextEvent; |
48 import dwt.accessibility.AccessibleTextListener; | 48 import dwt.accessibility.AccessibleTextListener; |
49 import dwt.accessibility.SWTAccessibleDelegate; | 49 import dwt.accessibility.SWTAccessibleDelegate; |
50 import dwt.dwthelper.associativearray; | |
50 | 51 |
51 /** | 52 /** |
52 * Instances of this class provide a bridge between application | 53 * Instances of this class provide a bridge between application |
53 * code and assistive technology clients. Many platforms provide | 54 * code and assistive technology clients. Many platforms provide |
54 * default accessible behavior for most widgets, and this class | 55 * default accessible behavior for most widgets, and this class |
87 AccessibleListener[] accessibleListeners; | 88 AccessibleListener[] accessibleListeners; |
88 AccessibleControlListener[] accessibleControlListeners; | 89 AccessibleControlListener[] accessibleControlListeners; |
89 AccessibleTextListener[] accessibleTextListeners; | 90 AccessibleTextListener[] accessibleTextListeners; |
90 Control control; | 91 Control control; |
91 | 92 |
92 HashMap!(int, SWTAccessibleDelegate) children; | 93 SWTAccessibleDelegate[int] children; |
93 | 94 |
94 this (Control control) { | 95 this (Control control) { |
95 | 96 |
96 this.control = control; | 97 this.control = control; |
97 | 98 |
551 attributeNames = null; | 552 attributeNames = null; |
552 if (parameterizedAttributeNames !is null) parameterizedAttributeNames.release(); | 553 if (parameterizedAttributeNames !is null) parameterizedAttributeNames.release(); |
553 parameterizedAttributeNames = null; | 554 parameterizedAttributeNames = null; |
554 | 555 |
555 foreach (childDelegate ; children) | 556 foreach (childDelegate ; children) |
556 childDelegate.internal_dispose_SWTAccessibleDelegate(); | 557 childDelegate.internal_dispose_SWTAccessibleDelegate(); |
557 | 558 |
558 children.clear(); | 559 children.clear(); |
559 } | 560 } |
560 | 561 |
561 cocoa.id getExpandedAttribute(int childID) { | 562 cocoa.id getExpandedAttribute(int childID) { |
1395 /* Check cache for childID, if found, return corresponding osChildID. */ | 1396 /* Check cache for childID, if found, return corresponding osChildID. */ |
1396 SWTAccessibleDelegate childRef = children[childID]; | 1397 SWTAccessibleDelegate childRef = children[childID]; |
1397 | 1398 |
1398 if (childRef is null) { | 1399 if (childRef is null) { |
1399 childRef = new SWTAccessibleDelegate(this, childID); | 1400 childRef = new SWTAccessibleDelegate(this, childID); |
1400 children.add(childID, childRef); | 1401 children.put(childID, childRef); |
1401 } | 1402 } |
1402 | 1403 |
1403 return childRef; | 1404 return childRef; |
1404 } | 1405 } |
1405 | 1406 |