feathersui / feathersui-starling-sdk Goto Github PK
View Code? Open in Web Editor NEWSDK for building Feathers UI (AS3/Starling) applications with MXML
Home Page: https://feathersui.com/learn/as3-starling/sdk/
License: Apache License 2.0
SDK for building Feathers UI (AS3/Starling) applications with MXML
Home Page: https://feathersui.com/learn/as3-starling/sdk/
License: Apache License 2.0
Just ran into this.
Sample of code that shows problem. - Note! Everything works if you remove the topAnchorDisplayObject, but fails if you have it in a the component loses it's width setting and the Quad errors.
== SIMPLE PANELSCREEN ==
<?xml version="1.0"?>
<f:PanelScreen
xmlns:f="library://ns.feathersui.com/mxml"
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:components="com.goutpal.views.components.*"
>
<f:layout>
<f:AnchorLayout/>
</f:layout>
<components:HRule id="hRule" color="0xcccccc" height="10">
<components:layoutData>
<f:AnchorLayoutData top="100" left="100" right="100" />
</components:layoutData>
</components:HRule>
<f:Button label="Click Me" >
<f:layoutData>
<f:AnchorLayoutData top="20" topAnchorDisplayObject="{hRule}" left="100" right="100" />
</f:layoutData>
</f:Button>
</f:PanelScreen>
== SIMPLE HRULE COMPONENT ==
<?xml version="1.0"?>
<core:FeathersControl
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:core="feathers.core.*"
creationComplete="onCreationComplete()"
>
<fx:Script><![CDATA[
import starling.display.Quad;
private var _color:uint = 0x000000;
public function set color(color:uint):void
{
_color = color;
}
public function get color():uint
{
return _color;
}
private function onCreationComplete():void
{
var rule:Quad = new Quad(this.width, this.height, _color);
this.addChild(rule);
}
]]></fx:Script>
</core:FeathersControl>
I have this issue for a while now. In all my workstations (3 desktops + 2 laptops) the Feathers SDK Installer gets stuck on the final process.
I have left one of my PCs on for 3 days and it is still there. If I abort the installation, in some cases, all the files stay in the folder and the SDK works without any issues, and in some all the files are gone.
I have tested this on Windows 10 64, all the pcs are really high end systems with more a minimum of 16gb ram.
EDIT: I am also adding the log
Any ideas?
This is with beta 2.3. The only way I can get this occur every time is by creating a list and then throwing the list upwards really fast, that will cause a RTE. This is more evident when there is only 1 group in the list, but can be reproduced with more than 1 as well.
Result is a Index is out of Range error.
If you look at Project Structure -> FeathersSDK -> Sourcepath, most sources are listed including starling but feathers and feathers-mxml are not there.
Would be nice to have those automatically added since middle mouse button is majic in IJ for looking at definitions.
Log:
Feathers SDK Manager 1.2.0 windows
Loading configuration file: http://feathersui.com/sdk/feathers-sdk-manager/sdk-manager-config-1.0.xml
Loading the Feathers SDK configuration data failed. The file was not found on the server. [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032" errorID=2032]
In browser, not found file opens OK.
This issue does not look like #49, at least visually.
I have latest AIR 28.0.0.127 installed on Win7.
EDIT:
I tried running it with:
C:\Program Files (x86)\Feathers SDK Manager>"Feathers SDK Manager.exe" -config sdk-manager-config-1.0.xml
but nothing happens:
I was trying to use your SDK with GradleFX (an AS3 build tool, that can download & install the Flex SDK automatically). While GradleFx works well with Apache Flex SDKs, it cannot install the feathers SDK since the ANT script requires different parameters.
GradleFX calls ant for the installer.xml file with the "installer" parameter set to true (for a silent install), you can see this code at https://github.com/GradleFx/GradleFx/blob/master/src/main/groovy/org/gradlefx/configuration/sdk/states/flex/InstallFlexSdkState.groovy#L92
But when I try to install a feathers SDK it fails to do it properly since the feathers SDK script needs a couple of other parameters for a full install:
https://github.com/BowlerHatLLC/feathers-sdk-manager/blob/master/source/services/RunInstallerScriptService.as#L85
So my request is that would it be possible that the feathers SDK behaves the same way as the Flex SDK? in other words if I call installer.xml just with the "installer=true" parameter it will download & install AIR, flash etc too (== "do.air.install", "do.flash.install", "do.swfobject.install" "do.fontswf.install" are true by default).
This way the build tools can stay SDK independent and we dont have to implement workarounds just for the feathers SDK.
https://github.com/BowlerHatLLC/feathers-sdk/blob/master/examples/Magic8Chat/README.md
"View the Magic8Chat example in your browser."
link http://feathersui.com/examples/magic-8-chat/ returns 404
I'm still rusty on this stuff but when do we need Bindable meta?
I am trying to bind to prompt in MXML and the value s not updating.
How do you differentiate what you make Bindable in the framework?
At about step 7, you need to have them set the Main class that they just created in Project Settings -> Modules -> General [Main Class:]
Hi,
percentWidth behaves differently on VerticalLayout / HorizontalLayout:
code:
<f:LayoutGroup height="300">
<f:layout>
<f:AnchorLayout />
</f:layout>
<f:List id="bannerRotator" snapToPages="true">
<f:layoutData>
<f:AnchorLayoutData left="0" right="0" bottom="0" top="0"/>
</f:layoutData>
<f:layout>
<f:HorizontalLayout />
</f:layout>
<f:itemRendererFactory>
<fx:Component>
<f:LayoutGroupListItemRenderer>
<f:layoutData>
<f:HorizontalLayoutData percentWidth="100" />
</f:layoutData>
<f:layout>
<f:AnchorLayout />
</f:layout>
<f:Button height="300">
<f:defaultSkin>
<f:ImageLoader source="{data.source}" scaleMode="noBorder"/>
</f:defaultSkin>
<f:layoutData>
<f:AnchorLayoutData left="0" right="0" bottom="0" top="0"/>
</f:layoutData>
</f:Button>
</f:LayoutGroupListItemRenderer>
</fx:Component>
</f:itemRendererFactory>
<f:dataProvider>
<f:ListCollection>
<fx:Object source="assets/products/banners/instagram.jpg"/>
<fx:Object source="assets/products/banners/banner_albuns.jpg"/>
<fx:Object source="assets/products/banners/calendarios.jpg"/>
<fx:Object source="assets/products/banners/banner_foto_telas.jpg"/>
</f:ListCollection>
</f:dataProvider>
</f:List>
<f:PageIndicator id="pageIndicator" pageCount="4" selectedIndex="{bannerRotator.selectedIndex}"
change="bannerRotator.selectedIndex=pageIndicator.selectedIndex">
<f:layoutData>
<f:AnchorLayoutData bottom="15" horizontalCenter="0"/>
</f:layoutData>
</f:PageIndicator>
</f:LayoutGroup>
If you set to verticallayout and percentWidth=100 works fine.
Also I think it should exist the property ensureSelectedItemIsVisible similar to Flex, otherwise I don't know how to automatically scroll to the selectedItem.
Thank you
With special properties for modifying the underlying NativeWindow.
http://feathersui.com/help/sdk/intellij-idea.html
This -> Windows, select the Window menu β Preferences....
should be File -> Settings
I think you copied and pasted FlashBuilder? :)
This is really just a question but now that we have MXML, I was wondering if it's worth putting the Callout in the components manifest?
I am running through the components and wanted to create a Callout in a Declaration tag to reuse it and initialize it but it was imported as xmlns:controls="feathers.controls.*".
Again just a question.
Given;
<f:LayoutGroup>
<f:layoutData>
<f:VerticalLayoutData percentWidth="100" percentHeight="100"/>
</f:layoutData>
<f:layout>
<f:AnchorLayout/>
</f:layout>
<f:ImageLoader id="logoImage"
source="{AssetMap.getTexture('logo-60')}"
width="60" height="60">
<f:layoutData>
<f:AnchorLayoutData top="25" left="25"/>
</f:layoutData>
</f:ImageLoader>
<f:Label id="titleLabel" text="{titleText}"
styleName="home-title-label">
<f:layoutData>
<f:AnchorLayoutData top="25" leftAnchorDisplayObject="{logoImage}"/>
</f:layoutData>
</f:Label>
I get the following, intuitively I thought this would and should work, I first tried without the explicit width/height but doesn't work either.
StarlingBootstrap should be able to display a splash screen until Starling is initialized and the application is created. Maybe with a minimum time.
Random notes and ideas:
Here's how Flex does it:
Adobe Flex 4.6: Define a mobile application and a splash screen
SDK downloads and installs in directory perfectly. When adding Feathers SDK to Flash Builder 4.7 i receive the error message "Directory does not contain a Flex SDK" Please advise, excited to try the new SDK
Hi. I'm trying to setup CI with gradle build. Thereis an issue with feathers sdk
I getting this error:
> The following error occurred while executing this line: /root/.gradle/gradleFx/sdks/dad80235945ad594fbc60646f9b4a721752f7af8/installer.xml:146: Reference air.sdk.server.linux.${config.airsdk.linux.versions.default} not found.
Even if i run "gradle -Dair.sdk.version=26" i still getting error:
> The following error occurred while executing this line: /root/.gradle/gradleFx/sdks/dad80235945ad594fbc60646f9b4a721752f7af8/installer.xml:146: Reference air.sdk.server.linux.26 not found.
As i understand, this happens because sdk-manager-config-1.0.xml doesn't contain any linux-platform data.
Why there is no support on linux?
More over - our project doesn't need air, but we can't complete build using gradle.
My current project uses both Screen and PanelScreen as views. Just noticed that Screen uses dispatchEvent(starling.events.Event) while PanelScreen uses dispatchEvent(flash.events.Event).
This is a bit of a problem when expecting a specific event in mediators etc.
Hi,
Is feather components supports resourceManager and compiled css ?
compiled css via mxmlc. (eg. mxmlc src\theme_dark.css -o bin\assets\theme_dark.swf).
My application needs multi-language support. In apache, I could change language locale by
"flex, resourceManager.localeChain=["en_US"]".
But I can't find resource manager in feather components...
Any recommended solution?
I'm putting this here just so if anybody else reads it and wants to chime in.
Background; I have worked extensively with the Falcon compiler mainly in creating/writing the FalconJX compiler FlexJS uses to cross compile AS/MXML to JS.
The problem I see is that I wrote a traversing framework that was a visitor and walker implementation which was an abstraction outside of the actual AST Falcon produces when it parses AS3.
The actual MXML compiler uses JBurg and is completely outside of my knowledge base. I don't off the top of my head know of any hooks to extend MXML generation or even how to start.
I do understand "what" the original compiler does as far as setting up AS to be compiled again so the theory is there for me but I am totally lacking in the vision from start to end of what I need to do to get Falcon to produce different byte code since there is no code generation pass.
Anyway, I think this could be HUGE for Starling and Feathers if it could be done since then we could add a whole bunch of specific things that could enhance the dynamic nature of constructing a Starling/Feathers mobile/desktop app.
I think I will start with posting on the apache dev list.
Adding more than one textEditorPropery via fx:Object results in the error "Cannot create property 0 on feathers.controls.text.StageTextTextEditor."
<f:TextInput verticalAlign="{TextInput.VERTICAL_ALIGN_JUSTIFY}">
<f:layoutData>
<f:AnchorLayoutData top="0" left="0" right="0"/>
</f:layoutData>
<f:textEditorProperties>
<fx:Object multiline="true" />
<fx:Object returnKeyLabel="{ReturnKeyLabel.DONE}"/>
</f:textEditorProperties>
</f:TextInput>
This will cause the error. If I remove one of the fx:Object the input works fine except of course I require the additional objects.
Perhaps I'm going about this wrong.
Hi Josh,
Do you think its possible to add some method to recursive on all children set this property? Like the enabled or mouseChildren on Flex. Or is this related to the way Starling handles the children/parent properties?
Thank you
<f:Button needs id="button" in all spots.
I didn't check but I can't add it in MXML.
Hi Josh,
This issue is related to a starling forum post: http://forum.starling-framework.org/topic/remoteobject-amf-for-feathers?replies=13#post-100337
The problem is that mx.messaging.config.LoaderConfig is a [Mixin] class, and on the method initializeMixins, is called the init(null); that triggers an error on that method of LoaderConfig.
I've tried to extend the StarlingBootstrap and override the method initializeMixins to avoid this particular case, but I get error on "public function info():Object":
Error: Method needs to be implemented in subclass
What do I need to do, so the compiler override this on my extended bootstrap?
Kind regards
Hi,
I created a Flex Library Project, and added some classes.
I referenced the project on the Feathers SDK project.
If I add the metatag [Bindable] to the Class or to some var, will throw this error:
1046: Type was not found or was not a compile-time constant: [flash.events]::IEventDispatcher. Unknown Flex Problem
What can I do? should I reference some FlexSDK swc?
Kind regards
Lists that don't explicitly set either a height or layoutData the creates a height will only render the first item until the list is scrolled. If a list also has the verticalScrollPolicy off, the list will never render more than 1 item.
<f:List id="detailsList" verticalScrollPolicy="off" horizontalScrollPolicy="off">
<f:layoutData>
<f:AnchorLayoutData left=0" right="0" top="0">
</f:layoutData>
</f:List>
If you add either bottom="0" or a height property to the list, it will render fine, but in cases of dynamic data used to build a non scrollable list, this doesn't work.
I think I am running into some bugs you have already fixed but it doesn't look like there is a way to update the sdk other then checking it out and building it right?
Edited by @joshtynjala
A second implicit parameter should be available to MXML events. Just like you can reference an event parameter, data would also be available, and you could optionally pass them both to your listener in the Script block. Example:
triggered="buttonGroup_triggeredHandler(event, data)"
Original Post:
Hey,
I have run into something I haven't tried before and just was wonder if I am missing something or it's just not possible.
Adding an event handler for triggered in MXML, there is no way to get that selectedItem in the dataProvider with a one argument event handler the compiler wants.
<f:ButtonGroup id="buttonGroup" direction="vertical" padding="15" width="300" triggered="buttonGroup_triggeredHandler(event)">
private function buttonGroup_triggeredHandler(event:starling.events.Event, data:Object):void { dispatchEventWith(EVENT_BUTTON_TRIGGERED, false, data); }
I get a;
Error:(30, 0) [PackageManager]: Error code: 1136: Incorrect number of arguments. Expected 2.I am only asking because I thought it might just be one of those things IDEA does but, this is an actual compiler error.
So this seems only possible to do in AS right? If so, is there anyway we could make it work in MXML like above?
"Unkown error" appears if trying to compile class with the [Bindable] field
[Bindable(event="evantName")] works fine
Is it possible to use <s:States> or mx:States in feathers sdk?
And another question is, while I was testing TextArea,
I noticed that when TextArea is not focused and not activated, I could not scroll the text.
Especially, when isEditable="false", I can not scroll the text at all.
Even if isEditable="true", in order to scroll text, I had to explicitly click first.
Is there any property to modify in order to show more intuitive scrolling as native app?
Using Intellij and following the tutorial I still get an "Attribute theme is not allowed here" when trying to set it on the Application tag.
The code;
<f:itemRendererFactory>
<fx:Component>
<f:DefaultListItemRenderer labelField="text"/>
</fx:Component>
</f:itemRendererFactory>
is invalid in IntelliJ, is this expected?
The test application compiles and runs though.
I has compiler "unknown error" in IntelliJ IDEA 2017.1.2 regularly the same like at this issue
#32
In project more than 10 classes with [Bindable] metadata. In some classes more than 20 public properties for this reason I donβt want to use manual PropertyChangeEvent.PROPERTY_CHANGE dispatching.
I try to import starling.events.EventDispatcher in each class, try to switch off "Compile independent modules in parallel" (in project one AS-library module) but still has compiler "unknown error".
Feathers SDK v 3.3.1 with AIR 27.0 SDK.
Added simple project files as you asked. When I remove [Bindable] in several classes then all is fine. Looks like too much [Bindable] metadata in project. Perhaps this is why earlier compiling was without errors.
trying to use custom bootstrap in the mxml metadata
<f:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:f="library://ns.feathersui.com/mxml">
<fx:Metadata>
[Frame(factoryClass="com.example.CustomBootstrap")]
</fx:Metadata>
</f:Application>
AbstractMethodError appears in runtime if trying to invoke info() method
in AS class metatag works fine
Moved from feathersui/feathersui-starling#1161
IntelliJ IDEA known issues should be modified. The cleared -preloader argument isn't picked up from airmobile-config.xml because IntelliJ IDEA likes to do its own thing, so it must be added manually.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.