Re: Keeping a menu enabled with a modal dialog running

2012-10-28 Thread Kyle Sluder
On Oct 28, 2012, at 3:40 PM, Graham Cox wrote: > Hi all, > > I have a menu item that should be available in my app no matter what. > Currently its target is the app delegate and it does not go through First > Responder. However, it is greyed out when a modal dialog is running which is > annoy

Keeping a menu enabled with a modal dialog running

2012-10-28 Thread Graham Cox
Hi all, I have a menu item that should be available in my app no matter what. Currently its target is the app delegate and it does not go through First Responder. However, it is greyed out when a modal dialog is running which is annoying. Is there a way to ensure that such a menu can still be r

Re: variable problem is driving me nuts

2012-10-28 Thread Kyle Sluder
On Oct 28, 2012, at 12:01 PM, Jens Alfke wrote: > > On Oct 28, 2012, at 1:37 AM, Kyle Sluder wrote: > >>> In general, initialization code like this in a nib-loaded object should go >>> into its -awakeFromNib method, which is [almost] guaranteed to be the first >>> method invoked on that obje

Re: variable problem is driving me nuts

2012-10-28 Thread gweston
H Miersch wrote:  then why does Xcode complain about an unused result? this is just another example of a TOTALLY USELESS error message. anyway, i fixed it, and now it works. thanks. ok, it looks like i've sorted the original problem. but here's the next one: i have this line: for (i = 0; i

Re: Warning message using stringWithContentsOfFile:encoding:error:

2012-10-28 Thread gweston
Quincey Morris wrote No matter what you do, file a bug with the 3rd-party framework. Their macros should not leak. The thing that bothers me is why macros should be substituting into method parameter names at all. It potentially brings *pieces* of method names into the global symbol namespa

Re: Warning message using stringWithContentsOfFile:encoding:error:

2012-10-28 Thread Jens Alfke
On Oct 28, 2012, at 11:03 AM, Quincey Morris wrote: > The thing that bothers me is why macros should be substituting into method > parameter names at all. The preprocessor barely knows anything about C syntax, let alone Obj-C. Remember, it’s running before the parser — all it gets is a strea

Re: variable problem is driving me nuts

2012-10-28 Thread Jens Alfke
On Oct 28, 2012, at 1:37 AM, Kyle Sluder wrote: >> In general, initialization code like this in a nib-loaded object should go >> into its -awakeFromNib method, which is [almost] guaranteed to be the first >> method invoked on that object. > > Actually, the NSTableView docs explicitly warn tha

Re: Warning message using stringWithContentsOfFile:encoding:error:

2012-10-28 Thread Quincey Morris
On Oct 28, 2012, at 10:37 , Kyle Sluder wrote: > No matter what you do, file a bug with the 3rd-party framework. Their macros > should not leak. The thing that bothers me is why macros should be substituting into method parameter names at all. It potentially brings *pieces* of method names int

Re: Warning message using stringWithContentsOfFile:encoding:error:

2012-10-28 Thread Kyle Sluder
On Oct 28, 2012, at 10:23 AM, Paul Johnson wrote: > Thanks, Nick and Gary. You are absolutely right. I found 'error' is being > defined in a 3rd-party framework I'm using. > > Then there is the question of how to work around this, so I can use the > NSString class method. If you can suggest a so

Re: Warning message using stringWithContentsOfFile:encoding:error:

2012-10-28 Thread Paul Johnson
Thanks, Nick and Gary. You are absolutely right. I found 'error' is being defined in a 3rd-party framework I'm using. Then there is the question of how to work around this, so I can use the NSString class method. If you can suggest a solution I would be grateful. On Sat, Oct 27, 2012 at 7:41 PM,

Re: Warning message using stringWithContentsOfFile:encoding:error:

2012-10-28 Thread Andy Lee
(Sorry again if the list gets this twice. I am going to strangle whoever thought it was a good idea to give me a me.com address as an alias for my mac.com address -- AND have Mail.app use one when I meant the other.) On Oct 28, 2012, at 12:04 PM, Andy Lee wrote: > I Googled "Rf_error" and ther

Re: Warning message using stringWithContentsOfFile:encoding:error:

2012-10-28 Thread Andy Lee
(Sorry if the list gets this twice. I am going to strangle whoever thought it was a good idea to give me a me.com address as an alias for my mac.com address.) On Oct 27, 2012, at 6:04 PM, Paul Johnson wrote: > I get a compiler warning message at the following line of code: > > NSString *text =

Re: variable problem is driving me nuts

2012-10-28 Thread Mike Abdullah
On 28 Oct 2012, at 01:18, M Pulis wrote: > clients is not (yet) a proper NSMutableArray.. > > Try one of the init methods within the NSMutableArray. I'm sorry? -init is a perfectly reasonable method to call here. ___ Cocoa-dev mailing list (Cocoa-d

Re: variable problem is driving me nuts

2012-10-28 Thread Roland King
On 28 Oct, 2012, at 8:01 PM, H Miersch wrote: > then why does Xcode complain about an unused result? this is just another > example of a TOTALLY USELESS error message. > > anyway, i fixed it, and now it works. thanks. > > On 28. Oct 2012, at 11:56, Roland King wrote: > >> >> On 28 Oct, 20

Re: variable problem is driving me nuts

2012-10-28 Thread Antonio Nunes
On 28 Oct, 2012, at 12:50 , H Miersch wrote: > ok, it looks like i've sorted the original problem. but here's the next one: > > i have this line: > > for (i = 0; i++; i < count) {…} > > in the app delegate. Xcode keeps giving me this warning: expression result > unused. WTF? that is correct s

Re: variable problem is driving me nuts

2012-10-28 Thread H Miersch
then why does Xcode complain about an unused result? this is just another example of a TOTALLY USELESS error message. anyway, i fixed it, and now it works. thanks. On 28. Oct 2012, at 11:56, Roland King wrote: > > On 28 Oct, 2012, at 7:50 PM, H Miersch wrote: > >> ok, it looks like i've so

Re: variable problem is driving me nuts

2012-10-28 Thread Koen van der Drift
On Oct 28, 2012, at 7:50 AM, H Miersch wrote: > for (i = 0; i++; i < count) {…} That should be for (i=0; i < count; i++) {} ;-) - Koen. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments

Re: variable problem is driving me nuts

2012-10-28 Thread Roland King
On 28 Oct, 2012, at 7:50 PM, H Miersch wrote: > ok, it looks like i've sorted the original problem. but here's the next one: > > i have this line: > > for (i = 0; i++; i < count) {…} > > in the app delegate. Xcode keeps giving me this warning: expression result > unused. WTF? that is correct

Re: variable problem is driving me nuts

2012-10-28 Thread H Miersch
ok, it looks like i've sorted the original problem. but here's the next one: i have this line: for (i = 0; i++; i < count) {…} in the app delegate. Xcode keeps giving me this warning: expression result unused. WTF? that is correct syntax for a for loop, isn't it? so then why do i keep getting

Re: Binding alignment property of NSTextField

2012-10-28 Thread Luc Van Bogaert
I have confirmed that the viewcontroller property is set correctly. While trying to find out why the textfield alignment isn't updated accordingly through the binding, I have found that when I set the textfield's stringValue (eg. to the same string), the alignment does get updated to its correct

Re: variable problem is driving me nuts

2012-10-28 Thread Kyle Sluder
On Oct 27, 2012, at 6:02 PM, Jens Alfke wrote: > In general, initialization code like this in a nib-loaded object should go > into its -awakeFromNib method, which is [almost] guaranteed to be the first > method invoked on that object. Actually, the NSTableView docs explicitly warn that this is