[Gtk-sharp-list] I really need some sort of tutorial

Kenneth D Weinert kenw at quarter-flash.com
Tue Jun 3 12:09:18 EDT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Chris Howie wrote:
> On Mon, Jun 2, 2008 at 10:35 AM, Adam Tauno Williams
> <adam at morrison-ind.com> wrote:
>> I assume your Window / Dialog with the form fields is a class?
>> Just expose the fields as properties might be the simplest way.
>>
>> ... public string Jackpot { set { jackpot.Text = value; } } ...
>>
>> That should update the value in the field.  Have your command
>> class call that method of your Window/Dialog/Form class.
>>
>> [snip]
>>
>> You can either update the field whenever the value is changed by
>> the calculation or call a Timer to refresh the values from the
>> command class.
>
> If the application is multi-threaded, this approach will die
> horribly. Kenneth, have a look at
> <http://www.mono-project.com/Responsive_Applications>.
>
That's a problem - I *have* looked at that and I'm just not making the
connection. For what you understand of my application, which one of
those approaches would make most sense?

To restate: I need to pull information from the widgets *and* then
update them.  I think I understand how the signal/callback works if I
am interacting with the widgets, I just don't see quite how it works
if it's the program that needs to update them.

The main reason for looking at it being threaded is solely to get the
responsiveness. Perhaps I'd be better off making all the form elements
be part of a class and then just pass the instance (or make it
"global") and leave it all in one thread.

I'll have to eventually sort out the threading issue for other projects.

Can you recommend any resources that show examples of threaded GUI
interaction? So far all the tutorial articles I've seen either have a
very limited, partially implemented example or they're very simple
interactions between a button and a static label sort of thing.

Thanks for your reply - I'll take another look and see if I can sort
it out some more.

- --
Ken Weinert
http://quarter-flash.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIRWyuH0OpnUzq8fARAhWcAJ9rzWYsh5n2qxSVeOqFR5wCUSnaRgCgtFk/
lx/eDm56qpxeZ7SZltUIZkA=
=koYA
-----END PGP SIGNATURE-----



More information about the Gtk-sharp-list mailing list