You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by Carlos Rovira <ca...@apache.org> on 2018/09/23 09:24:18 UTC

HTTPService JSON problems

Hi,

I'm creating this blog example

https://royale.codeoscopic.com/loading-github-external-data-through-httpservice/

After fighting with Github services, I finally get the example working
locally in Chrome, Firefox and Safari, but not IE11.

*IE11 error: Unable to get property 'html' of undefined or null reference*

That I think is when trying to retrieve the var "*service.json._links.html"*

*service.json._links.html*
https://github.com/apache/royale-asjs/blob/develop/examples/blog/BE0011_Loading_Github_external_data_through_HTTPService/src/main/royale/BE0011_Loading_Github_external_data_through_HTTPService.mxml


But, then uploading this to preproduction server it does not work in any
browser

https://royale.codeoscopic.com/blog-examples/BE0011_Loading_Github_external_data_through_HTTPService/index.html

Errors are mostly the same in all browsers:

*undefined is not an object (evaluating 'this.service.json.Mi.html')*

So hope someone could give a hand here since I'm a bit lost with this kind
of problems.

I'll be off for some hours now, so I'll catch up when I come back at night.

Thanks for any help here


-- 
Carlos Rovira
http://about.me/carlosrovira

Re: HTTPService JSON problems

Posted by Carlos Rovira <ca...@apache.org>.
Hi Alex,

that's sure, but I since MX and SPARK are emulation components that maybe
can't be change and still don't control I prefer to make this new ones.
Maybe is not the right option, but I have a ETA to finish HTTPService
example, and I found the problem in IE11 where native js functions doesn't
work, and was a hard work all this weekend to fight with that and with
JSON, and in first term with Github sending things in a format for Safari,
and then in others for Chrome and Firefox. So I need to get the most
straight way to the end result. Now we can discuss if we need to refactor
MX implementations, and remove the ones I did, or use my implementation to
change the ones in MX... I think you that are more familiar with MX, can
refine to the best solution. I prefer don't mess with MX to avoid break
something you guys are sure that is working. I finally prefer only one
Base64 class, and hope the implementation will be static, if that is
possible with MX, great!, if not let me know.

are you ok with that plan?




El lun., 24 sept. 2018 a las 18:08, Alex Harui (<ah...@adobe.com.invalid>)
escribió:

> Hi Carlos,
>
> All of our code is "still in development".  I know there are several ways
> to interpret the Apache principles of "community over code", but IMO, if
> some volunteer contributes some code and it isn't working perfectly, it is
> often better for us to improve on that code instead of abandon it for a
> different implementation.  We keep talking about trying to get more
> committers.  IMO, it encourages people to try if we don't reject them
> because of some bug.
>
> If you want an all-static API, that's fine, but then the MX version could
> have been refactored into utility methods shared by an all-static version.
> We would have moved the guts of it out of MX into some other SWC like Core
> or maybe a Utils at some point.  Now it will probably fall upon you or I to
> reconcile the two versions when we might have instead inspired more
> contributions from the person who originally wrote the MX version.
>
> My 2 cents,
> -Alex
>
> On 9/24/18, 4:09 AM, "Carlos Rovira" <ca...@apache.org> wrote:
>
>     Hi Alex,
>     if you refer to the classes in MX, was my first try but couldn't make
> it
>     work. Since MX is still in development, I didn't know if that is
> working or
>     not, and if are compatible with the string encoding/decoding. As well,
> but
>     not related, the implementation seems a bit strange to me. There's a
>     JSWrapper, and then tow classes that need instantiation where I think
> this
>     should be just static methods. Just my experience with that....
>
>     El lun., 24 sept. 2018 a las 7:19, Alex Harui
> (<ah...@adobe.com.invalid>)
>     escribió:
>
>     > What was wrong with the Base64Encoder/Decoder?
>     >
>     > -Alex
>     >
>     > On 9/23/18, 11:25 AM, "Carlos Rovira" <ca...@apache.org>
> wrote:
>     >
>     >     Hi,
>     >
>     >     just let you know that IE11 problem wasn't a JSON problem. It
> was that
>     >     "atob" and "btoa" functions to decode/encode base64 are not
> available
>     > in
>     >     IE11...another IE nightmare...
>     >     I finaly added a Base64 class with static encode and decode
> functions
>     > to
>     >     Core to solve this problem cross platform.
>     >
>     >     So final I was able to finish the example...
>     >
>     >     Thanks
>     >
>     >     Carlos
>     >
>     >
>     >     El dom., 23 sept. 2018 a las 17:37, Carlos Rovira (<
>     > carlosrovira@apache.org>)
>     >     escribió:
>     >
>     >     > Hi Harbs,
>     >     >
>     >     > thanks! that solves the issue! That's magic! : )
>     >     >
>     >     > I put this only in pom.xml in this example and in JewelExample,
>     > since I'll
>     >     > use it as well. But I think I can't enable it in maven
> globally, or
>     > at
>     >     > least don't know how.
>     >     > I think as you that this should be enabled per case, although,
> it
>     > seems
>     >     > that even we, that use mostly AMF instead JSON, will have to
> use it,
>     > so
>     >     > maybe all people using royale, will end using this compiler
>     > arg...just what
>     >     > I think will happen.
>     >     >
>     >     > About IE11, I'll go with it now, but seems that JSON.parse()
> has many
>     >     > problems with many functions and people uses polyfill or other
> JSON
>     >     > implementation to solve it. I'll try that way and I think if
> that
>     > works ok
>     >     > and we want to support IE11 as we said, we'll need to add the
>     > polyfill to
>     >     > Royale as we did with other things like Dialog.
>     >     >
>     >     > Thanks!
>     >     >
>     >     >
>     >     > El dom., 23 sept. 2018 a las 11:49, Harbs (<
> harbs.lists@gmail.com>)
>     >     > escribió:
>     >     >
>     >     >> I’m not sure what the problem is with IE11, but the problem
> with the
>     >     >> release version is minification renaming.
>     >     >>
>     >     >> I just committed a change to the example ant build script to
>     > include the
>     >     >> “js-dynamic-access-unknown-members” option (new to 0.9.3).
> That
>     > fixes the
>     >     >> renaming problem.
>     >     >>
>     >     >> You can do something similar for Maven and/or VS Code builds.
>     >     >>
>     >     >> I’m not suggesting that globally enabling this option (like I
> did)
>     > is the
>     >     >> best way to go, but I have limited time today and I wanted to
>     > demonstrate
>     >     >> how to use it.
>     >     >>
>     >     >> Good luck,
>     >     >> Harbs
>     >     >>
>     >     >
>     >     > --
>     >     > Carlos Rovira
>     >     >
>     >
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&amp;data=02%7C01%7Caharui%40adobe.com%7C04d3cb9a17aa4268c96e08d6220e2263%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636733841438441719&amp;sdata=c8Wkvn%2F9Ft3%2Bh8phxaJ0Q3SdGY%2BLquJatfnkPmSiVLQ%3D&amp;reserved=0
>     >     >
>     >     >
>     >
>     >     --
>     >     Carlos Rovira
>     >
>     >
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&amp;data=02%7C01%7Caharui%40adobe.com%7C04d3cb9a17aa4268c96e08d6220e2263%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636733841438441719&amp;sdata=c8Wkvn%2F9Ft3%2Bh8phxaJ0Q3SdGY%2BLquJatfnkPmSiVLQ%3D&amp;reserved=0
>     >
>     >
>     >
>
>     --
>     Carlos Rovira
>
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&amp;data=02%7C01%7Caharui%40adobe.com%7C04d3cb9a17aa4268c96e08d6220e2263%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636733841438441719&amp;sdata=c8Wkvn%2F9Ft3%2Bh8phxaJ0Q3SdGY%2BLquJatfnkPmSiVLQ%3D&amp;reserved=0
>
>
>

-- 
Carlos Rovira
http://about.me/carlosrovira

Re: HTTPService JSON problems

Posted by Alex Harui <ah...@adobe.com.INVALID>.
Hi Carlos,

All of our code is "still in development".  I know there are several ways to interpret the Apache principles of "community over code", but IMO, if some volunteer contributes some code and it isn't working perfectly, it is often better for us to improve on that code instead of abandon it for a different implementation.  We keep talking about trying to get more committers.  IMO, it encourages people to try if we don't reject them because of some bug.

If you want an all-static API, that's fine, but then the MX version could have been refactored into utility methods shared by an all-static version.  We would have moved the guts of it out of MX into some other SWC like Core or maybe a Utils at some point.  Now it will probably fall upon you or I to reconcile the two versions when we might have instead inspired more contributions from the person who originally wrote the MX version.

My 2 cents,
-Alex

On 9/24/18, 4:09 AM, "Carlos Rovira" <ca...@apache.org> wrote:

    Hi Alex,
    if you refer to the classes in MX, was my first try but couldn't make it
    work. Since MX is still in development, I didn't know if that is working or
    not, and if are compatible with the string encoding/decoding. As well, but
    not related, the implementation seems a bit strange to me. There's a
    JSWrapper, and then tow classes that need instantiation where I think this
    should be just static methods. Just my experience with that....
    
    El lun., 24 sept. 2018 a las 7:19, Alex Harui (<ah...@adobe.com.invalid>)
    escribió:
    
    > What was wrong with the Base64Encoder/Decoder?
    >
    > -Alex
    >
    > On 9/23/18, 11:25 AM, "Carlos Rovira" <ca...@apache.org> wrote:
    >
    >     Hi,
    >
    >     just let you know that IE11 problem wasn't a JSON problem. It was that
    >     "atob" and "btoa" functions to decode/encode base64 are not available
    > in
    >     IE11...another IE nightmare...
    >     I finaly added a Base64 class with static encode and decode functions
    > to
    >     Core to solve this problem cross platform.
    >
    >     So final I was able to finish the example...
    >
    >     Thanks
    >
    >     Carlos
    >
    >
    >     El dom., 23 sept. 2018 a las 17:37, Carlos Rovira (<
    > carlosrovira@apache.org>)
    >     escribió:
    >
    >     > Hi Harbs,
    >     >
    >     > thanks! that solves the issue! That's magic! : )
    >     >
    >     > I put this only in pom.xml in this example and in JewelExample,
    > since I'll
    >     > use it as well. But I think I can't enable it in maven globally, or
    > at
    >     > least don't know how.
    >     > I think as you that this should be enabled per case, although, it
    > seems
    >     > that even we, that use mostly AMF instead JSON, will have to use it,
    > so
    >     > maybe all people using royale, will end using this compiler
    > arg...just what
    >     > I think will happen.
    >     >
    >     > About IE11, I'll go with it now, but seems that JSON.parse() has many
    >     > problems with many functions and people uses polyfill or other JSON
    >     > implementation to solve it. I'll try that way and I think if that
    > works ok
    >     > and we want to support IE11 as we said, we'll need to add the
    > polyfill to
    >     > Royale as we did with other things like Dialog.
    >     >
    >     > Thanks!
    >     >
    >     >
    >     > El dom., 23 sept. 2018 a las 11:49, Harbs (<ha...@gmail.com>)
    >     > escribió:
    >     >
    >     >> I’m not sure what the problem is with IE11, but the problem with the
    >     >> release version is minification renaming.
    >     >>
    >     >> I just committed a change to the example ant build script to
    > include the
    >     >> “js-dynamic-access-unknown-members” option (new to 0.9.3). That
    > fixes the
    >     >> renaming problem.
    >     >>
    >     >> You can do something similar for Maven and/or VS Code builds.
    >     >>
    >     >> I’m not suggesting that globally enabling this option (like I did)
    > is the
    >     >> best way to go, but I have limited time today and I wanted to
    > demonstrate
    >     >> how to use it.
    >     >>
    >     >> Good luck,
    >     >> Harbs
    >     >>
    >     >
    >     > --
    >     > Carlos Rovira
    >     >
    > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&amp;data=02%7C01%7Caharui%40adobe.com%7C04d3cb9a17aa4268c96e08d6220e2263%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636733841438441719&amp;sdata=c8Wkvn%2F9Ft3%2Bh8phxaJ0Q3SdGY%2BLquJatfnkPmSiVLQ%3D&amp;reserved=0
    >     >
    >     >
    >
    >     --
    >     Carlos Rovira
    >
    > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&amp;data=02%7C01%7Caharui%40adobe.com%7C04d3cb9a17aa4268c96e08d6220e2263%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636733841438441719&amp;sdata=c8Wkvn%2F9Ft3%2Bh8phxaJ0Q3SdGY%2BLquJatfnkPmSiVLQ%3D&amp;reserved=0
    >
    >
    >
    
    -- 
    Carlos Rovira
    https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&amp;data=02%7C01%7Caharui%40adobe.com%7C04d3cb9a17aa4268c96e08d6220e2263%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636733841438441719&amp;sdata=c8Wkvn%2F9Ft3%2Bh8phxaJ0Q3SdGY%2BLquJatfnkPmSiVLQ%3D&amp;reserved=0
    


Re: HTTPService JSON problems

Posted by Carlos Rovira <ca...@apache.org>.
Hi Alex,
if you refer to the classes in MX, was my first try but couldn't make it
work. Since MX is still in development, I didn't know if that is working or
not, and if are compatible with the string encoding/decoding. As well, but
not related, the implementation seems a bit strange to me. There's a
JSWrapper, and then tow classes that need instantiation where I think this
should be just static methods. Just my experience with that....

El lun., 24 sept. 2018 a las 7:19, Alex Harui (<ah...@adobe.com.invalid>)
escribió:

> What was wrong with the Base64Encoder/Decoder?
>
> -Alex
>
> On 9/23/18, 11:25 AM, "Carlos Rovira" <ca...@apache.org> wrote:
>
>     Hi,
>
>     just let you know that IE11 problem wasn't a JSON problem. It was that
>     "atob" and "btoa" functions to decode/encode base64 are not available
> in
>     IE11...another IE nightmare...
>     I finaly added a Base64 class with static encode and decode functions
> to
>     Core to solve this problem cross platform.
>
>     So final I was able to finish the example...
>
>     Thanks
>
>     Carlos
>
>
>     El dom., 23 sept. 2018 a las 17:37, Carlos Rovira (<
> carlosrovira@apache.org>)
>     escribió:
>
>     > Hi Harbs,
>     >
>     > thanks! that solves the issue! That's magic! : )
>     >
>     > I put this only in pom.xml in this example and in JewelExample,
> since I'll
>     > use it as well. But I think I can't enable it in maven globally, or
> at
>     > least don't know how.
>     > I think as you that this should be enabled per case, although, it
> seems
>     > that even we, that use mostly AMF instead JSON, will have to use it,
> so
>     > maybe all people using royale, will end using this compiler
> arg...just what
>     > I think will happen.
>     >
>     > About IE11, I'll go with it now, but seems that JSON.parse() has many
>     > problems with many functions and people uses polyfill or other JSON
>     > implementation to solve it. I'll try that way and I think if that
> works ok
>     > and we want to support IE11 as we said, we'll need to add the
> polyfill to
>     > Royale as we did with other things like Dialog.
>     >
>     > Thanks!
>     >
>     >
>     > El dom., 23 sept. 2018 a las 11:49, Harbs (<ha...@gmail.com>)
>     > escribió:
>     >
>     >> I’m not sure what the problem is with IE11, but the problem with the
>     >> release version is minification renaming.
>     >>
>     >> I just committed a change to the example ant build script to
> include the
>     >> “js-dynamic-access-unknown-members” option (new to 0.9.3). That
> fixes the
>     >> renaming problem.
>     >>
>     >> You can do something similar for Maven and/or VS Code builds.
>     >>
>     >> I’m not suggesting that globally enabling this option (like I did)
> is the
>     >> best way to go, but I have limited time today and I wanted to
> demonstrate
>     >> how to use it.
>     >>
>     >> Good luck,
>     >> Harbs
>     >>
>     >
>     > --
>     > Carlos Rovira
>     >
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&amp;data=02%7C01%7Caharui%40adobe.com%7Cf2063785807d44f005d808d62181e980%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636733239179990089&amp;sdata=CJSDVZ6E%2BEnT%2BXbm5O3JFlu6TrOCdZ0A%2BRfRwlqHqJo%3D&amp;reserved=0
>     >
>     >
>
>     --
>     Carlos Rovira
>
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&amp;data=02%7C01%7Caharui%40adobe.com%7Cf2063785807d44f005d808d62181e980%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636733239179990089&amp;sdata=CJSDVZ6E%2BEnT%2BXbm5O3JFlu6TrOCdZ0A%2BRfRwlqHqJo%3D&amp;reserved=0
>
>
>

-- 
Carlos Rovira
http://about.me/carlosrovira

Re: HTTPService JSON problems

Posted by Alex Harui <ah...@adobe.com.INVALID>.
What was wrong with the Base64Encoder/Decoder?

-Alex

On 9/23/18, 11:25 AM, "Carlos Rovira" <ca...@apache.org> wrote:

    Hi,
    
    just let you know that IE11 problem wasn't a JSON problem. It was that
    "atob" and "btoa" functions to decode/encode base64 are not available in
    IE11...another IE nightmare...
    I finaly added a Base64 class with static encode and decode functions to
    Core to solve this problem cross platform.
    
    So final I was able to finish the example...
    
    Thanks
    
    Carlos
    
    
    El dom., 23 sept. 2018 a las 17:37, Carlos Rovira (<ca...@apache.org>)
    escribió:
    
    > Hi Harbs,
    >
    > thanks! that solves the issue! That's magic! : )
    >
    > I put this only in pom.xml in this example and in JewelExample, since I'll
    > use it as well. But I think I can't enable it in maven globally, or at
    > least don't know how.
    > I think as you that this should be enabled per case, although, it seems
    > that even we, that use mostly AMF instead JSON, will have to use it, so
    > maybe all people using royale, will end using this compiler arg...just what
    > I think will happen.
    >
    > About IE11, I'll go with it now, but seems that JSON.parse() has many
    > problems with many functions and people uses polyfill or other JSON
    > implementation to solve it. I'll try that way and I think if that works ok
    > and we want to support IE11 as we said, we'll need to add the polyfill to
    > Royale as we did with other things like Dialog.
    >
    > Thanks!
    >
    >
    > El dom., 23 sept. 2018 a las 11:49, Harbs (<ha...@gmail.com>)
    > escribió:
    >
    >> I’m not sure what the problem is with IE11, but the problem with the
    >> release version is minification renaming.
    >>
    >> I just committed a change to the example ant build script to include the
    >> “js-dynamic-access-unknown-members” option (new to 0.9.3). That fixes the
    >> renaming problem.
    >>
    >> You can do something similar for Maven and/or VS Code builds.
    >>
    >> I’m not suggesting that globally enabling this option (like I did) is the
    >> best way to go, but I have limited time today and I wanted to demonstrate
    >> how to use it.
    >>
    >> Good luck,
    >> Harbs
    >>
    >
    > --
    > Carlos Rovira
    > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&amp;data=02%7C01%7Caharui%40adobe.com%7Cf2063785807d44f005d808d62181e980%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636733239179990089&amp;sdata=CJSDVZ6E%2BEnT%2BXbm5O3JFlu6TrOCdZ0A%2BRfRwlqHqJo%3D&amp;reserved=0
    >
    >
    
    -- 
    Carlos Rovira
    https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&amp;data=02%7C01%7Caharui%40adobe.com%7Cf2063785807d44f005d808d62181e980%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636733239179990089&amp;sdata=CJSDVZ6E%2BEnT%2BXbm5O3JFlu6TrOCdZ0A%2BRfRwlqHqJo%3D&amp;reserved=0
    


Re: HTTPService JSON problems

Posted by Carlos Rovira <ca...@apache.org>.
Hi,

just let you know that IE11 problem wasn't a JSON problem. It was that
"atob" and "btoa" functions to decode/encode base64 are not available in
IE11...another IE nightmare...
I finaly added a Base64 class with static encode and decode functions to
Core to solve this problem cross platform.

So final I was able to finish the example...

Thanks

Carlos


El dom., 23 sept. 2018 a las 17:37, Carlos Rovira (<ca...@apache.org>)
escribió:

> Hi Harbs,
>
> thanks! that solves the issue! That's magic! : )
>
> I put this only in pom.xml in this example and in JewelExample, since I'll
> use it as well. But I think I can't enable it in maven globally, or at
> least don't know how.
> I think as you that this should be enabled per case, although, it seems
> that even we, that use mostly AMF instead JSON, will have to use it, so
> maybe all people using royale, will end using this compiler arg...just what
> I think will happen.
>
> About IE11, I'll go with it now, but seems that JSON.parse() has many
> problems with many functions and people uses polyfill or other JSON
> implementation to solve it. I'll try that way and I think if that works ok
> and we want to support IE11 as we said, we'll need to add the polyfill to
> Royale as we did with other things like Dialog.
>
> Thanks!
>
>
> El dom., 23 sept. 2018 a las 11:49, Harbs (<ha...@gmail.com>)
> escribió:
>
>> I’m not sure what the problem is with IE11, but the problem with the
>> release version is minification renaming.
>>
>> I just committed a change to the example ant build script to include the
>> “js-dynamic-access-unknown-members” option (new to 0.9.3). That fixes the
>> renaming problem.
>>
>> You can do something similar for Maven and/or VS Code builds.
>>
>> I’m not suggesting that globally enabling this option (like I did) is the
>> best way to go, but I have limited time today and I wanted to demonstrate
>> how to use it.
>>
>> Good luck,
>> Harbs
>>
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>

-- 
Carlos Rovira
http://about.me/carlosrovira

Re: HTTPService JSON problems

Posted by Carlos Rovira <ca...@apache.org>.
Hi Harbs,

thanks! that solves the issue! That's magic! : )

I put this only in pom.xml in this example and in JewelExample, since I'll
use it as well. But I think I can't enable it in maven globally, or at
least don't know how.
I think as you that this should be enabled per case, although, it seems
that even we, that use mostly AMF instead JSON, will have to use it, so
maybe all people using royale, will end using this compiler arg...just what
I think will happen.

About IE11, I'll go with it now, but seems that JSON.parse() has many
problems with many functions and people uses polyfill or other JSON
implementation to solve it. I'll try that way and I think if that works ok
and we want to support IE11 as we said, we'll need to add the polyfill to
Royale as we did with other things like Dialog.

Thanks!


El dom., 23 sept. 2018 a las 11:49, Harbs (<ha...@gmail.com>)
escribió:

> I’m not sure what the problem is with IE11, but the problem with the
> release version is minification renaming.
>
> I just committed a change to the example ant build script to include the
> “js-dynamic-access-unknown-members” option (new to 0.9.3). That fixes the
> renaming problem.
>
> You can do something similar for Maven and/or VS Code builds.
>
> I’m not suggesting that globally enabling this option (like I did) is the
> best way to go, but I have limited time today and I wanted to demonstrate
> how to use it.
>
> Good luck,
> Harbs
>

-- 
Carlos Rovira
http://about.me/carlosrovira

Re: HTTPService JSON problems

Posted by Alex Harui <ah...@adobe.com.INVALID>.
I thought that ValueObjects that use [Bindable] or Getter/Setters do not get renamed during minification.  We should not be defeating minification and hiding problems in other examples.  If you really need to turn off renaming in a single example, add it to the compile-app-config.xml file for that example.

Thanks,
-Alex

On 9/23/18, 2:49 AM, "Harbs" <ha...@gmail.com> wrote:

    I’m not sure what the problem is with IE11, but the problem with the release version is minification renaming.
    
    I just committed a change to the example ant build script to include the “js-dynamic-access-unknown-members” option (new to 0.9.3). That fixes the renaming problem.
    
    You can do something similar for Maven and/or VS Code builds.
    
    I’m not suggesting that globally enabling this option (like I did) is the best way to go, but I have limited time today and I wanted to demonstrate how to use it.
    
    Good luck,
    Harbs
    
    > On Sep 23, 2018, at 12:24 PM, Carlos Rovira <ca...@apache.org> wrote:
    > 
    > Hi,
    > 
    > I'm creating this blog example
    > 
    > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Froyale.codeoscopic.com%2Floading-github-external-data-through-httpservice%2F&amp;data=02%7C01%7Caharui%40adobe.com%7Ccee27eb1869f443abb5f08d62139ea28%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636732929983635846&amp;sdata=mo%2FMRbY3rVrKZt9a5Q%2Bka90qjKRB5wf%2BVtjdtqdNrnc%3D&amp;reserved=0
    > 
    > After fighting with Github services, I finally get the example working
    > locally in Chrome, Firefox and Safari, but not IE11.
    > 
    > *IE11 error: Unable to get property 'html' of undefined or null reference*
    > 
    > That I think is when trying to retrieve the var "*service.json._links.html"*
    > 
    > *service.json._links.html*
    > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Froyale-asjs%2Fblob%2Fdevelop%2Fexamples%2Fblog%2FBE0011_Loading_Github_external_data_through_HTTPService%2Fsrc%2Fmain%2Froyale%2FBE0011_Loading_Github_external_data_through_HTTPService.mxml&amp;data=02%7C01%7Caharui%40adobe.com%7Ccee27eb1869f443abb5f08d62139ea28%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636732929983635846&amp;sdata=aW%2B0%2F0Jon6BHlID7p4DQG%2Fy3ZhIWUkLA5hWMZF7%2F3%2B8%3D&amp;reserved=0
    > 
    > 
    > But, then uploading this to preproduction server it does not work in any
    > browser
    > 
    > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Froyale.codeoscopic.com%2Fblog-examples%2FBE0011_Loading_Github_external_data_through_HTTPService%2Findex.html&amp;data=02%7C01%7Caharui%40adobe.com%7Ccee27eb1869f443abb5f08d62139ea28%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636732929983635846&amp;sdata=InRwvRpdu8e%2BOpmXwWjPLGumzRD%2B2acG2v9gs9ixY4s%3D&amp;reserved=0
    > 
    > Errors are mostly the same in all browsers:
    > 
    > *undefined is not an object (evaluating 'this.service.json.Mi.html')*
    > 
    > So hope someone could give a hand here since I'm a bit lost with this kind
    > of problems.
    > 
    > I'll be off for some hours now, so I'll catch up when I come back at night.
    > 
    > Thanks for any help here
    > 
    > 
    > -- 
    > Carlos Rovira
    > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&amp;data=02%7C01%7Caharui%40adobe.com%7Ccee27eb1869f443abb5f08d62139ea28%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636732929983635846&amp;sdata=rfLrIWuSlrzyjwtbQzi%2FseLCwgVTiIoNF83KdtHQdPQ%3D&amp;reserved=0
    
    


Re: HTTPService JSON problems

Posted by Harbs <ha...@gmail.com>.
I’m not sure what the problem is with IE11, but the problem with the release version is minification renaming.

I just committed a change to the example ant build script to include the “js-dynamic-access-unknown-members” option (new to 0.9.3). That fixes the renaming problem.

You can do something similar for Maven and/or VS Code builds.

I’m not suggesting that globally enabling this option (like I did) is the best way to go, but I have limited time today and I wanted to demonstrate how to use it.

Good luck,
Harbs

> On Sep 23, 2018, at 12:24 PM, Carlos Rovira <ca...@apache.org> wrote:
> 
> Hi,
> 
> I'm creating this blog example
> 
> https://royale.codeoscopic.com/loading-github-external-data-through-httpservice/
> 
> After fighting with Github services, I finally get the example working
> locally in Chrome, Firefox and Safari, but not IE11.
> 
> *IE11 error: Unable to get property 'html' of undefined or null reference*
> 
> That I think is when trying to retrieve the var "*service.json._links.html"*
> 
> *service.json._links.html*
> https://github.com/apache/royale-asjs/blob/develop/examples/blog/BE0011_Loading_Github_external_data_through_HTTPService/src/main/royale/BE0011_Loading_Github_external_data_through_HTTPService.mxml
> 
> 
> But, then uploading this to preproduction server it does not work in any
> browser
> 
> https://royale.codeoscopic.com/blog-examples/BE0011_Loading_Github_external_data_through_HTTPService/index.html
> 
> Errors are mostly the same in all browsers:
> 
> *undefined is not an object (evaluating 'this.service.json.Mi.html')*
> 
> So hope someone could give a hand here since I'm a bit lost with this kind
> of problems.
> 
> I'll be off for some hours now, so I'll catch up when I come back at night.
> 
> Thanks for any help here
> 
> 
> -- 
> Carlos Rovira
> http://about.me/carlosrovira