Re: Naming question (was: [Pyobjc-dev] Cocoa Sheets)
Brought to you by:
ronaldoussoren
From: Ronald O. <ous...@ci...> - 2003-06-11 19:32:19
|
On Wednesday, Jun 11, 2003, at 20:50 Europe/Amsterdam, Bill Bumgarner wrote: > On Wednesday, Jun 11, 2003, at 14:10 US/Eastern, Ronald Oussoren wrote: >> I'm afraid I don't see a way to automaticly detect that a method will >> be used as the callback for a sheet. > > Right. I don't believe there is a great answer for this one-- at > least without asking developers to "follow a convention". > > In the case of that method, the method name doesn't matter. It is > only the signature that matters-- even in ObjC. You specify a name > and a method to be invoked, and it assumes the signature will be > compatible. > > But what if we wrapped the various methods that take signatures and > dynamically created and/or checked and/or enforced the signature at > that time? We could warn about the signatures when one of the beginSheet methods is called (better yet, make it an error when the signature is not correct). How many of such callback API's are there, is it just sheets or are there other API's that do callbacks to aritrary methods with a 'difficult' signature? Ronald |