PDA

View Full Version : [C# - Monodevelop + Glade2] un browser che non browsa...UFF!


RaouL_BennetH
23-08-2005, 21:20
using System;
using Gtk;
using Glade;
using Gecko;

public class GladeApp
{
[Widget] Frame frame1;
[Widget] Entry entry1;

WebControl web;

public static void Main (string[] args)
{
new GladeApp (args);
}

public GladeApp (string[] args)
{
Application.Init ();

Glade.XML gxml = new Glade.XML (null, "gui.glade", "window1", null);
gxml.Autoconnect (this);

web = new WebControl();

web.Show();

frame1.Add(web);

entry1.Activated += load_url;


Application.Run ();
}

// Connect the Signals defined in Glade
private void OnWindowDeleteEvent (object sender, DeleteEventArgs a)
{
Application.Quit ();
a.RetVal = true;

}

void load_url ( object source, EventArgs args) {
web.LoadUrl(entry1.Text);

}
}


Questo codice l'ho scritto seguendo alla lettera questa guida:

http://primates.ximian.com/~edasque/projects/Tutorial/glade2.html

Il problema è che l'applicazione mi si compila tranquillamente,mi si esegue,riesco a scrivere l'indirizzo nella casella di testo del browser,ma quando poi premo invio non succede nulla mentre invece dovrei riuscire a navigare.
Any ideas?

RaouL_BennetH
24-08-2005, 10:54
up :mc: