On Jun 29, 2013, at 7:48 PM, David Duncan wrote:
> On Jun 29, 2013, at 11:18 AM, Matt Neuburg wrote:
>
>>
>> On Jun 29, 2013, at 10:55 AM, Jens Alfke wrote:
>>
>>> This is just a parsing issue. If an ivar is declared in a class’s public
>>> interface, it’s in scope in any method of that cl
On Jun 29, 2013, at 11:18 AM, Matt Neuburg wrote:
>
> On Jun 29, 2013, at 10:55 AM, Jens Alfke wrote:
>
>> This is just a parsing issue. If an ivar is declared in a class’s public
>> interface, it’s in scope in any method of that class or a subclass. So if a
>> subclass declares an ivar with
Trying this again, reply all this time...
Jens, I think you’ve got the question backwards: the public ivar is in the base
class, and the private one is in the subclass, and it works, even though they
should both be in scope in the subclass’s implementation. I suppose it could be
basically C-sty
On Jun 29, 2013, at 10:55 AM, Jens Alfke wrote:
> This is just a parsing issue. If an ivar is declared in a class’s public
> interface, it’s in scope in any method of that class or a subclass. So if a
> subclass declares an ivar with the same name, you now have a conflict and the
> parser won
On Jun 29, 2013, at 10:23 AM, Matt Neuburg wrote:
> Am I reading this right? It's permitted to override an inherited instance
> variable, but only if you do so privately? m.
First, you can’t override an instance variable; they aren’t dynamic enough. An
ivar is like a struct field, it compiles
As you know, these days, we are allowed to declare an instance variable in
curly braces in the @implementation section rather than the @interface section.
Well, then:
* Suppose two classes, MyClass and its subclass MyClass2.
* Suppose MyClass publicly declares an instance variable "thing".
I o