It is working but now the Handler is not being called when getMyList() is
called in the initialize of a ComboBox. If I call getMyList() from a button
for example it works.
I didn't have this problem when including the RemoteObject in the same
mxml.
Any ideas?
// Remote call to getMyData in the Java service. Handler below
private function getMyList(): Void
{
var category:String="something";
var pendingCall = services.myRemoteObject.getMyData(category);
pendingCall.resultHandler =
mx.utils.Delegate.create(this,resultHandler)
}
function resultHandler(result): Void
{
// This is not being called
myList= result;
}
"Matt Chotin" To: [email protected]
<[EMAIL PROTECTED]> cc:
Sent by: Subject: RE: [flexcoders]
Calling RemoteObject declared in a
[email protected] mxml component in an
application-The property being
08/18/2005 02:45 AM referenced does not ...
Please respond to
flexcoders
You can't use the classname for your id. Change id="services" to something
like id="myServices" and then do myServices.myRemoteObject?
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Tuesday, August 16, 2005 8:25 AM
To: [email protected]
Subject: [flexcoders] Calling RemoteObject declared in a mxml component in
an application-The property being referenced does not ...
I want to have all my RemoteObject declarations in a mxml component that I
can later use in another application. I created a services.mxml file where
I have something like this:
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.macromedia.com/2003/mxml">
<!--
========================services.mxml=========================== -->
<!--
==================================================================== -->
<!-- Remote Java Objects
-->
<!--
==================================================================== -->
<mx:RemoteObject id="myRemoteObject"
source="com.remote.object"
result="event.call.resultHandler(event.result)">
<mx:method name="getMyData"></mx:method>
</mx:RemoteObject>
<!--
==================================================================== -->
<!-- Web Services
-->
<!--
==================================================================== -->
<!--
==================================================================== -->
<!-- HTTP Services
-->
<!--
==================================================================== -->
</mx:Canvas>
Then I call it like this:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"
xmlns:i2="*">
<mx:Script>
<![CDATA[
------------------------ Yahoo! Groups Sponsor --------------------~-->
<font face=arial size=-1><a
href="http://us.ard.yahoo.com/SIG=12hcveis0/M=362131.6882499.7825260.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1124490661/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life
- brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~->
--
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/
<*> 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/