Capture video from core animation (QC)

2009-01-14 Thread Jonathan Selander
Hi, I've made a funny cuartz composition with a couple of video filters, webcam, and so on, and now i'd like to record it to a video file (like quicktime). Question is, do i need to use OpenGL and render each frame or whatever, or is there an easier way to accomplish this? Thanks

non scrolling table view header...

2009-01-14 Thread Oscar Alejandro Alvarado Prieto
Hi, I'm trying to obtain a table header that doesn't disappear when scrolling rows. tableHeader/Footer properties support custom views that scroll with rows and so disappear. Please, anyone knows how to do this? Thanks in advance -- Oscar A. Alvarado

KVC error from bound SortDescriptor

2009-01-14 Thread Steven Hamilton
Hi folks, I have a customer WindowController class and within it I have a method that returns a NSSortDescriptor. Like this; -(NSArray *)nameSortDescriptors { NSSortDescriptor *sorter; sorter = [[[NSSortDescriptor alloc] initWithKey: @name

Service request fails if provider has not yet launched

2009-01-14 Thread an00na
My app provides a System Service, which works well if it is running when the request arrives; however, if the request rises and my app has not yet launched, the Service is failed to be served, even though my app can be launched normally by the Service request. Here is the corresponding

Re: Service request fails if provider has not yet launched

2009-01-14 Thread Kevin Gessner
On Jan 14, 2009, at 8:56 AM, an0...@gmail.com wrote: My app provides a System Service, which works well if it is running when the request arrives; however, if the request rises and my app has not yet launched, the Service is failed to be served, even though my app can be launched normally

Re: File association

2009-01-14 Thread Benjamin Stiglitz
I saved the project using NSArchiver with an extension say .myExtension. And also I opened the saved project by unachieved it from menu. Now I need to open the saved project when double clicking on it. How can I do this file association? See the Runtime Configuration Guidelines:

Re: How to center a custom NSView in a NSScrollView

2009-01-14 Thread Benjamin Stiglitz
I've already tried with a custom NSClipView, as explained here: http://www.bergdesign.com/missing_cocoa_docs/nsclipview.html This is the standard way to do this. The question is, how can I center a custom NSView in a NSScrollView, if the visible width and/or height is greater than the

Re: Constructing class names dynamically

2009-01-14 Thread Adam Venturella
The output is the same, but there is also: #import objc/runtime.h objc_getClass([myString UTF8String]); I am going to guess that NSClassFromString(myString) is probably using objc_getClass(), maybe not. I didn't know NSClassFromString existed though, so I am switching to that instead of using

Re: How font size managed without affecting the font? Please help

2009-01-14 Thread Benjamin Stiglitz
I use this code to change the fontsize: NSFont *font1 = [NSFont fontWithName:[pop1 titleOfSelectedItem] size:[[pop2 titleOfSelectedItem] doubleValue]]; In the second popup’s action method, you should be invoking -[NSFontManager convertFont:toSize:] to convert the fonts to the right size.

Re: Seamlessly converting any type of document to PDF?

2009-01-14 Thread Scott Ribe
If you can direct the application via AppleScript to print the document to the default printer, then you can set up a printer that prints to a PDF file, and switch the printer programmatically. (Combination of lpadmin defaults write commands.) -- Scott Ribe scott_r...@killerbytes.com

Re: Capture video from core animation (QC)

2009-01-14 Thread Jonathan Selander
Okay, so if I understood correctly, i need to set up an OpenGL context (in order to capture frames) which I use with a QCRenderer, and then render each frame manually? Am I on the right track? 14 jan 2009 kl. 16.25 skrev douglas welton: If you just want to record your composition, try

Re: Relaunch App (Quit, Relaunch If Quit)?

2009-01-14 Thread Chunk 1978
thanks! your way seems much easier :) On Wed, Jan 14, 2009 at 10:36 AM, Jean-Daniel Dupas devli...@shadowlab.org wrote: The proper way to do it is probably to listen for Finder death using a timeout, not polling the process list. You can either use the

Re: KVC error from bound SortDescriptor

2009-01-14 Thread Keary Suska
On Jan 14, 2009, at 4:54 AM, Steven Hamilton wrote: I have a customer WindowController class and within it I have a method that returns a NSSortDescriptor. Like this; -(NSArray *)nameSortDescriptors { NSSortDescriptor *sorter; sorter = [[[NSSortDescriptor alloc]

Re: UTIs and type codes and extensions

2009-01-14 Thread Randall Meadows
On Jan 14, 2009, at 7:48 AM, Sean McBride wrote: On 1/14/09 2:31 AM, Julien Jalon said: I'm just making sure I'm not missing something... There's no system-defined way to go from a UTI to an old-style file type code (which the UTI docs seem to refer to as a tag) and back again, am I

Re: Strange Webview Problem

2009-01-14 Thread Michael Ash
On Tue, Jan 13, 2009 at 6:11 PM, Diez B. Roggisch de...@web.de wrote: Nick Zitzmann schrieb: On Jan 13, 2009, at 3:45 PM, Diez B. Roggisch wrote: Just for the record - the timoutInterval of 0 is the culprit. I don't have the slightest idea why it stopped working, but I don't care either. It

Re: runModalForWindow, best solution to modal session

2009-01-14 Thread Keary Suska
On Jan 13, 2009, at 12:21 PM, Alexander Reichstadt wrote: If so, do you override -initWithWindowNibName:? The implementation may matter. No, I only override initWithWindow. Should I override it, and if so should I call on NSBundle to load my nib there then? I recommend that you allow

NSTableView

2009-01-14 Thread David Blanton
I thought I had this solved but I need help. Looking at iTunes with 130 songs the table scrolls quick and resizing the window is snappy. When I resize a window or split view containing a table of 30 rows or scroll the table it is slow. I have read Cocoa Performance Guidelines. I

Re: NSTableView

2009-01-14 Thread Corbin Dunn
On Jan 14, 2009, at 9:14 AM, David Blanton wrote: I thought I had this solved but I need help. Looking at iTunes with 130 songs the table scrolls quick and resizing the window is snappy. When I resize a window or split view containing a table of 30 rows or scroll the table it is

Re: Enable Scripting Failing - Missing something? Based on SimpleScripingVerbs sample

2009-01-14 Thread Matt Neuburg
On Tue, 13 Jan 2009 13:17:11 -0800, Adam Venturella aventure...@gmail.com said: keyOSAScriptingDefinition/key stringMyScriptingDef.def/string (1) Why do you call it .def when the example so clearly calls it .sdef? (2) There are lots of tutorials (including mine online, plus my book) on getting

Re: Enable Scripting Failing - Missing something? Based on SimpleScripingVerbs sample

2009-01-14 Thread Adam Venturella
the .def was a typo on my part when writing the e-mail. Anyway I managed to get it working, I must have been doing something wrong, as I built 2 test apps for the sole purpose of testing scripting and everything was fine. So the problem was me =) On Wed, Jan 14, 2009 at 9:24 AM, Matt Neuburg

Re: NSTableView

2009-01-14 Thread David Blanton
I understand what you are saying but it seems to me that if I could preserve content during live resize all would be well. My table view subclass implements preservesContentDuringLiveResize but it is not called. Is preservesContentDuringLiveResize a valid method for a table view subclass?

Re: NSTableView

2009-01-14 Thread Corbin Dunn
On Jan 14, 2009, at 9:41 AM, David Blanton wrote: I understand what you are saying but it seems to me that if I could preserve content during live resize all would be well. My table view subclass implements preservesContentDuringLiveResize but it is not called. Is

Re: NSTableView

2009-01-14 Thread Andy Lee
On Jan 14, 2009, at 12:14 PM, David Blanton wrote: I thought I had this solved but I need help. Looking at iTunes with 130 songs the table scrolls quick and resizing the window is snappy. When I resize a window or split view containing a table of 30 rows or scroll the table it is

Re: KVC error from bound SortDescriptor

2009-01-14 Thread Quincey Morris
On Jan 14, 2009, at 08:35, Keary Suska wrote: On Jan 14, 2009, at 4:54 AM, Steven Hamilton wrote: I have a customer WindowController class and within it I have a method that returns a NSSortDescriptor. Like this; -(NSArray *)nameSortDescriptors { NSSortDescriptor *sorter;

Re: NSTableView

2009-01-14 Thread Andy Lee
On Jan 14, 2009, at 1:06 PM, Andy Lee wrote: I forget if you said whether you're using bindings or a data source. If you're using a data source, how about posting your code for numberOfRowsInTableView: and tableView:objectValueForTableColumn:row:? The docs for these two methods say they

Debugging objc_msg errors

2009-01-14 Thread John Nairn
I occasionally get difficult-to-debug crashes where that last thing in the crash log is a message being sent, which ends up being a message sent to an object that has been released (I think it is objc_msg, but I am not looking at a crash log now). These happen much more often in Leopard

Re: Debugging objc_msg errors

2009-01-14 Thread Jeff Johnson
John, See the following for a good tutorial: http://www.sealiesoftware.com/blog/archive/2008/09/22/objc_explain_So_you_crashed_in_objc_msgSend.html -Jeff On Jan 14, 2009, at 1:04 PM, John Nairn wrote: I occasionally get difficult-to-debug crashes where that last thing in the crash log is

Re: NSTableView

2009-01-14 Thread David Blanton
Here is the code. Some notes, _browserView is an NSMatrix of NSImageCells Str is form a portable string library there are a few C++ classes used Once a cell value is computed it is stored. When moving a split view divider and covering the table that action is jerky.

auto garbage collection race condition?

2009-01-14 Thread Michael Link
I'm running into a scenario where it appears the application is allocating memory faster than it can be reclaimed by garbage collection. I believe this is how it happens. There are a pool of threads that are used to collect some data as it is collected (by using NSXML* objects, XQuery). In

Re: NSTableView

2009-01-14 Thread Corbin Dunn
I still reiterate that you need a Shark sample to really find the source of the problem. A complete backtrace during the slowdown is really what we would need to see, not that it is slow in objc_msgSend. Overall, the code can/should be improved. Specifically: /*

Re: NSTableView

2009-01-14 Thread Andy Lee
On Jan 14, 2009, at 2:01 PM, David Blanton wrote: - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn: (NSTableColumn *)aTableColumn row:(int)rowIndex { DTVCell* cell = [aTableColumn dataCell]; NSString* colID = [aTableColumn identifier]; [self

Re: NSTableView

2009-01-14 Thread David Blanton
Holy Joker Batman! Changing return cell; to return cell-_value gives the performance I am looking for! Corbin, u 2 cool! Thanks. On Jan 14, 2009, at 12:38 PM, Corbin Dunn wrote: I still reiterate that you need a Shark sample to really find the source of the problem. A

Report writer for Cocoa?

2009-01-14 Thread Jon C. Munson II
Namaste! I could be missing the obvious, however, my question is whether a report writer tool (like Crystal Reports or MS Access, by way of example) exists for Cocoa? I Googled around for a bit tyring to find something (other than ReportMill). I've looked at (and read) the printing-relevant

Re: Report writer for Cocoa?

2009-01-14 Thread Sherm Pendley
On Jan 14, 2009, at 3:01 PM, Jon C. Munson II wrote: I could be missing the obvious, however, my question is whether a report writer tool (like Crystal Reports or MS Access, by way of example) exists for Cocoa? I think what a lot of folks are doing is just generating HTML and printing

Re: Report writer for Cocoa?

2009-01-14 Thread Jim Thomason
A lot of people tend to link in webkit and layout a printed report using html and css. It's somewhat eqasier than standard web dev since you know that only webkit will be displaying your layout. No need for cross browser compatability. I use that aqpproach for one of my apps and it works well

UITableViewController with dynamic data

2009-01-14 Thread Mohan Parthasarathy
Hi, I am using a UITableViewController and the data for the table view is generated dynamically (fetched from the network). The data is normally fetched based on some search. But when the Controller is loaded and i don't have the data ready, i want to return something back sane and later reload

Re: NSTableView

2009-01-14 Thread Erik Buck
The code provided looks very unusual and clearly does not follow the Model-View-Controller design.  It is almost always a bad idea to store information in the user interface.     The following line is extremely suspect: int count =  _browserView-fileList.GetCount();   Why doesn't your

Re: UITableViewController with dynamic data

2009-01-14 Thread Luke the Hiesterman
I assume you meant numberOfSectionsInTableView:anyway, a good strategy might be to just go ahead and return 0 initially, and then whenever you have successfully pulled your data from the network, do [tableView reloadData] and then you can return the appropriate numbers at that time,

Re: UITableViewController with dynamic data

2009-01-14 Thread Mohan Parthasarathy
Yes, that's what i meant. Just to confirm.. It is safe to assume that numberOfSectionsInTableView will be first function called ? I am thinking of this sequence.. 1) The code receives low memory warning and frees up the data that the tableView is currently displaying 2) CellForRowAtIndexPath is

Re: UITableViewController with dynamic data

2009-01-14 Thread Luke the Hiesterman
The way to invalidate data in the tableView when you free it would be to reloadData. So, get rid of whatever you're getting rid of, build your new, truncated list of items, and then call [tableView reloadData] so you put only the data you've kept around in the table. Also, if you're

Custom drawn menus?

2009-01-14 Thread Scott Andrew
Is there any good way to custom draw a menu? Or is the old carbon 'mdef', like the star menu sample, the only way? And will it break in 10.6? Scott ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

Re: Custom drawn menus?

2009-01-14 Thread I. Savant
On Wed, Jan 14, 2009 at 4:14 PM, Scott Andrew scottand...@roadrunner.com wrote: Is there any good way to custom draw a menu? Or is the old carbon 'mdef', like the star menu sample, the only way? And will it break in 10.6? You could use a custom view and set it as the menu item's view ... --

Re: Custom drawn menus?

2009-01-14 Thread Scott Andrew
Not up for the menu item route. I am looking at just changing the background and shape slightly or the whole menu to match my UI. Scott On Jan 14, 2009, at 1:16 PM, I. Savant wrote: On Wed, Jan 14, 2009 at 4:14 PM, Scott Andrew scottand...@roadrunner.com wrote: Is there any good way to

Re: Custom drawn menus?

2009-01-14 Thread Joe Ranieri
Not up for the menu item route. I am looking at just changing the background and shape slightly or the whole menu to match my UI. Unfortunately there's not much of a good route to go here. Using a custom view requires you to do handle *all* drawing, mouse handling, keyboard events, etc. It

Re: NIB's owner doesn't get released because of NSArrayController

2009-01-14 Thread Vitaly Ovchinnikov
I just found a solution, but I don't like it. I added method -beforeRelease to my view controller where I send -unbind: to my array controller. I call this method from my window controller just before -release call. This helps. But looks ugly... Does somebody know better way? On Thu, Jan 15,

Re: NIB's owner doesn't get released because of NSArrayController

2009-01-14 Thread Jason Foreman
On Wed, Jan 14, 2009 at 3:51 PM, Vitaly Ovchinnikov vitaly.ovchinni...@gmail.com wrote: Hello all, I have a custom-loaded NIB file with NSView and NSArrayController. Array controller is bound to file's owner (NSObject's derived class) and use some keypath for contentArray. The problem is when

Re: KVC error from bound SortDescriptor

2009-01-14 Thread Keary Suska
On Jan 14, 2009, at 11:10 AM, Quincey Morris wrote: On Jan 14, 2009, at 08:35, Keary Suska wrote: On Jan 14, 2009, at 4:54 AM, Steven Hamilton wrote: I have a customer WindowController class and within it I have a method that returns a NSSortDescriptor. Like this; -(NSArray

addObserver problem with protocols

2009-01-14 Thread Mohan Parthasarathy
Hi, I have protocol X that is implemented by a few classes of my own. These classes are not known directly to my main code but only through the protocol (idprotocol). When my main code tries to addObserver:self to the object idprotocol, i get a warning saying that my protocol does not implement

Re: addObserver problem with protocols

2009-01-14 Thread Keary Suska
On Jan 14, 2009, at 3:18 PM, Mohan Parthasarathy wrote: I have protocol X that is implemented by a few classes of my own. These classes are not known directly to my main code but only through the protocol (idprotocol). When my main code tries to addObserver:self to the object idprotocol,

Re: Debugging objc_msg errors

2009-01-14 Thread Greg Parker
On Jan 14, 2009, at 11:18 AM, Jeff Johnson wrote: On Jan 14, 2009, at 1:04 PM, John Nairn wrote: I occasionally get difficult-to-debug crashes where that last thing in the crash log is a message being sent, which ends up being a message sent to an object that has been released (I think it is

Re: addObserver problem with protocols

2009-01-14 Thread Greg Parker
On Jan 14, 2009, at 2:18 PM, Mohan Parthasarathy wrote: I have protocol X that is implemented by a few classes of my own. These classes are not known directly to my main code but only through the protocol (idprotocol). When my main code tries to addObserver:self to the object idprotocol, i

Re: Debugging objc_msg errors

2009-01-14 Thread Sean McBride
On 1/14/09 2:33 PM, Greg Parker said: On Jan 14, 2009, at 11:18 AM, Jeff Johnson wrote: On Jan 14, 2009, at 1:04 PM, John Nairn wrote: I occasionally get difficult-to-debug crashes where that last thing in the crash log is a message being sent, which ends up being a message sent to an object

/tmp folder ok?

2009-01-14 Thread Chunk 1978
so an app doesn't need administrative rights to writeToFile in the /tmp folder? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at

Re: /tmp folder ok?

2009-01-14 Thread CodingMammoth
Every app can write to the tmp folder but take a look at: NSString * NSTemporaryDirectory (void); On 15 Jan 2009, at 00:31, Chunk 1978 wrote: so an app doesn't need administrative rights to writeToFile in the / tmp folder? ___ Cocoa-dev mailing

Re: /tmp folder ok?

2009-01-14 Thread Graham Cox
On 15 Jan 2009, at 10:31 am, Chunk 1978 wrote: so an app doesn't need administrative rights to writeToFile in the / tmp folder? ___ Don't do that. Instead use the FindFolder with the 'kTemporaryFolderType' constant. Here's a Cocoa wrapper (a

Re: Debugging objc_msg errors

2009-01-14 Thread Nick Zitzmann
On Jan 14, 2009, at 4:21 PM, Sean McBride wrote: Not to hijack this thread, but... anyone know what objc_msgSend_fixup is? Recently I've seen a lot of these types of crashes in my (64bit, GC) app. I could have sworn I've seen this before, and the problem ended up being a subtle memory

Re: Debugging objc_msg errors

2009-01-14 Thread Corbin Dunn
On Jan 14, 2009, at 11:04 AM, John Nairn wrote: I occasionally get difficult-to-debug crashes where that last thing in the crash log is a message being sent, which ends up being a message sent to an object that has been released (I think it is objc_msg, but I am not looking at a crash log

Re: /tmp folder ok?

2009-01-14 Thread Chris Parker
NSTemporaryDirectory() already does (effectively) that, and yields the same resulting folder. You should just use NSTemporaryDirectory(). .chris On Wed, Jan 14, 2009 at 3:44 PM, Graham Cox graham@bigpond.com wrote: On 15 Jan 2009, at 10:31 am, Chunk 1978 wrote: so an app doesn't need

Re: /tmp folder ok?

2009-01-14 Thread Kyle Sluder
On Wed, Jan 14, 2009 at 7:24 PM, Chris Parker ctpar...@gmail.com wrote: You should just use NSTemporaryDirectory(). Do not just use NSTemporaryDirectory if you need to perform an atomic save operation (write new data to location X and then overwrite old data at location Y by moving X - Y). If

Re: Report writer for Cocoa?

2009-01-14 Thread Dave Fernandes
I make an RTFD report template in TextEdit and read this template into an NSMutableAttributedString. My template contains keywords such as FIRST_NAME, LAST_NAME, etc. I then substitute the keywords in the attributed string with real data, and then initialize an NSTextView with the string.

Re: WebView (Caching)

2009-01-14 Thread Rob Keniger
On 15/01/2009, at 6:53 AM, Joseph Crawford wrote: When I drop a WebView on my XIB does it automatically cache the file(s) that it loads? I ask because I could not get a JS command to work properly even after I fixed the would be problem. This morning it started working just fine. If it

Re: IKImageView setImage only works once.

2009-01-14 Thread Graham Cox
On 15 Jan 2009, at 12:22 pm, James Trankelson wrote: Well, judging from how often ImageKit questions appear to be answered here, my expectations aren't high, but here goes anyway... I'm using an IKImageView and calling setImage to set its contents. The problem is that setImage only works the

Apply Preferences To Current Window

2009-01-14 Thread Walker Argendeli
I've just worked through Chapter 13 of Hillegass's book, which deals with setting user defaults. My problem is that the preferences (e.g. colorwell which changes the background color of a tableview) only take effect when I open a new document, whereas I'd like them to be applied to the

Re: Report writer for Cocoa?

2009-01-14 Thread Matt Neuburg
On Wed, 14 Jan 2009 15:01:02 -0500, Jon C. Munson II jmun...@his.com said: I've looked at (and read) the printing-relevant Apple dox. I've read the relevant chapter in Hillegass' book too. I can see how much work writing pretty reports is going to be. Unless... I missed a point concerning an

Re: IKImageView setImage only works once.

2009-01-14 Thread James Trankelson
Ha! I actually tried both of your suggestions, but without avail. It turns out that calling [setImage: imageProperties:] is happiest to be called from the main thread. Calling it by using performSelectorOnMainThread: works. jt On Thu, Jan 15, 2009 at 2:51 AM, Graham Cox graham@bigpond.com

Localized resources not loading from external frameworks

2009-01-14 Thread Samir Patel
I have an external framework I built in XCode 2.5. I have an English.lproj folder and a Japanese.lproj folder. I build my framework and put it in /Library/Frameworks. All the files are in the right locations, but when I run my app which is linked against the framework, the English version of

JOB OPENING- MAC OS modem interface SW ENGINEER

2009-01-14 Thread Lindsey Glass
JOB OPENING--- I am a recruiter of senior level hardware and software engineers for contract positions nationwide. We place engineers in the areas of semiconductors, aerospace, commercial, telecom, networking, and government defense. If you are interested in

Text field with buttons like the To field in Mail

2009-01-14 Thread Sergey Kuleshov
Hello all, I am very new to cocoa development and just making my first steps. What I am trying to do is something like a To field in Mail.app which provides autocomplete and once matched replaces the text with the button. After hours of googling it looks like I have to put NSButtonCell inside

What determines VSIZE allocation?

2009-01-14 Thread Tobias Zimmerman
I have searched for an answer to this question, including in Amit Singh's book, but have not found the answer (at least, not in a form that I recognize it). I have a fairly simple Cocoa app that creates an NSStatusItem with a small menu. It is compiled using Garbage Collection and in 64bit mode

ImageAndTextCell + NSOutlineView editing problem

2009-01-14 Thread Andrew Shamel
Greetings Cocoa-Dev! I am having the hardest time with a persistent and strange error with Apple's ImageAndTextCell in my NSOutlineView. I have the ImageAndTextCell set to be the outline's data cell via NSTableColumn's -setDataCell: method, and I set the image of the cell in the

Re: IKImageView setImage only works once.

2009-01-14 Thread Graham Cox
On 15 Jan 2009, at 2:07 pm, James Trankelson wrote: It turns out that calling [setImage: imageProperties:] is happiest to be called from the main thread. Calling it by using performSelectorOnMainThread: works. Anything concerned with views or other drawing must be called on the main

Re: What determines VSIZE allocation?

2009-01-14 Thread Andrew Farmer
On 14 Jan 09, at 14:31, Tobias Zimmerman wrote: I have searched for an answer to this question, including in Amit Singh's book, but have not found the answer (at least, not in a form that I recognize it). I have a fairly simple Cocoa app that creates an NSStatusItem with a small menu. It

Re: What determines VSIZE allocation?

2009-01-14 Thread Bill Bumgarner
On Jan 14, 2009, at 2:31 PM, Tobias Zimmerman wrote: I have searched for an answer to this question, including in Amit Singh's book, but have not found the answer (at least, not in a form that I recognize it). I have a fairly simple Cocoa app that creates an NSStatusItem with a small menu.

Re: Text field with buttons like the To field in Mail

2009-01-14 Thread Quincey Morris
On Jan 14, 2009, at 08:30, Sergey Kuleshov wrote: I am very new to cocoa development and just making my first steps. What I am trying to do is something like a To field in Mail.app which provides autocomplete and once matched replaces the text with the button. After hours of googling it looks

drag and drop with snapping

2009-01-14 Thread Francisco Tolmasky
I'd like to implement drag and drop behavior with snapping to guides in my application. I have looked at both the NSDraggingSource and NSDraggingDestination protocols and there seems to be no obvious way of modifying the position of the dragged image. Do I need to make my own transparent window

Dealing with exceptions in a drawing stack

2009-01-14 Thread Graham Cox
Suppose I have a drawing stack that is called from a view's drawRect: method. This stack can end up quite deep, with objects calling other objects to implement parts of their drawing. Some of these methods will save and restore the graphics context. If an exception is thrown from somewhere

Re: Dealing with exceptions in a drawing stack

2009-01-14 Thread Kyle Sluder
On Wed, Jan 14, 2009 at 11:34 PM, Graham Cox graham@bigpond.com wrote: If an exception is thrown from somewhere down inside this stack, I'd prefer it if I could continue to draw what can be drawn, rather than have to abort the drawing altogether which usually leaves the whole view in a

what the hell is Error (1007) creating CGSWindow?

2009-01-14 Thread Michael B Johnson
So I have an application that has been bedeviled by a nasty, nasty bug for years that manifests itself as an exception being thrown with: Error (1007) creating CGSWindow At that point, the user has no choice but to reboot the machine - the Window Server is pretty much hoarked. Since the

Re: what the hell is Error (1007) creating CGSWindow?

2009-01-14 Thread Joe Ranieri
NSDictionary* dict = [NSDictionary dictionaryWithObjectsAndKeys:font, NSFontAttributeName, self.textColor, NSForegroundColorAttributeName, nil]; NSAttributedString* aStr = [[[NSAttributedString alloc] initWithString:str attributes:dict] autorelease];

Re: what the hell is Error (1007) creating CGSWindow?

2009-01-14 Thread Michael B Johnson
On Jan 14, 2009, at 9:13 PM, Joe Ranieri wrote: NSDictionary* dict = [NSDictionary dictionaryWithObjectsAndKeys:font, NSFontAttributeName, self.textColor, NSForegroundColorAttributeName, nil]; NSAttributedString* aStr = [[[NSAttributedString alloc] initWithString:str attributes:dict]

Re: Dealing with exceptions in a drawing stack

2009-01-14 Thread Graham Cox
On 15 Jan 2009, at 3:53 pm, Kyle Sluder wrote: This is known as a continuation. Scheme, for example, often uses them instead of exceptions. Much like a jmp_buf, It contains all of the information necessary to resume execution at the point the continuation is created. In the event of an

Re: What determines VSIZE allocation?

2009-01-14 Thread Michael Ash
On Wed, Jan 14, 2009 at 5:31 PM, Tobias Zimmerman automa...@gmail.com wrote: I know there are people who will say VSIZE doesn't matter if there is no paging, This is kind of like that famous question, Have you stopped beating your wife? VSIZE doesn't matter, period. Paging doesn't enter into

Re: what the hell is Error (1007) creating CGSWindow?

2009-01-14 Thread Michael Ash
On Thu, Jan 15, 2009 at 12:16 AM, Michael B Johnson w...@pixar.com wrote: On Jan 14, 2009, at 9:13 PM, Joe Ranieri wrote: NSDictionary* dict = [NSDictionary dictionaryWithObjectsAndKeys:font, NSFontAttributeName, self.textColor, NSForegroundColorAttributeName, nil];

Re: NIB's owner doesn't get released because of NSArrayController

2009-01-14 Thread Vitaly Ovchinnikov
Well, OK. I am ready to release all root objects myself. Just tested with subclassed NSView from that NIB - it didn't get released automatically. So I added several -release calls to -dealloc method of my NIB's owner and now it will release everything. But the problem is still there: -dealloc of

Quick (?) NSCell question: getting the drawing (inner) rectangle

2009-01-14 Thread Luke Evans
I'm trying to determine what a cell's drawing rect will be (particularly the 'interior' size eventually expected to be sent to - drawInteriorWithFrame:inView: when the cell is actually drawn). I can get the 'prototypical' cell object by asking for the pertinent NSTableView column, and then

Center image in NSTableView header

2009-01-14 Thread Ivan C Myrvold
I am creating an NSAttributedString containing an image in an NSTextAttachment, setting an NSTableView headerCell to the attachmentCell. This works great, the image is shown nicely on the table view column header. But I am unable to get the image centered in the column header. Anyone have

Re: Localized resources not loading from external frameworks

2009-01-14 Thread Nick Zitzmann
On Jan 13, 2009, at 6:03 PM, Samir Patel wrote: All the files are in the right locations, but when I run my app which is linked against the framework, the English version of my UI from the framework always loads no matter what language I have set in System Preferences. Any ideas how to

Re: What determines VSIZE allocation?

2009-01-14 Thread Bill Bumgarner
On Jan 14, 2009, at 9:40 PM, Michael Ash wrote: On Wed, Jan 14, 2009 at 5:31 PM, Tobias Zimmerman automa...@gmail.com wrote: I know there are people who will say VSIZE doesn't matter if there is no paging, This is kind of like that famous question, Have you stopped beating your wife? VSIZE

completely messed up with bindings...

2009-01-14 Thread Vitaly Ovchinnikov
Hello all, I have array of Filter objects in my document. Filters are used in two ways: 1. I can select one of them to filter my data 2. I can browse them all and add, delete or/*modify any of them My document exposes this array via -filters/-setFilters pair. I have two NSArrayControllers: one