Re: [flexcoders] Problem with loading module -- mx.core::LayoutContainer could not be found.

2007-04-20 Thread bjorn -

Hi Alex,

I don't think I'm doing something special when loading -- just using the
ModuleManager:

var manager:ModuleManager = new ModuleManager();
this.myModule = ModuleManager.getModule( url );
this.myModule.addEventListener(ModuleEvent.READY, moduleReady );
this.myModule.addEventListener(ModuleEvent.ERROR, moduleError );
this.myModule.load();

.. it does work if I publish the application to the same domain I'm loading
the module from. So I'm thinking the problem has to do with the local
filesystem not being in the same domain as localhost, as you mentioned.

I don't know why the LayoutContainer error is thrown when I run the app
locally, but as I said - the same code works if I publish both application
and module on the same host, so it does seem a bit strange to me.

- Bjørn



On 18/04/07, Alex Harui [EMAIL PROTECTED] wrote:


   The recipe says that you generate a link-report when compiling the
main app, and use that link-report as -load-externs when compiling the
module.

The link-report for the main app should have layoutContainer in it.  If it
doesn't, you got the wrong version of mx.core.Application in your app.

If it does, then there must be something unique about the load.  Are you
specifying a different application domain?

-Alex

 --
*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *bjorn -
*Sent:* Wednesday, April 18, 2007 7:58 AM
*To:* flexcoders@yahoogroups.com
*Subject:* Re: [flexcoders] Problem with loading module --
mx.core::LayoutContainer could not be found.



 Hi Alex,

I've got Flex Builder 2.0.1 and the library path for framework.swc is
${FRAMEWORKS}/libs/framework.swc .. I assume that will link to the 2.0.1version 
which shipped with the Flex Builder I'm using.

As for the -load-externs, what do you mean? The classes are in my main app
(although located in a package, yes - but could that cause problems?). What
would the alternative be, putting all classes used by the modules in the
root? That doesn't seem right to me.

Best regards,
Bjørn


On 17 Apr 2007 06:00:57 -0700, Alex Harui [EMAIL PROTECTED] wrote:

Could you be linking the main app against a 2.0 framework.swc?  You
 need to link against 2.0.1.

 Also, normally you -load-externs against classes in the main app and not
 from some package.

 -Alex

  --
 *From:* flexcoders@yahoogroups.com [mailto: [EMAIL PROTECTED]
 *On Behalf Of *bjorn -
 *Sent:* Monday, April 16, 2007 1:14 AM
 *To:* [EMAIL PROTECTED] ups.com
 *Subject:* [flexcoders] Problem with loading module --
 mx.core::LayoutContainer could not be found.



 Hi guys,

 I've got a simple text module which looks like this:

 ?xml version=1.0 encoding=utf-8?
 mx:Module xmlns:mx= http://www.adobe.com/2006/mxml 
 layout=absolute
 mx:Script
 ![CDATA[

 import com.myapp.MyEventDispatcher;
 import com.myapp.MyTestEvent ;

 public function callSomethingInMainApp(e:Event): void
 {
 var event:MyTestEvent= new MyTestEvent();
 MyEventDispatcher.getInstance().dispatchEvent( event
 );
 }
 ]]
 /mx:Script
  mx:HBox
   mx:DateChooser x=10 y=10/
  /mx:HBox

 /mx:Module

 I compile it with the -load-externs option to not include the classes I
 use from  com.myapp

 However, when I try to load the module from my main application, this
 error is thrown:

 VerifyError: Error #1014: Class mx.core::LayoutContainer could not be
 found.
  at flash.display::MovieClip/nextFrame()
  at mx.core::FlexModuleFactory/::deferredNextFrame()
  at mx.core::FlexModuleFactory/::update ()
  at mx.core::FlexModuleFactory/::moduleCompleteHandler()


 Anyone know what might cause this? Googling the error didn't help me
 much ...

 --

 
 http://www.juicability.com - flex blog
 http://www.43min.com - funny movies




--


http://www.juicability.com - flex blog
http://www.43min.com - funny movies

 





--


http://www.juicability.com - flex blog
http://www.43min.com - funny movies


RE: [flexcoders] Problem with loading module -- mx.core::LayoutContainer could not be found.

2007-04-19 Thread Alex Harui
The recipe says that you generate a link-report when compiling the main app, 
and use that link-report as -load-externs when compiling the module.
 
The link-report for the main app should have layoutContainer in it.  If it 
doesn't, you got the wrong version of mx.core.Application in your app.
 
If it does, then there must be something unique about the load.  Are you 
specifying a different application domain?
 
-Alex



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of bjorn -
Sent: Wednesday, April 18, 2007 7:58 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Problem with loading module -- 
mx.core::LayoutContainer could not be found.



Hi Alex,
 
I've got Flex Builder 2.0.1 and the library path for framework.swc is 
${FRAMEWORKS}/libs/framework.swc .. I assume that will link to the 2.0.1 
version which shipped with the Flex Builder I'm using.
 
As for the -load-externs, what do you mean? The classes are in my main app 
(although located in a package, yes - but could that cause problems?). What 
would the alternative be, putting all classes used by the modules in the root? 
That doesn't seem right to me. 
 
Best regards,
Bjørn

 
On 17 Apr 2007 06:00:57 -0700, Alex Harui [EMAIL PROTECTED] mailto:[EMAIL 
PROTECTED]  wrote: 


Could you be linking the main app against a 2.0 framework.swc?  You 
need to link against 2.0.1.
 
Also, normally you -load-externs against classes in the main app and 
not from some package.
 
-Alex



From: flexcoders@yahoogroups.com http://ups.com/  [mailto: 
flexcoders@ mailto:flexcoders@ yahoogroups.com http://yahoogroups.com ] On 
Behalf Of bjorn -
Sent: Monday, April 16, 2007 1:14 AM
To: [EMAIL PROTECTED] ups.com http://ups.com/ 
Subject: [flexcoders] Problem with loading module -- 
mx.core::LayoutContainer could not be found.

 



Hi guys,

I've got a simple text module which looks like this:

?xml version=1.0 encoding=utf-8?
mx:Module xmlns:mx= http://www.adobe.com/2006/mxml 
http://www.adobe.com/2006/mxml  layout=absolute
mx:Script
![CDATA[

import com.myapp.MyEventDispatcher;
import com.myapp.MyTestEvent ;

public function callSomethingInMainApp(e:Event): void
{
var event:MyTestEvent= new MyTestEvent();
MyEventDispatcher.getInstance().dispatchEvent( event ); 
   
}
]]
/mx:Script
 mx:HBox
  mx:DateChooser x=10 y=10/  
 /mx:HBox

/mx:Module

I compile it with the -load-externs option to not include the classes I 
use from  com.myapp

However, when I try to load the module from my main application, this 
error is thrown:
 
VerifyError: Error #1014: Class mx.core::LayoutContainer could not be 
found.
 at flash.display::MovieClip/nextFrame()
 at mx.core::FlexModuleFactory/::deferredNextFrame()
 at mx.core::FlexModuleFactory/::update ()
 at mx.core::FlexModuleFactory/::moduleCompleteHandler()
 
 
Anyone know what might cause this? Googling the error didn't help me 
much ...

-- 


http://www.juicability.com http://www.juicability.com/  - flex blog
http://www.43min.com http://www.43min.com/ - funny movies 
















-- 

 
http://www.juicability.com http://www.juicability.com  - flex blog
http://www.43min.com http://www.43min.com  - funny movies 

 


RE: [flexcoders] Problem with loading module -- mx.core::LayoutContainer could not be found.

2007-04-18 Thread Alex Harui
That's because the file system really isn't a domain.  AllowDomain doesn't 
really help in this situation.  I would expect your gateway server to force you 
to import load the modules into the same security domain.  Does it actually 
work when deployed the way you want it?



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of bjorn -
Sent: Tuesday, April 17, 2007 6:20 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Problem with loading module -- 
mx.core::LayoutContainer could not be found.



Yeah, it seems the file system is pretty tricky. I can't load from it even 
though I have ...
 
this in my application:
 
   public function init():void 
   {
   Security.allowDomain(*);

   Security.loadPolicyFile(http://localhost/crossdomain.xml 
http://localhost/crossdomain.xml  );
   var request:URLRequest = new 
URLRequest(http://localhost/crossdomain.xml http://localhost/crossdomain.xml 
);
   var loader:URLLoader = new URLLoader();
   loader.load (request);
}
 
this in my module (gets called by initialize)
 
  public function initMod(e:Event):void {
Security.allowDomain(*);
   }
 
.. and this crossdomain.xml
 
?xml version=1.0?
!DOCTYPE cross-domain-policy SYSTEM 
http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd 
http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd  
cross-domain-policy
  allow-access-from domain=* to-ports=*/
/cross-domain-policy
 
 
.. still no luck.
 
Relative url's can't be used, as I need to load modules through the gateway 
server. Of course, I can publish to and run my app from the server everytime I 
compile, but it slows down the development process.
 
Best regards,
Bjørn


 
On 17 Apr 2007 05:54:37 -0700, Alex Harui [EMAIL PROTECTED] mailto:[EMAIL 
PROTECTED]  wrote: 


I think it is because localhost is not the same domain as the file 
system, and you can't load modules across domains without import loading them.  
You might be better off loading via relative urls instead of absolute. 



From: flexcoders@yahoogroups.com http://ups.com/  [mailto: 
flexcoders@ mailto:flexcoders@ yahoogroups.com http://yahoogroups.com ] On 
Behalf Of bjorn -
Sent: Tuesday, April 17, 2007 12:32 AM
To: [EMAIL PROTECTED] ups.com http://ups.com/ 
Subject: Re: [flexcoders] Problem with loading module -- 
mx.core::LayoutContainer could not be found.

 



I don't have a crossdomain file, didn't think I needed one as it was 
all on localhost .. I get the problem when I run my project in Flex hitting 
ctrl-F11 since it will load my app directly (e.g. 
file:///C:/dev/FlexWorkspace/MyApp/build/MyApp-debug.html  ) - while trying to 
load the module from a server (localhost). I don't see why it should be a 
problem though.
 
As for the security error (here's another one for Google) - it's: SWF 
is not a loadable module ...
 
The event:
 
e = mx.events.ModuleEvent (@414ad61)
 bubbles = false
 bytesLoaded = 0
 bytesTotal = 0
 cancelable = false
 currentTarget = ModuleManager.as$20.ModuleInfoProxy (@3ecec81)
 errorText = SWF is not a loadable module 
 eventPhase = 2
 module = ModuleManager.as$20.ModuleInfoProxy (@3ecec81)
 target = ModuleManager.as$20.ModuleInfoProxy (@3ecec81)
 type = error

 
Best regards,
Bjørn
 
On 16 Apr 2007 18:03:09 -0700, Robert Cadena  [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]  wrote: 


Glad I could help. Just cause I'm curious:
- do you have a crossdomain at the root of your localhost 
server?
- is your parent app not loaded from the same domain 
(localhost)?
- you are doing this with the swf player, maybe on the browser 
or by 
running the swf directly, not in apollo, right?

you might want to add eventListeners to the moduleinfo just to 
see what 
the exact security error is. Put a breakpoing on the function 
that 
handles SecurityError and see what the error message is. 

best of luck.

/r
http://www.searchcoders.com/flex/search/module 
http://www.searchcoders.com/flex/search/module 
http://www.laflex.org/ http://www.laflex.org/  - Los Angeles 
Flex Users Group

bjorn - wrote:
 Robert, thanks for leading me onto the correct path :-) The 
problem has to 
 do with security. If I set the module url to a local path 
(c:\..) 
 instead of
 localhost, I'm able to load it.
 
 Strange error message

Re: [flexcoders] Problem with loading module -- mx.core::LayoutContainer could not be found.

2007-04-18 Thread bjorn -

Yes, when I deploy the application on the gateway server it works.


On 18 Apr 2007 05:41:13 -0700, Alex Harui [EMAIL PROTECTED] wrote:


   That's because the file system really isn't a domain.  AllowDomain
doesn't really help in this situation.  I would expect your gateway server
to force you to import load the modules into the same security domain.  Does
it actually work when deployed the way you want it?

 --
*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *bjorn -
*Sent:* Tuesday, April 17, 2007 6:20 AM
*To:* flexcoders@yahoogroups.com
*Subject:* Re: [flexcoders] Problem with loading module --
mx.core::LayoutContainer could not be found.



Yeah, it seems the file system is pretty tricky. I can't load from it even
though I have ...

this in my application:

   public function init():void
   {
   Security.allowDomain(*);

   Security.loadPolicyFile(http://localhost/crossdomain.xml );
   var request:URLRequest = new URLRequest(
http://localhost/crossdomain.xml;);
   var loader:URLLoader = new URLLoader();
   loader.load (request);
}

this in my module (gets called by initialize)

  public function initMod(e:Event):void {
Security.allowDomain(*);
   }

.. and this crossdomain.xml

?xml version=1.0?
!DOCTYPE cross-domain-policy SYSTEM 
http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd 
cross-domain-policy
  allow-access-from domain=* to-ports=*/
/cross-domain-policy


.. still no luck.

Relative url's can't be used, as I need to load modules through the
gateway server. Of course, I can publish to and run my app from the server
everytime I compile, but it slows down the development process.

Best regards,
Bjørn



On 17 Apr 2007 05:54:37 -0700, Alex Harui [EMAIL PROTECTED] wrote:

I think it is because localhost is not the same domain as the file
 system, and you can't load modules across domains without import loading
 them.  You might be better off loading via relative urls instead of
 absolute.

  --
 *From:* flexcoders@yahoogroups.com [mailto: [EMAIL PROTECTED]
 *On Behalf Of *bjorn -
 *Sent:* Tuesday, April 17, 2007 12:32 AM
 *To:* [EMAIL PROTECTED] ups.com
 *Subject:* Re: [flexcoders] Problem with loading module --
 mx.core::LayoutContainer could not be found.



  I don't have a crossdomain file, didn't think I needed one as it was
 all on localhost .. I get the problem when I run my project in Flex hitting
 ctrl-F11 since it will load my app directly (e.g. 
file:///C:/dev/FlexWorkspace/MyApp/build/MyApp-debug.html
  ) - while trying to load the module from a server (localhost). I don't
 see why it should be a problem though.

 As for the security error (here's another one for Google) - it's: SWF
 is not a loadable module ...

 The event:

 e = mx.events.ModuleEvent (@414ad61)
  bubbles = false
  bytesLoaded = 0
  bytesTotal = 0
  cancelable = false
  currentTarget = ModuleManager.as$20.ModuleInfoProxy (@3ecec81)
  errorText = SWF is not a loadable module
  eventPhase = 2
  module = ModuleManager.as$20.ModuleInfoProxy (@3ecec81)
  target = ModuleManager.as$20.ModuleInfoProxy (@3ecec81)
  type = error


 Best regards,
 Bjørn

 On 16 Apr 2007 18:03:09 -0700, Robert Cadena  [EMAIL PROTECTED]
 wrote:
 
 
  Glad I could help. Just cause I'm curious:
  - do you have a crossdomain at the root of your localhost server?
  - is your parent app not loaded from the same domain (localhost)?
  - you are doing this with the swf player, maybe on the browser or by
  running the swf directly, not in apollo, right?
 
  you might want to add eventListeners to the moduleinfo just to see
  what
  the exact security error is. Put a breakpoing on the function that
  handles SecurityError and see what the error message is.
 
  best of luck.
 
  /r
  http://www.searchcoders.com/flex/search/module
  http://www.laflex.org/ - Los Angeles Flex Users Group
 
  bjorn - wrote:
   Robert, thanks for leading me onto the correct path :-) The problem
  has to
   do with security. If I set the module url to a local path (c:\..)
   instead of
   localhost, I'm able to load it.
  
   Strange error message for security issues, don't you think? Well,
  now it's
   soon on Google at the least.
  
   - Bjørn
  
  
   On 16 Apr 2007 10:10:50 -0700, Robert Cadena [EMAIL 
PROTECTED]robert%40searchcoders.com
  
   wrote:
  
   Hi Bjorn,
  
   when you load the module, what ApplicationDomain are you passing to
  the
   the IModuleInfo? and how do you construct it if you are passing it
  as a
   param?
  
   /r
   http://www.searchcoders.com/flex/search/module
   http://www.laflex.org/ - Los Angeles Flex Users Group
  
   bjorn - wrote:
Thanks for the tip .. I did try that already though, and it
  didn't make
   any
 
 


 --

 
 http://www.juicability.com - flex blog
 http://www.43min.com - funny movies




--


http://www.juicability.com - flex blog
http://www.43min.com

Re: [flexcoders] Problem with loading module -- mx.core::LayoutContainer could not be found.

2007-04-18 Thread bjorn -

Hi Alex,

I've got Flex Builder 2.0.1 and the library path for framework.swc is
${FRAMEWORKS}/libs/framework.swc .. I assume that will link to the
2.0.1version which shipped with the Flex Builder I'm using.

As for the -load-externs, what do you mean? The classes are in my main app
(although located in a package, yes - but could that cause problems?). What
would the alternative be, putting all classes used by the modules in the
root? That doesn't seem right to me.

Best regards,
Bjørn


On 17 Apr 2007 06:00:57 -0700, Alex Harui [EMAIL PROTECTED] wrote:


   Could you be linking the main app against a 2.0 framework.swc?  You
need to link against 2.0.1.

Also, normally you -load-externs against classes in the main app and not
from some package.

-Alex

 --
*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *bjorn -
*Sent:* Monday, April 16, 2007 1:14 AM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] Problem with loading module --
mx.core::LayoutContainer could not be found.



Hi guys,

I've got a simple text module which looks like this:

?xml version=1.0 encoding=utf-8?
mx:Module xmlns:mx= http://www.adobe.com/2006/mxml  layout=absolute
mx:Script
![CDATA[

import com.myapp.MyEventDispatcher;
import com.myapp.MyTestEvent ;

public function callSomethingInMainApp(e:Event): void
{
var event:MyTestEvent= new MyTestEvent();
MyEventDispatcher.getInstance().dispatchEvent( event );

}
]]
/mx:Script
 mx:HBox
  mx:DateChooser x=10 y=10/
 /mx:HBox

/mx:Module

I compile it with the -load-externs option to not include the classes I
use from  com.myapp

However, when I try to load the module from my main application, this
error is thrown:

VerifyError: Error #1014: Class mx.core::LayoutContainer could not be
found.
 at flash.display::MovieClip/nextFrame()
 at mx.core::FlexModuleFactory/::deferredNextFrame()
 at mx.core::FlexModuleFactory/::update ()
 at mx.core::FlexModuleFactory/::moduleCompleteHandler()


Anyone know what might cause this? Googling the error didn't help me much
...

--


http://www.juicability.com - flex blog
http://www.43min.com - funny movies

 





--


http://www.juicability.com - flex blog
http://www.43min.com - funny movies


Re: [flexcoders] Problem with loading module -- mx.core::LayoutContainer could not be found.

2007-04-17 Thread bjorn -

I don't have a crossdomain file, didn't think I needed one as it was all on
localhost .. I get the problem when I run my project in Flex hitting
ctrl-F11 since it will load my app directly (e.g.
file:///C:/dev/FlexWorkspace/MyApp/build/MyApp-debug.html ) - while trying
to load the module from a server (localhost). I don't see why it should be a
problem though.

As for the security error (here's another one for Google) - it's: SWF is
not a loadable module ...

The event:

e = mx.events.ModuleEvent (@414ad61)
bubbles = false
bytesLoaded = 0
bytesTotal = 0
cancelable = false
currentTarget = ModuleManager.as$20.ModuleInfoProxy (@3ecec81)
errorText = SWF is not a loadable module
eventPhase = 2
module = ModuleManager.as$20.ModuleInfoProxy (@3ecec81)
target = ModuleManager.as$20.ModuleInfoProxy (@3ecec81)
type = error


Best regards,
Bjørn

On 16 Apr 2007 18:03:09 -0700, Robert Cadena [EMAIL PROTECTED]
wrote:



Glad I could help. Just cause I'm curious:
- do you have a crossdomain at the root of your localhost server?
- is your parent app not loaded from the same domain (localhost)?
- you are doing this with the swf player, maybe on the browser or by
running the swf directly, not in apollo, right?

you might want to add eventListeners to the moduleinfo just to see what
the exact security error is. Put a breakpoing on the function that
handles SecurityError and see what the error message is.

best of luck.

/r
http://www.searchcoders.com/flex/search/module
http://www.laflex.org/ - Los Angeles Flex Users Group

bjorn - wrote:
 Robert, thanks for leading me onto the correct path :-) The problem has
to
 do with security. If I set the module url to a local path (c:\..)
 instead of
 localhost, I'm able to load it.

 Strange error message for security issues, don't you think? Well, now
it's
 soon on Google at the least.

 - Bjørn


 On 16 Apr 2007 10:10:50 -0700, Robert Cadena [EMAIL 
PROTECTED]robert%40searchcoders.com

 wrote:

 Hi Bjorn,

 when you load the module, what ApplicationDomain are you passing to the
 the IModuleInfo? and how do you construct it if you are passing it as a
 param?

 /r
 http://www.searchcoders.com/flex/search/module
 http://www.laflex.org/ - Los Angeles Flex Users Group

 bjorn - wrote:
  Thanks for the tip .. I did try that already though, and it didn't
make
 any







--


http://www.juicability.com - flex blog
http://www.43min.com - funny movies


RE: [flexcoders] Problem with loading module -- mx.core::LayoutContainer could not be found.

2007-04-17 Thread Alex Harui
I think it is because localhost is not the same domain as the file system, and 
you can't load modules across domains without import loading them.  You might 
be better off loading via relative urls instead of absolute.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of bjorn -
Sent: Tuesday, April 17, 2007 12:32 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Problem with loading module -- 
mx.core::LayoutContainer could not be found.



I don't have a crossdomain file, didn't think I needed one as it was all on 
localhost .. I get the problem when I run my project in Flex hitting ctrl-F11 
since it will load my app directly (e.g. 
file:///C:/dev/FlexWorkspace/MyApp/build/MyApp-debug.html 
file:///C:/dev/FlexWorkspace/MyApp/build/MyApp-debug.html  ) - while trying 
to load the module from a server (localhost). I don't see why it should be a 
problem though.
 
As for the security error (here's another one for Google) - it's: SWF is not a 
loadable module ...
 
The event:
 
e = mx.events.ModuleEvent (@414ad61)
 bubbles = false
 bytesLoaded = 0
 bytesTotal = 0
 cancelable = false
 currentTarget = ModuleManager.as$20.ModuleInfoProxy (@3ecec81)
 errorText = SWF is not a loadable module 
 eventPhase = 2
 module = ModuleManager.as$20.ModuleInfoProxy (@3ecec81)
 target = ModuleManager.as$20.ModuleInfoProxy (@3ecec81)
 type = error

 
Best regards,
Bjørn
 
On 16 Apr 2007 18:03:09 -0700, Robert Cadena [EMAIL PROTECTED] mailto:[EMAIL 
PROTECTED]  wrote: 


Glad I could help. Just cause I'm curious:
- do you have a crossdomain at the root of your localhost server?
- is your parent app not loaded from the same domain (localhost)?
- you are doing this with the swf player, maybe on the browser or by 
running the swf directly, not in apollo, right?

you might want to add eventListeners to the moduleinfo just to see what 
the exact security error is. Put a breakpoing on the function that 
handles SecurityError and see what the error message is. 

best of luck.

/r
http://www.searchcoders.com/flex/search/module 
http://www.searchcoders.com/flex/search/module 
http://www.laflex.org/ http://www.laflex.org/  - Los Angeles Flex 
Users Group

bjorn - wrote:
 Robert, thanks for leading me onto the correct path :-) The problem 
has to 
 do with security. If I set the module url to a local path (c:\..) 
 instead of
 localhost, I'm able to load it.
 
 Strange error message for security issues, don't you think? Well, now 
it's 
 soon on Google at the least.
 
 - Bjørn
 
 
 On 16 Apr 2007 10:10:50 -0700, Robert Cadena  [EMAIL PROTECTED] 
mailto:robert%40searchcoders.com 
 wrote:

 Hi Bjorn,

 when you load the module, what ApplicationDomain are you passing to 
the
 the IModuleInfo? and how do you construct it if you are passing it 
as a 
 param?

 /r
 http://www.searchcoders.com/flex/search/module 
http://www.searchcoders.com/flex/search/module 
 http://www.laflex.org/ http://www.laflex.org/  - Los Angeles Flex 
Users Group

 bjorn - wrote:
  Thanks for the tip .. I did try that already though, and it didn't 
make
 any








-- 

 
http://www.juicability.com http://www.juicability.com  - flex blog
http://www.43min.com http://www.43min.com  - funny movies 

 


RE: [flexcoders] Problem with loading module -- mx.core::LayoutContainer could not be found.

2007-04-17 Thread Alex Harui
Could you be linking the main app against a 2.0 framework.swc?  You need
to link against 2.0.1.
 
Also, normally you -load-externs against classes in the main app and not
from some package.
 
-Alex



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of bjorn -
Sent: Monday, April 16, 2007 1:14 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Problem with loading module --
mx.core::LayoutContainer could not be found.



Hi guys,

I've got a simple text module which looks like this:

?xml version=1.0 encoding=utf-8?
mx:Module xmlns:mx= http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml  layout=absolute
mx:Script
![CDATA[

import com.myapp.MyEventDispatcher;
import com.myapp.MyTestEvent ;

public function callSomethingInMainApp(e:Event): void
{
var event:MyTestEvent= new MyTestEvent();
MyEventDispatcher.getInstance().dispatchEvent( event );

}
]]
/mx:Script
 mx:HBox
  mx:DateChooser x=10 y=10/  
 /mx:HBox

/mx:Module

I compile it with the -load-externs option to not include the classes I
use from  com.myapp

However, when I try to load the module from my main application, this
error is thrown:
 
VerifyError: Error #1014: Class mx.core::LayoutContainer could not be
found.
 at flash.display::MovieClip/nextFrame()
 at mx.core::FlexModuleFactory/::deferredNextFrame()
 at mx.core::FlexModuleFactory/::update ()
 at mx.core::FlexModuleFactory/::moduleCompleteHandler()
 
 
Anyone know what might cause this? Googling the error didn't help me
much ...

-- 


http://www.juicability.com http://www.juicability.com/  - flex blog
http://www.43min.com http://www.43min.com/ - funny movies 

 


Re: [flexcoders] Problem with loading module -- mx.core::LayoutContainer could not be found.

2007-04-17 Thread bjorn -

Yeah, it seems the file system is pretty tricky. I can't load from it even
though I have ...

this in my application:

  public function init():void
  {
  Security.allowDomain(*);

  Security.loadPolicyFile(http://localhost/crossdomain.xml;);
  var request:URLRequest = new URLRequest(
http://localhost/crossdomain.xml;);
  var loader:URLLoader = new URLLoader();
  loader.load(request);
   }

this in my module (gets called by initialize)

 public function initMod(e:Event):void {
   Security.allowDomain(*);
  }

.. and this crossdomain.xml

?xml version=1.0?
!DOCTYPE cross-domain-policy SYSTEM 
http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd;
cross-domain-policy
 allow-access-from domain=* to-ports=*/
/cross-domain-policy


.. still no luck.

Relative url's can't be used, as I need to load modules through the gateway
server. Of course, I can publish to and run my app from the server everytime
I compile, but it slows down the development process.

Best regards,
Bjørn



On 17 Apr 2007 05:54:37 -0700, Alex Harui [EMAIL PROTECTED] wrote:


   I think it is because localhost is not the same domain as the file
system, and you can't load modules across domains without import loading
them.  You might be better off loading via relative urls instead of
absolute.

 --
*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *bjorn -
*Sent:* Tuesday, April 17, 2007 12:32 AM
*To:* flexcoders@yahoogroups.com
*Subject:* Re: [flexcoders] Problem with loading module --
mx.core::LayoutContainer could not be found.



 I don't have a crossdomain file, didn't think I needed one as it was all
on localhost .. I get the problem when I run my project in Flex hitting
ctrl-F11 since it will load my app directly (e.g.
file:///C:/dev/FlexWorkspace/MyApp/build/MyApp-debug.html ) - while trying
to load the module from a server (localhost). I don't see why it should be a
problem though.

As for the security error (here's another one for Google) - it's: SWF is
not a loadable module ...

The event:

e = mx.events.ModuleEvent (@414ad61)
 bubbles = false
 bytesLoaded = 0
 bytesTotal = 0
 cancelable = false
 currentTarget = ModuleManager.as$20.ModuleInfoProxy (@3ecec81)
 errorText = SWF is not a loadable module
 eventPhase = 2
 module = ModuleManager.as$20.ModuleInfoProxy (@3ecec81)
 target = ModuleManager.as$20.ModuleInfoProxy (@3ecec81)
 type = error


Best regards,
Bjørn

On 16 Apr 2007 18:03:09 -0700, Robert Cadena [EMAIL PROTECTED]
wrote:


 Glad I could help. Just cause I'm curious:
 - do you have a crossdomain at the root of your localhost server?
 - is your parent app not loaded from the same domain (localhost)?
 - you are doing this with the swf player, maybe on the browser or by
 running the swf directly, not in apollo, right?

 you might want to add eventListeners to the moduleinfo just to see what
 the exact security error is. Put a breakpoing on the function that
 handles SecurityError and see what the error message is.

 best of luck.

 /r
 http://www.searchcoders.com/flex/search/module
 http://www.laflex.org/ - Los Angeles Flex Users Group

 bjorn - wrote:
  Robert, thanks for leading me onto the correct path :-) The problem
 has to
  do with security. If I set the module url to a local path (c:\..)
  instead of
  localhost, I'm able to load it.
 
  Strange error message for security issues, don't you think? Well, now
 it's
  soon on Google at the least.
 
  - Bjørn
 
 
  On 16 Apr 2007 10:10:50 -0700, Robert Cadena  [EMAIL 
PROTECTED]robert%40searchcoders.com
 
  wrote:
 
  Hi Bjorn,
 
  when you load the module, what ApplicationDomain are you passing to
 the
  the IModuleInfo? and how do you construct it if you are passing it as
 a
  param?
 
  /r
  http://www.searchcoders.com/flex/search/module
  http://www.laflex.org/ - Los Angeles Flex Users Group
 
  bjorn - wrote:
   Thanks for the tip .. I did try that already though, and it didn't
 make
  any




--


http://www.juicability.com - flex blog
http://www.43min.com - funny movies

 





--


http://www.juicability.com - flex blog
http://www.43min.com - funny movies


Re: [flexcoders] Problem with loading module -- mx.core::LayoutContainer could not be found.

2007-04-16 Thread Tom Chiverton
On Monday 16 Apr 2007, bjorn - wrote:
 Anyone know what might cause this? Googling the error didn't help me much

Any luck if you import it in your code (but don't use it) ? Or creating a 
dummy variable of that type ?

-- 
Tom Chiverton
Helping to carefully coordinate value-added data
on: http://thefalken.livejournal.com



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at St 
James's Court Brown Street Manchester M2 2JF.  A list of members is available 
for inspection at the registered office. Any reference to a partner in relation 
to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law 
Society.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 8008.

For more information about Halliwells LLP visit www.halliwells.com.



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 


Re: [flexcoders] Problem with loading module -- mx.core::LayoutContainer could not be found.

2007-04-16 Thread bjorn -

Thanks for the tip .. I did try that already though, and it didn't make any
difference.


On 16 Apr 2007 06:23:20 -0700, Tom Chiverton [EMAIL PROTECTED]
wrote:


On Monday 16 Apr 2007, bjorn - wrote:
 Anyone know what might cause this? Googling the error didn't help me
much

Any luck if you import it in your code (but don't use it) ? Or creating a
dummy variable of that type ?

--
Tom Chiverton
Helping to carefully coordinate value-added data
on: http://thefalken.livejournal.com



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England
and Wales under registered number OC307980 whose registered office address
is at St James's Court Brown Street Manchester M2 2JF.  A list of members is
available for inspection at the registered office. Any reference to a
partner in relation to Halliwells LLP means a member of Halliwells LLP.
Regulated by the Law Society.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and
may be confidential or legally privileged.  If you are not the addressee you
must not read it and must not use any information contained in nor copy it
nor inform any person other than Halliwells LLP or the addressee of its
existence or contents.  If you have received this email in error please
delete it and notify Halliwells LLP IT Department on 0870 365 8008.

For more information about Halliwells LLP visit www.halliwells.com.



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links







--


http://www.juicability.com - flex blog
http://www.43min.com - funny movies


Re: [flexcoders] Problem with loading module -- mx.core::LayoutContainer could not be found.

2007-04-16 Thread Robert Cadena
Hi Bjorn,

when you load the module, what ApplicationDomain are you passing to the 
the IModuleInfo?  and how do you construct it if you are passing it as a 
param?


/r
http://www.searchcoders.com/flex/search/module
http://www.laflex.org/ - Los Angeles Flex Users Group

bjorn - wrote:
 Thanks for the tip .. I did try that already though, and it didn't make any
 difference.
 
 
 On 16 Apr 2007 06:23:20 -0700, Tom Chiverton [EMAIL PROTECTED]
 wrote:

 On Monday 16 Apr 2007, bjorn - wrote:
  Anyone know what might cause this? Googling the error didn't help me
 much

 Any luck if you import it in your code (but don't use it) ? Or creating a
 dummy variable of that type ?

 -- 
 Tom Chiverton
 Helping to carefully coordinate value-added data
 on: http://thefalken.livejournal.com

 

 This email is sent for and on behalf of Halliwells LLP.

 Halliwells LLP is a limited liability partnership registered in England
 and Wales under registered number OC307980 whose registered office 
 address
 is at St James's Court Brown Street Manchester M2 2JF.  A list of 
 members is
 available for inspection at the registered office. Any reference to a
 partner in relation to Halliwells LLP means a member of Halliwells LLP.
 Regulated by the Law Society.

 CONFIDENTIALITY

 This email is intended only for the use of the addressee named above and
 may be confidential or legally privileged.  If you are not the 
 addressee you
 must not read it and must not use any information contained in nor 
 copy it
 nor inform any person other than Halliwells LLP or the addressee of its
 existence or contents.  If you have received this email in error please
 delete it and notify Halliwells LLP IT Department on 0870 365 8008.

 For more information about Halliwells LLP visit www.halliwells.com.



 -- 
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
 Yahoo! Groups Links




 
 




Re: [flexcoders] Problem with loading module -- mx.core::LayoutContainer could not be found.

2007-04-16 Thread bjorn -

Robert, thanks for leading me onto the correct path :-) The problem has to
do with security. If I set the module url to a local path (c:\..) instead of
localhost, I'm able to load it.

Strange error message for security issues, don't you think? Well, now it's
soon on Google at the least.

- Bjørn


On 16 Apr 2007 10:10:50 -0700, Robert Cadena [EMAIL PROTECTED]
wrote:


  Hi Bjorn,

when you load the module, what ApplicationDomain are you passing to the
the IModuleInfo? and how do you construct it if you are passing it as a
param?

/r
http://www.searchcoders.com/flex/search/module
http://www.laflex.org/ - Los Angeles Flex Users Group

bjorn - wrote:
 Thanks for the tip .. I did try that already though, and it didn't make
any
 difference.


 On 16 Apr 2007 06:23:20 -0700, Tom Chiverton 
[EMAIL PROTECTED] tom.chiverton%40halliwells.com
 wrote:

 On Monday 16 Apr 2007, bjorn - wrote:
  Anyone know what might cause this? Googling the error didn't help me
 much

 Any luck if you import it in your code (but don't use it) ? Or creating
a
 dummy variable of that type ?

 --
 Tom Chiverton
 Helping to carefully coordinate value-added data
 on: http://thefalken.livejournal.com

 

 This email is sent for and on behalf of Halliwells LLP.

 Halliwells LLP is a limited liability partnership registered in England
 and Wales under registered number OC307980 whose registered office
 address
 is at St James's Court Brown Street Manchester M2 2JF. A list of
 members is
 available for inspection at the registered office. Any reference to a
 partner in relation to Halliwells LLP means a member of Halliwells LLP.
 Regulated by the Law Society.

 CONFIDENTIALITY

 This email is intended only for the use of the addressee named above
and
 may be confidential or legally privileged. If you are not the
 addressee you
 must not read it and must not use any information contained in nor
 copy it
 nor inform any person other than Halliwells LLP or the addressee of its
 existence or contents. If you have received this email in error please
 delete it and notify Halliwells LLP IT Department on 0870 365 8008.

 For more information about Halliwells LLP visit www.halliwells.com.



 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
 Yahoo! Groups Links













--


http://www.juicability.com - flex blog
http://www.43min.com - funny movies


Re: [flexcoders] Problem with loading module -- mx.core::LayoutContainer could not be found.

2007-04-16 Thread Robert Cadena

Glad I could help.  Just cause I'm curious:
- do you have a crossdomain at the root of your localhost server?
- is your parent app not loaded from the same domain (localhost)?
- you are doing this with the swf player, maybe on the browser or by 
running the swf directly, not in apollo, right?

you might want to add eventListeners to the moduleinfo just to see what 
the exact security error is.  Put a breakpoing on the function that 
handles SecurityError and see what the error message is.

best of luck.

/r
http://www.searchcoders.com/flex/search/module
http://www.laflex.org/ - Los Angeles Flex Users Group


bjorn - wrote:
 Robert, thanks for leading me onto the correct path :-) The problem has to
 do with security. If I set the module url to a local path (c:\..) 
 instead of
 localhost, I'm able to load it.
 
 Strange error message for security issues, don't you think? Well, now it's
 soon on Google at the least.
 
 - Bjørn
 
 
 On 16 Apr 2007 10:10:50 -0700, Robert Cadena [EMAIL PROTECTED]
 wrote:

   Hi Bjorn,

 when you load the module, what ApplicationDomain are you passing to the
 the IModuleInfo? and how do you construct it if you are passing it as a
 param?

 /r
 http://www.searchcoders.com/flex/search/module
 http://www.laflex.org/ - Los Angeles Flex Users Group

 bjorn - wrote:
  Thanks for the tip .. I did try that already though, and it didn't make
 any