[MonoDevelop] cli.Gtk.Widget methods overrides static method

Richard Hendershot rshendershot@mchsi.com
Sun, 11 Jul 2004 03:45:38 -0500


--=-4L66ww55d1t51LiRhLZY
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Sat, 2004-07-10 at 16:47 -0400, John Luke wrote:

> On Fri, 09 Jul 2004 09:02:44 -0500, Richard Hendershot
> <rshendershot@mchsi.com> wrote:
> > [Task:File=/usr/lib/monodevelop/bin/cli/Gtk/Widget.java, Line=-1,
> > Column=-1, Type=Error, Description= error: non-static method
> > 'cli.Gtk.Widget.get_Handle()' overrides static method
> > 
> > MonoDevelop 0.5, Mono 1.0, Fedora Core 2.
> > 
> > I don't understand the path referenced by the error  - something like
> > ../../../../../usr/lib/monodevelop/bin/cli/GTK
> > 
> > I get three of these when compiling the templated IKVM gtk# generated
> > project.  I've made no changes to the generated files.  I have created
> > stubs for the four files outlined in the help and blog.  I symlinked
> > them at /usr/lib to match the project configuration as it was generated.
> > 
> > application.class does get generated (using 'Compile F8'), but it still
> > results in complaints for Widget.java and Window.java.
> > 
> > I'm thinking perhaps ikvmstub has a problem with static methods?
> > 
> >
> 
> It seems to be a problem with gcj, going to the project options and
> switching the compiler to javac if you have it might help.  Otherwise
> it might be a bug in the javabinding, because neither seem to work for
> me right now.  I'll look into it soon hopefully.



I was able to get passed this by going to the Solution explorer tab and,
on application.java, clicking "include compile".  I diff'd generated
files and see that there's a change to the buildaction attribute in the
File element.  After the fix, this becomes buildaction="Nothing" but a
Configuration (peer to Configurations) node is inserted.  The project
option for compilation does not seem to stick to this setting and
without it no class file is created.

Switching to javac as a compiler also works for me. This also creates a
Configuration as a peer instead of a child to Configurations, but the
buildaction is set to Compile, and the Configuration inside
Configurations is updated (so both are) with the new compiler value.

There's only the single java file to this project; I guess Including
Compile on every java file would quickly become unmanageable.   I'm OK
with using javac for now.  I haven't found a way to set javac as the
java compiler globally and that would help ;)

HTH!
-rsh



--=-4L66ww55d1t51LiRhLZY
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.1.14">
</HEAD>
<BODY>
On Sat, 2004-07-10 at 16:47 -0400, John Luke wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">On Fri, 09 Jul 2004 09:02:44 -0500, Richard Hendershot</FONT>
<FONT COLOR="#000000">&lt;<A HREF="mailto:rshendershot@mchsi.com">rshendershot@mchsi.com</A>&gt; wrote:</FONT>
<FONT COLOR="#000000">&gt; [Task:File=/usr/lib/monodevelop/bin/cli/Gtk/Widget.java, Line=-1,</FONT>
<FONT COLOR="#000000">&gt; Column=-1, Type=Error, Description= error: non-static method</FONT>
<FONT COLOR="#000000">&gt; 'cli.Gtk.Widget.get_Handle()' overrides static method</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; MonoDevelop 0.5, Mono 1.0, Fedora Core 2.</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; I don't understand the path referenced by the error  - something like</FONT>
<FONT COLOR="#000000">&gt; ../../../../../usr/lib/monodevelop/bin/cli/GTK</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; I get three of these when compiling the templated IKVM gtk# generated</FONT>
<FONT COLOR="#000000">&gt; project.  I've made no changes to the generated files.  I have created</FONT>
<FONT COLOR="#000000">&gt; stubs for the four files outlined in the help and blog.  I symlinked</FONT>
<FONT COLOR="#000000">&gt; them at /usr/lib to match the project configuration as it was generated.</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; application.class does get generated (using 'Compile F8'), but it still</FONT>
<FONT COLOR="#000000">&gt; results in complaints for Widget.java and Window.java.</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; I'm thinking perhaps ikvmstub has a problem with static methods?</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt;</FONT>

<FONT COLOR="#000000">It seems to be a problem with gcj, going to the project options and</FONT>
<FONT COLOR="#000000">switching the compiler to javac if you have it might help.  Otherwise</FONT>
<FONT COLOR="#000000">it might be a bug in the javabinding, because neither seem to work for</FONT>
<FONT COLOR="#000000">me right now.  I'll look into it soon hopefully.</FONT>
</PRE>
</BLOCKQUOTE>
<BR>
<BR>
I was able to get passed this by going to the Solution explorer tab and, on application.java, clicking &quot;include compile&quot;.&nbsp; I diff'd generated files and see that there's a change to the buildaction attribute in the File element.&nbsp; After the fix, this becomes buildaction=&quot;Nothing&quot; but a Configuration (peer to Configurations) node is inserted.&nbsp; The project option for compilation does not seem to stick to this setting and without it no class file is created.<BR>
<BR>
Switching to javac as a compiler also works for me. This also creates a Configuration as a peer instead of a child to Configurations, but the buildaction is set to Compile, and the Configuration inside Configurations is updated (so both are) with the new compiler value.<BR>
<BR>
There's only the single java file to this project; I guess Including Compile on every java file would quickly become unmanageable.&nbsp;&nbsp; I'm OK with using javac for now.&nbsp; I haven't found a way to set javac as the java compiler globally and that would help ;)<BR>
<BR>
HTH!<BR>
-rsh<BR>
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<BR>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>

--=-4L66ww55d1t51LiRhLZY--