dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]Jabber.NET


From: Gopal V
Subject: Re: [DotGNU]Jabber.NET
Date: Fri, 14 Feb 2003 14:01:53 +0530
User-agent: Mutt/1.2.5i

If memory serves me right, Gopal V wrote:
> > ./jabber/server/JabberService.cs:191: could not coerce constant argument 1
> > Code:    [DefaultValue(ComponentType.Accept)]
> > Reason:  No idea
> 
> Where would I find ComponentType enum/class docs ?

I found that DefaultValueAttribute is a member of the System.ComponentModel
non-ECMA classes ... (I hope Simon can find ways to avoid it) .

This is the compiler issue :

The compiler picks DefaultValueAttribute(Object) as the ctor most suited
for the Enum args and then goes on to fail the coercion from Int32 (underlying 
enum type) to ObjectRef...

So the question is "How do I favour Enum -> Int32 conversion" while looking
for methods ?. The conversion to Object is the right one for direct 
invocation, but is the wrong one for the Attribute case .. :-(

I don't want to messup working code fixing this ... I don't need a fix,
I just need some advice from the design guru about this ;-)

Gopal
-- 
The difference between insanity and genius is measured by success

Attachment: attr-enum.cs
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]