List Info

Thread: Generics issue




Generics issue
user name
2006-07-19 15:01:42
Does anyone have any idea's on this?  I'm kind of stuck
right now, and I
was planning on a release this weekend.  Thanks!



> -------- Original Message --------
> Subject: [MonoDevelop] Generics issue
> From: "Carlos J. Muentes" <carlosrockwithme.org>
> Date: Mon, July 17, 2006 4:31 pm
> To: Monodevelop List <monodevelop-listlists.ximian.com>
> 
> I've got a generic class:
> 
> public class MyClass<T>{
>   public void DoSomething( T t ){
>   }
> }
> 
> When I compile this in MD, I get 
> 
> [Task:File=, Line=0, Column=0, Type=Error,
Description=Operation is not
> supported.(Exception: System.NotSupportedException)
> [Task:File=, Line=0, Column=0, Type=Error,
> Description=[Internal(1,1):,Internal(1,1):](being
compiled)
> [Task:File=, Line=0, Column=0, Type=Error,
Description=Operation is not
> supported.(Exception: System.NotSupportedException)
> [Task:File=, Line=0, Column=0, Type=Error,
Description=Operation is not
> supported.(.NotSupportedException)
> [Task:File=, Line=0, Column=0, Type=Error,
>
Description=/home/carlos/Documents/Programming/mono/myproj/M
yClass.cs(1,15):(that
> caused the problem begin at)
> 
> I selected Mono 2.0 as the runtime in the project
options.  If I change
> the type for 't' to object, it compiles fine.  What
am I missing?
> 
> _______________________________________________
> Monodevelop-list mailing list
> Monodevelop-listlists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monodevelop-li
st

_______________________________________________
Monodevelop-list mailing list
Monodevelop-listlists.ximian.com
http://lists.ximian.com/mailman/listinfo/monodevelop-li
st
Generics issue
user name
2006-07-20 13:30:20
I can't reproduce it here, with a not-up-to-date Mono and
MD sources
from SVN. Mono was compiled and installed for both profiles
1_1 and
2_0, so that MD could be compiled and support both profiles
also.

I compiled code containing this snippet:

<code source="generics.cs">
using System;

public class MyClass<T>{
	public void DoSomething( T t )
	{
		Console.Write("DoSomething: ");
		Console.WriteLine(t);
 	}
}

class MainClass
{
	public static void Main(string[] args)
	{
		MyClass<int> a = new MyClass<int>();
		a.DoSomething(123);
		MyClass<string> b = new MyClass<string>();
		b.DoSomething("abc");
	}
}
</code>

And it compiled and run:

<md-output>
DoSomething: 123
DoSomething: abc
</md-output>

The only things I can think that may be happening with you:
1) Mono not being properly compiled and installed for 2_0
profile.
2) As you didn't give the whole source file, I can't be
sure if line 1
pointed by the error doesn't contain some other error (like
some
strange character in the source file...)

Have you tried to compile the source file directly with gmcs
(mcs
won't be able)?

<terminal>
$ gmcs generics.cs
$ mono generics.exe
DoSomething: 123
DoSomething: abc
</terminal>






On 7/19/06, Carlos J. Muentes <carlosrockwithme.org> wrote:
> Does anyone have any idea's on this?  I'm kind of
stuck right now, and I
> was planning on a release this weekend.  Thanks!
>
>
>
> > -------- Original Message --------
> > Subject: [MonoDevelop] Generics issue
> > From: "Carlos J. Muentes"
<carlosrockwithme.org>
> > Date: Mon, July 17, 2006 4:31 pm
> > To: Monodevelop List <monodevelop-listlists.ximian.com>
> >
> > I've got a generic class:
> >
> > public class MyClass<T>{
> >   public void DoSomething( T t ){
> >   }
> > }
> >
> > When I compile this in MD, I get
> >
> > [Task:File=, Line=0, Column=0, Type=Error,
Description=Operation is not
> > supported.(Exception:
System.NotSupportedException)
> > [Task:File=, Line=0, Column=0, Type=Error,
> > Description=[Internal(1,1):,Internal(1,1):](being
compiled)
> > [Task:File=, Line=0, Column=0, Type=Error,
Description=Operation is not
> > supported.(Exception:
System.NotSupportedException)
> > [Task:File=, Line=0, Column=0, Type=Error,
Description=Operation is not
> > supported.(.NotSupportedException)
> > [Task:File=, Line=0, Column=0, Type=Error,
> >
Description=/home/carlos/Documents/Programming/mono/myproj/M
yClass.cs(1,15):(that
> > caused the problem begin at)
> >
> > I selected Mono 2.0 as the runtime in the project
options.  If I change
> > the type for 't' to object, it compiles fine. 
What am I missing?
> >
> > _______________________________________________
> > Monodevelop-list mailing list
> > Monodevelop-listlists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/monodevelop-li
st
>
> _______________________________________________
> Monodevelop-list mailing list
> Monodevelop-listlists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monodevelop-li
st
>


-- 
Rafael "Monoman" Teixeira
---------------------------------------
"The reasonable man adapts himself to the world; the
unreasonable one
persists in trying to adapt the world to himself. Therefore
all
progress depends on the unreasonable man." George
Bernard Shaw
_______________________________________________
Monodevelop-list mailing list
Monodevelop-listlists.ximian.com
http://lists.ximian.com/mailman/listinfo/monodevelop-li
st
Generics issue
user name
2006-07-20 13:30:20
I can't reproduce it here, with a not-up-to-date Mono and
MD sources
from SVN. Mono was compiled and installed for both profiles
1_1 and
2_0, so that MD could be compiled and support both profiles
also.

I compiled code containing this snippet:

<code source="generics.cs">
using System;

public class MyClass<T>{
	public void DoSomething( T t )
	{
		Console.Write("DoSomething: ");
		Console.WriteLine(t);
 	}
}

class MainClass
{
	public static void Main(string[] args)
	{
		MyClass<int> a = new MyClass<int>();
		a.DoSomething(123);
		MyClass<string> b = new MyClass<string>();
		b.DoSomething("abc");
	}
}
</code>

And it compiled and run:

<md-output>
DoSomething: 123
DoSomething: abc
</md-output>

The only things I can think that may be happening with you:
1) Mono not being properly compiled and installed for 2_0
profile.
2) As you didn't give the whole source file, I can't be
sure if line 1
pointed by the error doesn't contain some other error (like
some
strange character in the source file...)

Have you tried to compile the source file directly with gmcs
(mcs
won't be able)?

<terminal>
$ gmcs generics.cs
$ mono generics.exe
DoSomething: 123
DoSomething: abc
</terminal>






On 7/19/06, Carlos J. Muentes <carlosrockwithme.org> wrote:
> Does anyone have any idea's on this?  I'm kind of
stuck right now, and I
> was planning on a release this weekend.  Thanks!
>
>
>
> > -------- Original Message --------
> > Subject: [MonoDevelop] Generics issue
> > From: "Carlos J. Muentes"
<carlosrockwithme.org>
> > Date: Mon, July 17, 2006 4:31 pm
> > To: Monodevelop List <monodevelop-listlists.ximian.com>
> >
> > I've got a generic class:
> >
> > public class MyClass<T>{
> >   public void DoSomething( T t ){
> >   }
> > }
> >
> > When I compile this in MD, I get
> >
> > [Task:File=, Line=0, Column=0, Type=Error,
Description=Operation is not
> > supported.(Exception:
System.NotSupportedException)
> > [Task:File=, Line=0, Column=0, Type=Error,
> > Description=[Internal(1,1):,Internal(1,1):](being
compiled)
> > [Task:File=, Line=0, Column=0, Type=Error,
Description=Operation is not
> > supported.(Exception:
System.NotSupportedException)
> > [Task:File=, Line=0, Column=0, Type=Error,
Description=Operation is not
> > supported.(.NotSupportedException)
> > [Task:File=, Line=0, Column=0, Type=Error,
> >
Description=/home/carlos/Documents/Programming/mono/myproj/M
yClass.cs(1,15):(that
> > caused the problem begin at)
> >
> > I selected Mono 2.0 as the runtime in the project
options.  If I change
> > the type for 't' to object, it compiles fine. 
What am I missing?
> >
> > _______________________________________________
> > Monodevelop-list mailing list
> > Monodevelop-listlists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/monodevelop-li
st
>
> _______________________________________________
> Monodevelop-list mailing list
> Monodevelop-listlists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monodevelop-li
st
>


-- 
Rafael "Monoman" Teixeira
---------------------------------------
"The reasonable man adapts himself to the world; the
unreasonable one
persists in trying to adapt the world to himself. Therefore
all
progress depends on the unreasonable man." George
Bernard Shaw
_______________________________________________
Monodevelop-list mailing list
Monodevelop-listlists.ximian.com
http://lists.ximian.com/mailman/listinfo/monodevelop-li
st
Generics issue
user name
2006-07-20 13:30:20
I can't reproduce it here, with a not-up-to-date Mono and
MD sources
from SVN. Mono was compiled and installed for both profiles
1_1 and
2_0, so that MD could be compiled and support both profiles
also.

I compiled code containing this snippet:

<code source="generics.cs">
using System;

public class MyClass<T>{
	public void DoSomething( T t )
	{
		Console.Write("DoSomething: ");
		Console.WriteLine(t);
 	}
}

class MainClass
{
	public static void Main(string[] args)
	{
		MyClass<int> a = new MyClass<int>();
		a.DoSomething(123);
		MyClass<string> b = new MyClass<string>();
		b.DoSomething("abc");
	}
}
</code>

And it compiled and run:

<md-output>
DoSomething: 123
DoSomething: abc
</md-output>

The only things I can think that may be happening with you:
1) Mono not being properly compiled and installed for 2_0
profile.
2) As you didn't give the whole source file, I can't be
sure if line 1
pointed by the error doesn't contain some other error (like
some
strange character in the source file...)

Have you tried to compile the source file directly with gmcs
(mcs
won't be able)?

<terminal>
$ gmcs generics.cs
$ mono generics.exe
DoSomething: 123
DoSomething: abc
</terminal>






On 7/19/06, Carlos J. Muentes <carlosrockwithme.org> wrote:
> Does anyone have any idea's on this?  I'm kind of
stuck right now, and I
> was planning on a release this weekend.  Thanks!
>
>
>
> > -------- Original Message --------
> > Subject: [MonoDevelop] Generics issue
> > From: "Carlos J. Muentes"
<carlosrockwithme.org>
> > Date: Mon, July 17, 2006 4:31 pm
> > To: Monodevelop List <monodevelop-listlists.ximian.com>
> >
> > I've got a generic class:
> >
> > public class MyClass<T>{
> >   public void DoSomething( T t ){
> >   }
> > }
> >
> > When I compile this in MD, I get
> >
> > [Task:File=, Line=0, Column=0, Type=Error,
Description=Operation is not
> > supported.(Exception:
System.NotSupportedException)
> > [Task:File=, Line=0, Column=0, Type=Error,
> > Description=[Internal(1,1):,Internal(1,1):](being
compiled)
> > [Task:File=, Line=0, Column=0, Type=Error,
Description=Operation is not
> > supported.(Exception:
System.NotSupportedException)
> > [Task:File=, Line=0, Column=0, Type=Error,
Description=Operation is not
> > supported.(.NotSupportedException)
> > [Task:File=, Line=0, Column=0, Type=Error,
> >
Description=/home/carlos/Documents/Programming/mono/myproj/M
yClass.cs(1,15):(that
> > caused the problem begin at)
> >
> > I selected Mono 2.0 as the runtime in the project
options.  If I change
> > the type for 't' to object, it compiles fine. 
What am I missing?
> >
> > _______________________________________________
> > Monodevelop-list mailing list
> > Monodevelop-listlists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/monodevelop-li
st
>
> _______________________________________________
> Monodevelop-list mailing list
> Monodevelop-listlists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monodevelop-li
st
>


-- 
Rafael "Monoman" Teixeira
---------------------------------------
"The reasonable man adapts himself to the world; the
unreasonable one
persists in trying to adapt the world to himself. Therefore
all
progress depends on the unreasonable man." George
Bernard Shaw
_______________________________________________
Monodevelop-list mailing list
Monodevelop-listlists.ximian.com
http://lists.ximian.com/mailman/listinfo/monodevelop-li
st
Generics issue
user name
2006-07-20 13:30:20
I can't reproduce it here, with a not-up-to-date Mono and
MD sources
from SVN. Mono was compiled and installed for both profiles
1_1 and
2_0, so that MD could be compiled and support both profiles
also.

I compiled code containing this snippet:

<code source="generics.cs">
using System;

public class MyClass<T>{
	public void DoSomething( T t )
	{
		Console.Write("DoSomething: ");
		Console.WriteLine(t);
 	}
}

class MainClass
{
	public static void Main(string[] args)
	{
		MyClass<int> a = new MyClass<int>();
		a.DoSomething(123);
		MyClass<string> b = new MyClass<string>();
		b.DoSomething("abc");
	}
}
</code>

And it compiled and run:

<md-output>
DoSomething: 123
DoSomething: abc
</md-output>

The only things I can think that may be happening with you:
1) Mono not being properly compiled and installed for 2_0
profile.
2) As you didn't give the whole source file, I can't be
sure if line 1
pointed by the error doesn't contain some other error (like
some
strange character in the source file...)

Have you tried to compile the source file directly with gmcs
(mcs
won't be able)?

<terminal>
$ gmcs generics.cs
$ mono generics.exe
DoSomething: 123
DoSomething: abc
</terminal>






On 7/19/06, Carlos J. Muentes <carlosrockwithme.org> wrote:
> Does anyone have any idea's on this?  I'm kind of
stuck right now, and I
> was planning on a release this weekend.  Thanks!
>
>
>
> > -------- Original Message --------
> > Subject: [MonoDevelop] Generics issue
> > From: "Carlos J. Muentes"
<carlosrockwithme.org>
> > Date: Mon, July 17, 2006 4:31 pm
> > To: Monodevelop List <monodevelop-listlists.ximian.com>
> >
> > I've got a generic class:
> >
> > public class MyClass<T>{
> >   public void DoSomething( T t ){
> >   }
> > }
> >
> > When I compile this in MD, I get
> >
> > [Task:File=, Line=0, Column=0, Type=Error,
Description=Operation is not
> > supported.(Exception:
System.NotSupportedException)
> > [Task:File=, Line=0, Column=0, Type=Error,
> > Description=[Internal(1,1):,Internal(1,1):](being
compiled)
> > [Task:File=, Line=0, Column=0, Type=Error,
Description=Operation is not
> > supported.(Exception:
System.NotSupportedException)
> > [Task:File=, Line=0, Column=0, Type=Error,
Description=Operation is not
> > supported.(.NotSupportedException)
> > [Task:File=, Line=0, Column=0, Type=Error,
> >
Description=/home/carlos/Documents/Programming/mono/myproj/M
yClass.cs(1,15):(that
> > caused the problem begin at)
> >
> > I selected Mono 2.0 as the runtime in the project
options.  If I change
> > the type for 't' to object, it compiles fine. 
What am I missing?
> >
> > _______________________________________________
> > Monodevelop-list mailing list
> > Monodevelop-listlists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/monodevelop-li
st
>
> _______________________________________________
> Monodevelop-list mailing list
> Monodevelop-listlists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monodevelop-li
st
>


-- 
Rafael "Monoman" Teixeira
---------------------------------------
"The reasonable man adapts himself to the world; the
unreasonable one
persists in trying to adapt the world to himself. Therefore
all
progress depends on the unreasonable man." George
Bernard Shaw
_______________________________________________
Monodevelop-list mailing list
Monodevelop-listlists.ximian.com
http://lists.ximian.com/mailman/listinfo/monodevelop-li
st
Generics issue
user name
2006-07-20 13:30:20
I can't reproduce it here, with a not-up-to-date Mono and
MD sources
from SVN. Mono was compiled and installed for both profiles
1_1 and
2_0, so that MD could be compiled and support both profiles
also.

I compiled code containing this snippet:

<code source="generics.cs">
using System;

public class MyClass<T>{
	public void DoSomething( T t )
	{
		Console.Write("DoSomething: ");
		Console.WriteLine(t);
 	}
}

class MainClass
{
	public static void Main(string[] args)
	{
		MyClass<int> a = new MyClass<int>();
		a.DoSomething(123);
		MyClass<string> b = new MyClass<string>();
		b.DoSomething("abc");
	}
}
</code>

And it compiled and run:

<md-output>
DoSomething: 123
DoSomething: abc
</md-output>

The only things I can think that may be happening with you:
1) Mono not being properly compiled and installed for 2_0
profile.
2) As you didn't give the whole source file, I can't be
sure if line 1
pointed by the error doesn't contain some other error (like
some
strange character in the source file...)

Have you tried to compile the source file directly with gmcs
(mcs
won't be able)?

<terminal>
$ gmcs generics.cs
$ mono generics.exe
DoSomething: 123
DoSomething: abc
</terminal>






On 7/19/06, Carlos J. Muentes <carlosrockwithme.org> wrote:
> Does anyone have any idea's on this?  I'm kind of
stuck right now, and I
> was planning on a release this weekend.  Thanks!
>
>
>
> > -------- Original Message --------
> > Subject: [MonoDevelop] Generics issue
> > From: "Carlos J. Muentes"
<carlosrockwithme.org>
> > Date: Mon, July 17, 2006 4:31 pm
> > To: Monodevelop List <monodevelop-listlists.ximian.com>
> >
> > I've got a generic class:
> >
> > public class MyClass<T>{
> >   public void DoSomething( T t ){
> >   }
> > }
> >
> > When I compile this in MD, I get
> >
> > [Task:File=, Line=0, Column=0, Type=Error,
Description=Operation is not
> > supported.(Exception:
System.NotSupportedException)
> > [Task:File=, Line=0, Column=0, Type=Error,
> > Description=[Internal(1,1):,Internal(1,1):](being
compiled)
> > [Task:File=, Line=0, Column=0, Type=Error,
Description=Operation is not
> > supported.(Exception:
System.NotSupportedException)
> > [Task:File=, Line=0, Column=0, Type=Error,
Description=Operation is not
> > supported.(.NotSupportedException)
> > [Task:File=, Line=0, Column=0, Type=Error,
> >
Description=/home/carlos/Documents/Programming/mono/myproj/M
yClass.cs(1,15):(that
> > caused the problem begin at)
> >
> > I selected Mono 2.0 as the runtime in the project
options.  If I change
> > the type for 't' to object, it compiles fine. 
What am I missing?
> >
> > _______________________________________________
> > Monodevelop-list mailing list
> > Monodevelop-listlists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/monodevelop-li
st
>
> _______________________________________________
> Monodevelop-list mailing list
> Monodevelop-listlists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monodevelop-li
st
>


-- 
Rafael "Monoman" Teixeira
---------------------------------------
"The reasonable man adapts himself to the world; the
unreasonable one
persists in trying to adapt the world to himself. Therefore
all
progress depends on the unreasonable man." George
Bernard Shaw
_______________________________________________
Monodevelop-list mailing list
Monodevelop-listlists.ximian.com
http://lists.ximian.com/mailman/listinfo/monodevelop-li
st
Generics issue
user name
2006-07-20 13:30:20
I can't reproduce it here, with a not-up-to-date Mono and
MD sources
from SVN. Mono was compiled and installed for both profiles
1_1 and
2_0, so that MD could be compiled and support both profiles
also.

I compiled code containing this snippet:

<code source="generics.cs">
using System;

public class MyClass<T>{
	public void DoSomething( T t )
	{
		Console.Write("DoSomething: ");
		Console.WriteLine(t);
 	}
}

class MainClass
{
	public static void Main(string[] args)
	{
		MyClass<int> a = new MyClass<int>();
		a.DoSomething(123);
		MyClass<string> b = new MyClass<string>();
		b.DoSomething("abc");
	}
}
</code>

And it compiled and run:

<md-output>
DoSomething: 123
DoSomething: abc
</md-output>

The only things I can think that may be happening with you:
1) Mono not being properly compiled and installed for 2_0
profile.
2) As you didn't give the whole source file, I can't be
sure if line 1
pointed by the error doesn't contain some other error (like
some
strange character in the source file...)

Have you tried to compile the source file directly with gmcs
(mcs
won't be able)?

<terminal>
$ gmcs generics.cs
$ mono generics.exe
DoSomething: 123
DoSomething: abc
</terminal>






On 7/19/06, Carlos J. Muentes <carlosrockwithme.org> wrote:
> Does anyone have any idea's on this?  I'm kind of
stuck right now, and I
> was planning on a release this weekend.  Thanks!
>
>
>
> > -------- Original Message --------
> > Subject: [MonoDevelop] Generics issue
> > From: "Carlos J. Muentes"
<carlosrockwithme.org>
> > Date: Mon, July 17, 2006 4:31 pm
> > To: Monodevelop List <monodevelop-listlists.ximian.com>
> >
> > I've got a generic class:
> >
> > public class MyClass<T>{
> >   public void DoSomething( T t ){
> >   }
> > }
> >
> > When I compile this in MD, I get
> >
> > [Task:File=, Line=0, Column=0, Type=Error,
Description=Operation is not
> > supported.(Exception:
System.NotSupportedException)
> > [Task:File=, Line=0, Column=0, Type=Error,
> > Description=[Internal(1,1):,Internal(1,1):](being
compiled)
> > [Task:File=, Line=0, Column=0, Type=Error,
Description=Operation is not
> > supported.(Exception:
System.NotSupportedException)
> > [Task:File=, Line=0, Column=0, Type=Error,
Description=Operation is not
> > supported.(.NotSupportedException)
> > [Task:File=, Line=0, Column=0, Type=Error,
> >
Description=/home/carlos/Documents/Programming/mono/myproj/M
yClass.cs(1,15):(that
> > caused the problem begin at)
> >
> > I selected Mono 2.0 as the runtime in the project
options.  If I change
> > the type for 't' to object, it compiles fine. 
What am I missing?
> >
> > _______________________________________________
> > Monodevelop-list mailing list
> > Monodevelop-listlists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/monodevelop-li
st
>
> _______________________________________________
> Monodevelop-list mailing list
> Monodevelop-listlists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monodevelop-li
st
>


-- 
Rafael "Monoman" Teixeira
---------------------------------------
"The reasonable man adapts himself to the world; the
unreasonable one
persists in trying to adapt the world to himself. Therefore
all
progress depends on the unreasonable man." George
Bernard Shaw
_______________________________________________
Monodevelop-list mailing list
Monodevelop-listlists.ximian.com
http://lists.ximian.com/mailman/listinfo/monodevelop-li
st
[1-7]

about | contact  Other archives ( Real Estate discussion Medical topics )