Avoid smooth scrolling when scrolling programmatically

2011-09-12 Thread Stefan Haller
I need to set the scroll position of my NSScrollView programmatically, and I don't want it to scroll smoothly (if the user's "smooth scrolling" preference is on). I can't find a way how to do that. Calling scrollPoint: on my document view results in smooth scrolling. I thought that removing the s

how to get baseline info

2011-09-12 Thread Gerriet M. Denkmann
I have a subclass of NSTextView which does: - (void)setUpData { [ [ self textStorage ] setAttributedString: someAttributedString ]; // uses self.usedFont NSLayoutManager *layoutManager = [ self layoutManager ]; baselineOffset = [ layoutManager defaultBaselineOf

NSScanner to find multiple occurrences of a prefix?

2011-09-12 Thread Devraj Mukherjee
Hi all, I am trying to use NSScanner to change camel cased strings into underscore delimited strings, e.g featuredListingId to featured_listing_id I have worked our how to use NSScanner to achieve this, consider my implementation (implemented as a NSString category) - (NSString *) delimiterSepar

Re: NSScanner to find multiple occurrences of a prefix?

2011-09-12 Thread Jerry Krinock
On 2011 Sep 12, at 07:01, Devraj Mukherjee wrote: > Can I ask NSScanner to keep looking for multiple occurrences? Use something like while (![scanner isAtEnd]) { // your code } And be careful to consider all possibilities so you can't get an infinite loop.__

Problem with NSAppleScript execution

2011-09-12 Thread Nava Carmon
Hi list, I'm trying to run a simple Apple script, that gets the text from the frontmost application. Basically it simulates cmd+c click. It checks whether the clipboard is empty and if it is, it simulates the cmd+a and then cmd+c again. It doesn't work consistently. Sometimes it works and someti

iPad store ?

2011-09-12 Thread Phil Hystad
This may be off-topic but I am not sure of the right forum. Is there any way to deploy an iPad app other then the AppStore? I don't mean for development testing or other temporary purposes. Situation is the development of an application for a particular customer who would use the app for speci

Re: iPad store ?

2011-09-12 Thread Hunter Hillegas
There's an Enterprise program meant for internal deployments. http://developer.apple.com/programs/ios/enterprise/ On Sep 12, 2011, at 10:04 AM, Phil Hystad wrote: > Is there any way to deploy an iPad app other then the AppStore? I don't mean > for development testing or other temporary purpose

What is last number at end of crash log line?

2011-09-12 Thread lbland
hi- What does the 98 at the end of this line mean:? 8 com.apple.CoreFoundation0x7fff90662d32 -[NSMutableArray removeObjectsInRange:] + 98 … all the tech notes I can find explains everything else, but neglects describing that last number (as if it is not there) … thanks!- -

Re: What is last number at end of crash log line?

2011-09-12 Thread Bill Bumgarner
On Sep 12, 2011, at 10:27 AM, lbland wrote: > What does the 98 at the end of this line mean:? > > 8 com.apple.CoreFoundation 0x7fff90662d32 -[NSMutableArray > removeObjectsInRange:] + 98 > > > … all the tech notes I can find explains everything else, but neglects > describing

Re: iPad store ?

2011-09-12 Thread Phil Hystad
Thanks. I will look at that. PEH's iPhone On Sep 12, 2011, at 10:17 AM, Hunter Hillegas wrote: > There's an Enterprise program meant for internal deployments. > > http://developer.apple.com/programs/ios/enterprise/ > > On Sep 12, 2011, at 10:04 AM, Phil Hystad wrote: > >> Is there any way t

Disable autosave in place for a particular uti / filetype?

2011-09-12 Thread Gus Mueller
Is there any way to turn off 10.7's autosave in place for a particular uti/file type? Or maybe turn it on for a single file type? Here's my use case: I've got an image editor which can edit multiple types of files (png, jpeg, etc). Autosave is great for for its native format (.acorn) which is

any way to know where a UIBarButtonItem has been drawn?

2011-09-12 Thread Roland King
I have a toolbar with items on it. One of them is a trash can. When I delete something from the main screen I'd like it to 'minify' towards the trash can, well I think I would, I have to see what it looks like and see if the effect is as nice as I hope, I want to draw attention to where the 'thi

Re: Disable autosave in place for a particular uti / filetype?

2011-09-12 Thread Gus Mueller
On Sep 12, 2011, at 10:59 AM, Marco Tabini wrote: > Have you thought about adopting the same pattern taken by Photoshop, where > opening an image that is not in your native format simply creates a copy in > .acorn on which the user works? Your choices on save then are to (a) either > save a cop

Re: Disable autosave in place for a particular uti / filetype?

2011-09-12 Thread Kyle Sluder
On Mon, Sep 12, 2011 at 10:53 AM, Gus Mueller wrote: > Is there any way to turn off 10.7's autosave in place for a particular > uti/file type?  Or maybe turn it on for a single file type? Use a different NSDocument subclass for lossy file types? --Kyle Sluder ___

Re: iPad store ?

2011-09-12 Thread Kyle Sluder
On Mon, Sep 12, 2011 at 10:17 AM, Hunter Hillegas wrote: > There's an Enterprise program meant for internal deployments. > > http://developer.apple.com/programs/ios/enterprise/ And now that the iOS App Store has the B2B (Volume Purchase) program, you don't have to jump through hoops to sell apps

Re: Disable autosave in place for a particular uti / filetype?

2011-09-12 Thread Gus Mueller
On Sep 12, 2011, at 11:19 AM, Kyle Sluder wrote: > On Mon, Sep 12, 2011 at 10:53 AM, Gus Mueller wrote: >> Is there any way to turn off 10.7's autosave in place for a particular >> uti/file type? Or maybe turn it on for a single file type? > > Use a different NSDocument subclass for lossy fil

Re: Avoid smooth scrolling when scrolling programmatically

2011-09-12 Thread Kyle Sluder
On Mon, Sep 12, 2011 at 12:07 AM, Stefan Haller wrote: > I need to set the scroll position of my NSScrollView programmatically, > and I don't want it to scroll smoothly (if the user's "smooth scrolling" > preference is on).  I can't find a way how to do that. Why would you not want to scroll smoo

Re: Disable autosave in place for a particular uti / filetype?

2011-09-12 Thread Kyle Sluder
On Mon, Sep 12, 2011 at 11:23 AM, Gus Mueller wrote: > > On Sep 12, 2011, at 11:19 AM, Kyle Sluder wrote: > >> On Mon, Sep 12, 2011 at 10:53 AM, Gus Mueller wrote: >>> Is there any way to turn off 10.7's autosave in place for a particular >>> uti/file type?  Or maybe turn it on for a single file

Re: any way to know where a UIBarButtonItem has been drawn?

2011-09-12 Thread Fritz Anderson
On 12 Sep 2011, at 11:53 AM, Roland King wrote: > However .. I can't figure out what the frame for the UIBarButtonItem is .. > it's on a bar with items which change, some flexible space etc, so it's not a > fixed offset from either end of the the thing, and I can't find an API which > tells me

Re: any way to know where a UIBarButtonItem has been drawn?

2011-09-12 Thread Kyle Sluder
On Mon, Sep 12, 2011 at 9:53 AM, Roland King wrote: > I have a toolbar with items on it. One of them is a trash can. When I delete > something from the main screen I'd like it to 'minify' towards the trash can, > well I think I would, I have to see what it looks like and see if the effect > is

Re: Avoid smooth scrolling when scrolling programmatically

2011-09-12 Thread Stefan Haller
Kyle Sluder wrote: > On Mon, Sep 12, 2011 at 12:07 AM, Stefan Haller > wrote: > > I need to set the scroll position of my NSScrollView programmatically, > > and I don't want it to scroll smoothly (if the user's "smooth scrolling" > > preference is on). I can't find a way how to do that. > > W

Re: Submitting Mac App to the App Store

2011-09-12 Thread R
much thanks, I'll give Nick's work a try. On Sep 10, 2:34 pm, Indragie Karunaratne wrote: > https://github.com/nickpaulson/NPReceiptVerification > > Should simplify this procedure quite a bit. > > On 2011-09-10, at 2:28 PM, R wrote: > > > > > > > > > > > Wow, what a configuration mess for the new

Re: how to get baseline info

2011-09-12 Thread Aki Inoue
You can iterate through the line fragment positions using -[NSLayoutManager lineFragmentRectForGlyphIndex:effectiveRange:]. >From the line fragment origin, the baseline offset can be determine by using >-[NSTypesetter baselineOffsetInLayoutManager:glyphIndex:]. The typesetter can be obtained vi

Re: NSScanner to find multiple occurrences of a prefix?

2011-09-12 Thread Graham Cox
Typed into mail (no guarantee): NSScanner* scanner = [NSScanner scannerWithString:input]; NSMutableString* output = [NSMutableString string]; NSString* temp; [scanner setCaseSensitive:YES]; while( ![scanner isAtEnd]) { if([scanner scanUpToCharactersFromSet:[NSCharacterSet uppercaseLet

Re: NSScanner to find multiple occurrences of a prefix?

2011-09-12 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 9/12/11 7:01 AM, Devraj Mukherjee wrote: > Hi all, > > I am trying to use NSScanner to change camel cased strings into > underscore delimited strings, e.g featuredListingId to > featured_listing_id In addition to the responses you have already r

Re: Problem with NSAppleScript execution

2011-09-12 Thread Jerry Krinock
On 2011 Sep 12, at 08:50, Nava Carmon wrote: > I'm trying to run a simple Apple script, that gets the text from the > frontmost application. "Simple" is the way people who have never done this would describe it. > It doesn't work consistently. Sometimes it works and sometimes - doesn't. I pres

Re: any way to know where a UIBarButtonItem has been drawn?

2011-09-12 Thread Jamie Pinkham
If your use case permits, you can figure out the frame of the bar button item in it's action selector by giving the selector the following signature: - (void)barButtonAction:(UIBarButtonItem *)item event:(UIEvent *)event; You can then use the properties of UIEvent to get the touches location, or

web view moving in split view when keyboard comes up

2011-09-12 Thread Stephen Zyszkiewicz
I have a UIWebView loading a Sencha Touch html page in a split view. The autosizing for the web view is set to the left and top in Interface Builder with the four in the middle, right, and bottom disabled, although I've tried many combinations. The issue occurs when you touch in the sencha dial

Re: Problem with NSAppleScript execution

2011-09-12 Thread Nava Carmon
Thanks for answering, Jerry. On Sep 13, 2011, at 3:55 AM, Jerry Krinock wrote: > On 2011 Sep 12, at 08:50, Nava Carmon wrote: > >> I'm trying to run a simple Apple script, that gets the text from the >> frontmost application. > > "Simple" is the way people who have never done this would descri

strange values for boundingRectForGlyphRange with SE-Asian fonts

2011-09-12 Thread Gerriet M. Denkmann
I get the bounding rect for all glyphs in my TextView subclass and display them. Looks perfect: the boxes snugly fit the characters. But when a line contains any Thai character (similar for Laos, Burma, Khmer) then the boxes are strangly wide. Why? Is there some good reason for this? Or am I doi