easyWorker icon indicating copy to clipboard operation
easyWorker copied to clipboard

How to make plain function to be visible from within the worker?

Open ghost opened this issue 10 years ago • 4 comments

Hi Frédéric,

At first I would like to say thank you for the greate stuff you provided!

Unfortunately, I have an issue I can't resolve. I'm using the GraniteDS calsses inside worker. Everything works well except one thing. When I try to create org.granite.math.BigDecimal I get this error

[Fault] exception, information=ReferenceError: Error #1065: Variable org.granite.math::assert is not defined.

Due to the code of BigDecimal references to plain function org.granite.math::assert that is somehow not seen. I can't pass this name as extraDeps due to assert has Function type and not Class and defined like this.

package org.granite.math { function assert(value:Boolean, message:String = null):void { //... } }

Is it possible to somehow make it work? Thanx in advance.

ghost avatar May 06 '15 12:05 ghost

Sorry, I totally missed that. You could be right, I will have a look and come back to you.

doublefx avatar May 15 '15 17:05 doublefx

Sorry again for the delay, I never find the time to work again on this until today, my guess is there is a workaround adding "org.granite.math.*" as extraDependencies

doublefx avatar Sep 12 '15 17:09 doublefx

Hi Frédéric,

Thanx for reply. Could you please tell me whether a way to optimize the swf for size via e.g. 3rd party tools, but keep workers working?

ghost avatar Oct 28 '15 16:10 ghost

Not sure it is doable, I will investigate.

doublefx avatar Jan 22 '16 01:01 doublefx