Re: Possible causes of "attempted layout while textStorage is editing"?

2011-09-01 Thread jonat...@mugginsoft.com
On 1 Sep 2011, at 07:08, Gideon King wrote: > Here is the complete stack trace > > 2011-08-31 15:25:11 -0400[5]: ERROR - 14764064ms (NMApplication.m:81) > -[NMApplication handleRunException:] - NSException Exception encountered: > -[AAMainEditingLayoutManager > _fillLayoutHoleForCharacterRang

Re: setTitleWithMnemonic -- warning for deprecated API .

2011-09-01 Thread Rajendran P
Thanks for the reply . Is there a way to set an error or warning for use of deprecated API during compilation ? Thanks Rajendran P On 9/1/11 10:31 AM, "KappA" wrote: I never said I was using the "mnemonic" feature... just using it for setting plain text. Is that what you are curious to see?

Re: Possible causes of "attempted layout while textStorage is editing"?

2011-09-01 Thread Gideon King
Hmmm, I see that there is a place in my code where they can be editing the text view, and then they mouse down in its containing view, and that triggers an event to be posted through NSApp at the end of the event queue and an autorelease being sent to the enclosing view which would eventually re

Re: Won't Applescript command use defined ivars?

2011-09-01 Thread Chris Paveglio
Scott and Martin, thanks. I did not understand that NSScriptCommand made a new instance of itself each time it was called. Now it makes sense what was going on. I will try to use Scott's suggestion of a singleton or static for the connection object, and of course break things into different clas

Re: setTitleWithMnemonic -- warning for deprecated API .

2011-09-01 Thread Sean McBride
On Thu, 1 Sep 2011 17:02:20 +0530, Rajendran P said: >Thanks for the reply . Is there a way to set an error or warning for use >of deprecated API during compilation ? Yes, see the various warning checkboxes in Xcode. But it won't help because that API is not deprecated for some reason. I even

Re: Size of a file on disk

2011-09-01 Thread Sean McBride
On Wed, 31 Aug 2011 16:21:20 -0700, dct said: > NSFileHandle *hndl = [NSFileHandle fileHandleForReadingAtPath:path]; > long longlngth = [hndl seekToEndOfFile]; > >This gets you the length in bytes. Only for files small enough to fit in long long. It should be unsigned long long.

When and where to call [NSWindow setRestorationClass]?

2011-09-01 Thread Oleg Krupnov
Hi, I am implementing the Lion's User Interface Preservation, and must be overlooking something. The Mac OS X Application Programming Guide says: "Every window is expected to identify a class that knows about the window and can act on its behalf at launch time. This class is known as the restorat

Calendar Groups in CalCalendarStore

2011-09-01 Thread Torsten Curdt
In iCal you can organize your Calendars in a hierarchical fashion. But it seems like these relationships are not exposed via CalCalendarStore http://developer.apple.com/library/mac/#documentation/AppleApplications/Reference/CalendarStoreFramework/Classes/CalCalendarStore_Class/Reference/Reference.

Re: Calendar Groups in CalCalendarStore

2011-09-01 Thread Torsten Curdt
Actually ... there is a _group ivar but that's only in the headers - not in the documentation. I assume using that that would also be a rejection reason for the Mac App Store? cheers, Torsten ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Pleas

Re: setTitleWithMnemonic

2011-09-01 Thread Jerry Krinock
On 2011 Aug 31, at 22:01, KappA wrote: > I never said I was using the "mnemonic" feature... just using it for setting > plain text. Is that what you are curious to see? Sorry, I was wondering if maybe you were actually getting mnemonics in your menus. Never mind. On 2011 Sep 01, at 04:32, R

[Q] Handling "cancel" or "stop" button for NSProgressIndicator and on-going task

2011-09-01 Thread JongAm Park
Hello, I wrote codes to processing images on a second thread and the main thread displays and handles "progress dialog box". Because it is not possible to create a "UI thread" according to Cocoa framework, I had the main thread process the progress dialog box, while a second thread process imag

Overwhelming Options

2011-09-01 Thread Jeremy Matthews
I have an app with some groups of checkboxes...and it really takes up too much space in the UI. It is a utility app, but it has about 7 different matricies of about 6 checkboxes eachso lots of options...and it can be overwhelming at times. I'd like to design a better UI so as to not take up

Re: Overwhelming Options

2011-09-01 Thread Thomas Davie
Can I ask what your app is? I find it hard to believe that your user really needs to set 42 boolean flags. There must surely a better way to think about the configuration. Tom Davie if (*ra4 != 0xffc78948) { return false; } On 1 Sep 2011, at 17:36, Jeremy Matthews wrote: > I have an app with

Re: [Q] Handling "cancel" or "stop" button for NSProgressIndicator and on-going task

2011-09-01 Thread JongAm Park
Hmmm.. probably.. enterQTKitOnThread allows to create and initialize QTMovie objects on threads? On Sep 1, 2011, at 9:33 AM, JongAm Park wrote: > Hello, > > I wrote codes to processing images on a second thread and the main thread > displays and handles "progress dialog box". > Because it is

Re: Calendar Groups in CalCalendarStore

2011-09-01 Thread Kyle Sluder
On Thu, Sep 1, 2011 at 9:07 AM, Torsten Curdt wrote: > Actually ... there is a _group ivar but that's only in the headers - > not in the documentation. > I assume using that that would also be a rejection reason for the Mac App > Store? Yes, direct ivar access will cause your app to get rejected

Re: Overwhelming Options

2011-09-01 Thread Jens Alfke
On Sep 1, 2011, at 9:58 AM, Thomas Davie wrote: > Can I ask what your app is? I find it hard to believe that your user really > needs to set 42 boolean flags. There must surely a better way to think about > the configuration. Agreed. If Apple’s UI designers were looking at your app they’d st

Re: [Q] Handling "cancel" or "stop" button for NSProgressIndicator and on-going task

2011-09-01 Thread Robert Martin
No - creating the QT Movie must happen on the main thread - but after it's created, you can pass it off to secondary threads for processing… Rob On Sep 1, 2011, at 1:13 PM, JongAm Park wrote: > Hmmm.. probably.. enterQTKitOnThread allows to create and initialize QTMovie > objects on threads

Re: [Q] Handling "cancel" or "stop" button for NSProgressIndicator and on-going task

2011-09-01 Thread JongAm Park
Oh. Thank you for the information. I would like to make this message short because this is Cocoa mailing list not QuicTime mailing list. ( The topic was changed from Cocoa related question to QT one. ) BTW, I think I can create QTMovie in my case : This is from Tech Note TN2138 //

Re: Overwhelming Options

2011-09-01 Thread Jeremy Matthews
It's an internal app for "power users"...and its been a struggle to reduce it so far. I've been told that the current options need to stay putso no reducing for the moment. ...but I don't like it either... Thanks, j On Sep 1, 2011, at 1:51 PM, Jens Alfke wrote: > > On Sep 1, 2011, at 9:5

Re: Calendar Groups in CalCalendarStore

2011-09-01 Thread Torsten Curdt
>> Actually ... there is a _group ivar but that's only in the headers - >> not in the documentation. >> I assume using that that would also be a rejection reason for the Mac App >> Store? > > Yes, direct ivar access will cause your app to get rejected. We > tripped on this with historical use of i

Re: Overwhelming Options

2011-09-01 Thread Andy Lee
On Sep 1, 2011, at 12:36 PM, Jeremy Matthews wrote: > I have an app with some groups of checkboxes...and it really takes up too > much space in the UI. > > It is a utility app, but it has about 7 different matricies of about 6 > checkboxes eachso lots of options...and it can be overwhelming

Core Data Xcode 4 question

2011-09-01 Thread Andrew Kinnie
Greetings, I have a Core Data implementation, using generated subclasses of NSManagedObject for some of my entities. I used Xcode 4 to generate the initial subclass, then added other business rules methods as needed. I noticed, however, that the to-many relationship methods are stubbed in to

Re: Overwhelming Options

2011-09-01 Thread Quincey Morris
On Sep 1, 2011, at 11:48 , Jeremy Matthews wrote: > It's an internal app for "power users"...and its been a struggle to reduce it > so far. > I've been told that the current options need to stay putso no reducing > for the moment. There's no useful discussion possible without more informati

Re: Overwhelming Options

2011-09-01 Thread Jeremy Matthews
Quincy, Thanks for the feedback...right now I think I need to take some additional time and prototype some possible UI changes for more feedback. Problem with this situation is that it is difficult to get feedback...so essentially I'm told "add options, and then keep it the same"...which doesn'

Re: Calendar Groups in CalCalendarStore

2011-09-01 Thread Quincey Morris
On Sep 1, 2011, at 13:06 , Torsten Curdt wrote: >>> Actually ... there is a _group ivar but that's only in the headers - >>> not in the documentation. >>> I assume using that that would also be a rejection reason for the Mac App >>> Store? >> >> Yes, direct ivar access will cause your app to get

determine whether an ancillary program/task can run

2011-09-01 Thread Martin Wierschin
Hello all, My application sometimes need to run an ancillary program (included in the app's resources). I do this via NSTask and normally it works great. The problem is that this ancillary program is sometimes Intel-only, or sometimes PPC-only, while the main application is Universal. The use

Re: Core Data Xcode 4 question

2011-09-01 Thread Quincey Morris
On Sep 1, 2011, at 13:19 , Andrew Kinnie wrote: > I used Xcode 4 to generate the initial subclass, then added other business > rules methods as needed. I noticed, however, that the to-many relationship > methods are stubbed in to the .h file, but there is no implementation in the > .m file and

Re: determine whether an ancillary program/task can run

2011-09-01 Thread Dave DeLong
You could probably catch this before attempting to launch the task. Create a new NSBundle object pointing at the executable path, and then ask the bundle for the -executableArchitectures, and see if one of the returned values matches the architecture of the machine you're running. If it matches

Re: Core Data Xcode 4 question

2011-09-01 Thread Sean McBride
On Thu, 1 Sep 2011 16:19:07 -0400, Andrew Kinnie said: >I have a Core Data implementation, using generated subclasses of >NSManagedObject for some of my entities. > >I used Xcode 4 to generate the initial subclass, then added other >business rules methods as needed. I noticed, however, that the t

Re: Calendar Groups in CalCalendarStore

2011-09-01 Thread Torsten Curdt
> http://openradar.appspot.com/radar?id=1325406 > > The problem here is that you have no knowledge of what the "_group" ivar > represents, if anything. There are plenty of framework ivars that have been > abandoned but left in place so as not to change the layout of the rest of > the ivars. There a

Re: Core Data Xcode 4 question

2011-09-01 Thread Andrew Kinnie
Thanks. Maybe I'll try that. On Sep 1, 2011, at 5:10 PM, Quincey Morris wrote: > On Sep 1, 2011, at 13:19 , Andrew Kinnie wrote: > >> I used Xcode 4 to generate the initial subclass, then added other business >> rules methods as needed. I noticed, however, that the to-many relationship >>

Re: Core Data Xcode 4 question

2011-09-01 Thread Andrew Kinnie
Last I looked at mogenerator, it didn't support Xcode 4. On Sep 1, 2011, at 5:21 PM, Sean McBride wrote: > On Thu, 1 Sep 2011 16:19:07 -0400, Andrew Kinnie said: > >> I have a Core Data implementation, using generated subclasses of >> NSManagedObject for some of my entities. >> >> I used Xcode

Re: determine whether an ancillary program/task can run

2011-09-01 Thread Martin Wierschin
Hi Dave, Thanks for your reply. I was hoping to avoid handling that inspection myself, but even if I go that route there's another problem: the ancillary tool isn't a proper bundle, it's just a plain executable, so NSBundle's initializers will just return nil. That's a pity because there's even

Re: determine whether an ancillary program/task can run

2011-09-01 Thread Philip Ershler
On Sep 1, 2011, at 4:11 PM, Martin Wierschin wrote: > Hi Dave, > > Thanks for your reply. I was hoping to avoid handling that inspection myself, > but even if I go that route there's another problem: the ancillary tool isn't > a proper bundle, it's just a plain executable, so NSBundle's initia

Re: determine whether an ancillary program/task can run

2011-09-01 Thread Martin Wierschin
>> Thanks for your reply. I was hoping to avoid handling that inspection >> myself, but even if I go that route there's another problem: the ancillary >> tool isn't a proper bundle, it's just a plain executable, so NSBundle's >> initializers will just return nil. That's a pity because there's ev

Re: determine whether an ancillary program/task can run

2011-09-01 Thread Jens Alfke
On Sep 1, 2011, at 2:09 PM, Martin Wierschin wrote: > The problem is that this ancillary program is sometimes Intel-only, or > sometimes PPC-only, while the main application is Universal. The use of this > ancillary program is not mandatory, so displaying an error message, or using > a fallbac

Re: determine whether an ancillary program/task can run

2011-09-01 Thread Peter
Am 02.09.2011 um 00:19 schrieb Philip Ershler: > > On Sep 1, 2011, at 4:11 PM, Martin Wierschin wrote: > >> Hi Dave, >> >> Thanks for your reply. I was hoping to avoid handling that inspection >> myself, but even if I go that route there's another problem: the ancillary >> tool isn't a prope

Re: determine whether an ancillary program/task can run

2011-09-01 Thread Scott Ribe
On Sep 1, 2011, at 4:11 PM, Martin Wierschin wrote: > Offhand does anyone know how to inspect the architecture(s) of a plain > executable file? I've been googling for a little bit and haven't hit upon > anything that works yet. Use NSTask to launch lipo -info. (It's part of the standard install

Re: determine whether an ancillary program/task can run

2011-09-01 Thread Philip Ershler
On Sep 1, 2011, at 4:33 PM, Peter wrote: > > Am 02.09.2011 um 00:19 schrieb Philip Ershler: > >> >> On Sep 1, 2011, at 4:11 PM, Martin Wierschin wrote: >> >>> Hi Dave, >>> >>> Thanks for your reply. I was hoping to avoid handling that inspection >>> myself, but even if I go that route there

Re: determine whether an ancillary program/task can run

2011-09-01 Thread Martin Wierschin
>> The problem is that this ancillary program is sometimes Intel-only, or >> sometimes PPC-only, while the main application is Universal. The use of this >> ancillary program is not mandatory, so displaying an error message, or using >> a fallback solution is acceptable. The issue is that trying

Re: determine whether an ancillary program/task can run

2011-09-01 Thread Martin Wierschin
>> Offhand does anyone know how to inspect the architecture(s) of a plain >> executable file? I've been googling for a little bit and haven't hit upon >> anything that works yet. > > Use NSTask to launch lipo -info. (It's part of the standard install; does not > require dev tools.) Thank you S

Re: Core Data Xcode 4 question

2011-09-01 Thread Sixten Otto
On Thu, Sep 1, 2011 at 2:56 PM, Andrew Kinnie wrote: > Last I looked at mogenerator, it didn't support Xcode 4. mogenerator supports Xcode 4 just fine (it's the command-line tool). It's Xmo'd (the Xcode plugin) that no longer works. So, you need to regenerate the code manually when you change the

Re: determine whether an ancillary program/task can run

2011-09-01 Thread Scott Ribe
On Sep 1, 2011, at 5:07 PM, Martin Wierschin wrote: > Thank you Scott, that's good to know. And I just noticed it even has a nice > "-verify_arch" option, so I'm not stuck parsing output. I guess this is the > best solution. Oh, that's cool. There's probably a UNIX system call for this without

Re: determine whether an ancillary program/task can run

2011-09-01 Thread Rainer Brockerhoff
On 01/09/2011, at 20:17, cocoa-dev-requ...@lists.apple.com wrote: > From: Martin Wierschin > Date: 1 de setembro de 2011 19:11:24 BRT > To: Dave DeLong > Cc: Cocoa Dev List > > Offhand does anyone know how to inspect the architecture(s) of a plain > executable file? I've been googling for a l

Replacement for MethodReplacement?

2011-09-01 Thread James Walker
The sample code page describes it as "Objective C 2.0 compatible class_poseAs() replacement. This demonstrates how to replace a method in an existing Objective C class, and how to call the old versi

Re: Core Data Xcode 4 question

2011-09-01 Thread tim lindner
Quincey Morris wrote: > I haven't needed to update any Core Data apps since Xcode 4.x, so I don't > know if it's now trying to do something cleverer than what I described in > the previous paragraph. > I started a new core data, document based application in Xcode 4.1 recently and it did, in fa

Re: determine whether an ancillary program/task can run

2011-09-01 Thread Ken Thomases
On Sep 1, 2011, at 6:42 PM, Rainer Brockerhoff wrote: > On 01/09/2011, at 20:17, cocoa-dev-requ...@lists.apple.com wrote: >> From: Martin Wierschin >> Date: 1 de setembro de 2011 19:11:24 BRT >> To: Dave DeLong >> Cc: Cocoa Dev List >> >> Offhand does anyone know how to inspect the architectur

Re: Core Data Xcode 4 question

2011-09-01 Thread Steve Steinitz
Hi Andrew, I get this mailing list in digest form so hope I'm not too late to chime in with what a wonderful tool Jonathan “Wolf” Rentzsch has given to us and has continued to maintain over the years. I never did use the Xcode plugin and so am used to the command line interface. Install moge

Re: Large over 100K pixel high ruler scroll view

2011-09-01 Thread Graham Cox
On 31/08/2011, at 2:49 PM, Julie Porter wrote: > I have the idea that a class, MyDocument is instantiated with an array > myEvents, each time a file is opened. No, an OBJECT INSTANCE whose class is MyDocument is created when you open a file. This document object HAS an array, myEvents. This

Re: Large over 100K pixel high ruler scroll view

2011-09-01 Thread Julie Porter
Graham and others reading this thread; Jens Alfke and I took this discussion off list. He was able, as we have had similar background at apple to explain things, so that I mostly understand them. Enough to make the connection in interface builder and get my window scrolling. The last few

NSScrollView animation (animate scroll point)

2011-09-01 Thread Indragie Karunaratne
This has been asked a few times before, but not after Lion was released so I figured I'd ask again. Is there any way to animate the scroll point of an NSScrollView? I figure that animation must be possible somehow, considering that inertial scrolling is basically animating the scroll point. I ex