private methods?
private methods?
- Subject: private methods?
- From: Todd Gureckis <email@hidden>
- Date: Fri, 19 Oct 2001 01:38:55 -0500
hello,
sorry if this is a very basic question, but i can't seem to find an
clear answer to this anywhere online.
I am creating an class that needs quite a few internal methods. These
methods need not be available to users of the class however. I would
however like these methods to share the same variable space as standard
interface methods. something like private member functions in c++.
i feel that his must be possible, but i am not sure of the syntax for
obj-c.
if the above is unclear: basically I want to know where i can put the
method declarations and where to put the method definitions for
functions that is are in the public interface but still has access to
the private variables of the class.
then my next question is how to call such a function from within a
public method. i don't know how obj-c would handle this but, it seems
that placing the message
[self myPrivateMethod];
in the middle of a public method like - (void)init would violate the
"privateness" of the myPrivateMethod.(??)
thanks for any guidance,
todd