Re: NSLayoutManager's setDefaultAttachmentScaling: not working in custom PDF NSContexts.

2012-01-31 Thread Gus Mueller
On Jan 30, 2012, at 2:22 PM, Michael Nickerson wrote: > Hmm, I don't have an answer for you, but I looked at the code. I did a > little subclassing of NSLayoutManager, and it looks like the text attachment > cell is just ignoring the size given to draw the image in and drawing it full > size.

Re: Core Data Entity And Attribute Names In XML Store

2012-01-31 Thread Jens Alfke
On Jan 30, 2012, at 1:34 PM, Richard Somers wrote: > Why does Core Data change entity names to upper case and attribute names to > lower case in the XML store? I don’t know; but the format of that XML is supposed to be private to CoreData, not something your app should try to read or write. (S

Re: Update of Typography panel

2012-01-31 Thread Martin Wierschin
> But if i set a new active font with [[NSFontManager sharedFontManager] > setSelectedFont:isMultiple:], an already opened Typography panel is not > adjusted to the features of the new font. Instead it continues to show the > features of the last font. > > How can I refresh the Typography panel

Block Confusion...

2012-01-31 Thread R
I thought I understood block until today Here is my situation: One class creates a STRONG pointer to a NSMutableArray. It then passes that pointer to another class, which has a WEAK reference. that class is listed below. When I fork a new thread for the simpleBlock, I lose the pointer. I t

Re: Core Data Entity And Attribute Names In XML Store

2012-01-31 Thread Richard Somers
On Jan 30, 2012, at 6:27 PM, Jens Alfke wrote: > On Jan 30, 2012, at 1:34 PM, Richard Somers wrote: > >> Why does Core Data change entity names to upper case and attribute names to >> lower case in the XML store? > > I don’t know; but the format of that XML is supposed to be private to > CoreD

Re: How do you run an app on the device with Instruments?

2012-01-31 Thread G S
Thanks guys, but you can't attach to a process with Leaks. This turned out to be a bug in Xcode 4.2, apparently. The app simply never ran. Someone mentioned that Xcode 4.2.1 existed (I must've missed the notification somehow), so I downloaded it and installed it. Instruments and Leaks now work,

Re: iCloud On OSX - Cannot save changes

2012-01-31 Thread Michael Swan
April, You should try saving a non-iCloud document and see if you still have issues. If so try going through a couple of Apple's basic Mac OS X tutorials to see if they fill in the holes for you. If you are working with Core Data you can check out some tutorials I've written for a document based

Re: Update of Typography panel

2012-01-31 Thread Martin Huber
>> How can I refresh the Typography panel to show the features of the active >> font? > > It's been a while since I looked at this annoying problem, but IIRC > NSTextView's "updateFontPanel" was the only method with the magic needed to > update the Typography panel. You'll have to call NSTextVi

How to deactivate an app

2012-01-31 Thread Gerriet M. Denkmann
I have an app A, where I can select a word and press a button. This starts (or activates) another app called B, which displays some information about this word. Works fine so far. But if there is no information about the word, app B should make app A active again. But how? (B should not be hidd

Selected text in NSTextField

2012-01-31 Thread Dany Golubitsky
Hello Everyone! I am interested in opening NSAlert window that includes editable text field. I would like that the text field will be immediately in focus and all characters will be selected. Meaning that the user can immediately start to type another name if he interested. In other words it s

Re: How do you run an app on the device with Instruments?

2012-01-31 Thread Alex Zavatone
Is 4.2.1 this Lion only? Or are those of us who hate Lion in luck? On Jan 30, 2012, at 11:27 PM, G S wrote: > Thanks guys, but you can't attach to a process with Leaks. > > This turned out to be a bug in Xcode 4.2, apparently. The app simply never > ran. Someone mentioned that Xcode 4.2.1 exi

Re: How to deactivate an app

2012-01-31 Thread Lee Ann Rucker
Along with the word, send [[NSRunningApplication currentApplication] processIdentifier], then do [[NSRunningApplication runningApplicationWithProcessIdentifier:pid] activateWithOptions: NSApplicationActivateIgnoringOtherApps]; It says "You should rarely pass this flag because stealing key focus

Re: How to deactivate an app

2012-01-31 Thread Ken Thomases
On Jan 31, 2012, at 1:55 AM, Gerriet M. Denkmann wrote: > I have an app A, where I can select a word and press a button. > This starts (or activates) another app called B, which displays some > information about this word. > But if there is no information about the word, app B should make app A

Re: NSLayoutManager's setDefaultAttachmentScaling: not working in custom PDF NSContexts.

2012-01-31 Thread Ken Ferry
On Jan 30, 2012, at 3:58 PM, Gus Mueller wrote: > > On Jan 30, 2012, at 2:22 PM, Michael Nickerson wrote: > >> Hmm, I don't have an answer for you, but I looked at the code. I did a >> little subclassing of NSLayoutManager, and it looks like the text attachment >> cell is just ignoring the s

Re: NSLayoutManager's setDefaultAttachmentScaling: not working in custom PDF NSContexts.

2012-01-31 Thread Ken Ferry
On Jan 31, 2012, at 5:57 AM, Ken Ferry wrote: > On Jan 30, 2012, at 3:58 PM, Gus Mueller wrote: > >> >> On Jan 30, 2012, at 2:22 PM, Michael Nickerson wrote: >> >>> Hmm, I don't have an answer for you, but I looked at the code. I did a >>> little subclassing of NSLayoutManager, and it looks

Re: Block Confusion...

2012-01-31 Thread Fritz Anderson
On 30 Jan 2012, at 8:56 PM, R wrote: > One class creates a STRONG pointer to a NSMutableArray. It then > passes that pointer to another class, which has a WEAK reference. > that class is listed below. When I fork a new thread for the > simpleBlock, I lose the pointer. I tried this on a fresh, v

Re: iCloud On OSX - Cannot save changes

2012-01-31 Thread April
Thanks a lot for the reply. When it is not using iCloud everything works like a dream. It all functions exactly as expected. I only get the permission error with autosave and iCloud. I have reached a point where if I use writeSafely: etc... it will save to iCloud, but I cannot use autosave, I ha

Window/Controller, View/Controller, View ?

2012-01-31 Thread Erik Stainsby
Hello list, Seeking clarity about the display hierarchy: I have an application for a form which would have several variant sections, the exact configuration of which would be established in context at run time. I'm thinking to setup the variants as views, then swap them in using a (?) ViewCon

Re: Block Confusion...

2012-01-31 Thread R
My confusion is that the array in class A is used later in the code, it is just nil inside the block that is running on another thread. On Jan 31, 8:07 am, Fritz Anderson wrote: > On 30 Jan 2012, at 8:56 PM, R wrote: > > > One class creates a STRONG pointer to a NSMutableArray.  It then > > pas

Re: Block Confusion...

2012-01-31 Thread R
never mind. the class was getting dealloc. Still getting use to ARC and new ivar techniques. thanks! On Jan 31, 9:16 am, R wrote: > My confusion is that the array in class A is used later in the code, > it is just nil inside the block that is running on another thread. > > On Jan 31, 8:07 a

Re: Selected text in NSTextField

2012-01-31 Thread Conrad Shultz
On 01/31/2012 12:14 AM, Dany Golubitsky wrote: > Hello Everyone! > > I am interested in opening NSAlert window that includes editable text > field. I would like that the text field will be immediately in focus > and all characters will be selected. Meaning that the user can > immediately start to

Re: How do you run an app on the device with Instruments?

2012-01-31 Thread David Duncan
On Jan 31, 2012, at 1:39 AM, Alex Zavatone wrote: > Is 4.2.1 this Lion only? Or are those of us who hate Lion in luck? Lion only. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Re: Block Confusion...

2012-01-31 Thread David Duncan
On Jan 31, 2012, at 9:05 AM, R wrote: > never mind. the class was getting dealloc. Still getting use to ARC and > new ivar techniques. As a point of design here, without further knowledge on why your "ClassB" is keeping a weak reference to the target mutable array (rather than a strong on

On iOS5 simulator and device, NSDateFormatter doesn't show time zone abbreviation for "Asia/Kolkata" for the "z" or "zzz" specifier.

2012-01-31 Thread Heath Borders
On iOS5 simulator and device, NSDateFormatter doesn't show time zone abbreviation for "Asia/Kolkata" for the "z" or "zzz" specifier. NSTimeZone *timeZone = [NSTimeZone timeZoneWithName:@"Asia/Kolkata"]; NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init] autorelease]; dateFormatter.da

Re: How to deactivate an app

2012-01-31 Thread Gerriet M. Denkmann
On 31 Jan 2012, at 17:18, Ken Thomases wrote: > On Jan 31, 2012, at 1:55 AM, Gerriet M. Denkmann wrote: > >> I have an app A, where I can select a word and press a button. >> This starts (or activates) another app called B, which displays some >> information about this word. > >> But if there

Re: iCloud On OSX - Cannot save changes

2012-01-31 Thread Kyle Sluder
On Tue, Jan 31, 2012 at 7:21 AM, April wrote: > Thanks a lot for the reply. > When it is not using iCloud everything works like a dream. It all functions > exactly as expected. I only get the permission error with autosave and > iCloud. I have reached a point where if I use writeSafely: etc... i

Re: Update of Typography panel

2012-01-31 Thread Kyle Sluder
On Mon, Jan 30, 2012 at 11:38 PM, Martin Huber wrote: >>> How can I refresh the Typography panel to show the features of the active >>> font? >> >> It's been a while since I looked at this annoying problem, but IIRC >> NSTextView's "updateFontPanel" was the only method with the magic needed to

Re: On iOS5 simulator and device, NSDateFormatter doesn't show time zone abbreviation for "Asia/Kolkata" for the "z" or "zzz" specifier.

2012-01-31 Thread Kyle Sluder
On Tue, Jan 31, 2012 at 10:37 AM, Heath Borders wrote: > On iOS5 simulator and device, NSDateFormatter doesn't show time zone > abbreviation for "Asia/Kolkata" for the "z" or "zzz" specifier. > > NSTimeZone *timeZone = [NSTimeZone timeZoneWithName:@"Asia/Kolkata"]; > NSDateFormatter *dateFormatter

Calling an Objective-C function from C++?

2012-01-31 Thread Howard Moon
Hi all, How does one call a Cocoa function from C++ code? I've got an existing .cpp file that leverages the vstgui framework, which includes support for Cocoa in the underlying layers. However, vstgui does not support dialogs or alerts. My code already supports native Windows

Re: On iOS5 simulator and device blah blah

2012-01-31 Thread Matt Neuburg
http://www.cocoabuilder.com/archive/cocoa/310977-nsdateformatter-not-working-on-ios-5.html See the explanation from Peter Edberg at Apple: = The change in parsing of abbreviated time zone names in iOS 5.0 is a result of an intentional change in the open-source ICU 4.8 library (and the open

Re: NSDateFormatter not working on iOS 5.

2012-01-31 Thread Heath Borders
Peter, If I set the locale to "en_IN" shouldn't that show the short time zone? NSLocale *indianEnglishLocale = [[[NSLocale alloc] initWithLocaleIdentifier:@"en_IN"] autorelease]; NSTimeZone *timeZone = [NSTimeZone timeZoneWithName:@"Asia/Kolkata"]; NSDateFormatter *dateFormatter = [[[NSDateFormat

Re: Calling an Objective-C function from C++?

2012-01-31 Thread David Duncan
On Jan 31, 2012, at 11:31 AM, Howard Moon wrote: > I'd like to add the ability to support Cocoa, by adding a .mm/.h file > with the Cocoa code to display an NSAlert, and call it from here when the > preprocessor symbol MAC_COCOA is defined. I've created the Cocoa files, but > how can I i

Re: Calling an Objective-C function from C++?

2012-01-31 Thread Fritz Anderson
On 31 Jan 2012, at 1:31 PM, Howard Moon wrote: > I'd like to add the ability to support Cocoa, by adding a .mm/.h file > with the Cocoa code to display an NSAlert, and call it from here when the > preprocessor symbol MAC_COCOA is defined. I've created the Cocoa files, but > how can I inc

Re: Calling an Objective-C function from C++?

2012-01-31 Thread Charles Srstka
On Jan 31, 2012, at 1:31 PM, Howard Moon wrote: > How does one call a Cocoa function from C++ code? > > I've got an existing .cpp file that leverages the vstgui framework, > which includes support for Cocoa in the underlying layers. However, vstgui > does not support dialogs or ale

Transparent window not getting mouse down events

2012-01-31 Thread Marshall Houskeeper
I would like to create a transparent window that spans all the screens and that handles mouse down events. Below is the code that I use to create my transparent window. The transparent window gets created and display successfully. However, mouse down events are not directed to the window.

Re: Calling an Objective-C function from C++?

2012-01-31 Thread Greg Parker
On Jan 31, 2012, at 11:31 AM, Howard Moon wrote: > How do I call from a .cpp file into a .mm file? Write a C or C++ function in the .mm file that is called by the .cpp file. Nothing magic. > Simply adding either #import or #include of my new .h file causes many many > errors, even though the

Re: - (NSPoint)convertBaseToScreen:(NSPoint)point

2012-01-31 Thread Sean McBride
On Thu, 26 Jan 2012 12:41:33 -0700, koko said: >The docs say that - (NSPoint)convertBaseToScreen:(NSPoint)point is >deprecated and to use - (NSRect)convertRectToScreen:(NSRect)aRect Funny how they made the effort to write prose comments in the header to that effect, but didn't actually mark the

Re: How to deactivate an app

2012-01-31 Thread Lee Ann Rucker
I was afraid you were going to say Services :) When I'm using this both apps are under my control. Haven't tried this, but you could try checking which app is active in applicationWillBecomeActive: and restore that when you're done. - Original Message - From: "Gerriet M. Denkmann" To:

Re: Calling an Objective-C function from C++?

2012-01-31 Thread Howard Moon
Thanks, guys, you pointed out my problem. I had my Cocoa-specific functions in the same header file I was including from my pure C++ file. Instead, I now have an intermediate .h and .mm file that don't expose any Cocoa stuff to my original file, and the intermediate .mm file imports and uses th

Re: Calling an Objective-C function from C++?

2012-01-31 Thread Dave Zarzycki
Howard, If you don't want to rename your .cpp file to .mm, then you can just tell Xcode to ignore the file extension and always compile as Objective-C++. Then your C++ code can call Objective-C code natively when compiling for Mac OS X / iOS. davez On Jan 31, 2012, at 11:31 AM, Howard Moon

Re: Is NSRuleEditor worth the learning curve?

2012-01-31 Thread Peter Ammon
On Jan 28, 2012, at 4:23 PM, Erik Stainsby wrote: > Hello list folks, > > I'm struggling with the abstraction and sketchy documentation that surround > NSRuleEditor. I feel a need to know that the effort is worthwhile, versus > cobbling together something in a table or outline view instead. >

Re: Window/Controller, View/Controller, View ?

2012-01-31 Thread Quincey Morris
On Jan 31, 2012, at 07:32 , Erik Stainsby wrote: > Seeking clarity about the display hierarchy: > > I have an application for a form which would have several variant sections, > the exact configuration of which would be established in context at run time. > I'm thinking to setup the variants a

Re: Block Confusion...

2012-01-31 Thread R
David, Class B is a parser. It is passed NSData to parse (weak reference) and the Array (weak reference) from Class A. The results of the Data parse are placed into the Array. Class A will be around for the life of the application. Class B will be released (set to nil) after completing the pars

Re: Update of Typography panel

2012-01-31 Thread Martin Wierschin
>> I was just about to create a dummy NSTextView, when I found the (obvious) >> solution: I have to use [[NSFontManager sharedFontManager] >> setSelectedAttributes:isMultiple:]. This updates the Typography panel (at >> least with 10.7). > > I'm confused. Isn't this precisely what you said _didn

Re: Block Confusion...

2012-01-31 Thread David Duncan
On Jan 31, 2012, at 3:49 PM, R wrote: > I chose this approach rather than delegation. > > Thoughts? Use Delegation instead. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator commen

Re: Block Confusion...

2012-01-31 Thread Eeyore
On Jan 31, 2012, at 3:49 PM, R wrote: > David, > Class B is a parser. It is passed NSData to parse (weak reference) > and the Array (weak reference) from Class A. The results of the Data > parse are placed into the Array. Class A will be around for the life > of the application. Class B will

Re: Transparent window not getting mouse down events

2012-01-31 Thread Ron Fleckner
On 01/02/2012, at 7:59 AM, Marshall Houskeeper wrote: > I would like to create a transparent window that spans all the screens and > that handles mouse down events. Below is the code that I use to create my > transparent window. The transparent window gets created and display > successfull

NSDateFormatter, timezones and early dates

2012-01-31 Thread Gideon King
I have just come across a really unexpected thing. I have a date formatter like so: NSDateFormatter *formatter = [[[NSDateFormatter alloc] init] autorelease]; [formatter setDateFormat:@"-MM-dd'T'HH:mm:ss.SSSZ"]; Now when I use: [formatter stringFromDate:aDate]; It works fine fo

Re: How to deactivate an app

2012-01-31 Thread Leo
If I understand your goals correctly, you can send the following AppleScript script: tell application "System Events" to set frontmost of process yourApp to true You can use NSAppleScript of Scripting Bridge (although the latter maybe an overkill for just one line). Leo On 1/31/12 2:55:31

Re: Block Confusion...

2012-01-31 Thread Lee Ann Rucker
On Jan 31, 2012, at 3:49 PM, R wrote: > David, > Class B is a parser. It is passed NSData to parse (weak reference) > and the Array (weak reference) from Class A. The results of the Data > parse are placed into the Array. Class A will be around for the life > of the application. Class B will b

Re: iCloud On OSX - Cannot save changes

2012-01-31 Thread April
Ok that's the problem right there I know for sure. The filecoordinator methods. No they are not wrapped. And nothing else is overridden in my NSDocument subclass. I read about needing to use the NSFileCoordinator but could not find information on how, where, what exactly needed to be done... Ju

Re: How to deactivate an app

2012-01-31 Thread Gerriet M. Denkmann
On 1 Feb 2012, at 11:33, Leo wrote: > If I understand your goals correctly, you can send the following AppleScript > script: > > tell application "System Events" to set frontmost of process yourApp to true I tried the following in AppleScript Editor: set appList to "processes" tell applicatio

Re: NSDateFormatter, timezones and early dates

2012-01-31 Thread Shane Stanley
On 01/02/2012, at 3:26 PM, Gideon King wrote: > It works fine for dates after 1895, but for dates before that, the string is > incorrect - around here it should end in +1000, but for dates before 1895, it > gives +101208. +1000 sounds like AU. Australia changed to standard time on February 1, 1

PDFView focus ring

2012-01-31 Thread Martin Hewitson
Dear list, This is perhaps a silly question, but I can't find the answer anywhere. I have an app which has an editor on the left side of a splitview and a pdfview on the right side of the splitview. Then I have a keyboard shortcut to toggle focus between the editor and the pdfview. The problem

Re: How to deactivate an app

2012-01-31 Thread Gerriet M. Denkmann
On 1 Feb 2012, at 04:43, Lee Ann Rucker wrote: > I was afraid you were going to say Services :) When I'm using this both apps > are under my control. > > Haven't tried this, but you could try checking which app is active in > applicationWillBecomeActive: and restore that when you're done. I t

Re: How to deactivate an app

2012-01-31 Thread Ken Thomases
On Feb 1, 2012, at 1:20 AM, Gerriet M. Denkmann wrote: > I tried: > > - (void)applicationWillBecomeActive:(NSNotification *)aNotification > { > (void)aNotification; > > NSRunningApplication *currentApplication = [ NSRunningApplication > currentApplication ]; > NSString *bundle