Is a fault being called instead? Code
looks OK.
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of [EMAIL PROTECTED]
Sent: Friday, August 19, 2005 1:28
PM
To: [EMAIL PROTECTED]
Subject: RE: [flexcoders] Calling
RemoteObject declared in a mxml component in an application-The property being
referenced does not ...
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[
--
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
|