Hi Dustin,
 
Thanks for sharing that information. Yes I did run into the width/height troubles, but I saw that setting the exact width and height of the nighthawk.mxml caused it to appear properly when loaded within the phoenix.mxml.
 
Now back to the problem, one thing I forgot to mention the first time around was that since I am using Cairngorm, I have the following declaration in the nighthawk.mxml:
 
<core:Services id="services" />
 
Which is  a component that contains all my RemoteObject definitions. If I leave that line in the nighthawk.mxml, when loaded into Phoenix, nothing appears. Remove that line and it does appear. I then took the single RO and put it directly in the nighthawk.mxml and was doing Application.application.queryServices to use it, but like you explained below, using Application.application in a UI within a UI scenario references the top level UI and thus does not work. So anyways, I tried to work around this in several ways and it still doesn't work, the UI loads via the Loader, but no remote calls every get made.
 
You are right however, the Loader component may need some enhancement. I am using it now in this fashion in order to accomplish single sign on. Also, I know that the child UI can reference the parent UI, but there does not seem to be a specific way for the parent to tell the child to do something (or invoke a method on it).
 
Did you ever get it to work at all in your case?
 
Jimmy Gianninas
Software Developer - Optimal Payments Inc.
 


From: Mercer, Dustin [mailto:[EMAIL PROTECTED]
Sent: Friday, March 18, 2005 7:48 PM
To: [email protected]
Subject: RE: [flexcoders] RemoteObjects and UI within UI problem

I had hit some of the same problems.  A possible solution may be because you are referencing mx.core.Application.application from within your result handler of the remote object.  When using a loader, if you reference mx.core.Application.application from within nighthawk.mxml (Child Component), it actually points to the mx.core.Application.application of phoenix.mxml (Parent Application).  It is because of static variable issues between the apps.  Loader is extremely cool, but IMHO unusable for what you are trying to accomplish.  Macromedia has to give some sort of new component, revamp the loader, or give us guidelines on using loaders properly.  I had the same issues when I tried to accomplish this.  Maybe someone else has some suggestions on how to get loaders working properlyJ.

 

P.S.  there are also major sizing issues if you want to use percentage widths and heights on an application being loaded from a loader.  Just FYI

 


From: Dimitrios Gianninas [mailto:[EMAIL PROTECTED]
Sent: Friday, March 18, 2005 10:47 AM
To: [email protected]
Subject: [flexcoders] RemoteObjects and UI within UI problem

 

Hi,

 

Just been playing around with having one Flex UI within another and I am experiencing a little problem, and thus I was wondering if anyone has come across this problem and might have a solution.

 

This is all under JRun 4 SP4... so we have the parent UI at http://localhost:8200/phoenix/phoenix.mxml and the child UI at http://localhost:8204/nighthawk/nighthawk.mxml

 

Now using the loader component in phoenix.mxml I am able to load the nighthawk.mxml, no problem, it appears. However when I hit a button to perform an action which makes a remote call (via RemoteObject) nothing happens. The nighthawk.mxml works perfectly on its own however.

 

Anyone have any insight?

 

Jimmy Gianninas

Software Developer - Optimal Payments Inc.

 





Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to