Re: Figuring out what's causing redrawing

2010-05-15 Thread Uli Kusterer
On 13.05.2010, at 21:52, Nick Zitzmann wrote: > I've tried searching around but haven't found an answer to this. I have > several views that are being constantly & apparently needlessly redrawn and I > can't figure out why this is happening. How do I catch the culprit that is > causing the views

Posix error 24

2010-05-15 Thread The Geezer
I wrote a cocoa application that periodically gets a posix error 24. I know this means my app's number of open files has exceeded kern.maxfilesperproc, however, I can't figure out when and where I'm leaving files open. This appears to be happening after accessing several hundred web pages.

Re: Posix error 24

2010-05-15 Thread Paul Sanders
Use lsof from the command line. Paul Sanders. - Original Message - From: "The Geezer" To: Sent: Saturday, May 15, 2010 3:24 PM Subject: Posix error 24 I wrote a cocoa application that periodically gets a posix error 24. I know this means my app's number of open files has exceeded ke

Re: Posix error 24

2010-05-15 Thread Ken Thomases
On May 15, 2010, at 9:39 AM, Paul Sanders wrote: >> On May 15, 2010, at 9:24 AM, The Geezer wrote: >> >> I wrote a cocoa application that periodically gets a posix error 24. >> I know this means my app's number of open files has exceeded >> kern.maxfilesperproc, however, I can't figure out when

Re: Posix error 24

2010-05-15 Thread Mark Ritchie
On 15/May/2010, at 7:44 AM, Ken Thomases wrote: > Probably easier and more productive to use Instruments and the File Activity > instrument. Far easier, no code changes needed and you get the stack traces for each file action. Definitely the way to go! ;-) M. __

Re: Posix error 24

2010-05-15 Thread Ken Thomases
On May 15, 2010, at 9:44 AM, Ken Thomases wrote: > Probably easier and more productive to use Instruments and the File Activity > instrument. Hmm. Looking at that instrument in detail, it's not clear that it catches all file descriptors. In particular, it seems to only track the open() system

Re: NSTreeController and remove:

2010-05-15 Thread Mike Abdullah
As he stated, -remove: does work, but its result is deferred. On 15 May 2010, at 03:56, Tony Romano wrote: > Thanks Quincey. > > removeObjectAtArrangedObjectIndexPath works but remove: still does not. It > should remove the object, if there is a bug then I will file a bug report. > anyone ha

Forcing ordered-out-window to adjust position

2010-05-15 Thread Philip White
Hello, I was hoping someone could offer me some suggestions: Here is what I'm trying to do. I have a window that I create with the NSBorderlessWindowMask flag set. Since windows with this flag set don't really adopt any of the cocoa movement, sizing, or constraining behavior, I've been forced

Sorting the NSSet of a NSManagedObject's attribute

2010-05-15 Thread Gustavo Pizano
Hello all. this is a silly question, I have a Entity Invoice with a to Many relation to ItemsXInvoice and this one a to-One relation to Item.. so kinda ItemsXInvoice its join table, so I want to ask from my Invoice its ItemXInvoice's but ordered, I overwrote the accessor.. like this -(NSSet

Re: Forcing ordered-out-window to adjust position

2010-05-15 Thread Scott Ribe
If you can't get a direct answer to your question, could you create a subclass of NSWindow with a couple of very simple overrides: - (void) display {} - (void) displayIfNeeded {} You couldn't leave it out lest it muck with event handling, but you could order it in, position it, check its posit

Re: Forcing ordered-out-window to adjust position

2010-05-15 Thread Philip White
> If you can't get a direct answer to your question, could you create a > subclass of NSWindow with a couple of very simple overrides: > > - (void) display > {} > > - (void) displayIfNeeded > {} > > You couldn't leave it out lest it muck with event handling, but you could > order it in, positi

Re: Sorting the NSSet of a NSManagedObject's attribute

2010-05-15 Thread Quincey Morris
On May 15, 2010, at 10:42, Gustavo Pizano wrote: > NSSet * sortedtoRet = [NSSet setWithArray:[[toRet allObjects] > sortedArrayUsingDescriptors:[NSArray arrayWithObject:descriptor]]]; > return sortedtoRet; > } > > but :S.. of course it doesn't work, > I read I can apply to the NSFetc

Re: Sorting the NSSet of a NSManagedObject's attribute

2010-05-15 Thread Gustavo Pizano
OH!! You are right.. I forgot my discrete maths classes... :S so I have to return an array isn't it? ok I wil create the proper method to return the NSArray; g. On 15.5.2010, at 20:14, Quincey Morris wrote: > On May 15, 2010, at 10:42, Gustavo Pizano wrote: > >> NSSet * sorte

Re: Forcing ordered-out-window to adjust position

2010-05-15 Thread Jesper Storm Bache
I have only had the reverse problem (in some cases I need to circumvent AppKit mechanism), but have you looked at [NSWindow constrainFrameRect:frameRect toScreen:screen]: http://developer.apple.com/mac/library/documentation/cocoa/reference/ApplicationKit/Classes/NSWindow_Class/Reference/Reference

drawing into a hidden view

2010-05-15 Thread Shane
Hi, I have an application which swaps NSViews based on which segment of an NSSegmentedControl the user clicks on. There's one specific NSView in which I draw a graph using NSBezierPath's. This view is initialized once my application is started and always exists, it's just not always the currently

Re: drawing into a hidden view

2010-05-15 Thread Kyle Sluder
On Sat, May 15, 2010 at 11:50 AM, Shane wrote: > I have nothing in my code that says "if the view is not shown, don't > draw into it". Anyone have ideas on what's happening? You need to dissociate drawing from data collection. Your view's implementation of -drawRect: should simply draw whatever t

Re: Figuring out what's causing redrawing

2010-05-15 Thread Nick Zitzmann
On May 15, 2010, at 3:00 AM, Uli Kusterer wrote: > What about a view on top of/behind those views? It's not uncommon that e.g. a > pulsing default button causes the view it is embedded on to commonly redraw > (though that would generally cause a redraw on another thread, so is probably > not y

Re: Forcing ordered-out-window to adjust position

2010-05-15 Thread Philip White
On May 15, 2010, at 12:43 PM, Scott Ribe wrote: > If you can't get a direct answer to your question, could you create a > subclass of NSWindow with a couple of very simple overrides: > > - (void) display > {} > > - (void) displayIfNeeded > {} > > You couldn't leave it out lest it muck with ev

Re: Figuring out what's causing redrawing

2010-05-15 Thread appledev
Hi I did have one time something similar with an app where lots of views where recalculated when resizing the window. Using Quarts debug I noticed that some views did overlap each other during and after resizing a window and cause redrawing. Then I did the same as the suggestion above to show

Re: Figuring out what's causing redrawing

2010-05-15 Thread Paul Sanders
> Right, but how do I catch what is causing the views on top to redisplay? I > already tried breaking on the usual suspects and caught one view that was > doing unnecessary redisplays, but even after fixing that I'm still getting a > view in a completely different place that is constantly gettin

Drawing invisible window. was Re: Forcing ordered-out-window to adjust position

2010-05-15 Thread Philip White
On May 15, 2010, at 2:31 PM, Philip White wrote: I wrote this: > -(void)display > { > /* seems to be unnecessary? > NSGraphicsContext *context = [NSApp context]; > NSGraphicsContext *oldContext = [NSGraphicsContext currentContext]; > [NSGraphicsContext setCurrentContext:c

Re: Drawing invisible window. was Re: Forcing ordered-out-window to adjust position

2010-05-15 Thread Michael Ash
On Sat, May 15, 2010 at 3:48 PM, Philip White wrote: > > On May 15, 2010, at 2:31 PM, Philip White wrote: > > I wrote this: > >> -(void)display >> { >>       /* seems to be unnecessary? >>       NSGraphicsContext *context = [NSApp context]; >>       NSGraphicsContext *oldContext = [NSGraphicsConte

Re: Figuring out what's causing redrawing

2010-05-15 Thread Uli Kusterer
On 15.05.2010, at 21:26, Nick Zitzmann wrote: > Right, but how do I catch what is causing the views on top to redisplay? I > already tried breaking on the usual suspects and caught one view that was > doing unnecessary redisplays, but even after fixing that I'm still getting a > view in a comple

SETUP : Regular Expressions - Easy Setup for RegexKitLite

2010-05-15 Thread Bill Hernandez
I've been using RegexKitLite for regular expressions for a little while, and the other day when I went to add it to another project, I had forgotten about the project setup. I was getting debugging errors, and finally remembered that I had to add -licucore to the other linker flags. I decided t

Re: Figuring out what's causing redrawing

2010-05-15 Thread Nick Zitzmann
On May 15, 2010, at 3:00 PM, Uli Kusterer wrote: > override its drawRect: ? How else would you get the dirty rects to see what > is dirtied? Right, but what is causing -drawRect: to be called? That's what I want to know. Nick Zitzmann ___

Re: Figuring out what's causing redrawing

2010-05-15 Thread Uli Kusterer
On 16.05.2010, at 00:46, Nick Zitzmann wrote: > On May 15, 2010, at 3:00 PM, Uli Kusterer wrote: > >> override its drawRect: ? How else would you get the dirty rects to see what >> is dirtied? > > Right, but what is causing -drawRect: to be called? That's what I want to > know. How would I kn

How did Snow Leopard kill my table view?

2010-05-15 Thread Bill Cheeseman
I wrote an application that was built on and for Mac OS X 10.5 Leopard. The main view in its main window is a stock NSTableView. I used Cocoa bindings to populate and manipulate the table view. It works fine running on Leopard, but on Snow Leopard the table view no longer enables itself when I a

Re: SETUP : Regular Expressions - Easy Setup for RegexKitLite

2010-05-15 Thread Jens Alfke
On May 15, 2010, at 2:15 PM, Bill Hernandez wrote: > finally remembered that I had to add -licucore to the other linker flags. > I decided to make a few screen captures (10) that make it really easy to see > the small change that needs to be made to each project that uses regular > expressions.

Re: SETUP : Regular Expressions - Easy Setup for RegexKitLite

2010-05-15 Thread Bill Hernandez
On May 15, 2010, at 7:02 PM, Jens Alfke wrote: > FYI, you don’t have to edit the linker flags anymore to do this. In Xcode > 3.1+ you can open the target inspector, choose the General tab, and click the > + button at the bottom left to pop up a list of available libraries. Then > choose “libicu

Re: drawing into a hidden view

2010-05-15 Thread Shane
> You need to dissociate drawing from data collection. Your view's > implementation of -drawRect: should simply draw whatever the current > state is. It might be something as simple as this: > > - (void)drawRect:(NSRect)dirtyRect { >  for (DataPoint *p in [modelObject dataPoints]) >    [self drawDa

drawing border of NSPopUpButtonCell drawInteriorWithFrame:inView:

2010-05-15 Thread Shane
This is a data table header cell of type NSPopUpButtonCell where I'm trying to draw the bottom border of the cell. The problem is that the border along the bottom of each NSPopUpButtonCell only extends across part of the cell, not the entire length of the cell. The docs say about the cellFrame "T

Re: drawing into a hidden view

2010-05-15 Thread Kyle Sluder
On Sat, May 15, 2010 at 6:51 PM, Shane wrote: > But I have. My drawRect: is simply as follows. > > - (void) drawRect:(NSRect) rect > { >        NSRect bounds = [self bounds]; > >        [[NSColor blackColor] setFill]; >        [NSBezierPath fillRect:bounds]; > >        [self drawAxes]; >        [s

Framework linking errors

2010-05-15 Thread Patrick Rutkowski
I'm building a Framework which internally uses OpenSSL, and exposes a sort of OpenSSL wrapper for various small purposes. However, when linking the framework, Xcode complains of missing symbols like: _ERR_error_string_n _ERR_clear_error _SSL_CTX_free _SSL_CTX_new _ERR_get_error _SSL_library_init

Re: Framework linking errors

2010-05-15 Thread Patrick Rutkowski
I should mention that the obvious suggestion of "You need to link your framework against OpenSSL" is not what I'm looking for. If I link my framework statically against OpenSSL, then I force the clients of my framework to use that static version of OpenSSL, which I don't want. If I link my fram