Flex 4.5 / Apache Flex UI Framework Architecture - actionscript-3

Is there any framework for UI development in Flex 4.5 ? Better standard for creating UI view layers using Action script. Also how to create states and state transitions in Action script?

Is there any framework for UI development in Flex 4.5 ?
Flex is a framework for UI Development. You can read up on the Flex Component Lifecycle for more information on how it works.
Better standard for creating UI view layers using Action script.
I don't understand what you're asking for here. You want a better standard than what?
Also how to create states and state transitions in Action script?
You can create states and state transitions in ActionScript similar to how you do it in MXML. Every component has a states array; and each entry in the state array will be an instance of the State class which will have a bunch of 'commands' to add or remove children or change properties. The full list is in the state class API documentation under the related API elements header.
Setting up states in ActionScript is tedious, though.

Related

Integrating game with libGDX

I have multiplatform 2d game made in kotlin, which has its own game-loop, fires evens which then can be used to construct GUI/modify it. The project is very modular and quite flexible.
The game loop has multiple implementations using coroutines, java threads, javascript requestAnimationFrame, setInterval, etc.
I have multiple implementations of GUI, including text interface and HTML/javascript.
Now I decide to give it a try and make GUI using libGDX. I am playing around with it a bit trying to integrate it with each other (first using "desktop" platform).
My game loop goes through all necessary components like "unit spawner", "unit container", "projectile container", etc. passing "delta" to all of these. These components are firing different events like "unit moved", "projectile fired", etc.
If I understand correctly, so far I see 2 options on how to integrate:
Keep my gameloop, collect relevant events related to UI update and then update all of them in render function of my ApplicationAdapter (because I cannot render outside of render methods, right?).
Use Actor class and for every component (or group of components) and use it's render and basically let libGDX handle gameloop for me.
How would you proceed? Are there any other options to go?
I want to keep my design flexible and modular, not to be tightly bound to libGDX, and rather make it another GUI implementation if possible.

Android UI Components still running when React component is unmounted with react-router-native

When moving my app's navigation handling from react-native-router-flux to react-router-native, I seem to have uncovered an issue in how my app's native UI omponents are handled.
My app has several animated data plots that I've implemented in Java and imported into React Native as Native UI Components. The visualizations are powered by some resource-hungry runnables on background threads that get started when the ui component is loaded. Previously, I stopped these threads by changing a prop of the native ui component (isVisible) to false.
However, when navigating away from a screen containing one of these native ui components with react-router-native (which unmounts components upon transition), even though componentWillUnmount is called in the react component, the native threads powering my plots keep running.
I tried to shut them down by changing the native ui component prop isVisible to false in componentWillUnmount, but even that doesn't fix the problem. Perhaps because there isn't another render of that component after componentWillUnmount?
Does anyone have any ideas on how to force a native UI component and all of its processes to shut down when it's parent is unmounted?
After fiddling around for a while I came up with a solution that I thought I should share here.
It's not included in the React Native docs, but there is a function called onDropViewInstance that is called in the React SimpleViewManager class whenever a Native Java UI Components is unmounted.
In order to get around my problem of having some thread still running, all I had to do was explicitly stop those threads in that onDropViewInstance function.

Bind TreeView.SelectedItem to a property in the ViewModel in a WinRT app

In my Windows Store XAML app I’m using the TreeView control from the WinRTXamlToolkit and I’m attempting to two-way bind the SelectedItem property to a property on a ViewModel.
Out of the box, the SelectedItem property is read only and this makes sense because the control supports Virtualization.
I have seen some folk work around this with things like attached properties, helper methods and so forth, a great example of which is seen in this question
WPF MVVM TreeView SelectedItem
But all of the questions/solutions are not based on WinRT and all of my attempts to rework the solution code for a WinRT app have proven fruitless.
So, my question is, is this possible in a WinRT app? What am I missing?
Thanks
I'd skip trying to come up with a bindable property globally for the view model and instead use the IsSelectedBindingPath and IsExpandedBindingPath properties of the TreeView as in the debugging tools' example of the control's usage. Then when you want to select/expand an item from the view model - use a method similar to SelectItem() in my view model where I essentially set IsExpanded/IsSelected to true in item/node view models throughout the path from the root of the view model tree and load the content of the tree if the nodes in the expected path do not exist.

Custom Container ViewController Xamarin / Monotouch Example

Does anyone have a simple C# Example showing how you could use Custom Container ViewControllers with Xamarin / Monotouch as per this Apple documentation -
http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/CreatingCustomContainerViewControllers/CreatingCustomContainerViewControllers.html
Instead of posting question, thought would be more helpful to go away and create an example.
https://github.com/wickedw/ViewControllerContainer/blob/master/README.md
Readme Excerpt
I got to a point within a project whereby I wanted to display 3 different "Screens" of information based on a user selection.
The TabBarController was not appropriate as the GUI sat within a UINavigationController hierarchy. Yet, the UISegmentedControl fitted the design well.
I already had my views fully coded as seperate ViewControllers (and not all using the same creation pattern, some used Monotouch Dialog, others Nib files, others Programmatic).
Therefore, I did not want to rewrite existing code to use a Single ViewController controlling multiple Views.
I also thought it was time I looked at "Custom ViewController Containers" as they seemed an ideal fit for this scenario.

Flex Toast style windows

How can i create toast style windows in Flex MXML application like following?
http://www.adobe.com/devnet/air/flex/quickstart/articles/creating_toast-style_windows.html
I want to use this component in flex MXML where as this component is based on Action Script.
Was anyone able to recreate or use it in MXML project?
I reused some of the files and made it work in Flex Builder 3. :)