Hi,

in js, check if something is a class or is an instance is like this [1]

typeof myFunc === 'function'

In Royale since we are using AS3, doing

if(something is Class)
    do this
else
   do that

should work either for SWF and for JS, but seems is not the case.
I must make two codes COMPILE::SWF (with "is Class") and COMPILE::JS (with
typeof ... ==='function')

Could we have this abstracted by compiler?

Thanks

[1]
https://stackoverflow.com/questions/405164/best-method-of-testing-for-a-function-in-javascript

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

Reply via email to