GSSelectorFromName (follow-up)
Sébastien Pierre <[email protected]>
| Newsgroups | gmane.comp.lib.gnustep.user |
|---|---|
| Message-ID | <[email protected]> |
It's me again,
I dug a little bit in gnustep-base and found that `GSSelectorFromName`
only returns a selector if the selector *exists*, and this directly
cals sel_get_any_uid which is aliased as sel_getUid.
So, how can I create a reference for a selector that does not exist ?
The problem is that I use undeclared selectors in dynamic method
invocation for methods bound at runtime, so before runtime, there is no
"foo" selector defined. The workaround I found is the following:
1/ Declare somewhere in my code the selectors that are used in my
dynamic code (using @selector(foo))
2/ Later, when I call sel_getUid("foo"), the call returns me the
selector instead of nil
but this is not dynamicity anymore :/
-- Sébastien
--
«Le soleil est Dieu»
<http://www.type-z.org> -- Turner, avant de mourir