[Top][All Lists]

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

"Dynamic" selector issues (complement)

From: Sébastien Pierre
Subject: "Dynamic" selector issues (complement)
Date: Wed, 2 Feb 2005 12:35:17 +0100

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

«And never can a man be more disastrously in death than when death
itself shall be deathless.»
<>                     -- St. Augustine

reply via email to

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