Re: programmatically sorting an NSTableView

2011-07-12 Thread Ken Thomases
On Jul 12, 2011, at 9:24 PM, James Walker wrote: > On 7/12/2011 6:14 PM, Ken Thomases wrote: >> On Jul 12, 2011, at 5:36 PM, James Walker wrote: >> >>> On 7/12/2011 2:04 PM, Ken Thomases wrote: >>> Invoking -setSortDescriptors: on the array controller does sort it (or should). Ba

Re: iOS: Differentiating between 1 or 2 finger touches

2011-07-12 Thread Nathan Sims
On Jul 12, 2011, at 8:33 PM, Roland King wrote: > On Jul 13, 2011, at 11:27, Nathan Sims wrote: > >> If I put one finger down on the UIView, I get a -touchesBegan:withEvent: >> event. If I keep that finger down and put another down also I don't seem to >> get any event at all. Is there a way to

Re: Why can't I do "new uint32_t[ size ]"

2011-07-12 Thread Scott Ribe
On Jul 12, 2011, at 12:58 PM, Mark Wagner wrote: > ...because the fragment you posted isn't valid C++: you can't execute > code (the call to "new") outside a function. Sure you can. That's C that only only lets you initialize variables at file scope with constant expressions. -- Scott Ribe sco

Re: iOS: Differentiating between 1 or 2 finger touches

2011-07-12 Thread Roland King
Is the view multi touch enabled. Are you sure by the way you can't use a gesture recognizer for what you're doing? If you can, they make life a whole lot simpler. On Jul 13, 2011, at 11:27, Nathan Sims wrote: > On Jul 12, 2011, at 5:28 PM, Greg Parker wrote: >> On Jul 12, 2011, at 4:49 PM, Na

Re: iOS: Differentiating between 1 or 2 finger touches

2011-07-12 Thread Nathan Sims
On Jul 12, 2011, at 5:28 PM, Greg Parker wrote: > On Jul 12, 2011, at 4:49 PM, Nathan Sims wrote: >> On Jul 12, 2011, at 4:46 PM, Fritz Anderson wrote: >>> On 12 Jul 2011, at 6:30 PM, Nathan Sims wrote: I have a, iOS 4.3.3 UIView that is touch-enabled. When my -touchesBegan:withEvent: me

Re: programmatically sorting an NSTableView

2011-07-12 Thread James Walker
On 7/12/2011 6:14 PM, Ken Thomases wrote: On Jul 12, 2011, at 5:36 PM, James Walker wrote: On 7/12/2011 2:04 PM, Ken Thomases wrote: Invoking -setSortDescriptors: on the array controller does sort it (or should). Back on 10.4, it may have been necessary to follow that with a call to -rearran

Re: programmatically sorting an NSTableView

2011-07-12 Thread Ken Thomases
On Jul 12, 2011, at 5:36 PM, James Walker wrote: > On 7/12/2011 2:04 PM, Ken Thomases wrote: > >> Invoking -setSortDescriptors: on the array controller does sort it (or >> should). >> Back on 10.4, it may have been necessary to follow that with a call to >> -rearrangeObjects. > > -[NSArrayCont

Re: iOS: Differentiating between 1 or 2 finger touches

2011-07-12 Thread Greg Parker
On Jul 12, 2011, at 4:49 PM, Nathan Sims wrote: > On Jul 12, 2011, at 4:46 PM, Fritz Anderson wrote: >> On 12 Jul 2011, at 6:30 PM, Nathan Sims wrote: >>> I have a, iOS 4.3.3 UIView that is touch-enabled. When my >>> -touchesBegan:withEvent: method gets called, I can't figure out how to >>> diffe

Re: iOS: Differentiating between 1 or 2 finger touches

2011-07-12 Thread Nathan Sims
On Jul 12, 2011, at 4:46 PM, Fritz Anderson wrote: > On 12 Jul 2011, at 6:30 PM, Nathan Sims wrote: > >> I have a, iOS 4.3.3 UIView that is touch-enabled. When my >> -touchesBegan:withEvent: method gets called, I can't figure out how to >> differentiate when the user touched the screen with on

Re: iOS: Differentiating between 1 or 2 finger touches

2011-07-12 Thread Fritz Anderson
On 12 Jul 2011, at 6:30 PM, Nathan Sims wrote: > I have a, iOS 4.3.3 UIView that is touch-enabled. When my > -touchesBegan:withEvent: method gets called, I can't figure out how to > differentiate when the user touched the screen with one finger or with two. > Either way, I receive this: > > t

iOS: Differentiating between 1 or 2 finger touches

2011-07-12 Thread Nathan Sims
I have a, iOS 4.3.3 UIView that is touch-enabled. When my -touchesBegan:withEvent: method gets called, I can't figure out how to differentiate when the user touched the screen with one finger or with two. Either way, I receive this: timestamp: 423888 touches: {( phase: Began tap count: 1

Re: programmatically sorting an NSTableView

2011-07-12 Thread James Walker
> Am 12.07.2011 um 22:43 schrieb James Walker: > >> I have an NSTableView containing one column, which is bound to an >> NSArrayController. I've set a sort key and selector for the column >> in IB, and I've called setSortDescriptors: on the array controller. >> Clicking the column header sorts it

Re: programmatically sorting an NSTableView

2011-07-12 Thread Ken Thomases
On Jul 12, 2011, at 3:43 PM, James Walker wrote: > I have an NSTableView containing one column, which is bound to an > NSArrayController. I've set a sort key and selector for the column in IB, > and I've called setSortDescriptors: on the array controller. Clicking the > column header sorts it,

programmatically sorting an NSTableView

2011-07-12 Thread James Walker
I have an NSTableView containing one column, which is bound to an NSArrayController. I've set a sort key and selector for the column in IB, and I've called setSortDescriptors: on the array controller. Clicking the column header sorts it, but how can I sort programmatically? It seems odd that

Re: Removing (foo) from a NSString

2011-07-12 Thread Jens Alfke
On Jul 12, 2011, at 12:42 PM, Fritz Anderson wrote: > It should be easy to walk the string with NSScanner. I always end up taking the ghetto route and just using -rangeOfSubstring: and substringWithRange: for stuff like this. It would probably be cleaner to use NSScanner though, at least until

Re: Removing (foo) from a NSString

2011-07-12 Thread Wim Lewis
On 12 Jul 2011, at 12:42 PM, Fritz Anderson wrote: > On 12 Jul 2011, at 2:23 PM, Eric E. Dolecki wrote: >> What would be the easiest way to strip out parens and everything between >> them from an NSString? >> >> Into The Fire (Live) >> becomes >> Into The Fire > > NSRegularExpression will do, bu

Re: Removing (foo) from a NSString

2011-07-12 Thread Thomas Davie
On 12 Jul 2011, at 20:23, Eric E. Dolecki wrote: > What would be the easiest way to strip out parens and everything between > them from an NSString? It's slightly overkill for the situation, but CoreParse (http://www.github.org/beelsebob) will deal with nested parens quite happily.

Re: Removing (foo) from a NSString

2011-07-12 Thread Fritz Anderson
On 12 Jul 2011, at 2:23 PM, Eric E. Dolecki wrote: > What would be the easiest way to strip out parens and everything between > them from an NSString? > > Into The Fire (Live) > becomes > Into The Fire NSRegularExpression will do, but it is iOS-only (so far) and doesn't help you with nesting.

Removing (foo) from a NSString

2011-07-12 Thread Eric E. Dolecki
What would be the easiest way to strip out parens and everything between them from an NSString? Into The Fire (Live) becomes Into The Fire Thanks, Eric ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderat

Re: iOS: String Drawing

2011-07-12 Thread Kyle Sluder
On Tue, Jul 12, 2011 at 9:26 AM, Development wrote: > Well because the label can be rotated, I had to stick it inside of another > view (Otherwise when I moved or scaled it, the whole thing went nuts). So in > that view's code where the actual  shadow was set it resizes it's rectangle > as well

Re: Autosizing mask doesn't work with NSSegmentedControl

2011-07-12 Thread Jens Alfke
On Jul 12, 2011, at 2:16 AM, Filip van der Meeren wrote: > I have set up an NSSegmentedControl in IB with the autosizingmasks but the > control won't stretch or shrink as it should. Any clue about why? I have > searched the google pages and the apple doc but came up empty. NSSegmentedControl d

Re: Augmented Reality App

2011-07-12 Thread WT
Hi Paul, just yesterday I came across the following, which is very simple but might still be useful to your team: http://www.raywenderlich.com/3997/introduction-to-augmented-reality-on-the-iphone Hope that helps. WT On 11 Jul 2011, at 23:03, Paul Scott wrote: > Anyone that has done an app rel

Re: iOS: String Drawing

2011-07-12 Thread Development
Well because the label can be rotated, I had to stick it inside of another view (Otherwise when I moved or scaled it, the whole thing went nuts). So in that view's code where the actual shadow was set it resizes it's rectangle as well as the label's. However, on the bright side using CALayer f

Re: Adding Spotlight comment data to folder/file

2011-07-12 Thread Gerd Knops
On Jul 12, 2011, at 10:34 AM, Kyle Sluder wrote: > On Jul 12, 2011, at 3:24 AM, Kevin Muldoon wrote: > >> Of course, I'm not writing a file format but simply creating folders and >> moving files. Very enlightening stuff. Thanks for weighing in on the subject. > > Ah. Yeah, it would be nice if

Re: iOS: String Drawing

2011-07-12 Thread David Duncan
On Jul 11, 2011, at 11:49 PM, Development wrote: >CGSize newSize = rect.size; >CGSize imgSize = [self.text sizeWithFont:self.font]; >imgSize.width +=6; //this does nothing > //everything below adjusts for the shadow which is a flipping train > wreck of its own. > CGPoint

Re: CAOpenGLLayer content size

2011-07-12 Thread David Duncan
On Jul 8, 2011, at 11:33 PM, Takashi Mochizuki wrote: > Default CAOpenGLLayer keeps initial buffer size when addSubLayer: is called. > And it does not update back buffer size even when layer is resized like: > > 1. addSubLayer to 200x200 > 2. resize layer to 400x400 > 3. layer only shows 200x200

Re: Adding Spotlight comment data to folder/file

2011-07-12 Thread Kyle Sluder
On Jul 12, 2011, at 3:24 AM, Kevin Muldoon wrote: > Of course, I'm not writing a file format but simply creating folders and > moving files. Very enlightening stuff. Thanks for weighing in on the subject. Ah. Yeah, it would be nice if Spotlight were designed with this case in mind. I think the

Re: iOS: String Drawing

2011-07-12 Thread Development
Ok… Thank you very much both of you, I missed radius and opacity. Those were the two things I wanted which I was using my code to get On Jul 12, 2011, at 6:36 AM, Jeff Kelley wrote: > To echo Graham’s point, you can also use the CALayer of the label and modify > its properties to get a more cus

Re: iOS: String Drawing

2011-07-12 Thread Jeff Kelley
To echo Graham’s point, you can also use the CALayer of the label and modify its properties to get a more customized appearance. You’ve got shadowColor, shadowOffset, shadowOpacity, shadowPath, and shadowRadius. Between those properties and the label’s built-in shadow support, there’s a lot of cust

Re: Autosizing mask doesn't work with NSSegmentedControl

2011-07-12 Thread Fritz Anderson
On 12 Jul 2011, at 4:16 AM, Filip van der Meeren wrote: > I have set up an NSSegmentedControl in IB with the autosizingmasks but the > control won't stretch or shrink as it should. Any clue about why? I have > searched the google pages and the apple doc but came up empty. Examine the view hiera

Re: Adding Spotlight comment data to folder/file

2011-07-12 Thread Kevin Muldoon
Of course, I'm not writing a file format but simply creating folders and moving files. Very enlightening stuff. Thanks for weighing in on the subject. Sent from my iPhone On Jul 11, 2011, at 10:51 PM, Kyle Sluder wrote: > On Mon, Jul 11, 2011 at 6:31 PM, Kevin Muldoon wrote: >> Program is a

Re: iOS: String Drawing

2011-07-12 Thread Graham Cox
AFAIK, you don't have to subclass UILabel - it has a shadowColor/offset property that you can set as you wish, and it should all "just work". Sure, the default values are sometimes a bit questionable, but all you need to do is to set those shadow properties in IB or in code. You're doing way to

Autosizing mask doesn't work with NSSegmentedControl

2011-07-12 Thread Filip van der Meeren
Hi everyone, I have set up an NSSegmentedControl in IB with the autosizingmasks but the control won't stretch or shrink as it should. Any clue about why? I have searched the google pages and the apple doc but came up empty. Thanks, Filip___ Cocoa