|
View:
New views
18 Messages
—
Rating Filter:
Alert me
|
|
|
iconvertible
by Ken Johnson-8
::
Rate this Message:
Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message I am having a bit of trouble with my collections. In my c# class, I have the following: using FluorineFx; [RemotingService] public class ApplicationUser { private List<Role> _roles = new List<Role>(); public List<Role> Roles { get { return _roles; } set { _roles = value; } } } This works fiine going down to the swf into an ArrayCollection. The problem is when I try to send it back to the server. I am getting the following error: Property ApplicationUser.Roles set failed. Object must implement IConvertible. I am using flex 3. Am I forced to use AMF3 since I am using a List? Any suggestions about what is going on here? Thanks for your help! Ken Back to work after baby– how do you know when you’re ready? _______________________________________________ fluorine mailing list fluorine@... http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com |
|
|
Re: iconvertible
by Matthew Butt-2
::
Rate this Message:
Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message I had the exact same problem a week or two ago. In my case
it was actually a coding error on my part and I was sending the wrong class
back from Flex. .NET was expecting a List<MyObjectA> and I was
actually sending an Array of MyObjectB instances from Flex. This may be
totally unrelated for your case but worth checking! Matthew Butt T R I C Y C L E
| US Development Manager From:
fluorine-bounces@...
[mailto:fluorine-bounces@...] On Behalf Of Ken
Johnson Hi Everyone - Back
to work after baby– how do you know when you’re ready? _______________________________________________ fluorine mailing list fluorine@... http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com |
|
|
|
|
|
Re: iconvertible
by Matthew Butt-2
::
Rate this Message:
Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message Can you also post the AS and C# source for your Role classes
pls? Matthew Butt T R I C Y C L E
| US Development Manager From:
fluorine-bounces@...
[mailto:fluorine-bounces@...] On Behalf Of Ken
Johnson Sorry,
this may start a new thread. I have changed my email configuration
so it won't happen again. package components.common { import
mx.collections.ArrayCollection; [Bindable] [RemoteClass(alias="Common.ApplicationUser")] public
class ApplicationUser { public
function ApplicationUser() { } public
var Roles:ArrayCollection = new ArrayCollection(); } } In
a rush? Get real-time answers with Windows Live Messenger. _______________________________________________ fluorine mailing list fluorine@... http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com |
|
|
Re: iconvertible
by Ken Johnson-8
::
Rate this Message:
Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message .Net: using System; using System.Collections.Generic; using System.Text; namespace Common { public class Role : ChangeControl { private InternationalServicesApplication _application = new InternationalServicesApplication(); public InternationalServicesApplication Application { get { return _application; } set { _application = value; } } private int _id; public int Id { get { return _id;} set { _id = value;} } private string _name; public string Name { get { return _name; } set { _name = value; } } } }
AS: package components.common{ [RemoteClass(alias= "Common.Role")] public class Role extends ChangeControl{ public function Role(applicationId:int = 0 , id:int = 0 , name:String = null) { Application.Id = applicationId; Id = id; Name = name; } public var Application:InternationalServicesApplication = new InternationalServicesApplication(); public var Id:int; public var Name:String;} }
Back to work after baby– how do you know when you’re ready? _______________________________________________ fluorine mailing list fluorine@... http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com |
|
|
|
|
|
Re: iconvertible
by Matthew Butt-2
::
Rate this Message:
Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message Can you confirm that the Role objects are being classmapped
correctly when they arrive back in .Net? It still looks to me like Fluorine is
trying to created a List<Role> type but the contents of that array aren’t
Role objects. Matthew Butt T R I C Y C L E
| US Development Manager From:
fluorine-bounces@...
[mailto:fluorine-bounces@...] On Behalf Of Ken
Johnson As you will soon see, my object model is kind of complex.
There are no collections in either the ChangeControl or InternationalServicesApplication
classes. AS: package components.common { [RemoteClass(alias="Common.Role")] public
class Role extends ChangeControl { public
function Role( applicationId:int
= 0 ,
id:int = 0 ,
name:String = null ) { Application.Id
= applicationId; Id
= id; Name
= name; } public
var
Application:InternationalServicesApplication = new
InternationalServicesApplication(); public
var Id:int; public
var Name:String; } } Date: Tue, 22 Apr 2008 11:09:46 -0400 Can you also post the AS and C# source for your Role classes
pls? Matthew Butt T R I C Y C L E | US
Development Manager From:
fluorine-bounces@...
[mailto:fluorine-bounces@...] On Behalf Of Ken
Johnson Sorry,
this may start a new thread. I have changed my email configuration
so it won't happen again. package components.common { import
mx.collections.ArrayCollection; [Bindable] [RemoteClass(alias="Common.ApplicationUser")] public
class ApplicationUser { public
function ApplicationUser() { } public
var Roles:ArrayCollection = new ArrayCollection(); } } In
a rush? Get real-time answers with Windows Live Messenger. Back
to work after baby– how do you know when you’re ready? _______________________________________________ fluorine mailing list fluorine@... http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com |
|
|
Re: iconvertible
by Ken Johnson-8
::
Rate this Message:
Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message I do however have my objects in two assemblies. Could that be causing the problem? Is this error kind of a "catch all" exception?
Express yourself wherever you are. Mobilize! _______________________________________________ fluorine mailing list fluorine@... http://fluorine.thesilentgroup.com/mailman/listinfo/fluorine_fluorine.thesilentgroup.com |
|
|
Re: iconvertible
by Ken Johnson-8
::
Rate this Message:
Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message
|