On May 20, 2015, at 7:16 PM, Michael David Crawford wrote:
You could comment off their declarations in your header files, then
have a look at which uses of them in your sources result in fatal
compiler errors.
Bingo. That will do it.
Thanks much to everyone on this. It's certainly
On May 20, 2015, at 7:17 PM, Jens Alfke wrote:
On May 20, 2015, at 4:08 PM, Eric Wing ewmail...@gmail.com wrote:
You could use the Objective-C runtime to find out which things are
properties.
You could, but isn’t it a lot easier to just look at the character before the
name and
On 22 May 2015, at 2:28 am, Alex Zavatone z...@mac.com wrote:
if you use myThing, it's not visually obvious that you're directly accessing
the ivar
This is where a consistent and deeply ingrained naming convention is useful.
The leading underscore has always been Cocoa’s “way” of doing
On 22 May 2015, at 3:02 am, Jens Alfke j...@mooseyard.com wrote:
Now that I have a path forward and understand why things are what they are,
this brings up the wonderful speed issue of how much slower is property
access vs ivar access”.
Yeah, I think we’ve had some vigorous debates
On May 21, 2015, at 4:44 PM, Graham Cox graham@bigpond.com wrote:
On 22 May 2015, at 3:02 am, Jens Alfke j...@mooseyard.com wrote:
Now that I have a path forward and understand why things are what they are,
this brings up the wonderful speed issue of how much slower is property
access
On May 21, 2015, at 6:43 AM, Alex Zavatone z...@mac.com wrote:
Also, you can turn it off autosynthesis? How? That would be a big help for
me to straighten out this iOS project where the original developers thought
everything needed to be a java bean.
As Graham said, go to the build
On May 21, 2015, at 9:28 AM, Alex Zavatone z...@mac.com wrote:
@synthesize thing = _thing;
Which makes the internal and private ivar to be _thing while the property
becomes thing.
In my case, this helps to uncover where the original code is accessing the
ivar as opposed to the property.
Ahh. A little follow up.
One area we all know about is that you can specialize the name of the
property's ivar like so:
@synthesize thing = _thing;
Which makes the internal and private ivar to be _thing while the property
becomes thing.
In my case, this helps to uncover where the original
Have to correct a typo:
On May 20, 2015, at 3:22 PM, Ken Thomases k...@codeweavers.com wrote:
You are accessing a property if you use explicit message sending ([someObject
someProperty] or [someObject setSomeProperty:someValue]) or if you use
implicit message sending view dot syntax
On May 20, 2015, at 1:04 PM, Alex Zavatone z...@mac.com wrote:
Many times in the classes, an ivar is defined in the @interface of the class.
Sometimes not.
In the old days, before about 2006, the ivars had to be defined in the
@interface. Nowadays it’s best to put them in the
On May 20, 2015, at 3:04 PM, Alex Zavatone z...@mac.com wrote:
Many times in the classes, an ivar is defined in the @interface of the class.
Sometimes not. Then sometimes, the same name of the ivar is used in the
class and defined as a property and @synthesized.
Sometimes not.
Now, I
there are good reasons to use properties that are backed by ivars,
there are good reasons to use properties that aren't backed by
anything, and there are good reasons to use ivars that are not
properties.
In my own code I started with nothing but ivars, but changed some of
them to properties
On May 20, 2015, at 1:04 PM, Alex Zavatone z...@mac.com wrote:
In the code I've inherited, I've got the benefit of spending some time
refactoring and have an interesting situation.
Many times in the classes, an ivar is defined in the @interface of the class.
Sometimes not. Then
On May 20, 2015, at 4:08 PM, Eric Wing ewmail...@gmail.com wrote:
You could use the Objective-C runtime to find out which things are properties.
You could, but isn’t it a lot easier to just look at the character before the
name and check whether it’s a “.”?
—Jens
On 5/20/15, Jens Alfke j...@mooseyard.com wrote:
On May 20, 2015, at 4:57 PM, Eric Wing ewmail...@gmail.com wrote:
It depends on how pedantic you want to be.
As little as possible, honestly. Did you go back and read the original
question? The OP is having trouble with basic property-vs-ivar
Which are they, ivars or properties?
I don't know. I can't tell.
Is there any way to inspect an instance and tell if it is a property or an
ivar if both the property and ivar have the same name?
Fun times, fun times.
You could use the Objective-C runtime to find out which things are
You could comment off their declarations in your header files, then
have a look at which uses of them in your sources result in fatal
compiler errors.
(Comment off just one at a time.)
Michael David Crawford, Consulting Software Engineer
mdcrawf...@gmail.com
http://www.warplife.com/mdc/
On 21 May 2015, at 6:50 am, Michael David Crawford mdcrawf...@gmail.com
wrote:
In my own code I started with nothing but ivars, but changed some of
them to properties while neglecting to remove the original ivar. This
leaves me somewhat in the same situation as you.
Nothing wrong with
On May 20, 2015, at 4:57 PM, Eric Wing ewmail...@gmail.com wrote:
It depends on how pedantic you want to be.
As little as possible, honestly. Did you go back and read the original
question? The OP is having trouble with basic property-vs-ivar distinctions,
and dropping a whole bunch of
If you have so many ivars, or so many properties that it's a lot of
work to figure out which is which, quite likely you're doing something
wrong.
Now you're already refactoring your code, so you're doing something right there.
It is quite common that well-done refactoring reduces the numbers of
On 5/20/15, Jens Alfke j...@mooseyard.com wrote:
On May 20, 2015, at 4:08 PM, Eric Wing ewmail...@gmail.com wrote:
You could use the Objective-C runtime to find out which things are
properties.
You could, but isn't it a lot easier to just look at the character before
the name and check
On May 20, 2015, at 6:57 PM, Eric Wing ewmail...@gmail.com wrote:
On 5/20/15, Jens Alfke j...@mooseyard.com wrote:
On May 20, 2015, at 4:08 PM, Eric Wing ewmail...@gmail.com wrote:
You could use the Objective-C runtime to find out which things are
properties.
You could, but isn't it a
22 matches
Mail list logo