Re: Keyword @defs

2009-12-01 Thread Kyle Sluder
On Mon, Nov 30, 2009 at 1:33 PM, Ben Haller bhcocoa...@sticksoftware.com wrote:  This is interesting to me, since I am in fact using @public and - with some ivars to allow faster use of one of my classes.  (Yes, I've confirmed that this is significant in Sampler; it is, in fact, quite a large

Re: Keyword @defs

2009-12-01 Thread Ben Haller
On 1-Dec-09, at 3:21 PM, Kyle Sluder wrote: On Mon, Nov 30, 2009 at 1:33 PM, Ben Haller wrote: This is interesting to me, since I am in fact using @public and - with some ivars to allow faster use of one of my classes. (Yes, I've confirmed that this is significant in Sampler; it is, in

Re: Keyword @defs

2009-11-30 Thread Dennis Munsie
Not that I'm advocating it, but you can also declare a field as @public to allow you to access it via the - operator. Of course, I could be missing some compiler magic going on behind the scene as well, and it may not actually be the same speed wise as @defs was. Not to mention that it's just

Re: Keyword @defs

2009-11-30 Thread Bill Bumgarner
On Nov 30, 2009, at 12:50 PM, Dennis Munsie wrote: Not that I'm advocating it, but you can also declare a field as @public to allow you to access it via the - operator. Of course, I could be missing some compiler magic going on behind the scene as well, and it may not actually be the

Re: Keyword @defs

2009-11-30 Thread Ben Haller
On 30-Nov-09, at 4:06 PM, Bill Bumgarner wrote: On Nov 30, 2009, at 12:50 PM, Dennis Munsie wrote: Not that I'm advocating it, but you can also declare a field as @public to allow you to access it via the - operator. Of course, I could be missing some compiler magic going on behind the

Re: Keyword @defs

2009-11-30 Thread Greg Parker
On Nov 30, 2009, at 1:33 PM, Ben Haller wrote: On 30-Nov-09, at 4:06 PM, Bill Bumgarner wrote: On Nov 30, 2009, at 12:50 PM, Dennis Munsie wrote: Not that I'm advocating it, but you can also declare a field as @public to allow you to access it via the - operator. Of course, I could be

Re: Keyword @defs

2009-11-30 Thread Mike Abdullah
On 30 Nov 2009, at 21:33, Ben Haller wrote: On 30-Nov-09, at 4:06 PM, Bill Bumgarner wrote: On Nov 30, 2009, at 12:50 PM, Dennis Munsie wrote: Not that I'm advocating it, but you can also declare a field as @public to allow you to access it via the - operator. Of course, I could be

Re: Keyword @defs

2009-11-30 Thread Ben Haller
On 30-Nov-09, at 5:52 PM, Mike Abdullah wrote: On 30 Nov 2009, at 21:33, Ben Haller wrote: What I want is essentially a struct with methods; I need super-fast access to ivars for clients of the class in some places in my code. But I also want functionality provided by the class itself

Keyword @defs

2009-11-29 Thread James Pengra
Consider the following situation I found in a Cocoa program to simulate a sine wave generator: The class Foo has a number of variables defined in its header. In the code file Foo.m, and.preceding the @implementation block, the following structure is defined: typedef struct

Re: Keyword @defs

2009-11-29 Thread Oftenwrong Soong
James, What exactly is this @defs keyword supposed to do? -Soong - Original Message From: James Pengra pengr...@charter.net To: cocoa-dev@lists.apple.com Sent: Sun, November 29, 2009 4:07:11 PM Subject: Keyword @defs Consider the following situation I found in a Cocoa program

Re: Keyword @defs

2009-11-29 Thread Ken Thomases
On Nov 29, 2009, at 6:07 PM, James Pengra wrote: The class Foo has a number of variables defined in its header. In the code file Foo.m, and.preceding the @implementation block, the following structure is defined: typedef struct { @defs(Foo); } getFoo;

Re: Keyword @defs

2009-11-29 Thread Bill Bumgarner
On Nov 29, 2009, at 4:21 PM, Oftenwrong Soong wrote: What exactly is this @defs keyword supposed to do? It effectively turned an Objective-C class declaration into a standard C structure such that you could access the instance variables directly via a simple - operator. Was mostly used for