Re: Where is my bicycle?

2015-04-07 Thread Gerriet M. Denkmann
> On 7 Apr 2015, at 00:15, Quincey Morris > wrote: > > On Apr 6, 2015, at 09:19 , Gerriet M. Denkmann wrote: > > A suggestion, though: > > Try building your character set using ‘characterSetWithRange:’ and/or the > NSMutableCharacterSet methods that add ranges, instead of using NSStrings.

Re: Navigationbar doesn't work in iOS 7.1 / 8 with XCODE 6.2

2015-04-07 Thread wesley.dias wesley.dias
I've tried the two ways. Doesn't work! Well, i will keep trying! Thank you for all! I appreciate! 2015-04-06 17:01 GMT-03:00 Alex Zavatone : > Don't worry about your English. It's better than my Portuguese. > > Are you trying to push a view controller onto the navigation stack, or are > you tr

Assuring KVO compliance.

2015-04-07 Thread Alex Zavatone
I've read Apple's docs on assuring KVO/KVC compliance, but in this particular situation, I'd appreciate someone explaining what I'm not getting here if it's anything obvious. I think what I'm asking is how to convert code that has a state exposed as a (nonatomic, readwrite) property of a typede

Re: Assuring KVO compliance.

2015-04-07 Thread Alex Zavatone
To answer my own question, changing the enum to an NSInteger backed NS_Enum resulted in no more bad access exceptions from other chunks of code attempting to change the APP_State property. typedef NS_ENUM(NSInteger, APP_State) { APP_State_Normal = 0, APP_State_Expired = 1, APP_State_

Re: Assuring KVO compliance.

2015-04-07 Thread Roland King
> On 7 Apr 2015, at 23:12, Alex Zavatone wrote: > > To answer my own question, changing the enum to an NSInteger backed NS_Enum > resulted in no more bad access exceptions from other chunks of code > attempting to change the APP_State property. > > typedef NS_ENUM(NSInteger, APP_State) { >

Re: Assuring KVO compliance.

2015-04-07 Thread Alex Zavatone
Thanks Roland. Yeah, me neither, but this is inherited code where the previous guys obviously come from a java background and have done things in a manner I'm not accustomed to. In this project, refactoring properties and methods in many classes actually causes Xcode to tell me I'd be better

Re: Assuring KVO compliance.

2015-04-07 Thread Quincey Morris
On Apr 7, 2015, at 09:05 , Alex Zavatone wrote: > > Gremlins, I think. No, something, but not that. Enums are a C thing, not even Obj-C. They are, for all intents and purposes, an int of some size and signedness chosen by the compiler. So, the enum part of this is a red herring. The reason th

Re: Where is my bicycle?

2015-04-07 Thread Quincey Morris
On Apr 7, 2015, at 02:21 , Gerriet M. Denkmann wrote: > > it allowed me to create a replacement for characterSetWithCharactersInString: > which actually works The only suggestion I have is to return ‘mus.copy’ instead of ‘mus’. Given that we know NSCharacterSet has some optimized internal repr

Re: Making an array property without a backing store. How?

2015-04-07 Thread Daryle Walker
> On Apr 6, 2015, at 10:18 PM, Graham Cox wrote: > >> >> On 7 Apr 2015, at 12:01 pm, Daryle Walker wrote: >> >> I have an object like: >> >> @interface MyClass : NSObject >> @property (readonly) NSArray * myDatumList; >> @property NSArray * myDataList; >> @end >> >> The second member is me

Re: Making an array property without a backing store. How?

2015-04-07 Thread Quincey Morris
On Apr 7, 2015, at 10:58 , Daryle Walker wrote: > @interface MyClass : NSObject > @property (readonly) NSArray * myDatumList; > @property NSArray * myDataList; > @end > > @implementation MyClass > > - (NSUInteger)countOfMyDatumList { >return self.myDataList.count; > } > > - (id)objectInM

Re: Assuring KVO compliance.

2015-04-07 Thread Jens Alfke
> On Apr 7, 2015, at 7:04 AM, Alex Zavatone wrote: > > The code that I've inherited has an enum (not an NSEnum) that represents the > app's connected state, 0, 1 or 2. There’s no difference. NS_ENUM is just a macro that defines a C enum, but uses some newer (C99?) syntax to specify the intege

Re: Assuring KVO compliance.

2015-04-07 Thread Alex Zavatone
On Apr 7, 2015, at 3:13 PM, Jens Alfke wrote: > >> On Apr 7, 2015, at 7:04 AM, Alex Zavatone wrote: >> >> The code that I've inherited has an enum (not an NSEnum) that represents the >> app's connected state, 0, 1 or 2. > > There’s no difference. NS_ENUM is just a macro that defines a C enum

Re: Where is my bicycle?

2015-04-07 Thread Jens Alfke
> On Apr 6, 2015, at 2:09 PM, Jack Brindle wrote: > > Have you checked the Font you are using to display the character string to > see if it contains the bicycle character? If not, you probably won’t get the > character you seek. Fonts have nothing to do with it; they’re an aspect of renderin

Re: Making an array property without a backing store. How?

2015-04-07 Thread Jens Alfke
> On Apr 7, 2015, at 11:55 AM, Quincey Morris > wrote: > > The problem is that this approach doesn’t actually work, not in this form. > There’s a little bit of Doing It Wrong™, but mostly this is pretty badly > broken in Cocoa. What Quincey said. I banged my head against this a lot back in 2

Re: Making an array property without a backing store. How?

2015-04-07 Thread Charles Srstka
On Apr 7, 2015, at 2:33 PM, Jens Alfke wrote: > > What Quincey said. I banged my head against this a lot back in 2005 or so and > gave up on this approach. It sounds lovely — I can expose this property as an > NSArray in my class’s public API even though it’s not really implemented as > an NSA

addTarget: forControlEvents: ?

2015-04-07 Thread Dave
Hi All, Given the iOS/Cocoa-Touch code: [self addTarget:self action:@selector(buttonTouchUpInsideAction:) forControlEvents:UIControlEventTouchUpInside]; [self addTarget:self action:@selector(buttonTouchDownAction:) forControlEvents:UIControlEventTouchDownInside]; What is the Equivalent for Mac

Re: Where is my bicycle?

2015-04-07 Thread Charles Srstka
On Apr 7, 2015, at 2:24 PM, Jens Alfke wrote: > > This is the same process that allows you to put Japanese or Cyrillic > characters in a string and render them in Helvetica or Papyrus even though > those fonts don’t support those character sets. I really want to see a Cyrillic version of Papyr

Re: Where is my bicycle?

2015-04-07 Thread Jens Alfke
> On Apr 7, 2015, at 12:59 PM, Charles Srstka wrote: > > I really want to see a Cyrillic version of Papyrus now. ;-) http://ihateyouare.deviantart.com/art/Papyrus-Plain-Cyrillic-165111766 You’re welcome :) —Jens ___

Re: addTarget: forControlEvents: ?

2015-04-07 Thread Kyle Sluder
On Tue, Apr 7, 2015, at 02:49 PM, Dave wrote: > Hi All, > > Given the iOS/Cocoa-Touch code: > > [self addTarget:self action:@selector(buttonTouchUpInsideAction:) > forControlEvents:UIControlEventTouchUpInside]; > [self addTarget:self action:@selector(buttonTouchDownAction:) > forControlEvents:UI

Re: Making an array property without a backing store. How?

2015-04-07 Thread Greg Parker
> On Apr 6, 2015, at 7:01 PM, Daryle Walker wrote: > > I have an object like: > > @interface MyClass : NSObject > @property (readonly) NSArray * myDatumList; > @property NSArray * myDataList; > @end > > The second member is meant to be an actual data member, an array of mutable > dictionari

Re: Making an array property without a backing store. How?

2015-04-07 Thread Graham Cox
> On 8 Apr 2015, at 3:58 am, Daryle Walker wrote: > > Looking at the debugger again, I noticed that my BOOL property with a custom > getter (which simulates its result based on other member data) also has a > “_myFlag” backing store. Is there some setting we’re missing, or do I have to > file