[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GTK Cocoa ?

From: Helge Hess
Subject: Re: GTK Cocoa ?
Date: Tue, 19 Apr 2005 00:25:37 +0200

On 13. Apr 2005, at 21:57 Uhr, Jakob Kemi wrote:
I would be glad to hear any input (from you, or anybody else on the list)
on it and suggestions for improvements:


Whats different to GToolkit?

I find something like this:

  [button connect : "clicked":self:@selector(button:)];

rather ugly. I would suggest to have some mapping table which maps GObject names to proper selectors, say:

[button connectSignal:"clicked" toTarget:self withSelector:@selector(click:)];

Maybe you could use 'jobs' files for that.

Actually signals are somewhat similiar to selectors (well, its a workaround for not having selectors in gtk+ or Qt). So maybe something like this:

  [button connectToTarget:self];

would be more appropriate with a reflection on -clicked: performed by the button.

If this is too strange or if you absolutely need to have the connection to multiple recipients, maybe you should at least use the NSNotificationCenter API, eg:
  [gtk addObserver:self selector:@selector(click:)
       object:button name:@"clicked"];

Just some not well thought out ideas ;-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]