You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by OmPrakash Muppirala <bi...@gmail.com> on 2014/11/25 19:45:51 UTC

[FlexJS] Package name for mx.states.*

The mx.states package in FlexJSUI is causing a collision with the Flex
SDK's mx.states package.  Is there a reason why they have the same package
names.

Why not org.apache.flex.states instead?

Is there a way to tell FB to use FlexJSUI's mx.states.* instead of the Flex
SDK's?  Here is what I tried on my FlexJSJX project:
1. I tried removing the mx swc from the Flex SDK library path
2. I moved FlexJS up in the dependency list in the build path.

No luck.  I am still getting these errors:

Description Resource Path Location Type
1119: Access of possibly undefined property document through a reference
with static type mx.states:SetEventHandler. StatesWithTransitionsImpl.as
/FlexJSJX/src/org/apache/flex/core line 213 Flex Problem
1119: Access of possibly undefined property document through a reference
with static type mx.states:SetEventHandler. StatesWithTransitionsImpl.as
/FlexJSJX/src/org/apache/flex/core line 217 Flex Problem
1119: Access of possibly undefined property document through a reference
with static type mx.states:SetEventHandler. StatesWithTransitionsImpl.as
/FlexJSJX/src/org/apache/flex/core line 284 Flex Problem
1119: Access of possibly undefined property document through a reference
with static type mx.states:SetEventHandler. StatesWithTransitionsImpl.as
/FlexJSJX/src/org/apache/flex/core line 288 Flex Problem
1119: Access of possibly undefined property document through a reference
with static type mx.states:SetProperty. StatesWithTransitionsImpl.as
/FlexJSJX/src/org/apache/flex/core line 204 Flex Problem
1119: Access of possibly undefined property document through a reference
with static type mx.states:SetProperty. StatesWithTransitionsImpl.as
/FlexJSJX/src/org/apache/flex/core line 206 Flex Problem
1119: Access of possibly undefined property document through a reference
with static type mx.states:SetProperty. StatesWithTransitionsImpl.as
/FlexJSJX/src/org/apache/flex/core line 270 Flex Problem
1119: Access of possibly undefined property document through a reference
with static type mx.states:SetProperty. StatesWithTransitionsImpl.as
/FlexJSJX/src/org/apache/flex/core line 271 Flex Problem
1119: Access of possibly undefined property document through a reference
with static type mx.states:SetProperty. StatesWithTransitionsImpl.as
/FlexJSJX/src/org/apache/flex/core line 275 Flex Problem
1119: Access of possibly undefined property document through a reference
with static type mx.states:SetProperty. StatesWithTransitionsImpl.as
/FlexJSJX/src/org/apache/flex/core line 276 Flex Problem
1119: Access of possibly undefined property previousValue through a
reference with static type mx.states:SetProperty.
StatesWithTransitionsImpl.as /FlexJSJX/src/org/apache/flex/core line 204 Flex
Problem
1119: Access of possibly undefined property previousValue through a
reference with static type mx.states:SetProperty.
StatesWithTransitionsImpl.as /FlexJSJX/src/org/apache/flex/core line 206 Flex
Problem
1119: Access of possibly undefined property previousValue through a
reference with static type mx.states:SetProperty.
StatesWithTransitionsImpl.as /FlexJSJX/src/org/apache/flex/core line 270 Flex
Problem
1119: Access of possibly undefined property previousValue through a
reference with static type mx.states:SetProperty.
StatesWithTransitionsImpl.as /FlexJSJX/src/org/apache/flex/core line 275 Flex
Problem
1178: Attempted access of inaccessible property document through a
reference with static type mx.states:AddItems. StatesWithTransitionsImpl.as
/FlexJSJX/src/org/apache/flex/core line 237 Flex Problem
1178: Attempted access of inaccessible property document through a
reference with static type mx.states:AddItems. StatesWithTransitionsImpl.as
/FlexJSJX/src/org/apache/flex/core line 244 Flex Problem
1178: Attempted access of inaccessible property document through a
reference with static type mx.states:AddItems. StatesWithTransitionsImpl.as
/FlexJSJX/src/org/apache/flex/core line 249 Flex Problem

Re: [FlexJS] Package name for mx.states.*

Posted by Alex Harui <ah...@adobe.com>.

On 11/25/14, 2:41 PM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:

>
>> I’m not sure if the hooks from FB are that low level.  I can
>> try it myself if you want.  Did you make sure that FlexJS and not
>>regular
>> Flex is compiling the code?  Is it using a FlexJS flex-config?  Also,
>>did
>> you restart FB?  It can cache SWCs in memory and further complicate
>>things.
>>
>
>I managed to fix this problem by removing the framework.swc from the Flex
>SDK build path.  That is where mx.states.* comes from.  I did this for
>FlexJSJX, FlexJSUI and MXMLClasses projects.  Now there are no such
>compile
>errors.  I am able to resume work on this using FB, so I can live with
>this
>setup :-)

That sounds like the FlexJSJX project is using a regular Flex SDK.  The
only things in its library path should be playerglobal.swc or
airglobal.swc, FlexJSUI.swc and possibly MXMLClasses.swc.  Restricting the
library-path should also help catch accidental dependencies outside of
FlexJS and the runtime.

-Alex


Re: [FlexJS] Package name for mx.states.*

Posted by OmPrakash Muppirala <bi...@gmail.com>.
>
> >Yes,  I have been using FB all this while with no issues.   But it looks
> >like FlexJSUI's mx.states has started deviating from the Flex SDK version.
> >Which is manifesting as a problem now.
>
> In theory it should be ok to deviate from the API surface of the current
> Flex SDK.


Of course, it is okay.  My point was: it was always pointing to the wrong
mx.states package (i.e. the one in the Flex SDK) and since nothing changed
in the new mx.states package, this problem was hidden.  Now that things
started deviating, we hit this problem, which is a good thing.


> I’m not sure if the hooks from FB are that low level.  I can
> try it myself if you want.  Did you make sure that FlexJS and not regular
> Flex is compiling the code?  Is it using a FlexJS flex-config?  Also, did
> you restart FB?  It can cache SWCs in memory and further complicate things.
>

I managed to fix this problem by removing the framework.swc from the Flex
SDK build path.  That is where mx.states.* comes from.  I did this for
FlexJSJX, FlexJSUI and MXMLClasses projects.  Now there are no such compile
errors.  I am able to resume work on this using FB, so I can live with this
setup :-)

Yeah, long term, if we can remove all dependencies on the existing Flex
SDK, that would be good, especially from an IDE point of view.

Thanks,
Om

Re: [FlexJS] Package name for mx.states.*

Posted by Alex Harui <ah...@adobe.com>.

On 11/25/14, 11:02 AM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:

>On Nov 25, 2014 10:56 AM, "Alex Harui" <ah...@adobe.com> wrote:
>>
>>
>>
>> On 11/25/14, 10:45 AM, "OmPrakash Muppirala" <bi...@gmail.com>
>>wrote:
>>
>> >The mx.states package in FlexJSUI is causing a collision with the Flex
>> >SDK's mx.states package.  Is there a reason why they have the same
>package
>> >names.
>>
>> I was previously unable to get FB to recognize a FlexJS SDK as a Flex
>>SDK
>> (needed to get MXML handling in the editor).  I plan to try again
>>someday,
>> although others are welcome to take a shot at it sooner.
>
>How would I go about doing that?  Any pointers?

You’d have to set up the SDK without any mx classes and debug the errors.
I think even Falcon has some assumptions right now, and FB code may have
more.  One thing that has changed since I last tried it is that FB no
longer uses MXMLC to compile the project so that could make the problem
easier to solve.

>
>>
>> >
>> >Is there a way to tell FB to use FlexJSUI's mx.states.* instead of the
>> >Flex
>> >SDK's?
>>
>> I haven’t tried FlexJSJX as an FB project.  I did have FlexJSUI as an FB
>> project, but haven’t tried that in a while.  Did you get that far?
>
>Yes,  I have been using FB all this while with no issues.   But it looks
>like FlexJSUI's mx.states has started deviating from the Flex SDK version.
>Which is manifesting as a problem now.

In theory it should be ok to deviate from the API surface of the current
Flex SDK.  I’m not sure if the hooks from FB are that low level.  I can
try it myself if you want.  Did you make sure that FlexJS and not regular
Flex is compiling the code?  Is it using a FlexJS flex-config?  Also, did
you restart FB?  It can cache SWCs in memory and further complicate things.

-Alex


Re: [FlexJS] Package name for mx.states.*

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Nov 25, 2014 10:56 AM, "Alex Harui" <ah...@adobe.com> wrote:
>
>
>
> On 11/25/14, 10:45 AM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:
>
> >The mx.states package in FlexJSUI is causing a collision with the Flex
> >SDK's mx.states package.  Is there a reason why they have the same
package
> >names.
>
> I was previously unable to get FB to recognize a FlexJS SDK as a Flex SDK
> (needed to get MXML handling in the editor).  I plan to try again someday,
> although others are welcome to take a shot at it sooner.

How would I go about doing that?  Any pointers?

>
> >
> >Is there a way to tell FB to use FlexJSUI's mx.states.* instead of the
> >Flex
> >SDK's?
>
> I haven’t tried FlexJSJX as an FB project.  I did have FlexJSUI as an FB
> project, but haven’t tried that in a while.  Did you get that far?

Yes,  I have been using FB all this while with no issues.   But it looks
like FlexJSUI's mx.states has started deviating from the Flex SDK version.
Which is manifesting as a problem now.

>
> There are some mx class stubs in the FlexJS MXMLClasses project.  That SWC
> might help.

Okay, i will take a look at that.

Thanks,
Om
>
> -Alex
>

Re: [FlexJS] Package name for mx.states.*

Posted by Alex Harui <ah...@adobe.com>.

On 11/25/14, 10:45 AM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:

>The mx.states package in FlexJSUI is causing a collision with the Flex
>SDK's mx.states package.  Is there a reason why they have the same package
>names.

I was previously unable to get FB to recognize a FlexJS SDK as a Flex SDK
(needed to get MXML handling in the editor).  I plan to try again someday,
although others are welcome to take a shot at it sooner.

>
>Is there a way to tell FB to use FlexJSUI's mx.states.* instead of the
>Flex
>SDK's?

I haven’t tried FlexJSJX as an FB project.  I did have FlexJSUI as an FB
project, but haven’t tried that in a while.  Did you get that far?

There are some mx class stubs in the FlexJS MXMLClasses project.  That SWC
might help.

-Alex


Re: [FlexJS] Package name for mx.states.*

Posted by OmPrakash Muppirala <bi...@gmail.com>.
>
> I moved FlexJS up in the dependency list in the build path.


I meant: I moved FlexJSUI up in the dependency list in the build path.

On Tue, Nov 25, 2014 at 10:45 AM, OmPrakash Muppirala <bi...@gmail.com>
wrote:

> The mx.states package in FlexJSUI is causing a collision with the Flex
> SDK's mx.states package.  Is there a reason why they have the same package
> names.
>
> Why not org.apache.flex.states instead?
>
> Is there a way to tell FB to use FlexJSUI's mx.states.* instead of the
> Flex SDK's?  Here is what I tried on my FlexJSJX project:
> 1. I tried removing the mx swc from the Flex SDK library path
> 2. I moved FlexJS up in the dependency list in the build path.
>
> No luck.  I am still getting these errors:
>
> Description Resource Path Location Type
> 1119: Access of possibly undefined property document through a reference
> with static type mx.states:SetEventHandler. StatesWithTransitionsImpl.as
> /FlexJSJX/src/org/apache/flex/core line 213 Flex Problem
> 1119: Access of possibly undefined property document through a reference
> with static type mx.states:SetEventHandler. StatesWithTransitionsImpl.as
> /FlexJSJX/src/org/apache/flex/core line 217 Flex Problem
> 1119: Access of possibly undefined property document through a reference
> with static type mx.states:SetEventHandler. StatesWithTransitionsImpl.as
> /FlexJSJX/src/org/apache/flex/core line 284 Flex Problem
> 1119: Access of possibly undefined property document through a reference
> with static type mx.states:SetEventHandler. StatesWithTransitionsImpl.as
> /FlexJSJX/src/org/apache/flex/core line 288 Flex Problem
> 1119: Access of possibly undefined property document through a reference
> with static type mx.states:SetProperty. StatesWithTransitionsImpl.as
> /FlexJSJX/src/org/apache/flex/core line 204 Flex Problem
> 1119: Access of possibly undefined property document through a reference
> with static type mx.states:SetProperty. StatesWithTransitionsImpl.as
> /FlexJSJX/src/org/apache/flex/core line 206 Flex Problem
> 1119: Access of possibly undefined property document through a reference
> with static type mx.states:SetProperty. StatesWithTransitionsImpl.as
> /FlexJSJX/src/org/apache/flex/core line 270 Flex Problem
> 1119: Access of possibly undefined property document through a reference
> with static type mx.states:SetProperty. StatesWithTransitionsImpl.as
> /FlexJSJX/src/org/apache/flex/core line 271 Flex Problem
> 1119: Access of possibly undefined property document through a reference
> with static type mx.states:SetProperty. StatesWithTransitionsImpl.as
> /FlexJSJX/src/org/apache/flex/core line 275 Flex Problem
> 1119: Access of possibly undefined property document through a reference
> with static type mx.states:SetProperty. StatesWithTransitionsImpl.as
> /FlexJSJX/src/org/apache/flex/core line 276 Flex Problem
> 1119: Access of possibly undefined property previousValue through a
> reference with static type mx.states:SetProperty.
> StatesWithTransitionsImpl.as /FlexJSJX/src/org/apache/flex/core line 204 Flex
> Problem
> 1119: Access of possibly undefined property previousValue through a
> reference with static type mx.states:SetProperty.
> StatesWithTransitionsImpl.as /FlexJSJX/src/org/apache/flex/core line 206 Flex
> Problem
> 1119: Access of possibly undefined property previousValue through a
> reference with static type mx.states:SetProperty.
> StatesWithTransitionsImpl.as /FlexJSJX/src/org/apache/flex/core line 270 Flex
> Problem
> 1119: Access of possibly undefined property previousValue through a
> reference with static type mx.states:SetProperty.
> StatesWithTransitionsImpl.as /FlexJSJX/src/org/apache/flex/core line 275 Flex
> Problem
> 1178: Attempted access of inaccessible property document through a
> reference with static type mx.states:AddItems.
> StatesWithTransitionsImpl.as /FlexJSJX/src/org/apache/flex/core line 237 Flex
> Problem
> 1178: Attempted access of inaccessible property document through a
> reference with static type mx.states:AddItems.
> StatesWithTransitionsImpl.as /FlexJSJX/src/org/apache/flex/core line 244 Flex
> Problem
> 1178: Attempted access of inaccessible property document through a
> reference with static type mx.states:AddItems.
> StatesWithTransitionsImpl.as /FlexJSJX/src/org/apache/flex/core line 249 Flex
> Problem
>
>