[Gtk-sharp-list] Frame in Frame assertion errors

vanosten rick@vanosten.net
09 Jan 2003 09:59:36 +0100


Rachel and Mike

Thank you very much. The program now works correctly :-) I found yet
another place in my program an correted it:

public MyView : Frame {
    public MyView() : base() { //wrong! -> ... : base("") {
        ...

Is there a way to force the compiler to find these kind of errors? Or is
there a way to debug it? I am new to GTK and annot interprete the
runtime errors :-(

Have a nice day (you might be sleeping now ;-) ... Rick

PS: is there a #gtk-sharp channel on IRC?

> Nitpicking within.
> 
> On Thu, 2003-01-09 at 00:06, Mike Kestner wrote:
> > On Tue, 2003-01-07 at 11:00, vanosten wrote:
> > 
> > > public class EditView : Frame {
> > >     
> > >     private Frame mainF;
> > >         
> > >     public EditView(string aTitle) : base(aTitle) {
> > >         VBox vbox = new VBox(false, 5);
> > >         mainF = new Frame();
> > 
> > This shouldn't even compile.  The Frame(void) constructor is marked
> > protected.  You should only be able to call that from a subclass.  It
> > should only be used by subclasses which are instantiating a native
> > widget within the subclass and need to invoke a base ctor which
> > essentially does nothing on the native side.
> > 
> 
> It is being called from a Frame subclass. Not that it makes it any more
> correct, but that's why it compiles.
> 
> -- Rachel
>