Re: error: synthesized properties 'foo' and 'bar' both claim ivar 'myIvar'

2010-11-18 Thread Quincey Morris
On Nov 18, 2010, at 00:43, Andreas Grosam wrote: > Found this bug report related to this issue and the following explanation: > : > >> --- Comment #1 from Fariborz Jahanian 2009-06-22 >> 21:34:42 --- >> This is part of the languag

Re: Detecting shared folders

2010-11-18 Thread Leo
Greg and Ken: Thanks a lot for answering my question about shared folders, that's exactly what I needed! Best, Leo > From: Greg Nelson > Date: Wed, 17 Nov 2010 00:01:24 -0500 > To: Leo , > Subject: Re: Detecting shared folders > From: Ken Thomases > Date: Wed, 17 Nov 2010 00:33:02 -0600 >

Variable declaration in "for" loop initialization expression?

2010-11-18 Thread Oleg Krupnov
Hi, I know, this is a very basic question, but after learning so many programming languages, my head seems like a mess. In C that is in Objective-C, what is the correct/preferable way to declare the counter variable in a for loop? Type i; for (i = 0; i < N; ++ i) { statements } or for (Type i

Re: Variable declaration in "for" loop initialization expression?

2010-11-18 Thread Graham Cox
On 18/11/2010, at 10:28 PM, Oleg Krupnov wrote: > Hi, > > I know, this is a very basic question, but after learning so many > programming languages, my head seems like a mess. > > In C that is in Objective-C, what is the correct/preferable way to > declare the counter variable in a for loop? >

Re: Variable declaration in "for" loop initialization expression?

2010-11-18 Thread Graham Cox
On 18/11/2010, at 10:47 PM, Graham Cox wrote: > I don't think there is any significant advantage to either form, except the > latter is perhaps a bit more compact in source code. It shouldn't make any > difference to the object code. I should also point out that there is a scope difference -

Re: Variable declaration in "for" loop initialization expression?

2010-11-18 Thread Oleg Krupnov
Thanks Graham! I think I will stick to the more restricted version. It's more compact and reliable indeed. It seems that C99 is set by default in XCode. What are the possible scenarios when I may need to use another dialect? Oleg. On Thu, Nov 18, 2010 at 1:52 PM, Graham Cox wrote: > > On 18/11

readonly property which is a mutable array

2010-11-18 Thread Remco Poelstra
Hi, I've a object like to following: @interface { NSMutableArray *items; } @property (nonatomic,readonly) NSMutableArray *items; @end I also have a protocol as follows: @protocol Proto @property (nonatomic,readonly) NSArray *items; @end I of course want the items to be read only for the

Re: readonly property which is a mutable array

2010-11-18 Thread jonat...@mugginsoft.com
On 18 Nov 2010, at 12:35, Remco Poelstra wrote: > Hi, > > I've a object like to following: > @interface { > NSMutableArray *items; > } > @property (nonatomic,readonly) NSMutableArray *items; > @end > > I also have a protocol as follows: > @protocol Proto > @property (nonatomic,readonly)

Re: readonly property which is a mutable array

2010-11-18 Thread jonat...@mugginsoft.com
On 18 Nov 2010, at 13:01, jonat...@mugginsoft.com wrote: > > On 18 Nov 2010, at 12:35, Remco Poelstra wrote: > >> Hi, >> >> I've a object like to following: >> @interface { >> NSMutableArray *items; >> } >> @property (nonatomic,readonly) NSMutableArray *items; >> @end >> >> I also have

Re: Core Data: During Migration, should use Primitive Accessors only?

2010-11-18 Thread Jerry Krinock
On 2010 Nov 16, at 16:51, Quincey Morris wrote: > 2. If you have a *custom* NSManagedObject subclass (i.e. whose subclass name > is known to the Core Data entity), you can of course override the > Core-Data-supplied accessor methods by writing your own. Adam was saying that > there isn't suppo

Re: Variable declaration in "for" loop initialization expression?

2010-11-18 Thread Jerry Krinock
On 2010 Nov 18, at 03:57, Oleg Krupnov wrote: > It seems that C99 is set by default in XCode. What are the possible > scenarios when I may need to use another dialect? The only scenario I know of is: in case you want your code to be reuseable by other people/projects that are not using C99. __

Re: Re: NSTimer firedate randomly changes

2010-11-18 Thread lorenzo7620
Thanks everyone for all the replies. I've read through the docs again (its been years since I first set this up) and think I have a better understanding of how timers should work. I see now that the timer will fire once the computer is awakened from sleep, but it does take some time, maybe

Re: Variable declaration in "for" loop initialization expression?

2010-11-18 Thread Scott Ribe
On Nov 18, 2010, at 4:57 AM, Oleg Krupnov wrote: > What are the possible > scenarios when I may need to use another dialect? If you have a lot of very very old code that depends on C99 quirks and not enough time to fix it. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/

Re: Variable declaration in "for" loop initialization expression?

2010-11-18 Thread Scott Ribe
It's early in the morning for me and I mis-phrased it. I meant "pre-C99 quirks", not "C99 quirks". On Nov 18, 2010, at 8:21 AM, Oleg Krupnov wrote: > Err... not sure I've understood... Is C99 very old and quirky? I > thought it was a good idea to use it since it's set by default in > XCode and t

Re: readonly property which is a mutable array

2010-11-18 Thread Keary Suska
On Nov 18, 2010, at 5:35 AM, Remco Poelstra wrote: > Hi, > > I've a object like to following: > @interface { > NSMutableArray *items; > } > @property (nonatomic,readonly) NSMutableArray *items; > @end > > I also have a protocol as follows: > @protocol Proto > @property (nonatomic,readonly

Re: NSBrowser

2010-11-18 Thread Bruno Causse
yes i found, thank a lot Le 17 nov. 10 à 18:27, Dave DeLong a écrit : NSBrowser is a subclass of NSControl, which happens to have a target and action mechanism. Have you tried hooking up your browser's target and action? Dave On Nov 17, 2010, at 8:52 AM, Bruno Causse wrote: i can navig

Re: NSTimer firedate randomly changes

2010-11-18 Thread jonat...@mugginsoft.com
On 18 Nov 2010, at 15:10, lorenzo7...@gmail.com wrote: > Thanks everyone for all the replies. I've read through the docs again (its > been years since I first set this up) and think I have a better understanding > of how timers should work. I see now that the timer will fire once the > comput

Re: Core Data: During Migration, should use Primitive Accessors only?

2010-11-18 Thread Adam Swift
On Nov 18, 2010, at 6:17 AM, Jerry Krinock wrote: > > On 2010 Nov 16, at 16:51, Quincey Morris wrote: > >> 2. If you have a *custom* NSManagedObject subclass (i.e. whose subclass name >> is known to the Core Data entity), you can of course override the >> Core-Data-supplied accessor methods b

Re: Core Data: During Migration, should use Primitive Accessors only?

2010-11-18 Thread Quincey Morris
On Nov 18, 2010, at 06:17, Jerry Krinock wrote: > My claims are that such usage should not happen, and indeed you don't want it > to happen, but if you're not careful, it will happen… > > 1. If you invoke -(set)foo of -(setValue:)forKey: during a migration, and > you have overridden accessors

Re: On self = [super init...] ...

2010-11-18 Thread Bill Bumgarner
On Nov 18, 2010, at 1:10 PM, John Engelhart wrote: > The basic premise behind self = [super init...] is that the "lower levels of > initialization are free to return a different object than the one passed in". > > However, there is an unstated assumption in this reasoning: whatever object > is

Calling a class method with the runtime ObjC API

2010-11-18 Thread vincent habchi
Hi there, this is more a style question than anything else, but I'm sometimes perfectionist. ;) I am also aware it is somewhat borderline with Cocoa (belongs more to ObjC in general); sorry for this. I have designed a kind of a fake class which is, in reality, a simple collection of algorithms

Re: Calling a class method with the runtime ObjC API

2010-11-18 Thread Joar Wingfors
On 18 nov 2010, at 13.18, vincent habchi wrote: > I supposed I couldn't do such a simple thing as [MyClass perform:selector] > because the perform: method is an instance one. Sure you can: [MyClass performSelector:theSelector]; Works like a charm. j o a r _

Re: Calling a class method with the runtime ObjC API

2010-11-18 Thread vincent habchi
Le 18 nov. 2010 à 22:31, Joar Wingfors a écrit : >> I supposed I couldn't do such a simple thing as [MyClass perform:selector] >> because the perform: method is an instance one. > > [MyClass performSelector:theSelector]; > Works like a charm. Thanks Joar, next time I shall be more adventu

Re: On self = [super init...] ...

2010-11-18 Thread Thomas Davie
On 18 Nov 2010, at 21:16, Bill Bumgarner wrote: > > On Nov 18, 2010, at 1:10 PM, John Engelhart wrote: > >> The basic premise behind self = [super init...] is that the "lower levels of >> initialization are free to return a different object than the one passed in". >> >> However, there is an

Re: Calling a class method with the runtime ObjC API

2010-11-18 Thread Greg Parker
On Nov 18, 2010, at 1:18 PM, vincent habchi wrote: > I supposed I couldn't do such a simple thing as [MyClass perform:selector] > because the perform: method is an instance one. So I wrote this: All class objects are also instances of NSObject. That means any instance method from NSObject is als

Accessing the NSImageNameRefreshTemplate image on iOS?

2010-11-18 Thread Laurent Daudelin
Is there an equivalent of this OS X default image on iOS? The refresh image? Like the one that appears on a UIBarButtonItem that you choose to be of style "UIBarButtonSystemItemRefresh"? -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin http://www.ne

Re: On self = [super init...] ...

2010-11-18 Thread John Engelhart
On Thu, Nov 18, 2010 at 4:16 PM, Bill Bumgarner wrote: > > On Nov 18, 2010, at 1:10 PM, John Engelhart wrote: > > The basic premise behind self = [super init...] is that the "lower levels > of initialization are free to return a different object than the one passed > in". > > However, there is an

Re: On self = [super init...] ...

2010-11-18 Thread Charles Srstka
On Nov 18, 2010, at 4:34 PM, John Engelhart wrote: > But your objection is still from the perspective of the "tail end". It still > doesn't address the case when I'm performing object substitution "above you" > and I really, really need you to honor my choice. In this case, if you > decide to

App Store code signing

2010-11-18 Thread Chris Idou
Is this the right forum to ask about the whole business of verifying signatures etc for apps in the app store for Mac? I've been trying to get the code to work, but I'm stumped. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do no

Font panel accessory view problem

2010-11-18 Thread Graham Cox
I'm adding an accessory view to the font panel which includes some NSColorWells. The problem I'm having is that if the standard 'text colour' button is clicked, it links the Color Panel to the Font Panel in a way that is not friendly to standard colour wells - once the connection is established,

Re: App Store code signing

2010-11-18 Thread davelist
On Nov 18, 2010, at 6:43 PM, Chris Idou wrote: > > > Is this the right forum to ask about the whole business of verifying > signatures > etc for apps in the app store for Mac? I've been trying to get the code to > work, > but I'm stumped. > You should probably use http://devforums.apple.

Re: App Store code signing

2010-11-18 Thread James Walker
On 11/18/2010 3:43 PM, Chris Idou wrote: Is this the right forum to ask about the whole business of verifying signatures etc for apps in the app store for Mac? I've been trying to get the code to work, but I'm stumped. If you log in at devforums.apple.com, you'll find a folder devoted to the

NSScroller trackKnob

2010-11-18 Thread koko
How does one get continuous tracking from an NSScroller? -trackKnob only gives control when the mouse button is released. There must be a method as normal scroll view behaviour is continuous scrolling. So I want to have a scroller, not associated with a scroll view and get continuous call

Re: On self = [super init...] ...

2010-11-18 Thread Bill Bumgarner
On Nov 18, 2010, at 2:34 PM, John Engelhart wrote: > method is just going to -dealloc my object and do something else (you know, > basically exactly what I'm trying to do with my own object substitution, hint > hint), then what's the point in even trying to do object substitution in the > firs

Re: NSScroller trackKnob

2010-11-18 Thread Graham Cox
On 19/11/2010, at 1:36 PM, k...@highrolls.net wrote: > How does one get continuous tracking from an NSScroller? > > -trackKnob only gives control when the mouse button is released. > > There must be a method as normal scroll view behaviour is continuous > scrolling. > > So I want to have a s

Re: unit test exit's abnormally with code 5

2010-11-18 Thread Shane
Shameless bump. Anyone have ideas on this thread? On Sun, Nov 14, 2010 at 4:33 PM, Shane wrote: > I'm trying to put a unit test together, so I've created a new target, > added my files to compile and frameworks to link to, then commented > out all of my code to where I have an empty setUp, tearDo

Re: readonly property which is a mutable array

2010-11-18 Thread Ken Thomases
On Nov 18, 2010, at 9:33 AM, Keary Suska wrote: > On Nov 18, 2010, at 5:35 AM, Remco Poelstra wrote: > >> Hi, >> >> I've a object like to following: >> @interface { >> NSMutableArray *items; >> } >> @property (nonatomic,readonly) NSMutableArray *items; >> @end >> >> I also have a protocol

Re: NSScroller trackKnob

2010-11-18 Thread koko
Thanks Graham ! NOTE: This is a scroller for a view, not a slider requirement, no HIG police problems! -koko On Nov 18, 2010, at 7:45 PM, Graham Cox wrote: On 19/11/2010, at 1:36 PM, k...@highrolls.net wrote: How does one get continuous tracking from an NSScroller? -trackKnob only giv

Re: NSScroller trackKnob

2010-11-18 Thread koko
Maybe I spoke too soon. I have subclassed NSScroller and set my scroller to this class. Then this code: - (void)awakeFromNib { [self setContinuous:YES]; } - (void)trackKnob:(NSEvent *)theEvent { [super trackKnob:theEvent]; NSLog(@"trackKnob"); } I only

Why UIBarButtonItemStyleBordered?

2010-11-18 Thread Laurent Daudelin
Why this style if it doesn't make any difference with a bar button based on a custom view? I want to put an activity indicator on a bar button but it seems I can't. Well, I can but when I switch the right bar button item to the bar button item with the activity indicator, no border is drawn. I

Re: NSScroller trackKnob

2010-11-18 Thread Graham Cox
On 19/11/2010, at 2:02 PM, k...@highrolls.net wrote: > I only get the log output when the mouse button is released ... this is not > continuous to me. > > Clearly I am missing something. > -trackKnob is an internal method that performs the tracking - it's not where you get the stream of val

Re: NSScroller trackKnob

2010-11-18 Thread koko
Should the action look like this: - (void)action:(id)sender; i.e will sender be the NSScroller? -koko On Nov 18, 2010, at 8:14 PM, Graham Cox wrote: On 19/11/2010, at 2:02 PM, k...@highrolls.net wrote: I only get the log output when the mouse button is released ... this is not continuou

Re: NSScroller trackKnob

2010-11-18 Thread Graham Cox
On 19/11/2010, at 2:30 PM, k...@highrolls.net wrote: > Should the action look like this: > > - (void)action:(id)sender; > > i.e will sender be the NSScroller? Yes, though if you do this: - (IBAction) action:(id) sender; Then it will be visible to IB and you can connect it up there, instead

Re: NSScroller trackKnob

2010-11-18 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/18/10 7:30 PM, k...@highrolls.net wrote: > Should the action look like this: > > - (void)action:(id)sender; > > i.e will sender be the NSScroller? Please see the section titled "The Target-Action Mechanism" at http://developer.apple.com/librar

Re: [GREAT]NSScroller trackKnob

2010-11-18 Thread koko
Works great ... thanks ! Next question ... how do I get called for the buttons (line up down) and the page up down? -koko On Nov 18, 2010, at 8:39 PM, Graham Cox wrote: On 19/11/2010, at 2:30 PM, k...@highrolls.net wrote: Should the action look like this: - (void)action:(id)sender;

Re: [GREAT]NSScroller trackKnob

2010-11-18 Thread Graham Cox
On 19/11/2010, at 2:51 PM, k...@highrolls.net wrote: > Next question ... how do I get called for the buttons (line up down) and the > page up down? You should be called for all of the parts of the scroller. You can call -hitPart to find out which part of the control was hit. (I just found thi

Re: [GREAT]NSScroller trackKnob

2010-11-18 Thread Graham Cox
On 19/11/2010, at 3:05 PM, Graham Cox wrote: > The usual MO is to set the range of the scroller to the total height of the > view to be scrolled, less the height of the frame through which it is viewed. > You change the value of the scroller to the amount you want to scroll, > typically one li

Re: [GREAT]NSScroller trackKnob

2010-11-18 Thread koko
Yes, my action is being called. So, I must find the part and if line or page figure my scroll amount and then set the knob. Thx, -koko On Nov 18, 2010, at 9:09 PM, Graham Cox wrote: On 19/11/2010, at 3:05 PM, Graham Cox wrote: The usual MO is to set the range of the scroller to the tot

Re: [GREAT]NSScroller trackKnob

2010-11-18 Thread koko
Thanks to all, Graham too! All aspects work just fine. -koko On Nov 18, 2010, at 9:24 PM, k...@highrolls.net wrote: Yes, my action is being called. So, I must find the part and if line or page figure my scroll amount and then set the knob. Thx, -koko On Nov 18, 2010, at 9:09 PM, Graham