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

Mike Kestner mkestner@speakeasy.net
09 Jan 2003 00:06:40 -0600


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.

The reason you are seeing the assertions is because there is no native
widget instantiated by that ctor.  You probably want to use something
like:

	mainF = new Frame ("");

if you really want a label-less frame.

-- 
Mike Kestner <mkestner@speakeasy.net>