Flex/AS3: why I failed to listen ready event of module - apache-flex

follow are code snippet
var depTree:IModuleInfo=ModuleManager.getModule('modules/depTree.swf');
if(!depTree.loaded){
depTree.addEventListener(ModuleEvent.ERROR, onModuleError);
depTree.addEventListener(ModuleEvent.PROGRESS,onModuleProgress);
depTree.addEventListener(ModuleEvent.SETUP,onModuleSetup);
depTree.addEventListener(ModuleEvent.READY,onDepTreeModuleReady);
depTree.load();
}
private function onDepTreeModuleReady(event:ModuleEvent):void{
logger.debug("depTree module was ready");
var moduleInfo:IModuleInfo = event.currentTarget as IModuleInfo;
Panel(component).addChild(moduleInfo.factory.create() as Module);
}
when I run my application, I got "[SWF] modules/depTree.swf - 336,967 bytes after decompression" message,so i'm sure depTree module was loaded,also depTree.read is true.
but onDepTreeModuleReady function seems never be invoked,I didn't got debug message in it and UI of application has no change.

Its an SDK bug move to 3.4

Related

Blazor Application /_blazor/disconnect statuscode 400

my blazor app seems to work but im trying to understand why I'm getting a 400error as seen in the screenshot.
Who can give me a HINT for what Blazor needs technically the "disconnect" ?
SCREENSHOT-disconnect
I'm running everything on a NGINX webserver.
thx Fabio
That call happens here in the code on the window unload event and is used to tell the signalr server that you are disconnecting.
If you are seeing a lot of these it may be that your proxy is not configured correctly for websocket connections.
window.addEventListener(
'unload',
() => {
const data = new FormData();
const circuitId = circuit.circuitId!;
data.append('circuitId', circuitId);
navigator.sendBeacon('_blazor/disconnect', data);
},
false
);
There's a bug reported for this issue here:
https://github.com/dotnet/aspnetcore/issues/30316
Blazor.server.js not respecting configureSignalR builder defined
url/path for disconnnects
As a work-around, I added this to Startup.cs in the Configure method:
var rewriteOptions = new RewriteOptions();
rewriteOptions.AddRewrite("_blazor/disconnect", "/_blazor/disconnect", skipRemainingRules: true);
app.UseRewriter(rewriteOptions);

Can I use proxies ipv6 with CasperJS and SlimerJS?

I have a CasperJS Script duolingo.js and I run the script using a MeteorJS App using a Meteor Method like this:
// define server methods so that the clients will have access to server components
Meteor.methods({
runCasperJS: function() {
// This method call won't return immediately, it will wait for the
// asynchronous code to finish, so we call unblock to allow this client
// to queue other method calls (see Meteor docs)
this.unblock();
// run synchonous system command
var result = process_exec_sync('casperjs duolingo.js --engine=slimerjs --disk-cache=no --proxy=178.166.41.225:80 --proxy-type=HTTP');
// check for error
if (result.error) {
throw new Meteor.Error("exec-fail", "Error running CasperJS: " + result.error.message);
}
// success
return true;
}
});
I need to run the CasperJS Instance using a proxy IP V6. But I don't have any idea, the official documentations of slimerjs and casperjs did not say anything.
Here is the exact part of the code where I use an IP V4 Proxy.
var result = process_exec_sync('casperjs duolingo.js
--engine=slimerjs --disk-cache=no --proxy=178.166.41.225:80
--proxy-type=HTTP');
Thank you for your time and help.

meteor-testing tutorial fails

I started the meteor-testing tutorial, but the 2nd automatic generated test fails with:
TypeError: Cannot call method 'url' of undefined
So it seems that the client variable is not defined. Did anybody experience similar issues? (btw is there a way to debug this)
i'm using ubuntu 14.04 with
Meteor 1.2.0.2
node v4.0.0
xolvio:cucumber 0.19.4_1 CucumberJS for Velocity
Update:
Generated test code intests/cucumber/features/step_definitions/sample_steps.js:
// You can include npm dependencies for support files in tests/cucumber/package.json
var _ = require('underscore');
module.exports = function () {
// You can use normal require here, cucumber is NOT run in a Meteor context (by design)
var url = require('url');
// 1st TEST OK
this.Given(/^I am a new user$/, function () {
server.call('reset'); // server is a connection to the mirror
});
// 2nd TEST FAIL
this.When(/^I navigate to "([^"]*)"$/, function (relativePath) {
// process.env.ROOT_URL always points to the mirror
client.url(url.resolve(process.env.ROOT_URL, relativePath));
});
...
};
I was said to file an issue in the chimp repository, where I was pointed to the solution:
// 2nd TEST FAIL
this.When(/^I navigate to "([^"]*)"$/, function (relativePath) {
// REPLACE client with browser
browser.url(url.resolve(process.env.ROOT_URL, relativePath));
});
This is a short fix, but I'm not sure whether you should later rather use client (seems to be wrapper for different environments).
**Update: ** meanwhile this was fixed, no adaption necessary anymore

Why is my signalR proxy info not generated correctly?

Ok so im using the latest version of signalR (2.10.0 at this moment in time) and I am adding a new hub to my application, I don't want to use it yet nor do I intend to in it's own right I simply want to use this hub to template some basic crud stuff so I don't have to rewrite it all the time.
The adding of this hub to my project causes signalR to fail and not correctly generate the proxy stuff on the client.
Can anyone explain why this would happen?
Here's my code ...
Existing hub:
public class NotificationHub : Hub { ... }
New hub:
public class Hub<T> : Hub { ... }
Client side code that breaks by adding new hub ...
$(function () {
var notifications = $.connection.notificationHub;
notifications.client.success = function (message) <--- js exception here
{ ... };
});
The js exception reads "cannot read property client of undefined".
EDIT:
Looking closer at the details in chromes tools I can see that the client side error is due to : "GET http://localhost/signalr/hubs 500 (Internal Server Error)"
Question is, how do I fix this as attaching the debugger does not let me handle / see where this error is occurring.
I'm guessing this is in the signalR code somewhere.
Is there an issue with generics in signalR ?
Ah ok ...
Since I never have any intention of actually creating a Hub only its sub types I made it abstract.
This appears to resolve the resolve the problem.
public abstract class Hub<T> : Hub { ... }

When use Google Analytics SDK for Android v2 can not get any crash or Exception,I had try EasyTracker and ExceptionReporter but useless?

Use EasyTracker:<bool name="ga_reportUncaughtExceptions">true</bool>
Ues ExceptionReporter:
UncaughtExceptionHandler myHandler = new ExceptionReporter(
myTracker, // Currently used Tracker.
GoogleAnalytics.getInstance(), // GoogleAnalytics singleton.
Thread.getDefaultUncaughtExceptionHandler()); // Current default uncaught exception handler.
Thread.setDefaultUncaughtExceptionHandler(myHandler); // Make myHandler the new default uncaught exception handler.
I can get other data,like event ,page,but I can not get any data of crash and Exception.I have set some uncatch exception and crashs in my program.
if you look in the API doc:
ExceptionReporter(Tracker tracker, ServiceManager serviceManager, java.lang.Thread.UncaughtExceptionHandler originalHandler)
GoogleAnalytics does not implement the ServiceManager interface.... luckily GAServiceManager does. Thus if you change:
GoogleAnalytics.getInstance()
to:
GAServiceManager.getInstance()
It works for me

Resources