[Mono-list] Remoting a GTK UI
Brown, Robert
rbrown at plls.com
Tue May 31 13:35:51 EDT 2005
Are you just trying to retrieve a value from a textBox on a remote
machine? Will the textBox always be available and if not what do you
expect to be returned to you?
-----Original Message-----
From: mono-list-bounces at lists.ximian.com
[mailto:mono-list-bounces at lists.ximian.com] On Behalf Of George Farris
Sent: Tuesday, May 31, 2005 11:15 AM
To: mono-list at lists.ximian.com
Subject: Re: [Mono-list] Remoting a GTK UI
On Mon, 2005-05-30 at 17:18 -0400, Nigel Benns wrote:
> If you use GLADE, you could host the file on a web/ftp server and just
> retrive it when the application starts.
>
> > Does anyone have some example code to show how to effectively remote
> > a gtk# UI? I'm simply not knowledgeable enough about this type of
> > thing and documentation about it is severely lacking.
> >
Not what I meant. I want to have a .NET remoting client control a widget
in a remote gtk server app.
As an example: with the small piece of code below, how do I get the
AccountNumber class to reference ui so I can control the interface and
will this actually work or will the thread hang? I'm not a threading
guru, in fact never done any threading code so I really don't understand
all the ins and outs yet.
using Gtk;
using System;
using System.IO;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Http;
class Server
{
public static MyWindow ui;
public static void Main ()
{
Application.Init();
ui = new MyWindow();
Console.WriteLine("running, listening on port 8080...");
ChannelServices.RegisterChannel(new HttpChannel(8080));
RemotingConfiguration.RegisterWellKnownServiceType(typeof(AccountNumber)
,
"ui", WellKnownObjectMode.Singleton);
Application.Run();
}
}
public class AccountNumber : MarshalByRefObject {
public string GetAccount()
{
ui.ShowAll();
string s = ui.AccountNo.Text;
ui.HideAll();
return s;
}
}
--
George Farris farrisg at mala.bc.ca
Malaspina University-College
_______________________________________________
Mono-list maillist - Mono-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list
More information about the Mono-list
mailing list