You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2018/09/23 18:15:55 UTC
[royale-asjs] branch develop updated: fix httpservice example to
work in IE!1 too
This is an automated email from the ASF dual-hosted git repository.
carlosrovira pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new edd0c8a fix httpservice example to work in IE!1 too
edd0c8a is described below
commit edd0c8a93f36d99dd13fa46ef0ea81deeba17dc9
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Sun Sep 23 20:15:48 2018 +0200
fix httpservice example to work in IE!1 too
---
.../pom.xml | 2 +-
...E0011_Loading_Github_external_data_through_HTTPService.mxml | 2 +-
.../src/main/royale/services/GitHubService.as | 10 ++--------
3 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/examples/blog/BE0011_Loading_Github_external_data_through_HTTPService/pom.xml b/examples/blog/BE0011_Loading_Github_external_data_through_HTTPService/pom.xml
index 0525366..9656ac4 100644
--- a/examples/blog/BE0011_Loading_Github_external_data_through_HTTPService/pom.xml
+++ b/examples/blog/BE0011_Loading_Github_external_data_through_HTTPService/pom.xml
@@ -88,7 +88,7 @@
</dependency>
<dependency>
<groupId>org.apache.royale.framework</groupId>
- <artifactId>Jewel-Light-NoFlat-Primary-Red-Theme</artifactId>
+ <artifactId>Jewel-Light-NoFlat-Primary-Turquoise-Theme</artifactId>
<version>0.9.4-SNAPSHOT</version>
<type>swc</type>
<scope>theme</scope>
diff --git a/examples/blog/BE0011_Loading_Github_external_data_through_HTTPService/src/main/royale/BE0011_Loading_Github_external_data_through_HTTPService.mxml b/examples/blog/BE0011_Loading_Github_external_data_through_HTTPService/src/main/royale/BE0011_Loading_Github_external_data_through_HTTPService.mxml
index 2d4642d..172e447 100644
--- a/examples/blog/BE0011_Loading_Github_external_data_through_HTTPService/src/main/royale/BE0011_Loading_Github_external_data_through_HTTPService.mxml
+++ b/examples/blog/BE0011_Loading_Github_external_data_through_HTTPService/src/main/royale/BE0011_Loading_Github_external_data_through_HTTPService.mxml
@@ -36,7 +36,7 @@
public function dataReadyHandler(event:Event):void
{
- Alert.show(event.target.jsonToString, "JSON data retrieved");
+ Alert.show(service.jsonToString, "JSON data retrieved");
jsonData.html = "Some JSON Data: <br><strong> - service.json.name:</strong> " + service.json.name +
"<br><strong> - service.json.sha:</strong> " + service.json.sha +
"<br><strong> - service.json._links.html</strong> " + service.json._links.html;
diff --git a/examples/blog/BE0011_Loading_Github_external_data_through_HTTPService/src/main/royale/services/GitHubService.as b/examples/blog/BE0011_Loading_Github_external_data_through_HTTPService/src/main/royale/services/GitHubService.as
index ad546bf..d8e2970 100644
--- a/examples/blog/BE0011_Loading_Github_external_data_through_HTTPService/src/main/royale/services/GitHubService.as
+++ b/examples/blog/BE0011_Loading_Github_external_data_through_HTTPService/src/main/royale/services/GitHubService.as
@@ -22,6 +22,7 @@ package services
import org.apache.royale.net.HTTPHeader;
import org.apache.royale.events.EventDispatcher;
import org.apache.royale.events.Event;
+ import org.apache.royale.utils.string.Base64;
[Event(name="dataReady", type="org.apache.royale.events.Event")]
/**
@@ -87,14 +88,7 @@ package services
*/
public function get sourceCode():String
{
- COMPILE::JS
- {
- return atob(service.json.content);
- }
- COMPILE::SWF
- {
- return "";// to implement for SWF
- }
+ return Base64.decode(service.json.content);
}
/**