Simple PDF generation code not working as intended

2011-10-13 Thread Devarshi Kulshreshtha
Hi all, I am trying a simple application to generate pdf from contents in a text view. I am using below code: NSPrintInfo *pdfDisplayInfo = [[NSPrintInfo alloc] initWithDictionary:[NSDictionary dictionaryWithObjectsAndKeys:@YES,NSPrintHeaderAndFooter,nil]]; [pdfDisplayInfo

Animating a UITableViewCell changing size

2011-10-13 Thread Thomas Davie
Dear list, I'm trying to construct a UITableViewCell with what is essentially a disclosure triangle on it. When that's tapped, the cell expands to show additional information. I currently hack this with code along these lines: NSArray *cellPaths = [tableView indexPathsForVisibleRows];

PrintOperation reappears when cancelled

2011-10-13 Thread Alexander Reichstadt
Hi, in our project we have a print operation to print from a view drawn offline. This all works fine. But if the operation is cancelled in the printdialog and document window closed, another document window selected and then ordered to print, the print dialog shows up twice. Once for the

[Solved] Re: PrintOperation reappears when cancelled

2011-10-13 Thread Alexander Reichstadt
[op cleanUp]; Thanks Am 13.10.2011 um 11:48 schrieb Alexander Reichstadt: Hi, in our project we have a print operation to print from a view drawn offline. This all works fine. But if the operation is cancelled in the printdialog and document window closed, another document window

[unsolved] Re: PrintOperation reappears when cancelled

2011-10-13 Thread Alexander Reichstadt
OK, this didn't work. It seemed to work, but only because the app sat for a few seconds before the next attempt to print. The print dialog reappears for each window from which there was an attempt to print and cancelled. I found no thread or hint on how to fix this. It seems to be related to

[MEET] CocoaHeadsNYC TONIGHT

2011-10-13 Thread Andy Lee
Our speaker will be Jon Nathan, one of the original NYC CocoaHeads. Jon will be talking about making your Mac app plug-innable. http://www.cocoaheadsnyc.org/meeting/ --Andy ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: Animating a UITableViewCell changing size

2011-10-13 Thread Luke Hiesterman
You should never directly set the frame of a cell that is in the table view. Since UITableView automatically requiries and adjusts row heights when you do a begin/endUpdates block, performing an empty such block by itself after adjusting row heights in your model is sufficient to animate a

Re: -viewDidUnload not always called?

2011-10-13 Thread Fritz Anderson
On 12 Oct 2011, at 5:39 PM, Rick Mann wrote: I can't tell from the docs for -viewDidUnload if it is not guaranteed to be called when cleaning up. It does say that it's called for low-memory situations, but also says it's called as a counterpart to -viewDidLoad, which is always called when

Reusing XCode 4 Core Data Model.

2011-10-13 Thread Ben
In Xcode 3, if I needed to reuse parts of the Core Data Model from a previous project, I would simply highlight the entities required in the Graph Editor, copy then paste them into the Graph Editor of my new project… simple. XCode 4 however… when I try to copy and past the entities, nothing.

Re: Reusing XCode 4 Core Data Model.

2011-10-13 Thread Martin Hewitson
I think selecting the entities in the other non-graphical editor works for copy and paste. Martin On Oct 13, 2011, at 01:12 PM, Ben wrote: In Xcode 3, if I needed to reuse parts of the Core Data Model from a previous project, I would simply highlight the entities required in the Graph

Re: -viewDidUnload not always called?

2011-10-13 Thread Rick Mann
On Oct 13, 2011, at 8:02 , Fritz Anderson wrote: On 12 Oct 2011, at 5:39 PM, Rick Mann wrote: I can't tell from the docs for -viewDidUnload if it is not guaranteed to be called when cleaning up. It does say that it's called for low-memory situations, but also says it's called as a

Re: Best way to parse a time today?

2011-10-13 Thread Rick Mann
I think the concern is this. Say today is the day that a time change occurs. In the US, this happens at 2 am. When you move the clocks forward, the instant the clock would roll from 1:59:59.999 to 2:00:00.000, it actually rolls to 3:00:00.000. All of the times in the half-open interval (2:00,

iOS4: AVFoundation, determining video aspect ratio and orientation

2011-10-13 Thread John Michael Zorko
Hello, all ... I'm developing a video recording / playback app for a client. It works, but when playing back the video from the internet, I want to get information regarding the aspect ratio and orientation of the video i.e. if it was recorded when the device was in portrait or

Re: Retain/Release and Properties clarification

2011-10-13 Thread Bayes Scott F
Thank you, David. Sounds like safety first for my code: always use the setter/getter for synthesized properties, even in self. Or use ivars. ScottB On Oct 12, 2011, at 09:21 , Bayes Scott F wrote: Someone on Matt's site mentioned the possibility that the synthesized ivar could be

Re: Question about SMJobBless

2011-10-13 Thread Eric Gorr
If anyone is interested, this (probably) turned out to be a bug and one has been filed. rdar://10280469 The way the system currently works is that it will ask for an admin password every time regardless of whether or not the SMJobBless function needs to install the helper tool or not. The bug

Re: Retain/Release and Properties clarification

2011-10-13 Thread David Rowland
However, if the property is readonly I think you must use direct access to set an initial value. The setter does not exist. David Rowland On Oct 13, 2011, at 10:54 AM, Bayes Scott F wrote: Thank you, David. Sounds like safety first for my code: always use the setter/getter for

NSArrayController Update Delay

2011-10-13 Thread Richard Somers
Consider a NSArrayController in entity mode. When a managed object is inserted into the managed object context the controller's arrangedObjects property is not updated immediately. Calling a controller 'fetch:' immediately after inserting the managed object into the managed object context does

Re: Select model objects with NSTableView using cocoa bindings

2011-10-13 Thread Luc Van Bogaert
On 12 Oct 2011, at 23:22, Quincey Morris wrote: On Oct 12, 2011, at 13:31 , Luc Van Bogaert wrote: I'm wondering if I should create a NSIndexSet property in my model object and bind it to the NSArrayController's 'selectedIndexes' key? Yes, but you've got the terminology wrong. The

Re: NSArrayController Update Delay

2011-10-13 Thread Keary Suska
On Oct 13, 2011, at 2:20 PM, Richard Somers wrote: Consider a NSArrayController in entity mode. When a managed object is inserted into the managed object context the controller's arrangedObjects property is not updated immediately. How is this happening? Via code? or Via the

Re: Select model objects with NSTableView using cocoa bindings

2011-10-13 Thread Quincey Morris
On Oct 13, 2011, at 13:44 , Luc Van Bogaert wrote: Thanks, I got this working in one 'direction', ie. when the selection in the table is changed, this is reflected in my UI and the 'selected' Dot objects are drawn in a different color. For this, I decided to use a NSMutableIndexSet

Re: NSArrayController Update Delay

2011-10-13 Thread Richard Somers
On Oct 13, 2011, at 3:12 PM, Keary Suska wrote: How is this happening? Via code? or Via the NSArrayController (add: or insert:)? In the latter case the docs say, Beginning with Mac OS X v10.4 the result of this method is deferred until the next iteration of the runloop so that the error

Re: NSArrayController Update Delay

2011-10-13 Thread Mike Abdullah
On 13 Oct 2011, at 21:20, Richard Somers wrote: Consider a NSArrayController in entity mode. When a managed object is inserted into the managed object context the controller's arrangedObjects property is not updated immediately. Calling a controller 'fetch:' immediately after inserting

Re: Reusing XCode 4 Core Data Model.

2011-10-13 Thread Ben
Thanks for the reply. I previously attempted to copy the way you suggest, but sadly it also does not work. On 13 Oct 2011, at 18:17, Martin Hewitson wrote: I think selecting the entities in the other non-graphical editor works for copy and paste. Martin On Oct 13, 2011, at 01:12 PM,

Pop-up menu in NSCollectionView

2011-10-13 Thread Graham Cox
I'm using NSCollectionView to display a bunch of items. I have the 'menu' outlet of this view connected to a menu which in turn sends an action to File's Owner. On 10.7 this works as expected (menu is displayed when right-clicking in the view), but on 10.6.x, the menu is not displayed. Does

Namespace clash problem

2011-10-13 Thread Graham Cox
I just updated to Xcode 4.2 from 4.1, and I'm getting a new warning when I compile: Multiple methods named 'style' found When I go into this warning, it further states it's using [NSProgressIndicator style] instead of my own declared method style which exists in many different objects (and

Re: Pop-up menu in NSCollectionView

2011-10-13 Thread Lee Ann Rucker
Mine works fine on 10.6 and 10.7, but I'm implementing menuForEvent: in my NSCollectionView subclass instead of using bindings On Oct 13, 2011, at 4:13 PM, Graham Cox wrote: I'm using NSCollectionView to display a bunch of items. I have the 'menu' outlet of this view connected to a menu

Re: Namespace clash problem

2011-10-13 Thread Jens Alfke
On Oct 13, 2011, at 4:29 PM, Graham Cox wrote: When I go into this warning, it further states it's using [NSProgressIndicator style] instead of my own declared method style which exists in many different objects (and which would be correct). This only happens when calling -style on an

Re: Namespace clash problem

2011-10-13 Thread Kyle Sluder
On Thu, Oct 13, 2011 at 4:29 PM, Graham Cox graham@bigpond.com wrote: Typecasting the return type to be the explicit object type I expect does not eliminate the warning. You need to typecast the recipient, not the return type. --Kyle Sluder ___

Re: Namespace clash problem

2011-10-13 Thread Graham Cox
Ah, that's clear, but I now see why I'm going wrong. The object in question is actually a class, where it has a class method +style. But the class is passed as the 'object' parameter of a notification, which has type id. How do I typecast that to the precise class type I'm expecting? Using

Re: Namespace clash problem

2011-10-13 Thread Kyle Sluder
On Thu, Oct 13, 2011 at 6:32 PM, Graham Cox graham@bigpond.com wrote: The object in question is actually a class, where it has a class method +style. But the class is passed as the 'object' parameter of a notification, which has type id. How do I typecast that to the precise class type

Re: Namespace clash problem

2011-10-13 Thread Graham Cox
That doesn't work, because it then complains: warning: instance method 'style' is being used on 'Class' which is not in the root class Looks like I have no choice but to change the method name for the class method at least :( --Graham On 14/10/2011, at 12:51 PM, Kyle Sluder wrote: On

Re: Namespace clash problem

2011-10-13 Thread Kyle Sluder
On Thu, Oct 13, 2011 at 6:55 PM, Graham Cox graham@bigpond.com wrote: That doesn't work, because it then complains: warning: instance method 'style' is being used on 'Class' which is not in the root class Heh, looks like it picked -style instead of +style. Makes sense, I guess. The

Re: Cocoa-dev Digest, Vol 8, Issue 822

2011-10-13 Thread Daniel Steinberg
Mark's interview is up D On Oct 13, 2011, at 9:35 PM, cocoa-dev-requ...@lists.apple.com wrote: Send Cocoa-dev mailing list submissions to cocoa-dev@lists.apple.com To subscribe or unsubscribe via the World Wide Web, visit http://lists.apple.com/mailman/listinfo/cocoa-dev or,

Re: NSArrayController Update Delay

2011-10-13 Thread Steve Steinitz
Hi Richard, The advice you've received already is more sound than what I'm about to tell you. But my crude technique has solved the problem you mention and similar problems. I wrote the following class method on a utility class into which I throw stuff: + (void) waitUntilEndOfNextRunLoop {

Re: -viewDidUnload not always called?

2011-10-13 Thread David Rowland
My understanding is this, a diagram I made to visualize the process, http://drowland.net/iOS%20Class/View%20Controller%20unloading.pdf On Oct 13, 2011, at 8:02 AM, Fritz Anderson wrote: On 12 Oct 2011, at 5:39 PM, Rick Mann wrote: I can't tell from the docs for -viewDidUnload if it is not