Code Monkey home page Code Monkey logo

feathersui / feathersui-starling-sdk Goto Github PK

View Code? Open in Web Editor NEW
42.0 13.0 13.0 247.21 MB

SDK for building Feathers UI (AS3/Starling) applications with MXML

Home Page: https://feathersui.com/learn/as3-starling/sdk/

License: Apache License 2.0

JavaScript 0.37% XSLT 3.79% HTML 0.38% CSS 1.23% ActionScript 18.55% Shell 1.46% Java 73.44% C++ 0.05% C 0.02% Awk 0.01% Batchfile 0.20% Roff 0.30% AngelScript 0.15% sed 0.01% VBScript 0.02% ASP.NET 0.03%
actionscript mxml compiler starling-framework feathers-ui adobe-flash-player adobe-air starling

feathersui-starling-sdk's Introduction

Feathers SDK 4.2.0

The Feathers SDK provides custom ActionScript and MXML compilers specifically designed for apps built with Starling Framework and Feathers UI (Starling) components. This SDK makes building Starling and Feathers projects easier by simplifying project setup in supported IDEs and by providing more appropriate defaults (such as using "direct" render mode). The MXML compiler has been overhauled to work with Starling events and Feathers components.

Quick Links

Included Libraries

  • Feathers UI (Starling) 4.2.0
  • Starling Framework 2.7

Minimum Requirements

  • Adobe AIR 32.0 for desktop or mobile apps
  • Adobe Flash Player 19.0 for web browsers

Downloads

To download the latest stable version of Feathers SDK, visit feathersui.com.

feathersui-starling-sdk's People

Contributors

aharui avatar akamud avatar bdelacretaz avatar bigosmallm avatar carlosrovira avatar chrsmrtn- avatar cosmacol avatar cyrillzadra avatar danielshahaf avatar dloverin avatar doublefx avatar erikdebruin avatar evolverine avatar harbs avatar joaofernandes avatar josebarragan avatar joshtynjala avatar justinmclean avatar kesslerconsulting avatar kevingodell avatar mauriceamsellem avatar pentapache avatar piotrzarzycki21 avatar quetwo avatar s9tpepper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

feathersui-starling-sdk's Issues

Compiler doesn't override info method in the custom bootstrap

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

TextInput.prompt Bindable

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?

HorizontalLayout and HorizontalLayoutData of LayoutGroupListItemRenderer inside a List

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

Installer Installation Failed

image

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:
image

[Bindable] tag doesn't work

"Unkown error" appears if trying to compile class with the [Bindable] field

[Bindable(event="evantName")] works fine

GroupedList - Index is out of Range error

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.

  1. Create a list with at least 1 group.
  2. Throw the list upwards (north) as hard as you can

Result is a Index is out of Range error.

Error message on installing SDK in DB 4.7

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

resourceManager and external compiled css

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?

Feathers SDK compiler "unknown error" when using [Bindable] metadata.

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.

errapp.zip

Linux support

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.

Setting multiple textEditorProperties results in Error

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.

can I use states? and about TextArea...

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?

dispatchEvent inconsistencies with <f:Screen> & <f:PanelScreen>

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.

AnchorLayout problem with ImageLoader

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.

capture

Implement new SDK compiler using the Falcon compiler

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.

[Bindable] on Class throws Flex error

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

MXML: add implicit data parameter to code-generated Starling event listeners

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?

Install method differs from Apache Flex SDK

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.

List without explicit height only shows first item.

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.

Setting topAnchorDisplayObject sets width to null on Anchor

Just ran into this.

  1. Working in a PanelScreen with and AnchorLayout
  2. Created a HRule Component in MXML (simple FeathersControl that draws a Quad on creationComplete)
  3. In the PanelScreen, If I set a control to use the HRule as the anchor, the HRule's width becomes null. If I don't anchor to it, the width is fine (set using left and right properties)

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>

Feathers SDK Installer stuck

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.

image

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

https://pastebin.com/EgrFYR7X

Any ideas?

IntelliJ <fx:Component> error

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.

Library swc with [Bindable] "unknown error"

Just curious if you have ever run into this before trying to use [Bindable] in a library project.

Months ago I go it as well but just was tinkering again with a mxml component in a library and ran into this again.

capture

Extending StarlingBootstrap

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

LayoutGroup touchable

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

Callout defined for MXML

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.

IntelliJ - Feathers source paths not added to Sourcepath for SDK

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.