You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Lane <la...@hotmail.com> on 2016/10/27 08:38:26 UTC
Slider and circular dependency
I'm preparing a release version of what appears to be a stable FlexJS
program (my special thanks to those who have made this possible). It
contains a slider, generated as follows:
<js:Slider id="circuitsSlider" width="800" x="20" y="105"
minimum="0" maximum="242" snapInterval="1"
mouseUp="sliderChange()"/>
The sliderChange method accesses the value of the slider, which by
definition is always current after a mouseUp.
Two questions:
1) I am using mouseUp because there is apparently no change property
activated yet for a Slider in FlexJS. It's not perfect, but it does the job
(as long as one does not move the mouse a long distance from the slider
before releasing it, or off the app itself, yielding an error). Is there a
better way to capture slider movement than mouseUp and then slider.value?
2) To release the program, I go to Run, Express Tools, and then Option 7
(Flashbuilder 4.7). I am receiving the following error:
Oct 27, 2016 4:52:41 PM com.google.javascript.jscomp.LoggerErrorManager
println
SEVERE: ERROR - Circular dependency detected: org.apache.flex.html.Slider ->
org.apache.flex.html.beads.controllers.SliderMouseController ->
org.apache.flex.html.Slider
The section on Circular Dependencies on the Apache site suggests that one
might perhaps use the "-remove-circulars option" on the compiler (with the
word remove crossed out in the HTML which I find a bit puzzling). When I
place the expression "-remove-circulars" (without the quotes) in the
compiler (Project-Properties-Flex Compiler-Additional Compiler Operations),
it is not accepted. Is this the best way to handle this particular circular
dependency, and if so, what precise expression does one place in the
compiler as an option so that it will be accepted?
Thanks,
Lane.
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Re: Slider and circular dependency
Posted by Lane <la...@hotmail.com>.
Thanks Alex.
Lane.
-----Original Message-----
From: Alex Harui
Sent: Friday, October 28, 2016 9:22 AM
To: users@flex.apache.org
Subject: Re: Slider and circular dependency
On 10/27/16, 5:13 PM, "Lane" <la...@hotmail.com> wrote:
>Hi Alex,
>
>Thanks. I was placing the -remove-circulars in the wrong section. It
>worked
>after I applied the change, and then exited Flashbuilder completely and
>restarted it (just applying the change resulted in Flashbuilder being
>unable
>to find the program and delivering an error).
>
>There appears to be one final problem. I have an array. I want to sort
>the
>array and have another array (not just a pointer to the same array). I'm
>using the following function:
>
>private function clone(source:Object):*
>{
> var myBA:ByteArray = new ByteArray();
> myBA.writeObject(source);
> myBA.position = 0;
> return(myBA.readObject());
>}
>
>ByteArray appears to be related to Flash and doesn't compile. What
>substitute would one use in FlexJS?
We won't have a good clone() or deep copy mechanism until we get further
down the AMF path.
I'm sure you realize you can copy an Array of simple values via
Array.slice(); If you want to contribute a deep copy algorithm, you can
try using the Reflection APIs to do it.
Thanks,
-Alex
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Re: Slider and circular dependency
Posted by Alex Harui <ah...@adobe.com>.
On 10/27/16, 5:13 PM, "Lane" <la...@hotmail.com> wrote:
>Hi Alex,
>
>Thanks. I was placing the -remove-circulars in the wrong section. It
>worked
>after I applied the change, and then exited Flashbuilder completely and
>restarted it (just applying the change resulted in Flashbuilder being
>unable
>to find the program and delivering an error).
>
>There appears to be one final problem. I have an array. I want to sort
>the
>array and have another array (not just a pointer to the same array). I'm
>using the following function:
>
>private function clone(source:Object):*
>{
> var myBA:ByteArray = new ByteArray();
> myBA.writeObject(source);
> myBA.position = 0;
> return(myBA.readObject());
>}
>
>ByteArray appears to be related to Flash and doesn't compile. What
>substitute would one use in FlexJS?
We won't have a good clone() or deep copy mechanism until we get further
down the AMF path.
I'm sure you realize you can copy an Array of simple values via
Array.slice(); If you want to contribute a deep copy algorithm, you can
try using the Reflection APIs to do it.
Thanks,
-Alex
Re: Slider and circular dependency
Posted by Lane <la...@hotmail.com>.
Hi Alex,
Thanks. I was placing the -remove-circulars in the wrong section. It worked
after I applied the change, and then exited Flashbuilder completely and
restarted it (just applying the change resulted in Flashbuilder being unable
to find the program and delivering an error).
There appears to be one final problem. I have an array. I want to sort the
array and have another array (not just a pointer to the same array). I'm
using the following function:
private function clone(source:Object):*
{
var myBA:ByteArray = new ByteArray();
myBA.writeObject(source);
myBA.position = 0;
return(myBA.readObject());
}
ByteArray appears to be related to Flash and doesn't compile. What
substitute would one use in FlexJS?
Thanks again,
Lane.
-----Original Message-----
From: Alex Harui
Sent: Thursday, October 27, 2016 5:33 PM
To: users@flex.apache.org
Subject: Re: Slider and circular dependency
On 10/27/16, 1:38 AM, "Lane" <la...@hotmail.com> wrote:
>The section on Circular Dependencies on the Apache site suggests that one
>might perhaps use the "-remove-circulars option" on the compiler (with
>the
>word remove crossed out in the HTML which I find a bit puzzling). When I
>place the expression "-remove-circulars" (without the quotes) in the
>compiler (Project-Properties-Flex Compiler-Additional Compiler
>Operations),
>it is not accepted. Is this the best way to handle this particular
>circular
>dependency, and if so, what precise expression does one place in the
>compiler as an option so that it will be accepted?
From the menus: Run
External Tools
External Tools Configuration
Select: FlexJS (FalconJX Debug and Release Build)
And add -remove-circulars to the beginning of arguments list.
It may not work if you add it after the -fb argument.
-Alex
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Re: Slider and circular dependency
Posted by Alex Harui <ah...@adobe.com>.
On 10/27/16, 1:38 AM, "Lane" <la...@hotmail.com> wrote:
>The section on Circular Dependencies on the Apache site suggests that one
>might perhaps use the "-remove-circulars option" on the compiler (with
>the
>word remove crossed out in the HTML which I find a bit puzzling). When I
>place the expression "-remove-circulars" (without the quotes) in the
>compiler (Project-Properties-Flex Compiler-Additional Compiler
>Operations),
>it is not accepted. Is this the best way to handle this particular
>circular
>dependency, and if so, what precise expression does one place in the
>compiler as an option so that it will be accepted?
From the menus: Run
External Tools
External Tools Configuration
Select: FlexJS (FalconJX Debug and Release Build)
And add -remove-circulars to the beginning of arguments list.
It may not work if you add it after the -fb argument.
-Alex