RE: [flexcoders] NetConnection with AMF0

2006-02-22 Thread Matt Chotin
For the PhoneVO line you should do
var phone:PhoneVO = new PhoneVO();
phone.setValues(event.result);

Everything else looks OK to me though.

Matt

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Yokota Satoshi
Sent: Tuesday, February 21, 2006 11:22 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] NetConnection with AMF0

Hi Matt,

When I use this code,

var person:PersonVO = PersonVO(resultEvent.result);


I got runtime error.
For details, following code.

TypeError: Error #1034: Type Coercion failed: cannot convert 
[EMAIL PROTECTED] to com.mycompany.phones.model.PhoneVO
at MethodInfo-1607()
at mx.binding::Binding/execute()
at mx.binding::Binding/watcherFired()
at mx.binding::Watcher/notifyListeners()
at mx.binding::PropertyWatcher/eventHandler()
at flash.events::EventDispatcher/dispatchEvent()
at mx.controls.listclasses::ListBase/mouseDownHandler()
at mx.controls::List/mouseDownHandler()


I considered other alternatives.

package com.mycompany.phones.model {

[Bindable]
[RemoteClass(alias=com.mycompany.phones.model.PhoneVO)]
public class PhoneVO{

public var name:String;
public var description:String;
public var price:Number;
public var image:String;
public var series:String;
public var triband:Boolean;
public var camera:Boolean;
public var video:Boolean;
public var highlight1:String;
public var highlight2:String;

public function PhoneVO() {
name  = ;
description = ;
price = 0;
image = ;
series = ;
triband = false;
camera = false;
video = false;
highlight1 = ;
highlight2 = ;
}

public function setValues(obj:Object){
name  = obj.name;
description = obj.description;
price = obj.price;
image = obj.image;
series = obj.series;
triband = obj.triband;
camera = obj.camera;
video = obj.video;
highlight1 = obj.highlight1;
highlight2 = obj.highlight2;
}
}
}


Usage

var phone:PhoneVO = new PhoneVO().setValues(event.result);


I'm not sure this is correct approach.

Awesome FES!!

Thank you.
Satoshi Yokota

Matt Chotin wrote:
 I'm not sure why the class isn't working, I haven't played with
 NetConnection directly for this purpose.  
 
 Yes you can use FES for business purposes without charge, but we're
 still figuring out how exactly the tiered pricing structure will work.
 To use it in a clustered environment for example, you will be charged.
 But for small installations you'll probably be able to use it for
free.
 
 Matt
 
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of Yokota Satoshi
 Sent: Tuesday, February 21, 2006 10:45 PM
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] NetConnection with AMF0
 
 Hi Matt,
 
 PhoneVO have the getter/setter method.
 I could get primitive type, but I could'nt get the PhoneVO class.
 
 What do you mean about 'too high' ?
 I wish to use AMF easily like a Flash Pro.
 
 Can I use FES on business without charge or with small charge?
 
 Thank you.
 Satoshi Yokota
 
 Matt Chotin wrote:
 Does your PhoneVO on the Java side have the getName/setName pair?

 There will be an FES available that I think you'll be able to use
 without charge as long as your usage isn't too high.

 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
 On
 Behalf Of Yokota Satoshi
 Sent: Tuesday, February 21, 2006 9:55 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] NetConnection with AMF0

 Hi all,

 I'm trying to connect openamf without AMF3.
 I could this by using NetConnection.
 But, I can't get mapped class from server.

 following example code

RE: [flexcoders] NetConnection with AMF0

2006-02-21 Thread Matt Chotin
Does your PhoneVO on the Java side have the getName/setName pair?

There will be an FES available that I think you'll be able to use
without charge as long as your usage isn't too high.

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Yokota Satoshi
Sent: Tuesday, February 21, 2006 9:55 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] NetConnection with AMF0

Hi all,

I'm trying to connect openamf without AMF3.
I could this by using NetConnection.
But, I can't get mapped class from server.

following example code,
---

[DefaultTriggerEvent(result)]
[Event(fault)]
[Event(result)]
private var _con:NetConnection;
_con = new NetConnection();
_con.objectEncoding = ObjectEncoding.AMF0;
_con.connect(this.gatewayUrl);
var responder:Responder = new Responder(this.onResult,this.onFault);
var callMethod:String = this.destination+.+methodName;

if(args.length0){
  _con.call(callMethod,responder,args);
}else{
  _con.call(callMethod,responder);
}

public function onResult(resultData:Object){
  var resultEvent:ResultEvent=new ResultEvent(resultData,null,null);
  var person:PersonVO = PersonVO(resultEvent.result);
}
---

 - as class in flex side
---
[Bindable]
[RemoteClass(alias=com.mycompany.phones.model.PhoneVO)]
public class PhoneVO{
  public var name:String;
}
---

 - java class in server side
--
public class PhoneVO {
private String name;
}
--

wrong ? any idea?  specifications? beta version?

By the way, Will I have to purchase FES when I want to use NetConnection
and AbstractService and AMF0.

Thank you.
Satoshi Yokota



--
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



 




--
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/
 




Re: [flexcoders] NetConnection with AMF0

2006-02-21 Thread Yokota Satoshi
Hi Matt,

PhoneVO have the getter/setter method.
I could get primitive type, but I could'nt get the PhoneVO class.

What do you mean about 'too high' ?
I wish to use AMF easily like a Flash Pro.

Can I use FES on business without charge or with small charge?

Thank you.
Satoshi Yokota

Matt Chotin wrote:
 Does your PhoneVO on the Java side have the getName/setName pair?
 
 There will be an FES available that I think you'll be able to use
 without charge as long as your usage isn't too high.
 
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Yokota Satoshi
 Sent: Tuesday, February 21, 2006 9:55 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] NetConnection with AMF0
 
 Hi all,
 
 I'm trying to connect openamf without AMF3.
 I could this by using NetConnection.
 But, I can't get mapped class from server.
 
 following example code,
 ---
 
 [DefaultTriggerEvent(result)]
 [Event(fault)]
 [Event(result)]
 private var _con:NetConnection;
 _con = new NetConnection();
 _con.objectEncoding = ObjectEncoding.AMF0;
 _con.connect(this.gatewayUrl);
 var responder:Responder = new Responder(this.onResult,this.onFault);
 var callMethod:String = this.destination+.+methodName;
 
 if(args.length0){
   _con.call(callMethod,responder,args);
 }else{
   _con.call(callMethod,responder);
 }
 
 public function onResult(resultData:Object){
   var resultEvent:ResultEvent=new ResultEvent(resultData,null,null);
   var person:PersonVO = PersonVO(resultEvent.result);
 }
 ---
 
  - as class in flex side
 ---
 [Bindable]
 [RemoteClass(alias=com.mycompany.phones.model.PhoneVO)]
 public class PhoneVO  {
   public var name:String;
 }
 ---
 
  - java class in server side
 --
 public class PhoneVO {
   private String name;
 }
 --
 
 wrong ? any idea?  specifications? beta version?
 
 By the way, Will I have to purchase FES when I want to use NetConnection
 and AbstractService and AMF0.
 
 Thank you.
 Satoshi Yokota
 
 
 
 --
 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
 
 
 
  
 
 
 
 
 --
 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
 
 
 
  
 
 
 
 




--
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/
 





RE: [flexcoders] NetConnection with AMF0

2006-02-21 Thread Matt Chotin
I'm not sure why the class isn't working, I haven't played with
NetConnection directly for this purpose.  

Yes you can use FES for business purposes without charge, but we're
still figuring out how exactly the tiered pricing structure will work.
To use it in a clustered environment for example, you will be charged.
But for small installations you'll probably be able to use it for free.

Matt

-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Yokota Satoshi
Sent: Tuesday, February 21, 2006 10:45 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] NetConnection with AMF0

Hi Matt,

PhoneVO have the getter/setter method.
I could get primitive type, but I could'nt get the PhoneVO class.

What do you mean about 'too high' ?
I wish to use AMF easily like a Flash Pro.

Can I use FES on business without charge or with small charge?

Thank you.
Satoshi Yokota

Matt Chotin wrote:
 Does your PhoneVO on the Java side have the getName/setName pair?
 
 There will be an FES available that I think you'll be able to use
 without charge as long as your usage isn't too high.
 
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
 Behalf Of Yokota Satoshi
 Sent: Tuesday, February 21, 2006 9:55 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] NetConnection with AMF0
 
 Hi all,
 
 I'm trying to connect openamf without AMF3.
 I could this by using NetConnection.
 But, I can't get mapped class from server.
 
 following example code,
 ---
 
 [DefaultTriggerEvent(result)]
 [Event(fault)]
 [Event(result)]
 private var _con:NetConnection;
 _con = new NetConnection();
 _con.objectEncoding = ObjectEncoding.AMF0;
 _con.connect(this.gatewayUrl);
 var responder:Responder = new Responder(this.onResult,this.onFault);
 var callMethod:String = this.destination+.+methodName;
 
 if(args.length0){
   _con.call(callMethod,responder,args);
 }else{
   _con.call(callMethod,responder);
 }
 
 public function onResult(resultData:Object){
   var resultEvent:ResultEvent=new ResultEvent(resultData,null,null);
   var person:PersonVO = PersonVO(resultEvent.result);
 }
 ---
 
  - as class in flex side
 ---
 [Bindable]
 [RemoteClass(alias=com.mycompany.phones.model.PhoneVO)]
 public class PhoneVO  {
   public var name:String;
 }
 ---
 
  - java class in server side
 --
 public class PhoneVO {
   private String name;
 }
 --
 
 wrong ? any idea?  specifications? beta version?
 
 By the way, Will I have to purchase FES when I want to use
NetConnection
 and AbstractService and AMF0.
 
 Thank you.
 Satoshi Yokota
 
 
 
 --
 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
 
 
 
  
 
 
 
 
 --
 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
 
 
 
  
 
 
 
 




--
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



 





--
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/
 





Re: [flexcoders] NetConnection with AMF0

2006-02-21 Thread Yokota Satoshi
Hi Matt,

When I use this code,

var person:PersonVO = PersonVO(resultEvent.result);


I got runtime error.
For details, following code.

TypeError: Error #1034: Type Coercion failed: cannot convert 
[EMAIL PROTECTED] to com.mycompany.phones.model.PhoneVO
at MethodInfo-1607()
at mx.binding::Binding/execute()
at mx.binding::Binding/watcherFired()
at mx.binding::Watcher/notifyListeners()
at mx.binding::PropertyWatcher/eventHandler()
at flash.events::EventDispatcher/dispatchEvent()
at mx.controls.listclasses::ListBase/mouseDownHandler()
at mx.controls::List/mouseDownHandler()


I considered other alternatives.

package com.mycompany.phones.model {

[Bindable]
[RemoteClass(alias=com.mycompany.phones.model.PhoneVO)]
public class PhoneVO{

public var name:String;
public var description:String;
public var price:Number;
public var image:String;
public var series:String;
public var triband:Boolean;
public var camera:Boolean;
public var video:Boolean;
public var highlight1:String;
public var highlight2:String;

public function PhoneVO() {
name  = ;
description = ;
price = 0;
image = ;
series = ;
triband = false;
camera = false;
video = false;
highlight1 = ;
highlight2 = ;
}

public function setValues(obj:Object){
name  = obj.name;
description = obj.description;
price = obj.price;
image = obj.image;
series = obj.series;
triband = obj.triband;
camera = obj.camera;
video = obj.video;
highlight1 = obj.highlight1;
highlight2 = obj.highlight2;
}
}
}


Usage

var phone:PhoneVO = new PhoneVO().setValues(event.result);


I'm not sure this is correct approach.

Awesome FES!!

Thank you.
Satoshi Yokota

Matt Chotin wrote:
 I'm not sure why the class isn't working, I haven't played with
 NetConnection directly for this purpose.  
 
 Yes you can use FES for business purposes without charge, but we're
 still figuring out how exactly the tiered pricing structure will work.
 To use it in a clustered environment for example, you will be charged.
 But for small installations you'll probably be able to use it for free.
 
 Matt
 
 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Yokota Satoshi
 Sent: Tuesday, February 21, 2006 10:45 PM
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] NetConnection with AMF0
 
 Hi Matt,
 
 PhoneVO have the getter/setter method.
 I could get primitive type, but I could'nt get the PhoneVO class.
 
 What do you mean about 'too high' ?
 I wish to use AMF easily like a Flash Pro.
 
 Can I use FES on business without charge or with small charge?
 
 Thank you.
 Satoshi Yokota
 
 Matt Chotin wrote:
 Does your PhoneVO on the Java side have the getName/setName pair?

 There will be an FES available that I think you'll be able to use
 without charge as long as your usage isn't too high.

 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
 On
 Behalf Of Yokota Satoshi
 Sent: Tuesday, February 21, 2006 9:55 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] NetConnection with AMF0

 Hi all,

 I'm trying to connect openamf without AMF3.
 I could this by using NetConnection.
 But, I can't get mapped class from server.

 following example code,
 ---

 [DefaultTriggerEvent(result)]
 [Event(fault)]
 [Event(result)]
 private var _con:NetConnection;
 _con = new NetConnection();
 _con.objectEncoding = ObjectEncoding.AMF0;
 _con.connect(this.gatewayUrl);
 var responder:Responder = new Responder(this.onResult,this.onFault);
 var callMethod:String = this.destination+.+methodName;

 if(args.length0){
   _con.call(callMethod,responder,args);
 }else