You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by PKumar <pr...@gmail.com> on 2017/04/25 19:02:23 UTC
FlexJS: Getting Uncaught type error
Hi,
I have downloaded the FlexJS nightly build and compile my examples but
getting the following error:
Uncaught TypeError: Cannot read property 'apply' of undefined
at MyInitialView.get (MyInitialView.js:385)
at MyInitialView.org.apache.flex.core.ContainerBase.addedToParent
(ContainerBase.js:185)
at StyleExample.org.apache.flex.core.Application.addElement
(Application.js:127)
at StyleExample.org.apache.flex.core.Application.initialize
(Application.js:277)
at StyleExample.org.apache.flex.core.Application.start
(Application.js:248)
at index.html:179
This was working but stop working with nightly build. Please suggest.
-----
Regards,
Prashant
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/FlexJS-Getting-Uncaught-type-error-tp15112.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: FlexJS: Getting Uncaught type error
Posted by Alex Harui <ah...@adobe.com>.
Hard to say. You might have to debug into it and tell us what was
undefined.
There might be more issues with Container than with Group so if you don't
need scrolling, try switching Containers to Group.
HTH,
-Alex
On 4/25/17, 12:02 PM, "PKumar" <pr...@gmail.com> wrote:
>Hi,
>
>I have downloaded the FlexJS nightly build and compile my examples but
>getting the following error:
>
>Uncaught TypeError: Cannot read property 'apply' of undefined
> at MyInitialView.get (MyInitialView.js:385)
> at MyInitialView.org.apache.flex.core.ContainerBase.addedToParent
>(ContainerBase.js:185)
> at StyleExample.org.apache.flex.core.Application.addElement
>(Application.js:127)
> at StyleExample.org.apache.flex.core.Application.initialize
>(Application.js:277)
> at StyleExample.org.apache.flex.core.Application.start
>(Application.js:248)
> at index.html:179
>
>This was working but stop working with nightly build. Please suggest.
>
>
>
>-----
>Regards,
>Prashant
>--
>View this message in context:
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fle
>x-users.2333346.n4.nabble.com%2FFlexJS-Getting-Uncaught-type-error-tp15112
>.html&data=02%7C01%7C%7C39dde4078231497ed3c408d48c0f2743%7Cfa7b1b5a7b34438
>794aed2c178decee1%7C0%7C0%7C636287444089569690&sdata=EsVv2w6Gq0GmodG0Z4w1v
>urTMjke%2BlUTj6dqfeGTPso%3D&reserved=0
>Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: FlexJS: Getting Uncaught type error
Posted by piotrz <pi...@gmail.com>.
Good choice :)
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/FlexJS-Getting-Uncaught-type-error-tp15112p15149.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: FlexJS: Getting Uncaught type error
Posted by PKumar <pr...@gmail.com>.
I switch to VCode editor and issue disappear.
-----
Regards,
Prashant
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/FlexJS-Getting-Uncaught-type-error-tp15112p15144.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: FlexJS: Getting Uncaught type error
Posted by piotrz <pi...@gmail.com>.
Hi Prashant,
This kind of project build for me without the problem. Could you package to
zip your project and post here link. I will try to build it by maven and try
it in Moonshine or VSCode.
Thanks,
Piotr
-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/FlexJS-Getting-Uncaught-type-error-tp15112p15143.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: FlexJS: Getting Uncaught type error
Posted by PKumar <pr...@gmail.com>.
Aelx,
SWF side is working ok , problem is only JS side. Following is my code:
<?xml version="1.0" encoding="utf-8"?>
<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:js="library://ns.apache.org/flexjs/basic" xmlns:local="*">
<js:valuesImpl>
<js:SimpleCSSValuesImpl />
</js:valuesImpl>
<js:initialView>
<local:MyInitialView />
</js:initialView>
</js:Application>
MyInitialView.xml
<?xml version="1.0" encoding="utf-8"?>
<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:js="library://ns.apache.org/flexjs/basic">
<js:beads>
<js:ViewDataBinding />
</js:beads>
<js:Label text="Hello FlexJS" />
</js:View>
-----
Regards,
Prashant
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/FlexJS-Getting-Uncaught-type-error-tp15112p15142.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: FlexJS: Getting Uncaught type error
Posted by Alex Harui <ah...@adobe.com>.
Hi Prashant,
Send me the bad SWF off-list.
Thanks,
-Alex
On 4/27/17, 9:39 PM, "PKumar" <pr...@gmail.com> wrote:
>My initial view is based on <js:View > based and my old demos which was
>working now with latest build stopped working.
>
>On 28-Apr-2017 2:44 AM, "Alex Harui [via Apache Flex Users]" <
>ml+s2333346n15133h8@n4.nabble.com> wrote:
>
>> Hi Prashant,
>>
>> What is the top tag in MyInitialView?
>>
>> -Alex
>>
>> On 4/27/17, 11:43 AM, "PKumar" <[hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=15133&i=0>> wrote:
>>
>> >I have created the test demo but getting not working. If i am
>>compiling
>> >demo
>> >with FlexJS 0.7.0 then it is working but if compiling with FlexJS 0.8.0
>> >nightly build then it is failing.
>> >
>> >var arr = MyInitialView.superClass_.*get__MXMLDescriptor*.apply(this);
>> >
>> >get__MXMLDescriptor is getting undefined.
>> >
>> >
>> >
>> >-----
>> >Regards,
>> >Prashant
>> >--
>> >View this message in context:
>> >https://na01.safelinks.protection.outlook.com/?url=
>> http%3A%2F%2Fapache-fle
>>
>>>x-users.2333346.n4.nabble.com%2FFlexJS-Getting-Uncaught-type-error-tp151
>>>12
>>
>>
>>>p15132.html&data=02%7C01%7C%7C6558ba3f563e44377ef208d48d9edce9%7Cfa7b1b5
>>>a7
>>
>>
>>>b34438794aed2c178decee1%7C0%7C0%7C636289160854039320&sdata=MCfq9SbwUGr9S
>>>FZ
>>
>> >37bIwzxZlU5V4z4fAZLBbYPU5eYg%3D&reserved=0
>> >Sent from the Apache Flex Users mailing list archive at Nabble.com.
>>
>>
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>>
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fl
>>ex-users.2333346.n4.nabble.com%2FFlexJS-&data=02%7C01%7C%7C5fb8b48b575942
>>916aa908d48df22ddc%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636289518
>>672040382&sdata=iI3%2Fw9mX4EXFak26qfGyQjL3LdOwEvFye1Seq3fBjb4%3D&reserved
>>=0
>> Getting-Uncaught-type-error-tp15112p15133.html
>> To start a new topic under Apache Flex Users, email
>> ml+s2333346n1h16@n4.nabble.com
>> To unsubscribe from Apache Flex Users, click here
>>
>><https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-f
>>lex-users.2333346.n4.nabble.com%2Ftemplate%2FNamlServlet.jtp%3Fmacro%3Dun
>>subscribe_by_code%26node%3D1%26code%3DcHJhc2hha3VtYXJAZ21haWwuY29tfDF8LTU
>>0MTcyMzE2NA&data=02%7C01%7C%7C5fb8b48b575942916aa908d48df22ddc%7Cfa7b1b5a
>>7b34438794aed2c178decee1%7C0%7C0%7C636289518672040382&sdata=38VbyChKZF864
>>7D2Zn89Tm9o%2FnexC6kB3ucAYkF4V5Y%3D&reserved=0==>
>> .
>> NAML
>>
>><https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-f
>>lex-users.2333346.n4.nabble.com%2Ftemplate%2FNamlServlet.jtp%3Fmacro%3Dma
>>cro_viewer%26id%3Dinstant_html%2521nabble%253Aemail.naml%26base%3Dnabble.
>>naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-n
>>abble.view.web.template.NodeNamespace%26breadcrumbs%3Dnotify_subscribers%
>>2521nabble%253Aemail.naml-instant_emails%2521nabble%253Aemail.naml-send_i
>>nstant_email%2521nabble%253Aemail.naml&data=02%7C01%7C%7C5fb8b48b57594291
>>6aa908d48df22ddc%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C63628951867
>>2040382&sdata=sSPEQXb1tqCDQVBMGo4nx%2BcomEfuGDrxOuhzhoNOVhk%3D&reserved=0
>>>
>>
>
>
>
>
>-----
>Regards,
>Prashant
>--
>View this message in context:
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fle
>x-users.2333346.n4.nabble.com%2FFlexJS-Getting-Uncaught-type-error-tp15112
>p15134.html&data=02%7C01%7C%7C5fb8b48b575942916aa908d48df22ddc%7Cfa7b1b5a7
>b34438794aed2c178decee1%7C0%7C0%7C636289518672040382&sdata=j9M2P89%2Bz30hI
>pr2wxq%2B37ap5CULYA%2F2QvunA8%2F0xk8%3D&reserved=0
>Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: FlexJS: Getting Uncaught type error
Posted by PKumar <pr...@gmail.com>.
My initial view is based on <js:View > based and my old demos which was
working now with latest build stopped working.
On 28-Apr-2017 2:44 AM, "Alex Harui [via Apache Flex Users]" <
ml+s2333346n15133h8@n4.nabble.com> wrote:
> Hi Prashant,
>
> What is the top tag in MyInitialView?
>
> -Alex
>
> On 4/27/17, 11:43 AM, "PKumar" <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=15133&i=0>> wrote:
>
> >I have created the test demo but getting not working. If i am compiling
> >demo
> >with FlexJS 0.7.0 then it is working but if compiling with FlexJS 0.8.0
> >nightly build then it is failing.
> >
> >var arr = MyInitialView.superClass_.*get__MXMLDescriptor*.apply(this);
> >
> >get__MXMLDescriptor is getting undefined.
> >
> >
> >
> >-----
> >Regards,
> >Prashant
> >--
> >View this message in context:
> >https://na01.safelinks.protection.outlook.com/?url=
> http%3A%2F%2Fapache-fle
> >x-users.2333346.n4.nabble.com%2FFlexJS-Getting-Uncaught-type-error-tp15112
>
> >p15132.html&data=02%7C01%7C%7C6558ba3f563e44377ef208d48d9edce9%7Cfa7b1b5a7
>
> >b34438794aed2c178decee1%7C0%7C0%7C636289160854039320&sdata=MCfq9SbwUGr9SFZ
>
> >37bIwzxZlU5V4z4fAZLBbYPU5eYg%3D&reserved=0
> >Sent from the Apache Flex Users mailing list archive at Nabble.com.
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://apache-flex-users.2333346.n4.nabble.com/FlexJS-
> Getting-Uncaught-type-error-tp15112p15133.html
> To start a new topic under Apache Flex Users, email
> ml+s2333346n1h16@n4.nabble.com
> To unsubscribe from Apache Flex Users, click here
> <http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=cHJhc2hha3VtYXJAZ21haWwuY29tfDF8LTU0MTcyMzE2NA==>
> .
> NAML
> <http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
-----
Regards,
Prashant
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/FlexJS-Getting-Uncaught-type-error-tp15112p15134.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: FlexJS: Getting Uncaught type error
Posted by Alex Harui <ah...@adobe.com>.
Hi Prashant,
What is the top tag in MyInitialView?
-Alex
On 4/27/17, 11:43 AM, "PKumar" <pr...@gmail.com> wrote:
>I have created the test demo but getting not working. If i am compiling
>demo
>with FlexJS 0.7.0 then it is working but if compiling with FlexJS 0.8.0
>nightly build then it is failing.
>
>var arr = MyInitialView.superClass_.*get__MXMLDescriptor*.apply(this);
>
>get__MXMLDescriptor is getting undefined.
>
>
>
>-----
>Regards,
>Prashant
>--
>View this message in context:
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fle
>x-users.2333346.n4.nabble.com%2FFlexJS-Getting-Uncaught-type-error-tp15112
>p15132.html&data=02%7C01%7C%7C6558ba3f563e44377ef208d48d9edce9%7Cfa7b1b5a7
>b34438794aed2c178decee1%7C0%7C0%7C636289160854039320&sdata=MCfq9SbwUGr9SFZ
>37bIwzxZlU5V4z4fAZLBbYPU5eYg%3D&reserved=0
>Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: FlexJS: Getting Uncaught type error
Posted by PKumar <pr...@gmail.com>.
I have created the test demo but getting not working. If i am compiling demo
with FlexJS 0.7.0 then it is working but if compiling with FlexJS 0.8.0
nightly build then it is failing.
var arr = MyInitialView.superClass_.*get__MXMLDescriptor*.apply(this);
get__MXMLDescriptor is getting undefined.
-----
Regards,
Prashant
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/FlexJS-Getting-Uncaught-type-error-tp15112p15132.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: FlexJS: Getting Uncaught type error
Posted by OK <po...@olafkrueger.net>.
PKumar wrote
> Yes , I have tried but no luck. This issue is only occuring if I am
> creating separate view as InitialView.mxml and including it in main.mxml.
I also had this issue during my tests but after a clean up and the removing
of the bin the issue was gone...
Could you reproduce the issue by using a new FB test project?
Olaf
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/FlexJS-Getting-Uncaught-type-error-tp15112p15131.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: FlexJS: Getting Uncaught type error
Posted by PKumar <pr...@gmail.com>.
Yes , I have tried but no luck. This issue is only occuring if I am
creating separate view as InitialView.mxml and including it in main.mxml.
On 27-Apr-2017 1:30 AM, "OK [via Apache Flex Users]" <
ml+s2333346n15123h98@n4.nabble.com> wrote:
It already feels like doing much more clean ups than compilations during
app development :-))
In this case a project clean in combination with removing the bin dir works
for me!
@Prashant
Do you have already tried the FB Project->clean... function?
Thanks,
Olaf
------------------------------
If you reply to this email, your message will be added to the discussion
below:
http://apache-flex-users.2333346.n4.nabble.com/FlexJS-
Getting-Uncaught-type-error-tp15112p15123.html
To start a new topic under Apache Flex Users, email
ml+s2333346n1h16@n4.nabble.com
To unsubscribe from Apache Flex Users, click here
<http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=cHJhc2hha3VtYXJAZ21haWwuY29tfDF8LTU0MTcyMzE2NA==>
.
NAML
<http://apache-flex-users.2333346.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
-----
Regards,
Prashant
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/FlexJS-Getting-Uncaught-type-error-tp15112p15129.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: FlexJS: Getting Uncaught type error
Posted by OK <po...@olafkrueger.net>.
It already feels like doing much more clean ups than compilations during app
development :-))
In this case a project clean in combination with removing the bin dir works
for me!
@Prashant
Do you have already tried the FB Project->clean... function?
Thanks,
Olaf
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/FlexJS-Getting-Uncaught-type-error-tp15112p15123.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: FlexJS: Getting Uncaught type error
Posted by PKumar <pr...@gmail.com>.
I deleted bin folder and build project again. but getting same issue. I am
using FlashBuilder4.7. Please check the attached chrome console output.
This issue is only reproducible if i am creating a separate view as
"MyInitialView.mxml" and could not reproduce if i am keeping all my mxml
inside main.mxml file. Please suggest.
<http://apache-flex-users.2333346.n4.nabble.com/file/n15120/error.png>
-----
Regards,
Prashant
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/FlexJS-Getting-Uncaught-type-error-tp15112p15120.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.
Re: FlexJS: Getting Uncaught type error
Posted by Josh Tynjala <jo...@gmail.com>.
This looks suspiciously like a situation that I ran into a while back. In
Flash Builder, try deleting your project's output directory and build
(cleaning the project should take care of that). That should clear up the
error.
When you switch between different versions of FlexJS, you can get errors
like this because your output directory may end up containing a mix of JS
files from both versions of the SDK. I guess FlexJS doesn't delete the old
JS files with every build because that requires a longer build for all of
the file copying. So you need to remember to clean right after you update
your SDK.
- Josh
On Wed, Apr 26, 2017 at 7:01 AM, OK <po...@olafkrueger.net> wrote:
> Hi,
> this is a bit strange:
> I can reproduce this error by compiling with FlashBuilder [1].
> By using VSCode it works.
>
> Cause this makes no sense to me I double checked that both really used the
> same SDK...
>
> To make sure that there no side effects within my app code I reduced it to
> a
> test case with a Main.mxml file and an initial view that contains just a
> js:Label.
>
> Probably I'm doing something wrong... but maybe this is still more helpful
> than confusing.
>
> Olaf
>
>
> [1] https://snag.gy/KegvoT.jpg
>
>
>
> --
> View this message in context: http://apache-flex-users.
> 2333346.n4.nabble.com/FlexJS-Getting-Uncaught-type-error-
> tp15112p15117.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>
Re: FlexJS: Getting Uncaught type error
Posted by OK <po...@olafkrueger.net>.
Hi,
this is a bit strange:
I can reproduce this error by compiling with FlashBuilder [1].
By using VSCode it works.
Cause this makes no sense to me I double checked that both really used the
same SDK...
To make sure that there no side effects within my app code I reduced it to a
test case with a Main.mxml file and an initial view that contains just a
js:Label.
Probably I'm doing something wrong... but maybe this is still more helpful
than confusing.
Olaf
[1] https://snag.gy/KegvoT.jpg
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/FlexJS-Getting-Uncaught-type-error-tp15112p15117.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.