Re: NSInteger compare - Help Needed

2010-07-18 Thread Sherm Pendley
On Sun, Jul 18, 2010 at 1:21 PM, Steve Wetzel wrote: > Thanks guys, that was the problem,  There are so many little things to learn > with Objective C. Out of curiosity, what programming language are you comparing it to? I've used *many* of them over the past twenty years, and I can't think of a

Re: NSInteger compare - Help Needed

2010-07-18 Thread Dave Carrigan
On Jul 18, 2010, at 10:21 AM, Steve Wetzel wrote: > Thanks guys, that was the problem, There are so many little things to learn > with Objective C. The difference between the < operator and the << operator is not confined to Objective-C; it's part of the C language. You should probably fin

Re: NSInteger compare - Help Needed

2010-07-18 Thread Steve Wetzel
Thanks guys, that was the problem, There are so many little things to learn with Objective C. Steve Steve’s daily photo blog On Jul 17, 2010, at Jul 17:3:04 PM, Carter Allen wrote: > Steve, > > Have you tried changing "<<" in your code to simply "<"? That may work. > > - Carter Allen >

Re: NSInteger compare - Help Needed

2010-07-17 Thread Carter Allen
Steve, Have you tried changing "<<" in your code to simply "<"? That may work. - Carter Allen On Jul 17, 2010, at 1:58 PM, Steve Wetzel wrote: > Hi all, > > I am new to Cocoa programming and am trying to do something that I thought > was straightforward but not working. I am using the tag fi

Re: NSInteger compare - Help Needed

2010-07-17 Thread Greg Guerin
Steve Wetzel wrote: if ([sender tag] << 10) { The << operator is LEFT-SHIFT. The < operator is LESS-THAN. If you want to understand what your code is doing, think about what happens when the numbers 0-9 are left-shifted by 10 bits. -- GG