checking if directory is writable

2012-01-10 Thread Rick C.
Hi, Just looking for confirmation, I can use NSFileManager isWritableAtPath: if I want to check if a directory can be written to correct? Or do I have to use attributesOfItemAtPath:error:? I don't need to change permissions just to see if it's writable. Thanks! rc___

Re: checking if directory is writable

2012-01-10 Thread Mike Abdullah
In order of preference, the best technique last: 1. -attributesOfItemAtPath:error: — can only give you some info info on if the file is writable 2. -isWritableAtPath: — takes more into account, but can't be sure. Gives you no details on *why* isn't wri

NSTimer and touch events

2012-01-10 Thread Eric E. Dolecki
This is odd. Perhaps I need coffee. I have an app where I hide something by default (UIView). touchesBegan will make it visible. touchesMoved keeps visible. touchesEnded after 2 seconds. My method is never getting called. In my .h NSTimer *screenTimer; ... @property(nonatomic,retain) NSTimer *scr

Re: NSTimer and touch events

2012-01-10 Thread Ben Kennedy
On 10 Jan 2012, at 12:03 pm, Eric E. Dolecki wrote: >screenTimer = [NSTimer timerWithTimeInterval:2 target:self selector: > @selector(turnOffScreen:) userInfo:nil repeats:NO]; You need scheduledTimerWithTimeInterval:... (as opposed to just timerWithTimeInterval:...), in order for the timer t

Respecting tabs across applications

2012-01-10 Thread James Merkel
In my application I tab text (Helvetica 12 font) so that things line up in my application window. If I copy a text selection out of my app window and then look at the clipboard, the text looks the same as in my window. If the clipboard is then pasted into a new TextEdit window or a new TextWran

Re: NSTimer and touch events

2012-01-10 Thread Eric E. Dolecki
Haha. Thanks for catching that!!! Google Voice: (508) 656-0622 Twitter: eric_dolecki XBoxLive: edolecki PSN: eric_dolecki http://blog.ericd.net On Tue, Jan 10, 2012 at 3:11 PM, Ben Kennedy wrote: > On 10 Jan 2012, at 12:03 pm, Eric E. Dolecki wrote: > > >screenTimer = [NS

Re: Respecting tabs across applications

2012-01-10 Thread Jens Alfke
On Jan 10, 2012, at 12:49 PM, James Merkel wrote: > In my application I tab text (Helvetica 12 font) so that things line up in my > application window. > If I copy a text selection out of my app window and then look at the > clipboard, the text looks the same as in my window. > If the clipboar

Re: Respecting tabs across applications

2012-01-10 Thread James Merkel
On Jan 10, 2012, at 1:20 PM, Jens Alfke wrote: > > On Jan 10, 2012, at 12:49 PM, James Merkel wrote: > >> In my application I tab text (Helvetica 12 font) so that things line up in >> my application window. >> If I copy a text selection out of my app window and then look at the >> clipboard,

Re: Respecting tabs across applications

2012-01-10 Thread Jens Alfke
On Jan 10, 2012, at 2:00 PM, James Merkel wrote: > In fact, I am using multiple consecutive tab characters to force things to > line up -- i.e. a sure recipe for disaster. The trouble with that is that the number of tabs you’ll need depends on the width of each item, and that’s highly dependen

Re: Respecting tabs across applications

2012-01-10 Thread James Merkel
On Jan 10, 2012, at 4:52 PM, Jens Alfke wrote: > > On Jan 10, 2012, at 2:00 PM, James Merkel wrote: > >> In fact, I am using multiple consecutive tab characters to force things to >> line up -- i.e. a sure recipe for disaster. > > The trouble with that is that the number of tabs you’ll need d

Re: checking if directory is writable

2012-01-10 Thread Rick C.
Great thanks Mike! On Jan 10, 2012, at 8:03 PM, Mike Abdullah wrote: > In order of preference, the best technique last: > > 1. -attributesOfItemAtPath:error: — can only give you some info > info on if the file is writable > 2. -isWritableAtPath: — takes

Re: Respecting tabs across applications

2012-01-10 Thread Scott Ribe
On Jan 10, 2012, at 6:45 PM, James Merkel wrote: > The strings are tabbed for Helvetica Regular 12 point font. That sentence, right there, makes no sense at all. Once you understand that, you'll understand the whole problem. (Hint: what is a "tab" character and what will its width be?) -- Sco

Re: Respecting tabs across applications

2012-01-10 Thread Jens Alfke
On Jan 10, 2012, at 5:45 PM, James Merkel wrote: > The strings are tabbed for Helvetica Regular 12 point font. So yes if the > font is changed the tabs would change. I *think* what you mean there is that the layout works with whatever NSParagraphStyle’s default tab stops are — I think they’re

Alias, Dock drag, and NSOpenPanel

2012-01-10 Thread Lee Ann Rucker
Sketch (and my app) behaves very differently from TextEdit when it comes to alias files: Create several aliases to your app's documents. In the NSOpenPanel you get from File->Open, Sketch can only select one alias at a time. TextEdit can do multiple selections. Drag the alias to your Dock icon

Re: Respecting tabs across applications

2012-01-10 Thread James Merkel
On Jan 10, 2012, at 6:54 PM, Jens Alfke wrote: > I *think* what you mean there is that the layout works with whatever > NSParagraphStyle’s default tab stops are Ok, there's something I didn't understand -- the default NSParagraphStyle is being applied to my string. So, I am supposed to modify