You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by gr...@apache.org on 2020/03/03 16:59:44 UTC

[royale-asjs] branch develop updated: UIComponent is dispatching PREINITIALIZE, (as with Flex), but was missing its [Event] Metadata

This is an automated email from the ASF dual-hosted git repository.

gregdove pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 99f688d  UIComponent is dispatching PREINITIALIZE, (as with Flex), but was missing its [Event] Metadata
     new b9f0c05  Merge branch 'develop' of https://github.com/apache/royale-asjs into develop
99f688d is described below

commit 99f688d01122d1976db8627a25cd0e32c594c209
Author: greg-dove <gr...@gmail.com>
AuthorDate: Wed Mar 4 05:57:41 2020 +1300

    UIComponent is dispatching PREINITIALIZE, (as with Flex), but was missing its [Event] Metadata
---
 .../MXRoyale/src/main/royale/mx/core/UIComponent.as    | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
index 1dacec8..7f745e4 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
@@ -164,21 +164,23 @@ import mx.events.FocusEvent;
 [Event(name="valid", type="mx.events.FlexEvent")]
 
 /**
- *  Dispatched when the component has finished its construction
- *  and has all initialization properties set.
- *
- *  <p>After the initialization phase, properties are processed, the component
- *  is measured, laid out, and drawn, after which the
- *  <code>creationComplete</code> event is dispatched.</p>
+ * The "preinitialize" event gets dispatched after everything about this
+ * UIComponent has been initialized, and it has been attached to
+ * its parent, but before any of its children have been created.
+
+ * <p>This allows a "preinitialize" event handler to set properties which
+ * affect child creation.
+ * Note that this implies that "preinitialize" handlers are called
+ * top-down; i.e., parents before children..</p>
  * 
- *  @eventType mx.events.FlexEvent.INITIALIZE
+ *  @eventType mx.events.FlexEvent.PREINITIALIZE
  *  
  *  @langversion 3.0
  *  @playerversion Flash 9
  *  @playerversion AIR 1.1
  *  @productversion Flex 3
  */
- 
+[Event(name="preinitialize", type="mx.events.FlexEvent")]
 /**
  *  Dispatched when the component has finished its construction
  *  and has all initialization properties set.