Skip to content

Commit

Permalink
Version 1.0:
Browse files Browse the repository at this point in the history
- Navigation
- Basic FS commands: Copy/Move/MkDir/Delete
  • Loading branch information
Vadim Usoltsev committed May 9, 2017
1 parent b945d11 commit 26de65f
Show file tree
Hide file tree
Showing 7 changed files with 296 additions and 9 deletions.
2 changes: 1 addition & 1 deletion FlexCommander-app.xml → application.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<!-- A string value of the format <0-999>.<0-999>.<0-999> that represents application version which can be used to check for application upgrade.
Values can also be 1-part or 2-part. It is not necessary to have a 3-part value.
An updated version of application must have a versionNumber value higher than the previous version. Required for namespace >= 2.5. -->
<versionNumber>0.0.8</versionNumber>
<versionNumber>1.0.0</versionNumber>

<!-- A string value (such as "v1", "2.5", or "Alpha 1") that represents the version of the application, as it should be shown to users. Optional. -->
<versionLabel>Alpha</versionLabel>
Expand Down
247 changes: 247 additions & 0 deletions flex-config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,247 @@
<?xml version="1.0"?>
<flex-config>
<compiler>

<!-- Turn on generation of accessible SWFs. -->
<accessible>true</accessible>

<!-- Specifies the locales for internationalization. -->
<!--
<locale>
<locale-element>@locale@</locale-element>
</locale>
-->

<!-- List of path elements that form the roots of ActionScript class hierarchies. -->
<!-- not set -->
<source-path append="true">
<path-element>src</path-element>
</source-path>

<!-- Allow the source-path to have path-elements which contain other path-elements -->
<allow-source-path-overlap>false</allow-source-path-overlap>

<!-- Run the AS3 compiler in a mode that detects legal but potentially incorrect -->
<!-- code. -->
<show-actionscript-warnings>false</show-actionscript-warnings>

<!-- Turn on generation of debuggable SWFs. False by default for mxmlc, -->
<!-- but true by default for compc. -->
<debug>false</debug>


<!-- Turn on writing of generated/*.as files to disk. These files are generated by -->
<!-- the compiler during mxml translation and are helpful with understanding and -->
<!-- debugging Flex applications. -->
<keep-generated-actionscript>false</keep-generated-actionscript>

<!-- not set -->
<!--
<include-libraries>
<library>string</library>
</include-libraries>
-->

<!-- List of SWC files or directories that contain SWC files. -->
<library-path append="true">
<path-element>lib</path-element>
<!--<path-element>libs/mx</path-element>-->
<!--<path-element>locale/{locale}</path-element>-->
<!--<path-element>{playerglobalHome}/{targetPlayerMajorVersion}.{targetPlayerMinorVersion}</path-element>-->
</library-path>

<!-- Enable post-link SWF optimization. -->
<optimize>true</optimize>

<!-- Enable trace statement omission. -->
<omit-trace-statements>true</omit-trace-statements>

<!-- Keep the following AS3 metadata in the bytecodes. -->
<!-- Warning: For the data binding feature in the Flex framework to work properly, -->
<!-- the following metadata must be kept: -->
<!-- 1. Bindable -->
<!-- 2. Managed -->
<!-- 3. ChangeEvent -->
<!-- 4. NonCommittingChangeEvent -->
<!-- 5. Transient -->
<!--
<keep-as3-metadata>
<name>Bindable</name>
<name>Managed</name>
<name>ChangeEvent</name>
<name>NonCommittingChangeEvent</name>
<name>Transient</name>
</keep-as3-metadata>
-->

<!-- Turn on reporting of data binding warnings. For example: Warning: Data binding -->
<!-- will not be able to detect assignments to "foo". -->
<show-binding-warnings>false</show-binding-warnings>

<!-- toggle whether warnings generated from unused type selectors are displayed -->
<show-unused-type-selector-warnings>false</show-unused-type-selector-warnings>

<!-- Run the AS3 compiler in strict error checking mode. -->
<strict>true</strict>

<!-- Use the ActionScript 3 class based object model for greater performance and better error reporting. -->
<!-- In the class based object model most built-in functions are implemented as fixed methods of classes -->
<!-- (-strict is recommended, but not required, for earlier errors) -->
<as3>true</as3>

<!-- Use the ECMAScript edition 3 prototype based object model to allow dynamic overriding of prototype -->
<!-- properties. In the prototype based object model built-in functions are implemented as dynamic -->
<!-- properties of prototype objects (-strict is allowed, but may result in compiler errors for -->
<!-- references to dynamic properties) -->
<es>false</es>


<!-- Turns on the display of stack traces for uncaught runtime errors. -->
<verbose-stacktraces>false</verbose-stacktraces>

<!-- Defines the AS3 file encoding. -->
<!-- not set -->
<!--
<actionscript-file-encoding></actionscript-file-encoding>
-->

<!-- Array.toString() format has changed. -->
<warn-array-tostring-changes>false</warn-array-tostring-changes>

<!-- Assignment within conditional. -->
<warn-assignment-within-conditional>true</warn-assignment-within-conditional>

<!-- Possibly invalid Array cast operation. -->
<warn-bad-array-cast>true</warn-bad-array-cast>

<!-- Non-Boolean value used where a Boolean value was expected. -->
<warn-bad-bool-assignment>true</warn-bad-bool-assignment>

<!-- Invalid Date cast operation. -->
<warn-bad-date-cast>true</warn-bad-date-cast>

<!-- Unknown method. -->
<warn-bad-es3-type-method>true</warn-bad-es3-type-method>

<!-- Unknown property. -->
<warn-bad-es3-type-prop>true</warn-bad-es3-type-prop>

<!-- Illogical comparison with NaN. Any comparison operation involving NaN will evaluate to false because NaN != NaN. -->
<warn-bad-nan-comparison>true</warn-bad-nan-comparison>

<!-- Impossible assignment to null. -->
<warn-bad-null-assignment>true</warn-bad-null-assignment>

<!-- Illogical comparison with null. -->
<warn-bad-null-comparison>true</warn-bad-null-comparison>

<!-- Illogical comparison with undefined. Only untyped variables (or variables of type *) can be undefined. -->
<warn-bad-undefined-comparison>true</warn-bad-undefined-comparison>

<!-- Boolean() with no arguments returns false in ActionScript 3.0. Boolean() returned undefined in ActionScript 2.0. -->
<warn-boolean-constructor-with-no-args>false</warn-boolean-constructor-with-no-args>

<!-- __resolve is no longer supported. -->
<warn-changes-in-resolve>false</warn-changes-in-resolve>

<!-- Class is sealed. It cannot have members added to it dynamically. -->
<warn-class-is-sealed>true</warn-class-is-sealed>

<!-- Constant not initialized. -->
<warn-const-not-initialized>true</warn-const-not-initialized>

<!-- Function used in new expression returns a value. Result will be what the -->
<!-- function returns, rather than a new instance of that function. -->
<warn-constructor-returns-value>false</warn-constructor-returns-value>

<!-- EventHandler was not added as a listener. -->
<warn-deprecated-event-handler-error>false</warn-deprecated-event-handler-error>

<!-- Unsupported ActionScript 2.0 function. -->
<warn-deprecated-function-error>true</warn-deprecated-function-error>

<!-- Unsupported ActionScript 2.0 property. -->
<warn-deprecated-property-error>true</warn-deprecated-property-error>

<!-- More than one argument by the same name. -->
<warn-duplicate-argument-names>true</warn-duplicate-argument-names>

<!-- Duplicate variable definition -->
<warn-duplicate-variable-def>true</warn-duplicate-variable-def>

<!-- ActionScript 3.0 iterates over an object's properties within a "for x in target" statement in random order. -->
<warn-for-var-in-changes>false</warn-for-var-in-changes>

<!-- Importing a package by the same name as the current class will hide that class identifier in this scope. -->
<warn-import-hides-class>true</warn-import-hides-class>

<!-- Use of the instanceof operator. -->
<warn-instance-of-changes>true</warn-instance-of-changes>

<!-- Internal error in compiler. -->
<warn-internal-error>true</warn-internal-error>

<!-- _level is no longer supported. For more information, see the flash.display package. -->
<warn-level-not-supported>true</warn-level-not-supported>

<!-- Missing namespace declaration (e.g. variable is not defined to be public, private, etc.). -->
<warn-missing-namespace-decl>true</warn-missing-namespace-decl>

<!-- Negative value will become a large positive value when assigned to a uint data type. -->
<warn-negative-uint-literal>true</warn-negative-uint-literal>

<!-- Missing constructor. -->
<warn-no-constructor>false</warn-no-constructor>

<!-- The super() statement was not called within the constructor. -->
<warn-no-explicit-super-call-in-constructor>false</warn-no-explicit-super-call-in-constructor>

<!-- Missing type declaration. -->
<warn-no-type-decl>true</warn-no-type-decl>

<!-- In ActionScript 3.0, white space is ignored and '' returns 0. Number() returns -->
<!-- NaN in ActionScript 2.0 when the parameter is '' or contains white space. -->
<warn-number-from-string-changes>false</warn-number-from-string-changes>

<!-- Change in scoping for the this keyword. Class methods extracted from an -->
<!-- instance of a class will always resolve this back to that instance. In -->
<!-- ActionScript 2.0 this is looked up dynamically based on where the method -->
<!-- is invoked from. -->
<warn-scoping-change-in-this>false</warn-scoping-change-in-this>

<!-- Inefficient use of += on a TextField.-->
<warn-slow-text-field-addition>true</warn-slow-text-field-addition>

<!-- Possible missing parentheses. -->
<warn-unlikely-function-value>true</warn-unlikely-function-value>

<!-- Possible usage of the ActionScript 2.0 XML class. -->
<warn-xml-class-has-changed>false</warn-xml-class-has-changed>

</compiler>

<!-- compute-digest: writes a digest to the catalog.xml of a library. Use this when the library will be used as a
cross-domain rsl.-->
<!-- compute-digest usage:
<compute-digest>boolean</compute-digest>
-->

<!-- remove-unused-rsls: remove RSLs that are not being used by the application-->
<remove-unused-rsls>true</remove-unused-rsls>

<!-- static-link-runtime-shared-libraries: statically link the libraries specified by the -runtime-shared-libraries-path option.-->
<static-link-runtime-shared-libraries>true</static-link-runtime-shared-libraries>

<!-- Enables SWFs to access the network. -->
<use-network>true</use-network>

<!-- Metadata added to SWFs via the SWF Metadata tag. -->
<metadata>
<title>Flex Navigator</title>
<description>-</description>
<publisher>koldoon</publisher>
<creator>koldoon</creator>
<language>en</language>
</metadata>

</flex-config>
8 changes: 7 additions & 1 deletion src/ru/koldoon/fc/Main.mxml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,19 @@
id="rightPanel" position="right"
right="0" bottom="85" top="20" width="{width / 2 - 10}"/>

<!--
<s:TextInput
bottom="85" height="55" left="0" right="0"
skinClass="ru.koldoon.fc.resources.skins.input.TextInputBorderedSkin"
tabFocusEnabled="false"/>
-->

<s:List
id="functionKeyList"
bottom="15" left="0" right="0" minHeight="0"
itemRenderer="ru.koldoon.fc.c.fn.FunctionKeyRenderer"
skinClass="ru.koldoon.fc.resources.skins.list.ListTransparentSkin"
preventSelection="true" focusEnabled="false" cacheAsBitmap="true"
preventSelection="true" focusEnabled="false"
click="functionKeyList_clickHandler(event)">

<s:layout>
Expand Down
22 changes: 22 additions & 0 deletions src/ru/koldoon/fc/c/windows/DialogWindow.as
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package ru.koldoon.fc.c.windows {
import mx.events.FlexNativeWindowBoundsEvent;

import spark.components.Window;

public class DialogWindow extends Window {
public function DialogWindow() {
renderMode = "gpu";
resizable = false;
showStatusBar = false;
minimizable = false;
maximizable = false;

addEventListener(FlexNativeWindowBoundsEvent.WINDOW_MOVE, windowMoveHandler);
}


private function windowMoveHandler(event:FlexNativeWindowBoundsEvent):void {
event.stopImmediatePropagation();
}
}
}
22 changes: 17 additions & 5 deletions src/ru/koldoon/fc/m/app/impl/commands/env/InitMainMenuCommand.as
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ package ru.koldoon.fc.m.app.impl.commands.env {

import mx.events.AIREvent;

import ru.koldoon.fc.c.windows.DialogWindow;
import ru.koldoon.fc.m.app.IApplication;
import ru.koldoon.fc.m.app.impl.commands.AbstractCommand;

import spark.components.Window;

public class InitMainMenuCommand extends AbstractCommand {

/**
Expand Down Expand Up @@ -42,9 +41,22 @@ package ru.koldoon.fc.m.app.impl.commands.env {


private function example_selectHandler(event:Event):void {
var w:Window = new Window();
w.alwaysInFront = true;
w.showStatusBar = false;
// var nvo:NativeWindowInitOptions = new NativeWindowInitOptions();
// nvo.systemChrome = NativeWindowSystemChrome.STANDARD;
// nvo.type = NativeWindowType.NORMAL;
// nvo.renderMode = NativeWindowRenderMode.GPU;
// nvo.owner = FlexGlobals.topLevelApplication.stage.nativeWindow;
//
// var nv:NativeWindow = new NativeWindow(nvo);
// nv.activate();
//
// var tpd:TransferPrepareDialog = new TransferPrepareDialog();
// nv.stage.addChild(tpd);

var w:DialogWindow = new DialogWindow();
w.width = 600;
w.height = 400;
w.title = "Example Window";
w.renderMode = NativeWindowRenderMode.GPU;
w.open();
w.addEventListener(AIREvent.WINDOW_DEACTIVATE, function (e:AIREvent):void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ package ru.koldoon.fc.m.app.impl.commands.env {
this.app = app;
this.context = app.getContext();

context.installCommand(new InitMainMenuCommand());
// context.installCommand(new InitMainMenuCommand());

context.installCommand(new GoToLastNodeCommand());
context.installCommand(new GoToFirstNodeCommand());
Expand Down
2 changes: 1 addition & 1 deletion version.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var fs = require( "fs" );
var file = "./FlexCommander-app.xml";
var file = "./application.xml";

var VERSION_RXP = /<versionNumber>(\d+).(\d+).(\d+)<\/versionNumber>/m;
var data = fs.readFileSync( file, "utf8" );
Expand Down

0 comments on commit 26de65f

Please sign in to comment.