Agreed.
I just meant in the general case.
ScottB
On Oct 13, 2011, at 11:30 , David Rowland wrote:
> However, if the property is readonly I think you must use direct access to
> set an initial value. The setter does not exist.
>
>
> David Rowland
>
> On Oct 13, 2011, at 10:54 AM, Bayes Scot
However, if the property is readonly I think you must use direct access to set
an initial value. The setter does not exist.
David Rowland
On Oct 13, 2011, at 10:54 AM, Bayes Scott F wrote:
> Thank you, David.
>
> Sounds like safety first for my code: always use the setter/getter for
> synthe
Thank you, David.
Sounds like safety first for my code: always use the setter/getter for
synthesized properties, even in self.
Or use ivars.
ScottB
On Oct 12, 2011, at 09:21 , Bayes Scott F wrote:
> Someone on Matt's site mentioned the possibility that the synthesized ivar
> could be impleme
Thanks, Greg.
ScottB
On Oct 12, 2011, at 12:12 , Greg Parker wrote:
> On Oct 12, 2011, at 9:21 AM, Bayes Scott F wrote:
>> Someone on Matt's site mentioned the possibility that the synthesized ivar
>> could be implemented indirectly, say as a member of a collection. Since the
>> implementatio
On Oct 12, 2011, at 9:21 AM, Bayes Scott F wrote:
> Someone on Matt's site mentioned the possibility that the synthesized ivar
> could be implemented indirectly, say as a member of a collection. Since the
> implementation's opaque, we don't know if that ever can happen.
A property may be impleme
Thank you, David, that's pretty clear.
Sounds like safety first for my code: always use the setter/getter for
synthesized properties, even in self.
Or use @private ivars.
ScottB
On Oct 12, 2011, at 09:46 , David Duncan wrote:
> On Oct 12, 2011, at 9:21 AM, Bayes Scott F wrote:
>
>> Someone o
On Oct 12, 2011, at 9:21 AM, Bayes Scott F wrote:
> Someone on Matt's site mentioned the possibility that the synthesized ivar
> could be implemented indirectly, say as a member of a collection. Since the
> implementation's opaque, we don't know if that ever can happen.
I can't say that I know
Someone on Matt's site mentioned the possibility that the synthesized ivar
could be implemented indirectly, say as a member of a collection. Since the
implementation's opaque, we don't know if that ever can happen.
So, is self->mySynthIvar safe (both lvalue and rvalue), or should we be
messagin
On Oct 11, 2011, at 9:57 AM, Matt Neuburg wrote:
> I did everything "right" when I named an ivar "firstResponder" (property,
> synthesized ivar, synthesized accessors) and totally broke my app because
> Apple was apparently already using an undocumented ivar called
> "firstResponder".
>
> http
On Fri, 07 Oct 2011 19:46:17 -0400, Andy Lee said:
>On Oct 3, 2011, at 2:23 PM, Charles Srstka wrote:
>> 2. KVOs access instance variables directly (mis)feature recognizes the
>> underscore prefix. I like to give it a prefix that KVO doesnt know about so
>> that I can be sure never to end up
On Oct 3, 2011, at 2:23 PM, Charles Srstka wrote:
> 2. KVO’s “access instance variables directly” (mis)feature recognizes the
> underscore prefix. I like to give it a prefix that KVO doesn’t know about so
> that I can be sure never to end up accidentally accessing the ivars of
> another object w
On Oct 7, 2011, at 11:40 AM, Sean McBride wrote:
> On Mon, 3 Oct 2011 13:23:25 -0500, Charles Srstka said:
>
>> 1. Apple reserves the underscore prefix for their own use, so you could,
>> at least theoretically, clash with a superclass ivar this way, and
>
> In addition to what Kyle replied, I'd
On Fri, 7 Oct 2011 10:21:41 -0700, Glenn L. Austin said:
>Do I really need to quote the C and C++ standards that states that a
>leading underscore on a symbol is reserved to the implementation -- in
>other words 'the implementation' is everything that you're not writing?
ISO/IEC 9899:1999, Sectio
On Oct 7, 2011, at 9:40 AM, Sean McBride wrote:
> On Mon, 3 Oct 2011 13:23:25 -0500, Charles Srstka said:
>
>> 1. Apple reserves the underscore prefix for their own use, so you could,
>> at least theoretically, clash with a superclass ivar this way, and
>
> In addition to what Kyle replied, I'd
> In addition to what Kyle replied, I'd just like to point out that prefixing
> your *methods* with an underscore is a very bad idea, since Apple does
> reserve such names and a conflict will bite you at runtime possibly affecting
> the binary compatibility of your app.
I would argue that under
On Mon, 3 Oct 2011 13:23:25 -0500, Charles Srstka said:
>1. Apple reserves the underscore prefix for their own use, so you could,
>at least theoretically, clash with a superclass ivar this way, and
In addition to what Kyle replied, I'd just like to point out that prefixing
your *methods* with an
On Mon, Oct 3, 2011 at 2:01 PM, Andreas Mayer wrote:
>
> Am 03.10.2011 um 16:14 schrieb John Tsombakos:
>
>> audioPlayer = [self getSoundFile:"soundfile.wav"];
>> ...
>>
>> in getSoundFile routine:
>> AVAudioPlayer *snd;
>> ...
>> snd = [[[AVAudioPlayer alloc] initWithContentsOfURL:url error:&erro
On Oct 3, 2011, at 1:31 PM, Kyle Sluder wrote:
>> 1. Apple reserves the underscore prefix for their own use, so you could, at
>> least theoretically, clash with a superclass ivar this way, and
>
> [snip]
>
>>
>> 3. If I use an ivar prefix that no one else uses (as far as I know), then I
>> ca
On Mon, Oct 3, 2011 at 11:23 AM, Charles Srstka
wrote:
> 1. Apple reserves the underscore prefix for their own use, so you could, at
> least theoretically, clash with a superclass ivar this way, and
[snip]
>
> 3. If I use an ivar prefix that no one else uses (as far as I know), then I
> can ma
On Oct 3, 2011, at 10:14 AM, John Tsombakos wrote:
> (and will also change to use the underscore ivar names too - I had done that
> previously, but...well, didn't this time.)
I recommend using some other prefix system instead of the underscore, for two
reasons:
1. Apple reserves the underscore
Am 03.10.2011 um 16:14 schrieb John Tsombakos:
> audioPlayer = [self getSoundFile:"soundfile.wav"];
> ...
>
> in getSoundFile routine:
> AVAudioPlayer *snd;
> ...
> snd = [[[AVAudioPlayer alloc] initWithContentsOfURL:url error:&error]
The question was already answered, but I wanted to point out
On Mon, Oct 3, 2011 at 10:29 AM, Steve Sisak wrote:
>> At 10:14 AM -0400 10/3/11, John Tsombakos wrote:
>> @interface AudioPlayerViewController : UIViewController {
>> AVAudioPlayer *audioPlayer;
>> }
>> @property (retain) AVAudioPlayer *audioPlayer;
>>
>> In the .m file:
>> @synthesize audioPlaye
Not enough morning coffee for you,
On Oct 3, 2011, at 7:29 AM, Steve Sisak wrote:
> You do, indeed want:
>
> self.audioPlayer = [self getSoundFile:"soundfile.wav"];
>
> or
>
> [self setAudioPlayer = [self getSoundFile:"soundfile.wav"]];
I think you meant [self setAudioPlayer:[self getSoundFil
At 10:14 AM -0400 10/3/11, John Tsombakos wrote:
@interface AudioPlayerViewController : UIViewController {
AVAudioPlayer *audioPlayer;
}
@property (retain) AVAudioPlayer *audioPlayer;
In the .m file:
@synthesize audioPlayer;
in viewDidLoad:
audioPlayer = [self getSoundFile:"soundfile.wav"];
You
24 matches
Mail list logo