Skip to content

Commit 55f849d

Browse files
avm2: Make relatedObject field an accessor for SoftKeyboardEvent
1 parent 10239e1 commit 55f849d

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

core/src/avm2/globals/flash/events/SoftKeyboardEvent.as

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package flash.events
1919
public static const SOFT_KEYBOARD_DEACTIVATE:String = "softKeyboardDeactivate";
2020

2121
// A reference to a display list object that is related to the event.
22-
public var relatedObject: InteractiveObject;
22+
private var _relatedObject: InteractiveObject;
2323

2424
// Indicates whether the change in keyboard status has been triggered by an application (such as programmatic use of requestSoftKeyboard()) or by the user (such as selecting a text field).
2525
private var _triggerType: String;
@@ -40,14 +40,19 @@ package flash.events
4040
// Returns a string that contains all the properties of the SoftKeyboardEvent object.
4141
override public function toString():String
4242
{
43-
return this.formatToString("SoftKeyboardEvent","type","bubbles","cancelable","eventPhase","relatedObjectVal","triggerTypeVal", "activating");
43+
return this.formatToString("SoftKeyboardEvent","type","bubbles","cancelable","eventPhase","relatedObject","triggerType");
4444
}
4545

46-
public function get triggerType() : String
47-
{
46+
public function get relatedObject():InteractiveObject {
47+
return this._relatedObject;
48+
}
49+
public function set relatedObject(value:InteractiveObject):void {
50+
this._relatedObject = value;
51+
}
52+
53+
public function get triggerType():String {
4854
return this._triggerType;
4955
}
50-
5156
}
5257
}
5358

0 commit comments

Comments
 (0)