Thanks Pashmina, If this makes things easier for porting from Flex to Jewel, then implementing it inside Jewel could still be an option. But if a workaround is easy then that's also probably what others would have done in the past for porting work.
Cheers, Greg On Wed, Jan 22, 2025 at 3:22 AM Harbs <harbs.li...@gmail.com> wrote: > Thank you. > > Don’t get scared off from committing improvements, but discussing things > is always a good idea. :-) > > Best, > Harbs > > > On Jan 21, 2025, at 12:57 PM, Pashmina Kazi <pashminak...@gmail.com> > wrote: > > > > Hi Harbs and Greg, > > > > I don't know that my change will affect any third party's application, > > I am so sorry for that. > > I will use a workaround for ParentApplication in my project. > > I have reverted my change, next time I ask first before committing sorry > > again, > > > > Thanks and regards, > > Pushmina kazi. > > > > > > On Tue, Jan 21, 2025, 1:49 AM Greg Dove <greg.d...@gmail.com> wrote: > > > >> Hi Pashmina, > >> > >> I agree with Harbs, here. This is quite a big change for a low > level/base > >> class like UIBase. > >> The problem with this change is that because it is so low level it > affects > >> everybody and will break a lot of established projects, and because > UIBase > >> was not intended to have this included at the outset (which is clear by > >> having it implemented in other sets like createjs or MXRoyale, and not > in > >> UIBase). > >> It's not that there can't be changes to UIBase, it's more that they need > >> shared scrutiny and shared input/agreement, because of the greater risk > of > >> breaking changes that can impact the wider community. > >> > >> I've worked on projects porting to Jewel from Flex before and was able > to > >> avoid this, but of course you might be facing something different in > your > >> case. What types of view classes were you seeing problems with? > >> > >> If it is unavoidable to add this code, then a more community-oriented > >> solution may be to find a lower level class inside Jewel and add it > >> there, similar to how it was previously supported in MXRoyale, or to > create > >> a new intermediate base class inside Jewel where this can be added (like > >> createjs). > >> If you look inside Jewel, there is only one class that directly extends > >> this UIBase, for example (although that doesn't mean it will be 'easy' > >> depending on how many other core/basic classes are extended in other > Jewel > >> components). If you can provide examples of what you are trying to > solve, > >> perhaps we can all find a more Jewel-centric solution. > >> > >> Cheers, > >> Greg > >> > >> > >> On Tue, Jan 21, 2025 at 9:26 AM Harbs <harbs.li...@gmail.com> wrote: > >> > >>> That is not PAYG. > >>> > >>> Can you explain more why you need parentApplication? > >>> > >>> I have many, many apps and I never needed parentApplication. You can > >>> easily keep a reference to your main application in many different > ways. > >>> > >>> You broke any third party code which extends any of the core components > >>> with this change. That’s not something we want to do lightly. > >>> > >>> Thanks, > >>> Harbs > >>> > >>>> On Jan 20, 2025, at 11:02 AM, Pashmina Kazi <pashminak...@gmail.com> > >>> wrote: > >>>> > >>>> Hi Harbs, > >>>> > >>>> Sorry for the late reply and sorry for the change, > >>>> > >>>> We are porting Flex application in jewel so i need ParentApplication > >>>> property in UIBase, because in jewel we are using UIBase instead of > >>>> UIComponent that why i have to add mxmlDocument and other stuff to > >>> achieve > >>>> the functionality of ParentApplication. > >>>> > >>>> Thanks and regards, > >>>> Pushmina kazi > >>>> > >>>> On Mon, Jan 20, 2025, 3:36 AM Harbs <harbs.li...@gmail.com> wrote: > >>>> > >>>>> Pashmina, > >>>>> > >>>>> Please respond to my questions. It’s important to understand if there > >>> was > >>>>> a good technical reason for this change. > >>>>> > >>>>> Thanks, > >>>>> Harbs > >>>>> > >>>>>> On Jan 17, 2025, at 3:46 PM, Harbs <harbs.li...@gmail.com> wrote: > >>>>>> > >>>>>> Also: > >>>>>> > >>>>>> Any breaking changes really should be discussed before committing. > >>>>>> > >>>>>>> On Jan 17, 2025, at 2:58 PM, Harbs <harbs.li...@gmail.com> wrote: > >>>>>>> > >>>>>>> I just noticed this: > >>>>>>> > >>>>>>>> mxmlDocument in UIBase > >>>>>>> > >>>>>>> > >>>>>>> UIBase is not **supposed** to have mxmlDocument. > >>>>>>> > >>>>>>> Why was this done/changed? > >>>>>>> > >>>>>>>> On Jan 13, 2025, at 10:58 PM, pushminak...@apache.org wrote: > >>>>>>>> > >>>>>>>> This is an automated email from the ASF dual-hosted git > repository. > >>>>>>>> > >>>>>>>> pushminakazi 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 9bf2aac596 Added parentApplication and mxmlDocument in > >> UIBase > >>>>> and some other changes > >>>>>>>> 9bf2aac596 is described below > >>>>>>>> > >>>>>>>> commit 9bf2aac59699b4b29517d12727253b92aa684511 > >>>>>>>> Author: pashminakazi <pashminak...@gmail.com> > >>>>>>>> AuthorDate: Tue Jan 14 01:54:49 2025 +0500 > >>>>>>>> > >>>>>>>> Added parentApplication and mxmlDocument in UIBase and some other > >>>>> changes > >>>>>>>> --- > >>>>>>>> .../projects/Basic/src/main/royale/BasicClasses.as | 3 + > >>>>>>>> .../royale/org/apache/royale/core/IChildList.as | 301 > >>>>> +++++++++++++++++++++ > >>>>>>>> .../royale/org/apache/royale/core/IUIBaseBasic.as} | 9 +- > >>>>>>>> .../main/royale/org/apache/royale/core/UIBase.as | 252 > >>>>> +++++++++++++++++ > >>>>>>>> .../html/supportClasses/TextFieldItemRenderer.as | 33 +++ > >>>>>>>> .../org/apache/royale/managers/ISystemManager.as | 135 +++++++++ > >>>>>>>> .../main/royale/org/apache/royale/core/IUIBase.as | 7 + > >>>>>>>> .../royale/org/apache/royale/core/UIButtonBase.as | 33 +++ > >>>>>>>> .../royale/org/apache/royale/jewel/DateField.as | 86 +++++- > >>>>>>>> .../AdvancedDataGridItemRenderer.as | 4 +- > >>>>>>>> .../dataGridClasses/DataGridItemRenderer.as | 4 +- > >>>>>>>> .../src/main/royale/mx/core/UIComponent.as | 8 +- > >>>>>>>> .../src/main/royale/mx/managers/SystemManager.as | 28 +- > >>>>>>>> .../src/main/royale/mx/core/IUIComponent.as | 4 +- > >>>>>>>> 14 files changed, 889 insertions(+), 18 deletions(-) > >>>>>>>> > >>>>>>>> diff --git > >>> a/frameworks/projects/Basic/src/main/royale/BasicClasses.as > >>>>> b/frameworks/projects/Basic/src/main/royale/BasicClasses.as > >>>>>>>> index 91a45a7911..16ed5c9cad 100644 > >>>>>>>> --- a/frameworks/projects/Basic/src/main/royale/BasicClasses.as > >>>>>>>> +++ b/frameworks/projects/Basic/src/main/royale/BasicClasses.as > >>>>>>>> @@ -365,6 +365,9 @@ internal class BasicClasses > >>>>>>>> } > >>>>>>>> > >>>>>>>> import org.apache.royale.html.SimpleTextHighlighter; > >>>>> SimpleTextHighlighter; > >>>>>>>> + import org.apache.royale.managers.ISystemManager; > >> ISystemManager; > >>>>>>>> + import org.apache.royale.core.IChildList; IChildList; > >>>>>>>> + import org.apache.royale.core.IUIBaseBasic; IUIBaseBasic; > >>>>>>>> } > >>>>>>>> > >>>>>>>> } > >>>>>>>> diff --git > >>>>> > >>> > >> > a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/IChildList.as > >>>>> > >>> > >> > b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/IChildList.as > >>>>>>>> new file mode 100644 > >>>>>>>> index 0000000000..5bcc0bd44a > >>>>>>>> --- /dev/null > >>>>>>>> +++ > >>>>> > >>> > >> > b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/IChildList.as > >>>>>>>> @@ -0,0 +1,301 @@ > >>>>>>>> > >>>>> > >>> > >> > +//////////////////////////////////////////////////////////////////////////////// > >>>>>>>> +// > >>>>>>>> +// Licensed to the Apache Software Foundation (ASF) under one or > >>> more > >>>>>>>> +// contributor license agreements. See the NOTICE file > >> distributed > >>>>> with > >>>>>>>> +// this work for additional information regarding copyright > >>>>> ownership. > >>>>>>>> +// The ASF licenses this file to You under the Apache License, > >>>>> Version 2.0 > >>>>>>>> +// (the "License"); you may not use this file except in > >> compliance > >>>>> with > >>>>>>>> +// the License. You may obtain a copy of the License at > >>>>>>>> +// > >>>>>>>> +// http://www.apache.org/licenses/LICENSE-2.0 > >>>>>>>> +// > >>>>>>>> +// Unless required by applicable law or agreed to in writing, > >>>>> software > >>>>>>>> +// distributed under the License is distributed on an "AS IS" > >>> BASIS, > >>>>>>>> +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express > >> or > >>>>> implied. > >>>>>>>> +// See the License for the specific language governing > >> permissions > >>>>> and > >>>>>>>> +// limitations under the License. > >>>>>>>> +// > >>>>>>>> > >>>>> > >>> > >> > +//////////////////////////////////////////////////////////////////////////////// > >>>>>>>> + > >>>>>>>> +package org.apache.royale.core > >>>>>>>> +{ > >>>>>>>> + > >>>>>>>> +COMPILE::SWF > >>>>>>>> +{ > >>>>>>>> + import flash.display.DisplayObject; > >>>>>>>> +} > >>>>>>>> +import org.apache.royale.core.IUIBase; > >>>>>>>> + > >>>>>>>> +/** > >>>>>>>> + * The IChildList interface defines the properties and methods > >>>>>>>> + * for accessing and manipulating child lists, which are subsets > >>>>>>>> + * of a DisplayObjectContainer's children. > >>>>>>>> + * > >>>>>>>> + * <p>As an example, consider the Container class. > >>>>>>>> + * It overrides DisplayObjectContainer APIs such as the > >>>>>>>> + * <code>numChildren</code> and <code>getChildAt()</code> > methods > >>>>>>>> + * to access only "content" children, which are the controls > >>>>>>>> + * and other containers that you put inside it. > >>>>>>>> + * But a Container can also have additional children > >>>>>>>> + * created automatically by the framework, such as a background > >> or > >>>>> border > >>>>>>>> + * skin and scrollbars. > >>>>>>>> + * So Container exposes a property called > >> <code>rawChildren</code> > >>>>>>>> + * of type IChildList, which lets you access all its children, > >>>>>>>> + * not just the content children.</p> > >>>>>>>> + * > >>>>>>>> + * <p>As another example, the SystemManager class is a > >>>>> DisplayObjectContainer > >>>>>>>> + * whose children are partitioned into various layers: > >>>>>>>> + * normal children like the Application are on the bottom, > >>>>>>>> + * popups above them, tooltips above them, and cursors on the > >> top. > >>>>>>>> + * The SystemManager class has properties named > >>>>> <code>popUpChildren</code>, > >>>>>>>> + * <code>toolTipChildren</code>, and <code>cursorChildren</code> > >>>>>>>> + * which let you access these layers, and the type of each of > >> these > >>>>>>>> + * properties is IChildList. > >>>>>>>> + * Therefore, you can count the number of popups using the > >>>>>>>> + * <code>systemManager.popUpChildren.numChildren</code> > property, > >>>>>>>> + * insert another DisplayObject into the tooltip layer using the > >>>>>>>> + * <code>systemManager.toolTipChildren.addChild()</code> method, > >>> and > >>>>> so on.</p> > >>>>>>>> + * > >>>>>>>> + * @see mx.core.Container#rawChildren > >>>>>>>> + * @see mx.managers.SystemManager#rawChildren > >>>>>>>> + * @see mx.managers.SystemManager#popUpChildren > >>>>>>>> + * @see mx.managers.SystemManager#toolTipChildren > >>>>>>>> + * @see mx.managers.SystemManager#cursorChildren > >>>>>>>> + * > >>>>>>>> + * @langversion 3.0 > >>>>>>>> + * @playerversion Flash 9 > >>>>>>>> + * @playerversion AIR 1.1 > >>>>>>>> + * @productversion Flex 3 > >>>>>>>> + */ > >>>>>>>> +public interface IChildList > >>>>>>>> +{ > >>>>>>>> + > >>>>> > >>> > >> > //-------------------------------------------------------------------------- > >>>>>>>> + // > >>>>>>>> + // Properties > >>>>>>>> + // > >>>>>>>> + > >>>>> > >>> > >> > //-------------------------------------------------------------------------- > >>>>>>>> + > >>>>>>>> + //---------------------------------- > >>>>>>>> + // numChildren > >>>>>>>> + //---------------------------------- > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * The number of children in this child list. > >>>>>>>> + * > >>>>>>>> + * @langversion 3.0 > >>>>>>>> + * @playerversion Flash 9 > >>>>>>>> + * @playerversion AIR 1.1 > >>>>>>>> + * @productversion Flex 3 > >>>>>>>> + */ > >>>>>>>> + function get numChildren():int; > >>>>>>>> + > >>>>>>>> + > >>>>> > >>> > >> > //-------------------------------------------------------------------------- > >>>>>>>> + // > >>>>>>>> + // Methods > >>>>>>>> + // > >>>>>>>> + > >>>>> > >>> > >> > //-------------------------------------------------------------------------- > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * Adds a child DisplayObject after the end of this child > >> list. > >>>>>>>> + * > >>>>>>>> + * <p>Calling <code>childList.addChild(child)</code> is the > >> same > >>>>> as calling > >>>>>>>> + * <code>childList.addChild(child, > >> childList.numChildren)</code> > >>>>>>>> + * After it has been added, its index of the new child > >>>>>>>> + * will be <code>(child.numChildren - 1)</code></p> > >>>>>>>> + * > >>>>>>>> + * @param child The DisplayObject to add as a child. > >>>>>>>> + * > >>>>>>>> + * @return The child that was added; this is the same > >>>>>>>> + * as the argument passed in. > >>>>>>>> + * > >>>>>>>> + * @langversion 3.0 > >>>>>>>> + * @playerversion Flash 9 > >>>>>>>> + * @playerversion AIR 1.1 > >>>>>>>> + * @productversion Flex 3 > >>>>>>>> + */ > >>>>>>>> + [SWFOverride(params="flash.display.DisplayObject", > >>>>> altparams="org.apache.royale.core.UIBase", > >>>>> returns="flash.display.DisplayObject")] > >>>>>>>> + function addChild(child:IUIBase):IUIBase; > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * Adds a child DisplayObject to this child list at the > index > >>>>> specified. > >>>>>>>> + * An index of 0 represents the beginning of the DisplayList, > >>>>>>>> + * and an index of <code>numChildren</code> represents the > >> end. > >>>>>>>> + * > >>>>>>>> + * <p>Adding a child anywhere except at the end of a child > >> list > >>>>>>>> + * will increment the indexes of children that were > previously > >>>>>>>> + * at that index or at higher indices.</p> > >>>>>>>> + * > >>>>>>>> + * @param child The DisplayObject to add as a child. > >>>>>>>> + * > >>>>>>>> + * @param index The index to add the child at. > >>>>>>>> + * > >>>>>>>> + * @return The child that was added; this is the same > >>>>>>>> + * as the <code>child</code> argument passed in. > >>>>>>>> + * > >>>>>>>> + * @langversion 3.0 > >>>>>>>> + * @playerversion Flash 9 > >>>>>>>> + * @playerversion AIR 1.1 > >>>>>>>> + * @productversion Flex 3 > >>>>>>>> + */ > >>>>>>>> + [SWFOverride(params="flash.display.DisplayObject,int", > >>>>> altparams="org.apache.royale.core.UIBase,int", > >>>>> returns="flash.display.DisplayObject")] > >>>>>>>> + function addChildAt(child:IUIBase, index:int):IUIBase; > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * Removes the specified child DisplayObject from this child > >>>>> list. > >>>>>>>> + * > >>>>>>>> + * <p>Removing a child anywhere except from the end of a > child > >>>>> list > >>>>>>>> + * will decrement the indexes of children that were at higher > >>>>> indices.</p> > >>>>>>>> + * > >>>>>>>> + * <p>The removed child will have its parent set to null and > >>> will > >>>>> be > >>>>>>>> + * garbage collected if no other references to it exist.</p> > >>>>>>>> + * > >>>>>>>> + * @param child The DisplayObject to remove. > >>>>>>>> + * > >>>>>>>> + * @return The child that was removed; this is the same > >>>>>>>> + * as the argument passed in. > >>>>>>>> + * > >>>>>>>> + * @langversion 3.0 > >>>>>>>> + * @playerversion Flash 9 > >>>>>>>> + * @playerversion AIR 1.1 > >>>>>>>> + * @productversion Flex 3 > >>>>>>>> + */ > >>>>>>>> + [SWFOverride(params="flash.display.DisplayObject", > >>>>> altparams="mx.core.UIComponent", > >> returns="flash.display.DisplayObject")] > >>>>>>>> + function removeChild(child:IUIBase):IUIBase; > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * Removes the child DisplayObject at the specified index > >>>>>>>> + * from this child list. > >>>>>>>> + * > >>>>>>>> + * <p>Removing a child anywhere except from the end of a > child > >>>>> list > >>>>>>>> + * will decrement the indexes of children that were at higher > >>>>> indices.</p> > >>>>>>>> + * > >>>>>>>> + * <p>The removed child will have its parent set to null and > >>>>> will be > >>>>>>>> + * garbage collected if no other references to it exist.</p> > >>>>>>>> + * > >>>>>>>> + * @param index The child index of the DisplayObject to > >> remove. > >>>>>>>> + * > >>>>>>>> + * @return The child that was removed. > >>>>>>>> + * > >>>>>>>> + * @langversion 3.0 > >>>>>>>> + * @playerversion Flash 9 > >>>>>>>> + * @playerversion AIR 1.1 > >>>>>>>> + * @productversion Flex 3 > >>>>>>>> + */ > >>>>>>>> + [SWFOverride(returns="flash.display.DisplayObject")] > >>>>>>>> + function removeChildAt(index:int):IUIBase; > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * Gets the child DisplayObject at the specified index in > this > >>>>> child list. > >>>>>>>> + * > >>>>>>>> + * @param index An integer from 0 to <code>(numChildren - > >>>>> 1)</code> > >>>>>>>> + * that specifies the index of a child in this child list. > >>>>>>>> + * > >>>>>>>> + * @return The child at the specified index. > >>>>>>>> + * > >>>>>>>> + * @langversion 3.0 > >>>>>>>> + * @playerversion Flash 9 > >>>>>>>> + * @playerversion AIR 1.1 > >>>>>>>> + * @productversion Flex 3 > >>>>>>>> + */ > >>>>>>>> + [SWFOverride(returns="flash.display.DisplayObject")] > >>>>>>>> + function getChildAt(index:int):IUIBase; > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * Gets the child DisplayObject with the specified name > >>>>>>>> + * in this child list. > >>>>>>>> + * > >>>>>>>> + * @param name The name of the child to return. > >>>>>>>> + * > >>>>>>>> + * @return The child with the specified name. > >>>>>>>> + * > >>>>>>>> + * @langversion 3.0 > >>>>>>>> + * @playerversion Flash 9 > >>>>>>>> + * @playerversion AIR 1.1 > >>>>>>>> + * @productversion Flex 3 > >>>>>>>> + */ > >>>>>>>> + [SWFOverride(returns="flash.display.DisplayObject")] > >>>>>>>> + function getChildByName(name:String):IUIBase; > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * Gets the index of a specific child in this child list. > >>>>>>>> + * > >>>>>>>> + * <p>The first child in the child list has an index of 0, > >>>>>>>> + * the second child has an index of 1, and the last child > >>>>>>>> + * has an index of <code>(numChildren - 1)</code>.</p> > >>>>>>>> + * > >>>>>>>> + * <p>If <code>getChildIndex(myChild)</code> returns 5, > >>>>>>>> + * then <code>myView.getChildAt(5)</code> returns > >>>>>>>> + * <code>myChild</code>.</p> > >>>>>>>> + * > >>>>>>>> + * <p>If you add a child by calling the > >> <code>addChild()</code> > >>>>> method, > >>>>>>>> + * the new child's index is equal to the largest index among > >> the > >>>>>>>> + * existing children plus one.</p> > >>>>>>>> + * > >>>>>>>> + * <p>You can insert a child at a specified index by using > the > >>>>>>>> + * <code>addChildAt()</code> method > >>>>>>>> + * In that case the children previously at that index and > >> higher > >>>>>>>> + * indices have their index increased by 1 so that all > >>>>>>>> + * children are indexed from 0 to <code>(numChildren - > >>>>> 1)</code>.</p> > >>>>>>>> + * > >>>>>>>> + * <p>If you remove a child by calling the > >>>>> <code>removeChild()</code> > >>>>>>>> + * or <code>removeChildAt()</code> method, then the children > >>>>>>>> + * at higher indices have their index decreased by 1 so that > >>>>>>>> + * all children are indexed from 0 to <code>(numChildren - > >>>>> 1)</code>.</p> > >>>>>>>> + * > >>>>>>>> + * <p>If you change a child's index by calling the > >>>>>>>> + * <code>setChildIndex()</code> method, then the children > >>> between > >>>>>>>> + * the old index and the new index, inclusive, have their > >>> indexes > >>>>>>>> + * adjusted so that all children are indexed from > >>>>>>>> + * 0 to <code>(numChildren - 1)</code>.</p> > >>>>>>>> + * > >>>>>>>> + * @param child The child whose index to get. > >>>>>>>> + * > >>>>>>>> + * @return The index of the child, which is an integer > >>>>>>>> + * between 0 and <code>(numChildren - 1)</code>. > >>>>>>>> + * > >>>>>>>> + * @langversion 3.0 > >>>>>>>> + * @playerversion Flash 9 > >>>>>>>> + * @playerversion AIR 1.1 > >>>>>>>> + * @productversion Flex 3 > >>>>>>>> + */ > >>>>>>>> + [SWFOverride(params="flash.display.DisplayObject", > >>>>> altparams="org.apache.royale.core.UIBase")] > >>>>>>>> + function getChildIndex(child:IUIBase):int; > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * Changes the index of a particular child in this child > list. > >>>>>>>> + * See the <code>getChildIndex()</code> method for a > >>>>>>>> + * description of the child's index. > >>>>>>>> + * > >>>>>>>> + * @param child The child whose index to set. > >>>>>>>> + * > >>>>>>>> + * @param newIndex The new index for the specified child. > >>>>>>>> + * This must be an integer between zero and > >> <code>(numChildren - > >>>>> 1)</code>. > >>>>>>>> + * > >>>>>>>> + * @langversion 3.0 > >>>>>>>> + * @playerversion Flash 9 > >>>>>>>> + * @playerversion AIR 1.1 > >>>>>>>> + * @productversion Flex 3 > >>>>>>>> + */ > >>>>>>>> + [SWFOverride(params="flash.display.DisplayObject,int", > >>>>> altparams="org.apache.royale.core.UIBase,int")] > >>>>>>>> + function setChildIndex(child:IUIBase, newIndex:int):void; > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * Determines if a DisplayObject is in this child list, > >>>>>>>> + * or is a descendant of an child in this child list. > >>>>>>>> + * > >>>>>>>> + * @param child The DisplayObject to test. > >>>>>>>> + * > >>>>>>>> + * @return <code>true</code> if the DisplayObject is in this > >>>>> child list > >>>>>>>> + * or is a descendant of an child in this child list; > >>>>>>>> + * <code>false</code> otherwise. > >>>>>>>> + * > >>>>>>>> + * @langversion 3.0 > >>>>>>>> + * @playerversion Flash 9 > >>>>>>>> + * @playerversion AIR 1.1 > >>>>>>>> + * @productversion Flex 3 > >>>>>>>> + */ > >>>>>>>> + [SWFOverride(params="flash.display.DisplayObject", > >>>>> altparams="org.apache.royale.core.UIBase")] > >>>>>>>> + function contains(child:IUIBase):Boolean; > >>>>>>>> +} > >>>>>>>> + > >>>>>>>> +} > >>>>>>>> diff --git > >>>>> > >>> > >> > a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/IUIBase.as > >>>>> > >>> > >> > b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/IUIBaseBasic.as > >>>>>>>> similarity index 95% > >>>>>>>> copy from > >>>>> > >>> > >> > frameworks/projects/Core/src/main/royale/org/apache/royale/core/IUIBase.as > >>>>>>>> copy to > >>>>> > >>> > >> > frameworks/projects/Basic/src/main/royale/org/apache/royale/core/IUIBaseBasic.as > >>>>>>>> index f35f6d0049..c36e1e58eb 100644 > >>>>>>>> --- > >>>>> > >>> > >> > a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/IUIBase.as > >>>>>>>> +++ > >>>>> > >>> > >> > b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/IUIBaseBasic.as > >>>>>>>> @@ -28,7 +28,7 @@ package org.apache.royale.core > >>>>>>>> * @playerversion AIR 2.6 > >>>>>>>> * @productversion Royale 0.0 > >>>>>>>> */ > >>>>>>>> - public interface IUIBase extends IStrand, IEventDispatcher, > >>> IChild > >>>>>>>> + public interface IUIBaseBasic extends IStrand, > >> IEventDispatcher, > >>>>> IChild > >>>>>>>> { > >>>>>>>> > >>>>>>>> /** > >>>>>>>> @@ -53,6 +53,13 @@ package org.apache.royale.core > >>>>>>>> function get alpha():Number; > >>>>>>>> function set alpha(value:Number):void; > >>>>>>>> > >>>>>>>> + function get mxmlDocument():Object > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * @private > >>>>>>>> + */ > >>>>>>>> + function set mxmlDocument(value:Object):void > >>>>>>>> + > >>>>>>>> /** > >>>>>>>> * The x co-ordinate or left side position of the > >>>>> bounding box. > >>>>>>>> * > >>>>>>>> diff --git > >>>>> > >>> > >> > a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/UIBase.as > >>>>> > >>> > >> > b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/UIBase.as > >>>>>>>> index 522d5d5da4..159edfcfea 100644 > >>>>>>>> --- > >>>>> > >>> > >> > a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/UIBase.as > >>>>>>>> +++ > >>>>> > >>> > >> > b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/UIBase.as > >>>>>>>> @@ -35,6 +35,7 @@ package org.apache.royale.core > >>>>>>>> import org.apache.royale.events.ValueChangeEvent; > >>>>>>>> import org.apache.royale.utils.loadBeadFromValuesManager; > >>>>>>>> import org.apache.royale.utils.sendEvent; > >>>>>>>> + import org.apache.royale.managers.ISystemManager; > >>>>>>>> > >>>>>>>> COMPILE::JS > >>>>>>>> { > >>>>>>>> @@ -212,6 +213,257 @@ package org.apache.royale.core > >>>>>>>> createElement(); > >>>>>>>> } > >>>>>>>> } > >>>>>>>> + > >>>>>>>> + //---------------------------------- > >>>>>>>> + // parentApplication > >>>>>>>> + //---------------------------------- > >>>>>>>> + > >>>>>>>> + [Bindable("initialize")] > >>>>>>>> + > >>>>>>>> + /* > >>>>>>>> + * Note: > >>>>>>>> + * There are two reasons that 'parentApplication' is > >>>>> typed as Object > >>>>>>>> + * rather than as Application. The first is that > >> typing > >>>>> it as Application > >>>>>>>> + * would make UIComponent dependent on Application, > >>>>> slowing down compile > >>>>>>>> + * times not only for SWCs for also for MXML and AS > >>>>> components. The > >>>>>>>> + * second is that authors would not be able to access > >>>>> properties and > >>>>>>>> + * methods in the <Script> of their <Application> > >>> without > >>>>> casting it > >>>>>>>> + * to their application's subclass, as in > >>>>>>>> + * MyApplication(paentApplication).myAppMethod(). > >>>>>>>> + * Therefore we decided to dispense with strict > typing > >>> for > >>>>>>>> + * 'parentApplication'. > >>>>>>>> + */ > >>>>>>>> + /** > >>>>>>>> + * A reference to the Application object that > contains > >>>>> this UIComponent > >>>>>>>> + * instance. > >>>>>>>> + * This Application object might exist in a SWFLoader > >>>>> control in another > >>>>>>>> + * Application, and so on, creating a chain of > >>>>> Application objects that > >>>>>>>> + * can be walked using parentApplication. > >>>>>>>> + * > >>>>>>>> + * <p>The <code>parentApplication</code> property of > >> an > >>>>> Application is never itself; > >>>>>>>> + * it is either the Application into which it was > >> loaded > >>>>> or null > >>>>>>>> + * (for the top-level Application).</p> > >>>>>>>> + * > >>>>>>>> + * <p>Walking the application chain using the > >>>>> <code>parentApplication</code> > >>>>>>>> + * property is similar to walking the document chain > >>>>> using the > >>>>>>>> + * <code>parentDocument</code> property. > >>>>>>>> + * You can access the top-level application using the > >>>>>>>> + * <code>application</code> property of the > >> Application > >>>>> class.</p> > >>>>>>>> + * > >>>>>>>> + * @langversion 3.0 > >>>>>>>> + * @playerversion Flash 9 > >>>>>>>> + * @playerversion AIR 1.1 > >>>>>>>> + * @productversion Flex 3 > >>>>>>>> + */ > >>>>>>>> + public function get parentApplication():Object > >>>>>>>> + { > >>>>>>>> + // Look for the SystemManager's document, > >>>>>>>> + // which should be the Application. > >>>>>>>> + var o:Object = > systemManagerBasic.mxmlDocument; > >>>>>>>> + > >>>>>>>> + // If this UIBase is its own root, then it is > >> an > >>>>> Application. > >>>>>>>> + // We want to return its parent Application, > or > >>>>> null > >>>>>>>> + // (if it has no parent because it is the > >>>>> top-level Application). > >>>>>>>> + // The hierarchy in this situation looks > >>> something > >>>>> like this: > >>>>>>>> + // > >>>>>>>> + // SystemManager > >>>>>>>> + // Application > >>>>>>>> + // SomeContainer > >>>>>>>> + // Loader > >>>>>>>> + // Loaded App's SystemManager > >>>>>>>> + // Application > >>>>>>>> + // ThisComponent > >>>>>>>> + if (o == this) > >>>>>>>> + { > >>>>>>>> + var p:UIBase = > >>> o.systemManagerBasic.parent > >>>>> as UIBase; > >>>>>>>> + o = p ? > >> p.systemManagerBasic.mxmlDocument > >>>>> : null; > >>>>>>>> + } > >>>>>>>> + > >>>>>>>> + return o; > >>>>>>>> + } > >>>>>>>> + > >>>>>>>> + //---------------------------------- > >>>>>>>> + // parentComponent > >>>>>>>> + //---------------------------------- > >>>>>>>> + > >>>>>>>> + [Bindable("initialize")] > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * A reference to the parent component object > >>> for > >>>>> this UIComponent. > >>>>>>>> + * A component object is a UIComponent at the > >>> top > >>>>> of the hierarchy > >>>>>>>> + * of a Flex application, MXML component, or > >> AS > >>>>> component. > >>>>>>>> + * > >>>>>>>> + * <p>For the Application object, the > >>>>> <code>parentDocument</code> > >>>>>>>> + * property is null. > >>>>>>>> + * This property is useful in MXML scripts > to > >>> go > >>>>> up a level > >>>>>>>> + * in the chain of document objects. > >>>>>>>> + * It can be used to walk this chain using > >>>>>>>> + * > <code>parentDocument.parentDocument</code>, > >>>>> and so on.</p> > >>>>>>>> + * > >>>>>>>> + * <p>It is typed as Object so that authors > >> can > >>>>> access properties > >>>>>>>> + * and methods on ancestor document objects > >>>>> without casting.</p> > >>>>>>>> + * > >>>>>>>> + * @langversion 3.0 > >>>>>>>> + * @playerversion Flash 9 > >>>>>>>> + * @playerversion AIR 1.1 > >>>>>>>> + * @productversion Flex 3 > >>>>>>>> + */ > >>>>>>>> + public function get > parentMxmlDocument():Object > >>>>>>>> + { > >>>>>>>> + if (mxmlDocument == this) > >>>>>>>> + { > >>>>>>>> + var p:IUIBase = parent as > >>> IUIBase; > >>>>>>>> + if (p) > >>>>>>>> + return p.mxmlDocument; > >>>>>>>> + > >>>>>>>> + var sm:ISystemManager = parent > >> as > >>>>> ISystemManager; > >>>>>>>> + if (sm) > >>>>>>>> + return > sm.mxmlDocument; > >>>>>>>> + > >>>>>>>> + return null; > >>>>>>>> + } > >>>>>>>> + else > >>>>>>>> + { > >>>>>>>> + return mxmlDocument; > >>>>>>>> + } > >>>>>>>> + } > >>>>>>>> + > >>>>>>>> + //---------------------------------- > >>>>>>>> + // systemManager > >>>>>>>> + //---------------------------------- > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * @private > >>>>>>>> + * Storage for the systemManager property. > >>>>>>>> + * Set by the SystemManager so that each UIBase > >>>>>>>> + * has a references to its SystemManager > >>>>>>>> + */ > >>>>>>>> + private var _systemManager:ISystemManager; > >>>>>>>> + > >>>>>>>> + [Inspectable(environment="none")] > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * Returns the SystemManager object used by this > >>>>> component. > >>>>>>>> + * > >>>>>>>> + * @langversion 3.0 > >>>>>>>> + * @playerversion Flash 9 > >>>>>>>> + * @playerversion AIR 1.1 > >>>>>>>> + * @productversion Flex 3 > >>>>>>>> + */ > >>>>>>>> + public function get > systemManagerBasic():ISystemManager > >>>>>>>> + { > >>>>>>>> + // TODO > >>>>>>>> + if (_systemManager == null && parent != null > && > >>>>> parent is UIBase) > >>>>>>>> + _systemManager = (parent as > >>>>> UIBase).systemManagerBasic; > >>>>>>>> + > >>>>>>>> + return _systemManager; > >>>>>>>> + } > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * @private > >>>>>>>> + */ > >>>>>>>> + public function set > >>>>> systemManagerBasic(value:ISystemManager):void > >>>>>>>> + { > >>>>>>>> + // TODO > >>>>>>>> + _systemManager = value; > >>>>>>>> + } > >>>>>>>> + > >>>>>>>> + private var processedMXMLDescriptors : Boolean; > >>>>>>>> + > >>>>>>>> + private var _mxmlDescriptor:Array; > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * @copy > >>> org.apache.royale.core.Application#MXMLDescriptor > >>>>>>>> + * > >>>>>>>> + * @langversion 3.0 > >>>>>>>> + * @playerversion Flash 10.2 > >>>>>>>> + * @playerversion AIR 2.6 > >>>>>>>> + * @productversion Royale 0.8 > >>>>>>>> + */ > >>>>>>>> + public function get MXMLDescriptorBasic():Array > >>>>>>>> + { > >>>>>>>> + return _mxmlDescriptor; > >>>>>>>> + } > >>>>>>>> + > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * @private > >>>>>>>> + */ > >>>>>>>> + // COMPILE::SWF > >>>>>>>> + // { override } > >>>>>>>> + public function get numChildrenBasic():int > >>>>>>>> + { > >>>>>>>> + return numElements; > >>>>>>>> + } > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * @private > >>>>>>>> + * @royaleignorecoercion > >> org.apache.royale.core.IUIBase > >>>>>>>> + */ > >>>>>>>> + // > [SWFOverride(returns="flash.display.DisplayObject")] > >>>>>>>> + // COMPILE::SWF > >>>>>>>> + // { override } > >>>>>>>> + public function getChildAtBasic(index:int):IUIBase > >>>>>>>> + { > >>>>>>>> + return getElementAt(index) as IUIBase; > >>>>>>>> + } > >>>>>>>> + > >>>>>>>> + > >>>>>>>> + public var _mxmlDocument:Object; > >>>>>>>> + > >>>>>>>> + [Inspectable(environment="none")] > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * A reference to the document object associated with > >>>>> this UIComponent. > >>>>>>>> + * A document object is an Object at the top of the > >>>>> hierarchy of a > >>>>>>>> + * Flex application, MXML component, or AS component. > >>>>>>>> + * > >>>>>>>> + * @langversion 3.0 > >>>>>>>> + * @playerversion Flash 9 > >>>>>>>> + * @playerversion AIR 1.1 > >>>>>>>> + * @productversion Flex 3 > >>>>>>>> + */ > >>>>>>>> + public function get mxmlDocument():Object > >>>>>>>> + { > >>>>>>>> + if (!_mxmlDocument && MXMLDescriptorBasic != > >>> null) > >>>>>>>> + _mxmlDocument = this; > >>>>>>>> + return _mxmlDocument; > >>>>>>>> + } > >>>>>>>> + > >>>>>>>> + public static var topLevelApplication:Object; > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * A reference to the document object associated with > >>>>> this UIComponent. > >>>>>>>> + * A document object is an Object at the top of the > >>>>> hierarchy of a > >>>>>>>> + * Flex application, MXML component, or AS component. > >>>>>>>> + * > >>>>>>>> + * @langversion 3.0 > >>>>>>>> + * @playerversion Flash 9 > >>>>>>>> + * @playerversion AIR 1.1 > >>>>>>>> + * @productversion Flex 3 > >>>>>>>> + */ > >>>>>>>> + public function set mxmlDocument(value:Object):void > >>>>>>>> + { > >>>>>>>> + var n:int = numChildrenBasic; > >>>>>>>> + for (var i:int = 0; i < n; i++) > >>>>>>>> + { > >>>>>>>> + var child:IUIBase = getChildAtBasic(i) > >> as > >>>>> IUIBase; > >>>>>>>> + if (!child) > >>>>>>>> + continue; > >>>>>>>> + // JS subtrees will point back to the > >>>>> component. Ignore those. > >>>>>>>> + if (child == this) > >>>>>>>> + continue; > >>>>>>>> + > >>>>>>>> + if (child.mxmlDocument == > _mxmlDocument > >>> || > >>>>>>>> + // child.mxmlDocument == > >>>>> FlexGlobals.topLevelApplication) > >>>>>>>> + child.mxmlDocument == > >>>>> topLevelApplication) > >>>>>>>> + { > >>>>>>>> + child.mxmlDocument = value; > >>>>>>>> + } > >>>>>>>> + } > >>>>>>>> + > >>>>>>>> + _mxmlDocument = value; > >>>>>>>> + } > >>>>>>>> > >>>>>>>> COMPILE::SWF > >>>>>>>> public function get $displayObject():DisplayObject > >>>>>>>> diff --git > >>>>> > >>> > >> > a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/supportClasses/TextFieldItemRenderer.as > >>>>> > >>> > >> > b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/supportClasses/TextFieldItemRenderer.as > >>>>>>>> index 3c98bd6bbd..09c610ce2c 100644 > >>>>>>>> --- > >>>>> > >>> > >> > a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/supportClasses/TextFieldItemRenderer.as > >>>>>>>> +++ > >>>>> > >>> > >> > b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/supportClasses/TextFieldItemRenderer.as > >>>>>>>> @@ -69,6 +69,39 @@ package org.apache.royale.html.supportClasses > >>>>>>>> > >>>>>>>> MouseEventConverter.setupInstanceConverters(this); > >>>>>>>> } > >>>>>>>> + > >>>>>>>> + //---------------------------------- > >>>>>>>> + // document > >>>>>>>> + //---------------------------------- > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * @private > >>>>>>>> + * Storage for the enabled property. > >>>>>>>> + */ > >>>>>>>> + private var _mxmlDocument:Object; > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * A reference to the document object associated with > >>>>> this UITextField object. > >>>>>>>> + * A document object is an Object at the top of the > >>>>> hierarchy of a Flex application, > >>>>>>>> + * MXML component, or AS component. > >>>>>>>> + * > >>>>>>>> + * @langversion 3.0 > >>>>>>>> + * @playerversion Flash 9 > >>>>>>>> + * @playerversion AIR 1.1 > >>>>>>>> + * @productversion Flex 3 > >>>>>>>> + */ > >>>>>>>> + public function get mxmlDocument():Object > >>>>>>>> + { > >>>>>>>> + return _mxmlDocument; > >>>>>>>> + } > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * @private > >>>>>>>> + */ > >>>>>>>> + public function set mxmlDocument(value:Object):void > >>>>>>>> + { > >>>>>>>> + _mxmlDocument = value; > >>>>>>>> + } > >>>>>>>> > >>>>>>>> public var highlightColor:uint = 0xCEDBEF; > >>>>>>>> public var selectedColor:uint = 0xA8C6EE; > >>>>>>>> diff --git > >>>>> > >>> > >> > a/frameworks/projects/Basic/src/main/royale/org/apache/royale/managers/ISystemManager.as > >>>>> > >>> > >> > b/frameworks/projects/Basic/src/main/royale/org/apache/royale/managers/ISystemManager.as > >>>>>>>> new file mode 100644 > >>>>>>>> index 0000000000..4dbdd2c84b > >>>>>>>> --- /dev/null > >>>>>>>> +++ > >>>>> > >>> > >> > b/frameworks/projects/Basic/src/main/royale/org/apache/royale/managers/ISystemManager.as > >>>>>>>> @@ -0,0 +1,135 @@ > >>>>>>>> > >>>>> > >>> > >> > +//////////////////////////////////////////////////////////////////////////////// > >>>>>>>> +// > >>>>>>>> +// Licensed to the Apache Software Foundation (ASF) under one or > >>> more > >>>>>>>> +// contributor license agreements. See the NOTICE file > >> distributed > >>>>> with > >>>>>>>> +// this work for additional information regarding copyright > >>>>> ownership. > >>>>>>>> +// The ASF licenses this file to You under the Apache License, > >>>>> Version 2.0 > >>>>>>>> +// (the "License"); you may not use this file except in > >> compliance > >>>>> with > >>>>>>>> +// the License. You may obtain a copy of the License at > >>>>>>>> +// > >>>>>>>> +// http://www.apache.org/licenses/LICENSE-2.0 > >>>>>>>> +// > >>>>>>>> +// Unless required by applicable law or agreed to in writing, > >>>>> software > >>>>>>>> +// distributed under the License is distributed on an "AS IS" > >>> BASIS, > >>>>>>>> +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express > >> or > >>>>> implied. > >>>>>>>> +// See the License for the specific language governing > >> permissions > >>>>> and > >>>>>>>> +// limitations under the License. > >>>>>>>> +// > >>>>>>>> > >>>>> > >>> > >> > +//////////////////////////////////////////////////////////////////////////////// > >>>>>>>> + > >>>>>>>> +package org.apache.royale.managers > >>>>>>>> +{ > >>>>>>>> + > >>>>>>>> +import org.apache.royale.events.IEventDispatcher; > >>>>>>>> +import org.apache.royale.core.IChildList; > >>>>>>>> +//import mx.core.UIComponent; > >>>>>>>> +//import flash.display.Stage; > >>>>>>>> +/** > >>>>>>>> + * An ISystemManager manages an "application window". > >>>>>>>> + * Every application that runs on the desktop or in a browser > >>>>>>>> + * has an area where the visuals of the application will be > >>>>>>>> + * displayed. It may be a window in the operating system > >>>>>>>> + * or an area within the browser. That is an "application > >> window" > >>>>>>>> + * and different from an instance of > >>>>> <code>mx.core.Application</code>, which > >>>>>>>> + * is the main "top-level" window within an application. > >>>>>>>> + * > >>>>>>>> + * <p>Every application has an ISystemManager. > >>>>>>>> + * The ISystemManager sends an event if > >>>>>>>> + * the size of the application window changes (you cannot change > >> it > >>>>> from > >>>>>>>> + * within the application, but only through interaction with the > >>>>> operating > >>>>>>>> + * system window or browser). It parents all displayable items > >>>>> within the > >>>>>>>> + * application, such as the main mx.core.Application instance > and > >>>>> all popups, > >>>>>>>> + * tooltips, cursors, an so on. Any object parented by the > >>>>> ISystemManager is > >>>>>>>> + * considered to be a "top-level" window, even tooltips and > >>>>> cursors.</p> > >>>>>>>> + * > >>>>>>>> + * <p>The ISystemManager also switches focus between top-level > >>>>> windows > >>>>>>>> + * if there are more than one IFocusManagerContainer displayed > >> and > >>>>> users > >>>>>>>> + * are interacting with components within the > >>>>> IFocusManagerContainers.</p> > >>>>>>>> + * > >>>>>>>> + * <p>All keyboard and mouse activity that is not expressly > >> trapped > >>>>> is seen > >>>>>>>> + * by the ISystemManager, making it a good place to monitor > >>> activity > >>>>>>>> + * should you need to do so.</p> > >>>>>>>> + * > >>>>>>>> + * <p>If an application is loaded into another application, an > >>>>> ISystemManager > >>>>>>>> + * will still be created, but will not manage an "application > >>>>> window", > >>>>>>>> + * depending on security and domain rules. > >>>>>>>> + * Instead, it will be the <code>content</code> of the > >>>>> <code>Loader</code> > >>>>>>>> + * that loaded it and simply serve as the parent of the > >>>>> sub-application</p> > >>>>>>>> + * > >>>>>>>> + * <p>The ISystemManager maintains multiple lists of children, > >> one > >>>>> each for > >>>>>>>> + * tooltips, cursors, popup windows. > >>>>>>>> + * This is how it ensures that popup windows "float" above the > >> main > >>>>>>>> + * application windows and that tooltips "float" above that > >>>>>>>> + * and cursors above that. > >>>>>>>> + * If you examine the <code>numChildren</code> property > >>>>>>>> + * or <code>getChildAt()</code> method on the ISystemManager > >>>>>>>> + * you are accessing the main application window and any other > >>>>> windows > >>>>>>>> + * that aren't popped up. > >>>>>>>> + * To get the list of all windows, including popups, tooltips > and > >>>>> cursors, > >>>>>>>> + * use the <code>rawChildren</code> property.</p> > >>>>>>>> + * > >>>>>>>> + * @langversion 3.0 > >>>>>>>> + * @playerversion Flash 9 > >>>>>>>> + * @playerversion AIR 1.1 > >>>>>>>> + * @productversion Royale 0.9.4 > >>>>>>>> + */ > >>>>>>>> +public interface ISystemManager extends IEventDispatcher, > >> IChildList > >>>>> /*, IFlexModuleFactory */ > >>>>>>>> +{ > >>>>>>>> + > >>>>> > >>> > >> > //-------------------------------------------------------------------------- > >>>>>>>> + // > >>>>>>>> + // Properties > >>>>>>>> + // > >>>>>>>> + > >>>>> > >>> > >> > //-------------------------------------------------------------------------- > >>>>>>>> + > >>>>>>>> + //---------------------------------- > >>>>>>>> + // component > >>>>>>>> + //---------------------------------- > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * A reference to the document object. > >>>>>>>> + * A document object is an Object at the top of the > hierarchy > >>> of > >>>>> a > >>>>>>>> + * Flex application, MXML component, or AS component. > >>>>>>>> + * > >>>>>>>> + * @langversion 3.0 > >>>>>>>> + * @playerversion Flash 9 > >>>>>>>> + * @playerversion AIR 1.1 > >>>>>>>> + * @productversion Royale 0.9.4 > >>>>>>>> + */ > >>>>>>>> + function get mxmlDocument():Object; > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * @private > >>>>>>>> + */ > >>>>>>>> + function set mxmlDocument(value:Object):void; > >>>>>>>> + function get rawChildren():IChildList; > >>>>>>>> + function get numModalWindows():int; > >>>>>>>> + function set numModalWindows(value:int):void; > >>>>>>>> + /* COMPILE::SWF { > >>>>>>>> + function get stage():Stage; > >>>>>>>> + } > >>>>>>>> + COMPILE::JS { > >>>>>>>> + function get stage():Object; > >>>>>>>> + } */ > >>>>>>>> + > >>>>>>>> + > >>>>>>>> + > >>>>> > >>> > >> > //-------------------------------------------------------------------------- > >>>>>>>> + // > >>>>>>>> + // Methods > >>>>>>>> + // > >>>>>>>> + > >>>>> > >>> > >> > //-------------------------------------------------------------------------- > >>>>>>>> + /** > >>>>>>>> + * Gets the system manager that is the root of all > >>>>>>>> + * top level system managers in this SecurityDomain. > >>>>>>>> + * > >>>>>>>> + * @return the highest-level systemManager in the sandbox > >>>>>>>> + * > >>>>>>>> + * @langversion 3.0 > >>>>>>>> + * @playerversion Flash 9 > >>>>>>>> + * @playerversion AIR 1.1 > >>>>>>>> + * @productversion Royale 0.9.4 > >>>>>>>> + */ > >>>>>>>> + function getSandboxRoot():Object; > >>>>>>>> + > >>>>>>>> +} > >>>>>>>> + > >>>>>>>> +} > >>>>>>>> diff --git > >>>>> > >>> > >> > a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/IUIBase.as > >>>>> > >>> > >> > b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/IUIBase.as > >>>>>>>> index f35f6d0049..f87437804f 100644 > >>>>>>>> --- > >>>>> > >>> > >> > a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/IUIBase.as > >>>>>>>> +++ > >>>>> > >>> > >> > b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/IUIBase.as > >>>>>>>> @@ -42,6 +42,13 @@ package org.apache.royale.core > >>>>>>>> */ > >>>>>>>> function addedToParent():void; > >>>>>>>> > >>>>>>>> + function get mxmlDocument():Object > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * @private > >>>>>>>> + */ > >>>>>>>> + function set mxmlDocument(value:Object):void > >>>>>>>> + > >>>>>>>> /** > >>>>>>>> * The alpha or opacity in the range of 0 to 1. > >>>>>>>> * > >>>>>>>> diff --git > >>>>> > >>> > >> > a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/UIButtonBase.as > >>>>> > >>> > >> > b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/UIButtonBase.as > >>>>>>>> index 38bc88c599..1612b18866 100644 > >>>>>>>> --- > >>>>> > >>> > >> > a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/UIButtonBase.as > >>>>>>>> +++ > >>>>> > >>> > >> > b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/UIButtonBase.as > >>>>>>>> @@ -97,6 +97,39 @@ package org.apache.royale.core > >>>>>>>> { > >>>>>>>> > >>>>>>>> } > >>>>>>>> + > >>>>>>>> + //---------------------------------- > >>>>>>>> + // document > >>>>>>>> + //---------------------------------- > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * @private > >>>>>>>> + * Storage for the enabled property. > >>>>>>>> + */ > >>>>>>>> + private var _mxmlDocument:Object; > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * A reference to the document object associated with > >>>>> this UITextField object. > >>>>>>>> + * A document object is an Object at the top of the > >>>>> hierarchy of a Flex application, > >>>>>>>> + * MXML component, or AS component. > >>>>>>>> + * > >>>>>>>> + * @langversion 3.0 > >>>>>>>> + * @playerversion Flash 9 > >>>>>>>> + * @playerversion AIR 1.1 > >>>>>>>> + * @productversion Flex 3 > >>>>>>>> + */ > >>>>>>>> + public function get mxmlDocument():Object > >>>>>>>> + { > >>>>>>>> + return _mxmlDocument; > >>>>>>>> + } > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * @private > >>>>>>>> + */ > >>>>>>>> + public function set mxmlDocument(value:Object):void > >>>>>>>> + { > >>>>>>>> + _mxmlDocument = value; > >>>>>>>> + } > >>>>>>>> > >>>>>>>> private var _x:Number; > >>>>>>>> > >>>>>>>> diff --git > >>>>> > >>> > >> > a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/DateField.as > >>>>> > >>> > >> > b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/DateField.as > >>>>>>>> index 0d6fa25698..b378646c1e 100644 > >>>>>>>> --- > >>>>> > >>> > >> > a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/DateField.as > >>>>>>>> +++ > >>>>> > >>> > >> > b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/DateField.as > >>>>>>>> @@ -24,6 +24,7 @@ package org.apache.royale.jewel > >>>>>>>> import org.apache.royale.core.StyledUIBase; > >>>>>>>> import org.apache.royale.events.Event; > >>>>>>>> import org.apache.royale.utils.loadBeadFromValuesManager; > >>>>>>>> + import org.apache.royale.jewel.beads.views.DateFieldView; > >>>>>>>> > >>>>>>>> /** > >>>>>>>> * The change event is dispatched when the selectedDate is > >>> changed. > >>>>>>>> @@ -135,5 +136,88 @@ package org.apache.royale.jewel > >>>>>>>> { > >>>>>>>> _dateFormat = value.toUpperCase(); > >>>>>>>> } > >>>>>>>> - } > >>>>>>>> + > >>>>>>>> + //---------------------------------- > >>>>>>>> + // formatString > >>>>>>>> + //---------------------------------- > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * @private > >>>>>>>> + * Storage for the formatString property. > >>>>>>>> + */ > >>>>>>>> + // private var _formatString:String = "MM/DD/YYYY"; > >>>>>>>> + > >>>>>>>> + // [Bindable("formatStringChanged")] > >>>>>>>> + // [Inspectable(defaultValue="null")] > >>>>>>>> + > >>>>>>>> + // /** > >>>>>>>> + // * @private > >>>>>>>> + // */ > >>>>>>>> + // private var formatStringOverride:String; > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * The format of the displayed date in the text > field. > >>>>>>>> + * This property can contain any combination of > >>>>> <code>"M"</code>, > >>>>>>>> + * <code>"MM"</code>, <code>"MMM"</code> (3 letter > >> month > >>>>> names), > >>>>>>>> + * <code>"MMMM"</code> (month names), > >> <code>"D"</code>, > >>>>> <code>"DD"</code>, > >>>>>>>> + * <code>"YY"</code>, <code>"YYYY"</code>, > >>>>>>>> + * delimiter, and punctuation characters. > >>>>>>>> + * > >>>>>>>> + * <p>Only upper case characters are supported.</p> > >>>>>>>> + * > >>>>>>>> + * @default "MM/DD/YYYY" > >>>>>>>> + * > >>>>>>>> + * @langversion 3.0 > >>>>>>>> + * @playerversion Flash 9 > >>>>>>>> + * @playerversion AIR 1.1 > >>>>>>>> + * @productversion Flex 3 > >>>>>>>> + */ > >>>>>>>> + // public function get formatString():String > >>>>>>>> + // { > >>>>>>>> + // return _formatString; > >>>>>>>> + // } > >>>>>>>> + > >>>>>>>> + // /** > >>>>>>>> + // * @private > >>>>>>>> + // */ > >>>>>>>> + // public function set formatString(value:String):void > >>>>>>>> + // { > >>>>>>>> + // formatStringOverride = value; > >>>>>>>> + > >>>>>>>> + // if (value != _formatString) > >>>>>>>> + // { > >>>>>>>> + // _formatString = value /* != null ? > >>>>>>>> + // value : > >>>>>>>> + // > >>>>> resourceManager.getString( > >>>>>>>> + // > >>>>> "SharedResources", "dateFormat")*/; > >>>>>>>> + // var formatter:IBead = > >>>>> getBeadByType(IFormatter); > >>>>>>>> + // if (formatter) > >>>>>>>> + // removeBead(formatter); > >>>>>>>> + // if (value == "MM/DD/YYYY") > >>>>>>>> + // addBead(new > >>>>> DateFormatMMDDYYYY()); > >>>>>>>> + // else if (value == "DD/MM/YYYY") > >>>>>>>> + // addBead(new > >>>>> DateFormatDDMMYYYY()); > >>>>>>>> + // else if (value == "YYYY/MM/DD") > >>>>>>>> + // addBead(new > >>>>> DateFormatYYYYMMDD()); > >>>>>>>> + // } > >>>>>>>> + // } > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * @private > >>>>>>>> + */ > >>>>>>>> + public function get text():String > >>>>>>>> + { > >>>>>>>> + // var s:String = ((view as > >>>>> DateFieldView).textInputField as TextInput).text; > >>>>>>>> + // return s == null ? "" : s; > >>>>>>>> + return ""; > >>>>>>>> + } > >>>>>>>> + > >>>>>>>> + /** > >>>>>>>> + * @private > >>>>>>>> + */ > >>>>>>>> + public function set text(value:String):void > >>>>>>>> + { > >>>>>>>> + // ((view as DateFieldView).textInputField as > >>>>> TextInput).text = value == null ? "" : value; > >>>>>>>> + } > >>>>>>>> +} > >>>>>>>> } > >>>>>>>> diff --git > >>>>> > >>> > >> > a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/advancedDataGridClasses/AdvancedDataGridItemRenderer.as > >>>>> > >>> > >> > b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/advancedDataGridClasses/AdvancedDataGridItemRenderer.as > >>>>>>>> index 30b717f2c2..0dcae179e2 100644 > >>>>>>>> --- > >>>>> > >>> > >> > a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/advancedDataGridClasses/AdvancedDataGridItemRenderer.as > >>>>>>>> +++ > >>>>> > >>> > >> > b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/advancedDataGridClasses/AdvancedDataGridItemRenderer.as > >>>>>>>> @@ -800,7 +800,7 @@ public class AdvancedDataGridItemRenderer > >> extends > >>>>> StringItemRenderer > >>>>>>>> * @playerversion AIR 1.1 > >>>>>>>> * @productversion Flex 3 > >>>>>>>> */ > >>>>>>>> - public function get mxmlDocument():Object > >>>>>>>> + override public function get mxmlDocument():Object > >>>>>>>> { > >>>>>>>> return _mxmlDocument; > >>>>>>>> } > >>>>>>>> @@ -808,7 +808,7 @@ public class AdvancedDataGridItemRenderer > >> extends > >>>>> StringItemRenderer > >>>>>>>> /** > >>>>>>>> * @private > >>>>>>>> */ > >>>>>>>> - public function set mxmlDocument(value:Object):void > >>>>>>>> + override public function set mxmlDocument(value:Object):void > >>>>>>>> { > >>>>>>>> _mxmlDocument = value; > >>>>>>>> } > >>>>>>>> diff --git > >>>>> > >>> > >> > a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/dataGridClasses/DataGridItemRenderer.as > >>>>> > >>> > >> > b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/dataGridClasses/DataGridItemRenderer.as > >>>>>>>> index 727630cae4..6b86afd51b 100644 > >>>>>>>> --- > >>>>> > >>> > >> > a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/dataGridClasses/DataGridItemRenderer.as > >>>>>>>> +++ > >>>>> > >>> > >> > b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/dataGridClasses/DataGridItemRenderer.as > >>>>>>>> @@ -960,7 +960,7 @@ public class DataGridItemRenderer extends > >>>>> StringItemRenderer > >>>>>>>> * @playerversion AIR 1.1 > >>>>>>>> * @productversion Flex 3 > >>>>>>>> */ > >>>>>>>> - public function get mxmlDocument():Object > >>>>>>>> + override public function get mxmlDocument():Object > >>>>>>>> { > >>>>>>>> return _mxmlDocument; > >>>>>>>> } > >>>>>>>> @@ -968,7 +968,7 @@ public class DataGridItemRenderer extends > >>>>> StringItemRenderer > >>>>>>>> /** > >>>>>>>> * @private > >>>>>>>> */ > >>>>>>>> - public function set mxmlDocument(value:Object):void > >>>>>>>> + override public function set mxmlDocument(value:Object):void > >>>>>>>> { > >>>>>>>> _mxmlDocument = value; > >>>>>>>> } > >>>>>>>> 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 da171add4b..1e51d1f061 100644 > >>>>>>>> --- > >>>>> a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as > >>>>>>>> +++ > >>>>> b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as > >>>>>>>> @@ -2391,7 +2391,7 @@ COMPILE::JS > >>>>>>>> * @playerversion AIR 1.1 > >>>>>>>> * @productversion Flex 3 > >>>>>>>> */ > >>>>>>>> - public function get mxmlDocument():Object > >>>>>>>> + override public function get mxmlDocument():Object > >>>>>>>> { > >>>>>>>> if (!_mxmlDocument && MXMLDescriptor != null) > >>>>>>>> _mxmlDocument = this; > >>>>>>>> @@ -2408,7 +2408,7 @@ COMPILE::JS > >>>>>>>> * @playerversion AIR 1.1 > >>>>>>>> * @productversion Flex 3 > >>>>>>>> */ > >>>>>>>> - public function set mxmlDocument(value:Object):void > >>>>>>>> + override public function set mxmlDocument(value:Object):void > >>>>>>>> { > >>>>>>>> var n:int = numChildren; > >>>>>>>> for (var i:int = 0; i < n; i++) > >>>>>>>> @@ -2519,7 +2519,7 @@ COMPILE::JS > >>>>>>>> * @playerversion AIR 1.1 > >>>>>>>> * @productversion Flex 3 > >>>>>>>> */ > >>>>>>>> - public function get parentApplication():Object > >>>>>>>> + override public function get parentApplication():Object > >>>>>>>> { > >>>>>>>> // Look for the SystemManager's document, > >>>>>>>> // which should be the Application. > >>>>>>>> @@ -2572,7 +2572,7 @@ COMPILE::JS > >>>>>>>> * @playerversion AIR 1.1 > >>>>>>>> * @productversion Flex 3 > >>>>>>>> */ > >>>>>>>> - public function get parentMxmlDocument():Object > >>>>>>>> + override public function get parentMxmlDocument():Object > >>>>>>>> { > >>>>>>>> if (mxmlDocument == this) > >>>>>>>> { > >>>>>>>> diff --git > >>>>> > >>> > >> > a/frameworks/projects/MXRoyale/src/main/royale/mx/managers/SystemManager.as > >>>>> > >>> > >> > b/frameworks/projects/MXRoyale/src/main/royale/mx/managers/SystemManager.as > >>>>>>>> index af6debe60a..af94fd5825 100644 > >>>>>>>> --- > >>>>> > >>> > >> > a/frameworks/projects/MXRoyale/src/main/royale/mx/managers/SystemManager.as > >>>>>>>> +++ > >>>>> > >>> > >> > b/frameworks/projects/MXRoyale/src/main/royale/mx/managers/SystemManager.as > >>>>>>>> @@ -833,7 +833,9 @@ public class SystemManager extends > >>>>> SystemManagerBase implements ISystemManager, > >>>>>>>> > >>>>>>>> return _densityScale; > >>>>>>>> } */ > >>>>>>>> - > >>>>>>>> + > >>>>>>>> + > >>>>>>>> + > >>>>>>>> //---------------------------------- > >>>>>>>> // component (was 'document' in Flex, but collides with browser > >>>>> 'document' > >>>>>>>> //---------------------------------- > >>>>>>>> @@ -842,7 +844,8 @@ public class SystemManager extends > >>>>> SystemManagerBase implements ISystemManager, > >>>>>>>> * @private > >>>>>>>> * Storage for the mxmlDocument property. > >>>>>>>> */ > >>>>>>>> - private var _mxmlDocument:Object; > >>>>>>>> + > >>>>>>>> + private var _mxmlDocument:Object; > >>>>>>>> > >>>>>>>> /** > >>>>>>>> * @inheritDoc > >>>>>>>> @@ -852,18 +855,31 @@ public class SystemManager extends > >>>>> SystemManagerBase implements ISystemManager, > >>>>>>>> * @playerversion AIR 1.1 > >>>>>>>> * @productversion Royale 0.9.4 > >>>>>>>> */ > >>>>>>>> - public function get mxmlDocument():Object > >>>>>>>> + COMPILE::JS { > >>>>>>>> + override public function get mxmlDocument():Object > >>>>>>>> { > >>>>>>>> return _mxmlDocument; > >>>>>>>> } > >>>>>>>> > >>>>>>>> - /** > >>>>>>>> - * @private > >>>>>>>> - */ > >>>>>>>> + > >>>>>>>> + override public function set mxmlDocument(value:Object):void > >>>>>>>> + { > >>>>>>>> + _mxmlDocument = value; > >>>>>>>> + } > >>>>>>>> + } > >>>>>>>> + > >>>>>>>> + COMPILE::SWF { > >>>>>>>> + public function get mxmlDocument():Object > >>>>>>>> + { > >>>>>>>> + return _mxmlDocument; > >>>>>>>> + } > >>>>>>>> + > >>>>>>>> + > >>>>>>>> public function set mxmlDocument(value:Object):void > >>>>>>>> { > >>>>>>>> _mxmlDocument = value; > >>>>>>>> } > >>>>>>>> + } > >>>>>>>> > >>>>>>>> //---------------------------------- > >>>>>>>> // embeddedFontList > >>>>>>>> diff --git > >>>>> > >>> > >> > a/frameworks/projects/MXRoyaleBase/src/main/royale/mx/core/IUIComponent.as > >>>>> > >>> > >> > b/frameworks/projects/MXRoyaleBase/src/main/royale/mx/core/IUIComponent.as > >>>>>>>> index 497dbe2532..8478678a43 100644 > >>>>>>>> --- > >>>>> > >>> > >> > a/frameworks/projects/MXRoyaleBase/src/main/royale/mx/core/IUIComponent.as > >>>>>>>> +++ > >>>>> > >>> > >> > b/frameworks/projects/MXRoyaleBase/src/main/royale/mx/core/IUIComponent.as > >>>>>>>> @@ -56,12 +56,12 @@ public interface IUIComponent extends > >>>>> IFlexDisplayObject, IChild, IUIBase, IChil > >>>>>>>> * @playerversion AIR 1.1 > >>>>>>>> * @productversion Flex 3 > >>>>>>>> */ > >>>>>>>> - function get mxmlDocument():Object > >>>>>>>> + // function get mxmlDocument():Object > >>>>>>>> > >>>>>>>> /** > >>>>>>>> * @private > >>>>>>>> */ > >>>>>>>> - function set mxmlDocument(value:Object):void > >>>>>>>> + // function set mxmlDocument(value:Object):void > >>>>>>>> > >>>>>>>> //---------------------------------- > >>>>>>>> // enabled > >>>>>>>> > >>>>>>> > >>>>>> > >>>>> > >>>>> > >>> > >>> > >> > >