iconvertible

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

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi Everyone -
 
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

Some parts of this message have been removed. Learn more about Nabble's security policy.

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
Sent: Tuesday, April 22, 2008 9:07 AM
To: fluorine@...
Subject: [Fluorine] iconvertible

 

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

Parent Message unknown Re: iconvertible

by Ken Johnson-8 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Sorry, this may start a new thread.  I have changed my email configuration so it won't happen again.
 
Thanks for the input Matthew.  Unfortunately, it didn't apply in my case.  I double checked, and I am correctly using an ArrayCollection.  The following is my AS code:

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 Matthew Butt-2 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

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
Sent: Tuesday, April 22, 2008 11:03 AM
To: fluorine@...
Subject: Re: [Fluorine] iconvertible

 

Sorry, this may start a new thread.  I have changed my email configuration so it won't happen again.
 
Thanks for the input Matthew.  Unfortunately, it didn't apply in my case.  I double checked, and I am correctly using an ArrayCollection.  The following is my AS code:

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

Some parts of this message have been removed. Learn more about Nabble's security policy.
As you will soon see, my object model is kind of complex.  There are no collections in either the ChangeControl or InternationalServicesApplication classes.
 
.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;

}

}



Date: Tue, 22 Apr 2008 11:09:46 -0400
From: matthew.butt@...
To: fluorine@...
Subject: Re: [Fluorine] iconvertible

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
Sent: Tuesday, April 22, 2008 11:03 AM
To: fluorine@...
Subject: Re: [Fluorine] iconvertible

 

Sorry, this may start a new thread.  I have changed my email configuration so it won't happen again.
 
Thanks for the input Matthew.  Unfortunately, it didn't apply in my case.  I double checked, and I am correctly using an ArrayCollection.  The following is my AS code:

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

Parent Message unknown Re: iconvertible

by rob@toolsbydesign.com :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Just a quick check, but do you have the full Namespace path defined in the alias?  I have run into this in the past.  It looks like your Namespace is 'Common', your class is 'Role', but what is the dll name that this compiles to? 

Example: alias="DLLName.Common.Role"

Rob Herman



From: Ken Johnson <kenjohnson77@...>
Sent: Tuesday, April 22, 2008 10:55 AM
To: Fluorine Mailing List <fluorine@...>
Subject: Re: [Fluorine] iconvertible


As you will soon see, my object model is kind of complex.  There are no collections in either the ChangeControl or InternationalServicesApplication classes.
 
.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;

}

}



Date: Tue, 22 Apr 2008 11:09:46 -0400
From: matthew.butt@...
To: fluorine@...
Subject: Re: [Fluorine] iconvertible

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
Sent: Tuesday, April 22, 2008 11:03 AM
To: fluorine@...
Subject: Re: [Fluorine] iconvertible

 

Sorry, this may start a new thread.  I have changed my email configuration so it won't happen again.
 
Thanks for the input Matthew.  Unfortunately, it didn't apply in my case.  I double checked, and I am correctly using an ArrayCollection.  The following is my AS code:

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 Matthew Butt-2 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

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
Sent: Tuesday, April 22, 2008 11:44 AM
To: Fluorine Mailing List
Subject: Re: [Fluorine] iconvertible

 

As you will soon see, my object model is kind of complex.  There are no collections in either the ChangeControl or InternationalServicesApplication classes.
 
.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;

}

}


Date: Tue, 22 Apr 2008 11:09:46 -0400
From: matthew.butt@...
To: fluorine@...
Subject: Re: [Fluorine] iconvertible

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
Sent: Tuesday, April 22, 2008 11:03 AM
To: fluorine@...
Subject: Re: [Fluorine] iconvertible

 

Sorry, this may start a new thread.  I have changed my email configuration so it won't happen again.
 
Thanks for the input Matthew.  Unfortunately, it didn't apply in my case.  I double checked, and I am correctly using an ArrayCollection.  The following is my AS code:

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

Some parts of this message have been removed. Learn more about Nabble's security policy.
The alias is correct and contains the full c# namespace; however, it doesn't contain the dll name.  I changed the properties of the assembly, and it didn't fix the problem.
 
I do however have my objects in two assemblies.  Could that be causing the problem?  Is this error kind of a "catch all" exception?

Date: Tue, 22 Apr 2008 13:09:29 -0400
From: rob@...
To: fluorine@...; fluorine@...
CC:
Subject: Re: [Fluorine] iconvertible

Just a quick check, but do you have the full Namespace path defined in the alias?  I have run into this in the past.  It looks like your Namespace is 'Common', your class is 'Role', but what is the dll name that this compiles to? 

Example: alias="DLLName.Common.Role"

Rob Herman



From: Ken Johnson <kenjohnson77@...>
Sent: Tuesday, April 22, 2008 10:55 AM
To: Fluorine Mailing List <fluorine@...>
Subject: Re: [Fluorine] iconvertible


As you will soon see, my object model is kind of complex.  There are no collections in either the ChangeControl or InternationalServicesApplication classes.
 
.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;

}

}



Date: Tue, 22 Apr 2008 11:09:46 -0400
From: matthew.butt@...
To: fluorine@...
Subject: Re: [Fluorine] iconvertible

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
Sent: Tuesday, April 22, 2008 11:03 AM
To: fluorine@...
Subject: Re: [Fluorine] iconvertible

 

Sorry, this may start a new thread.  I have changed my email configuration so it won't happen again.
 
Thanks for the input Matthew.  Unfortunately, it didn't apply in my case.  I double checked, and I am correctly using an ArrayCollection.  The following is my AS code:

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?


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

Some parts of this message have been removed. Learn more about Nabble's security policy.
I am not doing any class mapping because I thought that was optional.  Is that required?


Date: Tue, 22 Apr 2008 13:33:50 -0400
From: matthew.butt@...
To: