You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2020/06/04 16:57:19 UTC
[royale-asjs] branch develop updated: jewel-viewbase: fix all blog
examples due to StyledUIBase now requires base class to be StyledUIBase
This is an automated email from the ASF dual-hosted git repository.
carlosrovira 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 9c70b05 jewel-viewbase: fix all blog examples due to StyledUIBase now requires base class to be StyledUIBase
9c70b05 is described below
commit 9c70b052a6fef3ebe7c6a07ca887af4f7381d46f
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Thu Jun 4 18:57:09 2020 +0200
jewel-viewbase: fix all blog examples due to StyledUIBase now requires base class to be StyledUIBase
---
.../main/royale/org/apache/royale/jewel/View.as | 2 +-
.../royale/jewel/supportClasses/view/ViewBase.as | 121 +++++++++++++++++++++
2 files changed, 122 insertions(+), 1 deletion(-)
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/View.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/View.as
index 821078b..5f03abe 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/View.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/View.as
@@ -20,9 +20,9 @@ package org.apache.royale.jewel
{
import org.apache.royale.core.IMXMLDocument;
import org.apache.royale.core.ValuesManager;
- import org.apache.royale.core.ViewBase;
import org.apache.royale.events.Event;
import org.apache.royale.utils.MXMLDataInterpreter;
+ import org.apache.royale.jewel.supportClasses.view.ViewBase;
/**
* The default property uses when additional MXML content appears within an element's
diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/view/ViewBase.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/view/ViewBase.as
new file mode 100644
index 0000000..96c2ec4
--- /dev/null
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/supportClasses/view/ViewBase.as
@@ -0,0 +1,121 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.jewel.supportClasses.view
+{
+ import org.apache.royale.core.IApplicationView;
+ import org.apache.royale.core.IPopUpHost;
+ import org.apache.royale.core.IPopUpHostParent;
+ import org.apache.royale.jewel.supportClasses.group.GroupBase;
+ import org.apache.royale.utils.sendEvent;
+
+ //--------------------------------------
+ // Events
+ //--------------------------------------
+
+ /**
+ * Dispatched at startup. Attributes and sub-instances of
+ * the MXML document have been created and assigned.
+ * The component lifecycle is different
+ * than the Flex SDK. There is no creationComplete event.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.0
+ */
+ [Event(name="initComplete", type="org.apache.royale.events.Event")]
+
+ [DefaultProperty("mxmlContent")]
+
+ /**
+ * The ViewBase class is the base class for most views in a Royale
+ * application.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.0
+ */
+ public class ViewBase extends GroupBase implements IPopUpHost, IPopUpHostParent, IApplicationView
+ {
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.0
+ */
+ public function ViewBase()
+ {
+ super();
+
+ typeNames = "royale";
+ }
+
+ private var _applicationModel:Object;
+
+ [Bindable("modelChanged")]
+
+ /**
+ * A reference to the Application's model. Usually,
+ * a view is displaying the main model for an
+ * application.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.0
+ */
+ public function get applicationModel():Object
+ {
+ return _applicationModel;
+ }
+
+ /**
+ * @private
+ */
+ public function set applicationModel(value:Object):void
+ {
+ _applicationModel = value;
+ sendEvent(this,"modelChanged");
+ }
+
+ /**
+ * ViewBase can host popups but they will be in the layout, if any
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10.2
+ * @playerversion AIR 2.6
+ * @productversion Royale 0.0
+ */
+ public function get popUpParent():IPopUpHostParent
+ {
+ return this;
+ }
+
+ /**
+ */
+ public function get popUpHost():IPopUpHost
+ {
+ return this;
+ }
+
+ }
+}