[flexcoders] 3rd party RSLs ?

2011-11-02 Thread Nigel Magnay
Would I be correct in saying that any RSLs that my SWF uses must be
compiled with (exactly) the same version of the SDK ?

I have an SWC that I'm using as an RSL rather than linking directly, and
it's bombing out with

VerifyError: Error #1053: Illegal override of getPollSyncMessageResponder
in mx.messaging.channels.NetConnectionChannel.

I believe that's because it was built with an (older) version of the SDK;
but I wanted to verify this.

Is there any way of forcing an RSL to become compatible with a different
SDK, or am I stuck recompiling from source ?


[flexcoders] Diagnosing a TypeError #1034 with RSLs

2011-11-02 Thread Nigel Magnay
I've just been updating our build to use the latest Flexmojos 4.1-beta, and
to use RSL versions of the 4.5.1 flex framework. To do this, I've included
all the dependencies in a manual, correct order, so that the RSL load order
is correct. I've even manually added entries to get the
correct application-domain-targetdefault/application-domain-target
entries for the runtime-shared-library-path elements, and validated against
the flash builder generated -config xml.

It works. Mostly.

I have one rather frustrating error - a TypeError. I believe I understand
what it is telling me, but
I can find no way of getting anything sensible out of flash to help me
figure out why the domains
are screwed up. The link reports and config outputs all look OK to me.

The error is:

TypeError: Error #1034: Type Coercion failed: cannot convert  to
xreader.converters.reflection.ReflectionProvider.
at xreader::xreader()
at
xreader::Modelxreader()[/Users/magnayn/dev/mycorp/mycorp-workspace/mycorp/flex-modules/mycorp-flex-components/src/main/flex/xreader/Modelxreader.as:33]
at
Function/anonymous()[/Users/magnayn/dev/mycorp/mycorp-workspace/mycorp/flex-modules/mycorp-flex-components/src/main/flex/managers/SystemManager.as:65]
at
Function/anonymous()[/Users/magnayn/dev/mycorp/mycorp-workspace/mycorp/flex-modules/mycorp-flex-components/src/main/flex/rpc/AdminService.as:96]
at Function/http://adobe.com/AS3/2006/builtin::call()
at
Function/anonymous()[/Users/magnayn/dev/mycorp/mycorp-workspace/mycorp/flex-modules/mycorp-flex-components/src/main/flex/rpc/BaseWebService.as:82]
at
net.mycorp.mycorp.util::Timing/time()[/Users/magnayn/dev/mycorp/mycorp-workspace/mycorp/flex-modules/mycorp-flex-components/src/main/flex/net/mycorp/mycorp/util/Timing.as:61]
at
rpc::BaseWebService/resultHandler()[/Users/magnayn/dev/mycorp/mycorp-workspace/mycorp/flex-modules/mycorp-flex-components/src/main/flex/rpc/BaseWebService.as:80]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.rpc::AbstractOperation/
http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[E
:\dev\4.5.1\frameworks\projects\rpc\src\mx\rpc\AbstractOperation.as:249]
at mx.rpc::AbstractInvoker/
http://www.adobe.com/2006/flex/mx/internal::resultHandler()[E
:\dev\4.5.1\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:318]
at
mx.rpc::Responder/result()[E:\dev\4.5.1\frameworks\projects\rpc\src\mx\rpc\Responder.as:56]
at
mx.rpc::AsyncRequest/acknowledge()[E:\dev\4.5.1\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:84]
at
DirectHTTPMessageResponder/completeHandler()[E:\dev\4.5.1\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.as:451]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()

(suspicious that there is no class mentioned in the 'cannot convert  to'
part.

The flex-app includes mycorp-flex-components and mycorp-flex-xreader as
RSLs. mycorp-flex-components references mycorp-flex-xreaderas an
'external', and at the point of the error is passing an object which is a
subclass of one defined within mycorp-flex-xreader
(ReflectionProvider), but the class there doesn't think the type is
correct. I can only assume that for some reason there's something wierd
going on with domains, but I cannot figure out what.

Is there any tooling that could help to figure this out?


RE: [flexcoders] Error comparing bitmapData

2011-11-02 Thread Philip Smith

So apparently this error is as a result of comparing bitmap from images of 
different sizes.

To: flexcoders@yahoogroups.com
From: loudj...@hotmail.com
Date: Tue, 1 Nov 2011 22:54:27 +
Subject: [flexcoders] Error comparing bitmapData


















 



  



  
  
  I'm getting this error when comparing (what appears to be) two valid 
BitmapData objects, any ideas why?



Type Coercion failed: cannot convert -3 to flash.display.BitmapData.



code:



var diff:BitmapData =

BitmapData(this._editorBitmapData.compare(this._iceBitmapData));





Cheers,



Philip






 









  

Re: [flexcoders] Diagnosing a TypeError #1034 with RSLs

2011-11-02 Thread Alex Harui
What is the code doing?  If it is trying to find a class definition by name and 
can’t that might be the issue.


On 11/2/11 12:21 PM, Nigel Magnay nigel.mag...@gmail.com wrote:







I've just been updating our build to use the latest Flexmojos 4.1-beta, and to 
use RSL versions of the 4.5.1 flex framework. To do this, I've included all the 
dependencies in a manual, correct order, so that the RSL load order is correct. 
I've even manually added entries to get the correct 
application-domain-targetdefault/application-domain-target entries for the 
runtime-shared-library-path elements, and validated against the flash builder 
generated -config xml.

It works. Mostly.

I have one rather frustrating error - a TypeError. I believe I understand what 
it is telling me, but
I can find no way of getting anything sensible out of flash to help me figure 
out why the domains
are screwed up. The link reports and config outputs all look OK to me.

The error is:

TypeError: Error #1034: Type Coercion failed: cannot convert  to 
xreader.converters.reflection.ReflectionProvider.
at xreader::xreader()
at 
xreader::Modelxreader()[/Users/magnayn/dev/mycorp/mycorp-workspace/mycorp/flex-modules/mycorp-flex-components/src/main/flex/xreader/Modelxreader.as:33]
at 
Function/anonymous()[/Users/magnayn/dev/mycorp/mycorp-workspace/mycorp/flex-modules/mycorp-flex-components/src/main/flex/managers/SystemManager.as:65]
at 
Function/anonymous()[/Users/magnayn/dev/mycorp/mycorp-workspace/mycorp/flex-modules/mycorp-flex-components/src/main/flex/rpc/AdminService.as:96]
at Function/http://adobe.com/AS3/2006/builtin::call()
at 
Function/anonymous()[/Users/magnayn/dev/mycorp/mycorp-workspace/mycorp/flex-modules/mycorp-flex-components/src/main/flex/rpc/BaseWebService.as:82]
at 
net.mycorp.mycorp.util::Timing/time()[/Users/magnayn/dev/mycorp/mycorp-workspace/mycorp/flex-modules/mycorp-flex-components/src/main/flex/net/mycorp/mycorp/util/Timing.as:61]
at 
rpc::BaseWebService/resultHandler()[/Users/magnayn/dev/mycorp/mycorp-workspace/mycorp/flex-modules/mycorp-flex-components/src/main/flex/rpc/BaseWebService.as:80]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at 
mx.rpc::AbstractOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[E:\dev\4.5.1\frameworks\projects\rpc\src\mx\rpc\AbstractOperation.as:249]
at 
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[E:\dev\4.5.1\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:318]
at 
mx.rpc::Responder/result()[E:\dev\4.5.1\frameworks\projects\rpc\src\mx\rpc\Responder.as:56]
at 
mx.rpc::AsyncRequest/acknowledge()[E:\dev\4.5.1\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:84]
at 
DirectHTTPMessageResponder/completeHandler()[E:\dev\4.5.1\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.as:451]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()

(suspicious that there is no class mentioned in the 'cannot convert  to' part.

The flex-app includes mycorp-flex-components and mycorp-flex-xreader as RSLs. 
mycorp-flex-components references mycorp-flex-xreaderas an 'external', and at 
the point of the error is passing an object which is a subclass of one defined 
within mycorp-flex-xreader (ReflectionProvider), but the class there doesn't 
think the type is correct. I can only assume that for some reason there's 
something wierd going on with domains, but I cannot figure out what.

Is there any tooling that could help to figure this out?





--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Diagnosing a TypeError #1034 with RSLs

2011-11-02 Thread Nigel Magnay
It's just passing classes that are constructed in the normal way; -

mycorp-flex-xreader rsl defines

public class XReader {
 ...
   public function XReader(reflectionProvider:ReflectionProvider) {}
 where
 public interface ReflectionProvider { ... }

public class ASReflectionProvider implements ReflectionProvider { .. }
mycorp-flex-components defines

  public class ModelXReader extends XReader {
  ...
 public function ModelXReader() {
   ..
super( new ModelReflectionProvider() );
}

public class ModelReflectionProvider extends ASReflectionProvider {
 ...
}

mycorp-flex-xreader and mycorp-flex-components are RSLs in mycorp-flex-app;
mycorp-flex-xreader is an external in mycorp-flex-components.

It's bombing out here trying to call the super() constructor, which I can
only think means that there are 1 definitions for ReflectionProvider,
which I don't understand..






On Wed, Nov 2, 2011 at 8:06 PM, Alex Harui aha...@adobe.com wrote:

 **


 What is the code doing?  If it is trying to find a class definition by
 name and can’t that might be the issue.



 On 11/2/11 12:21 PM, Nigel Magnay nigel.mag...@gmail.com wrote:







 I've just been updating our build to use the latest Flexmojos 4.1-beta,
 and to use RSL versions of the 4.5.1 flex framework. To do this, I've
 included all the dependencies in a manual, correct order, so that the RSL
 load order is correct. I've even manually added entries to get the correct
 application-domain-targetdefault/application-domain-target entries for
 the runtime-shared-library-path elements, and validated against the flash
 builder generated -config xml.

 It works. Mostly.

 I have one rather frustrating error - a TypeError. I believe I understand
 what it is telling me, but
 I can find no way of getting anything sensible out of flash to help me
 figure out why the domains
 are screwed up. The link reports and config outputs all look OK to me.

 The error is:

 TypeError: Error #1034: Type Coercion failed: cannot convert  to
 xreader.converters.reflection.ReflectionProvider.
 at xreader::xreader()
 at
 xreader::Modelxreader()[/Users/magnayn/dev/mycorp/mycorp-workspace/mycorp/flex-modules/mycorp-flex-components/src/main/flex/xreader/Modelxreader.as:33]
 at
 Function/anonymous()[/Users/magnayn/dev/mycorp/mycorp-workspace/mycorp/flex-modules/mycorp-flex-components/src/main/flex/managers/SystemManager.as:65]
 at
 Function/anonymous()[/Users/magnayn/dev/mycorp/mycorp-workspace/mycorp/flex-modules/mycorp-flex-components/src/main/flex/rpc/AdminService.as:96]
 at Function/http://adobe.com/AS3/2006/builtin::call()
 at
 Function/anonymous()[/Users/magnayn/dev/mycorp/mycorp-workspace/mycorp/flex-modules/mycorp-flex-components/src/main/flex/rpc/BaseWebService.as:82]
 at
 net.mycorp.mycorp.util::Timing/time()[/Users/magnayn/dev/mycorp/mycorp-workspace/mycorp/flex-modules/mycorp-flex-components/src/main/flex/net/mycorp/mycorp/util/Timing.as:61]
 at
 rpc::BaseWebService/resultHandler()[/Users/magnayn/dev/mycorp/mycorp-workspace/mycorp/flex-modules/mycorp-flex-components/src/main/flex/rpc/BaseWebService.as:80]
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at mx.rpc::AbstractOperation/
 http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[E:\dev\4.5.1\frameworks\projects\rpc\src\mx\rpc\AbstractOperation.as:249]
 at mx.rpc::AbstractInvoker/
 http://www.adobe.com/2006/flex/mx/internal::resultHandler()[E:\dev\4.5.1\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:318]
 at
 mx.rpc::Responder/result()[E:\dev\4.5.1\frameworks\projects\rpc\src\mx\rpc\Responder.as:56]
 at
 mx.rpc::AsyncRequest/acknowledge()[E:\dev\4.5.1\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:84]
 at
 DirectHTTPMessageResponder/completeHandler()[E:\dev\4.5.1\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.as:451]
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at flash.net::URLLoader/onComplete()

 (suspicious that there is no class mentioned in the 'cannot convert  to'
 part.

 The flex-app includes mycorp-flex-components and mycorp-flex-xreader as
 RSLs. mycorp-flex-components references mycorp-flex-xreaderas an
 'external', and at the point of the error is passing an object which is a
 subclass of one defined within mycorp-flex-xreader (ReflectionProvider),
 but the class there doesn't think the type is correct. I can only assume
 that for some reason there's something wierd going on with domains, but I
 cannot figure out what.

 Is there any tooling that could help to figure this out?





 --
 Alex Harui
 Flex SDK Team
 Adobe System, Inc.
 http://blogs.adobe.com/aharui

  



[flexcoders] HttpService error handling

2011-11-02 Thread Sells, Fred
I'm using Flex 4.1 with a django backend.  Django provides a really
useful HTML error traceback when it fails.  Currently I then have to
manually insert the offending url into the browser url to see the error
details when debugging.  That's a pain.   I would like to subclass
HttpService to provide a generic automatic solution, but I'm having
trouble.

 

My typical pattern is

Var parms:Object = new Object()

Parms.a=3

Parms.b=4

MyHttpService.url = http://yadda.yadda.yadda/root/function;

MyHttpService.send(parms)

 

When the faultHandler is called I would like to do something like this

navigateToURL( new URLRequest(
Configure.getServer()+'getpdf?id='+parms.id+resid=+parms.resid ) ); 

 

but I cannot find a way to get the parms back from the HttpService in
order to create the URLRequest string.  I've tried the
MyHttpService.request object but that appears to be empty.  It won't
expand in debugger view and a for loop does not iterate through it.

 

Can anyone offer a suggestion?

 

Thanks,

Fred.

 



Re: [flexcoders] Diagnosing a TypeError #1034 with RSLs

2011-11-02 Thread Alex Harui
Try dumping ObjectUtil.toString() on the object in question.


On 11/2/11 1:51 PM, Nigel Magnay nigel.mag...@gmail.com wrote:






It's just passing classes that are constructed in the normal way; -

mycorp-flex-xreader rsl defines

public class XReader {
 ...
   public function XReader(reflectionProvider:ReflectionProvider) {}
where
public interface ReflectionProvider { ... }

public class ASReflectionProvider implements ReflectionProvider { .. }
mycorp-flex-components defines

  public class ModelXReader extends XReader {
  ...
 public function ModelXReader() {
   ..
super( new ModelReflectionProvider() );
}

public class ModelReflectionProvider extends ASReflectionProvider {
 ...
}

mycorp-flex-xreader and mycorp-flex-components are RSLs in mycorp-flex-app;
mycorp-flex-xreader is an external in mycorp-flex-components.

It's bombing out here trying to call the super() constructor, which I can only 
think means that there are 1 definitions for ReflectionProvider, which I don't 
understand..






On Wed, Nov 2, 2011 at 8:06 PM, Alex Harui aha...@adobe.com wrote:





What is the code doing?  If it is trying to find a class definition by name and 
can’t that might be the issue.




On 11/2/11 12:21 PM, Nigel Magnay nigel.mag...@gmail.com 
http://nigel.mag...@gmail.com  wrote:







I've just been updating our build to use the latest Flexmojos 4.1-beta, and to 
use RSL versions of the 4.5.1 flex framework. To do this, I've included all the 
dependencies in a manual, correct order, so that the RSL load order is correct. 
I've even manually added entries to get the correct 
application-domain-targetdefault/application-domain-target entries for the 
runtime-shared-library-path elements, and validated against the flash builder 
generated -config xml.

It works. Mostly.

I have one rather frustrating error - a TypeError. I believe I understand what 
it is telling me, but
I can find no way of getting anything sensible out of flash to help me figure 
out why the domains
are screwed up. The link reports and config outputs all look OK to me.

The error is:

TypeError: Error #1034: Type Coercion failed: cannot convert  to 
xreader.converters.reflection.ReflectionProvider.
at xreader::xreader()
at 
xreader::Modelxreader()[/Users/magnayn/dev/mycorp/mycorp-workspace/mycorp/flex-modules/mycorp-flex-components/src/main/flex/xreader/Modelxreader.as:33]
at 
Function/anonymous()[/Users/magnayn/dev/mycorp/mycorp-workspace/mycorp/flex-modules/mycorp-flex-components/src/main/flex/managers/SystemManager.as:65]
at 
Function/anonymous()[/Users/magnayn/dev/mycorp/mycorp-workspace/mycorp/flex-modules/mycorp-flex-components/src/main/flex/rpc/AdminService.as:96]
at Function/http://adobe.com/AS3/2006/builtin::call()
at 
Function/anonymous()[/Users/magnayn/dev/mycorp/mycorp-workspace/mycorp/flex-modules/mycorp-flex-components/src/main/flex/rpc/BaseWebService.as:82]
at 
net.mycorp.mycorp.util::Timing/time()[/Users/magnayn/dev/mycorp/mycorp-workspace/mycorp/flex-modules/mycorp-flex-components/src/main/flex/net/mycorp/mycorp/util/Timing.as:61]
at 
rpc::BaseWebService/resultHandler()[/Users/magnayn/dev/mycorp/mycorp-workspace/mycorp/flex-modules/mycorp-flex-components/src/main/flex/rpc/BaseWebService.as:80]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at 
mx.rpc::AbstractOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[E:\dev\4.5.1\frameworks\projects\rpc\src\mx\rpc\AbstractOperation.as:249]
at 
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[E:\dev\4.5.1\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:318]
at 
mx.rpc::Responder/result()[E:\dev\4.5.1\frameworks\projects\rpc\src\mx\rpc\Responder.as:56]
at 
mx.rpc::AsyncRequest/acknowledge()[E:\dev\4.5.1\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:84]
at 
DirectHTTPMessageResponder/completeHandler()[E:\dev\4.5.1\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.as:451]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()

(suspicious that there is no class mentioned in the 'cannot convert  to' part.

The flex-app includes mycorp-flex-components and mycorp-flex-xreader as RSLs. 
mycorp-flex-components references mycorp-flex-xreaderas an 'external', and at 
the point of the error is passing an object which is a subclass of one defined 
within mycorp-flex-xreader (ReflectionProvider), but the class there doesn't 
think the type is correct. I can only assume that for some reason there's 
something wierd going on with domains, but I cannot figure out what.

Is there any tooling that could help to figure this out?





--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui