Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onReceiveImage(responseCode as Number, data as Null or BitmapReference or BitmapResource) as Void {
- System.println("onReceiveImage: response code = " + responseCode);
- if (responseCode == 200 && data != null) {
- // Storage.setValue(bitmapKey, data); // generates warning/error at typecheck level 2/3
- // a spurious cast is required to make the type checker happy (arguably this type of cast
- // is bad because it should be used sparingly - or not at all, and it gives the dev
- // a false sense of security)
- Storage.setValue(bitmapKey, data as BitmapResource);
- }
- Background.exit(responseCode);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement