Re: Rendering OpenGL in timed loop (CoreVideo).

2009-04-11 Thread Brian Bruinewoud
Ok. That works. I was coming from an NSOpenGLView example where the view sets the context before the drawRect is sent. Any it, doesn't crash/hang/stop now, but it doesn't draw anything, either... :( Oh well. On 11/04/2009, at 14:18 , Michael Ash wrote: You can't just go and start

Re: Undocumented flags in LSCopyItemInfoForRef

2009-04-11 Thread Gerriet M. Denkmann
On 10 Apr 2009, at 15:25, Jean-Daniel Dupas wrote: Le 10 avr. 09 à 10:13, Gerriet M. Denkmann a écrit : On 10 Apr 2009, at 14:10, Jean-Daniel Dupas wrote: Le 10 avr. 09 à 07:06, Gerriet M. Denkmann a écrit : LSItemInfoFlags, returned by LSCopyItemInfoForRef() when the queried item is

RE: IKImageBrowserView drag and drop/reordering when using core data [SOLVED]

2009-04-11 Thread jonat...@mugginsoft.com
Regarding this previous post of mine: http://www.cocoabuilder.com/archive/message/cocoa/2009/1/13/227642 The code listed in that previous posting contains an error which results in insidious behaviour: “EXC_BAD_ACCESS” sometimes generated when dragging within IKBrowserImageView I had

Re: WebKit Caching

2009-04-11 Thread Adam Thorsen
Hi Greg, I mistakenly posted to this list first, when I should have posted to the sdk list. The client is not performing a conditional GET request based on examinations of the outgoing requests (from within the client). The server is detecting date changes and sending the correct date

Re: Changing CAConstraint for a CALayer

2009-04-11 Thread Kevin Cathey
Constraints are immutable objects, once you create them, you cannot change them. This is a limitation of the constraint layout manager. If you need more fine-grain control, use a custom layout manager. Kevin -- Kevin Cathey On 10 Apr 2009, at 12:15, Rama Krishna

Re: NSLog with %f and comparisons using ==

2009-04-11 Thread Michael Ash
On Sat, Apr 11, 2009 at 12:46 PM, James Maxwell jbmaxw...@rubato-music.com wrote: I've got a strange problem. I have a list of float constants that I need to compare to the result of a new calculation. I derived the constants by performing the calculation, and printing using NSLog with %f,

Re: NSLog with %f and comparisons using ==

2009-04-11 Thread James Maxwell
oooh, damn... I was afraid someone was going to say that. I just hoped there might be some way to force a float to conform to what NSLog %f prints... That seems like it might be a useful function - something like pround(aFloat), for print-round, to force any float number to round as the

Re: NSLog with %f and comparisons using ==

2009-04-11 Thread Greg Titus
If what you really want is to see whether the result is the same as %f previously printed, then you could always make your array of constants an array of constant _strings_ and then compare the strings. Not terribly efficient, maybe, but straightforward. - Greg On Apr 11, 2009, at

Re: NSLog with %f and comparisons using ==

2009-04-11 Thread James Maxwell
Yeah, that's an idea... But I do need it to be fairly efficient. I've solved the problem by calculating fabs(val1 - val2) and only allowing a very small margin of error (0.01). It seems to be working. If this is still going to be disaster-prone, I'd appreciate a quick heads-up. But keep

Re: Does waitUntilExit really mean that?

2009-04-11 Thread Michael Domino
Ken, I ended up throwing out NSTask in favor of popen for running hdiutil, and my code seems much more stable now. Did I shoot myself in the foot some other way? I'm executing this in a pthread of its own. I also kept getting exceptions thrown for nil arguments to NSConreteTask, besides

Re: Does waitUntilExit really mean that?

2009-04-11 Thread Gwynne Raskind
On Apr 11, 2009, at 2:29 PM, Michael Domino wrote: I ended up throwing out NSTask in favor of popen for running hdiutil, and my code seems much more stable now. Did I shoot myself in the foot some other way? I'm executing this in a pthread of its own. I also kept getting exceptions thrown

Re: NSLog with %f and comparisons using ==

2009-04-11 Thread Greg Guerin
James Maxwell wrote: Yeah, that's an idea... But I do need it to be fairly efficient. I've solved the problem by calculating fabs(val1 - val2) and only allowing a very small margin of error (0.01). It seems to be working. If this is still going to be disaster-prone, I'd appreciate a

Re: NSLog with %f and comparisons using ==

2009-04-11 Thread Greg Guerin
James Maxwell wrote: Now, when I run the calculation live and try to compare to my stored constants, I'm not getting matches. I'm assuming this is because the result of the calculation *isn't* actually what I stored in my constants, since the constants were rounded during the NSLog. So,

displaying a screen saver on multiple displays

2009-04-11 Thread Development
I'm not seeing exactly how to go about running my screen save on both of my displays. At least I'm not seeing an accessor that allows me to add the rendered screen saver to more than one display. How would I go about doing that? Thanks ___

Re: displaying a screen saver on multiple displays

2009-04-11 Thread Nick Zitzmann
On Apr 11, 2009, at 1:34 PM, Development wrote: At least I'm not seeing an accessor that allows me to add the rendered screen saver to more than one display. How would I go about doing that? ScreenSaverEngine will always create one instance of your saver view class per screen. Nick

Re: NSLog with %f and comparisons using ==

2009-04-11 Thread James Maxwell
hmm... Well, this all sounds like a sledge-hammer approach to my immediate problem. The actual explanation of what I'm doing is kind of long-winded, so I'll spare you that. For now, I know the calculated values will always come out the same, since there are a limited number of possible

Re: NSLog with %f and comparisons using ==

2009-04-11 Thread Michael Ash
On Sat, Apr 11, 2009 at 4:45 PM, James Maxwell jbmaxw...@rubato-music.com wrote: hmm... Well, this all sounds like a sledge-hammer approach to my immediate problem. The actual explanation of what I'm doing is kind of long-winded, so I'll spare you that. For now, I know the calculated values

Re: NSLog with %f and comparisons using ==

2009-04-11 Thread James Maxwell
oh, geez... Okay, you guys made your point! ;-) One thing I love about this list; I *always* get useful info. I'll find a better way to do this soon. In this particular case, the match could be specified as broadly as any value falling within a sort of bin. The bottoms of each of these bins

@selector not working with (id)anObject

2009-04-11 Thread Trygve Inda
[NSThread detachNewThreadSelector:@selector(threadMethod:) toTarget:self withObject:@selector(myMethod)]; -(void)threadMethod:(id)anObject { NSAutoreleasePool*pool = [[NSAutoreleasePool alloc] init]; SEL comp = (SEL)anObject; ... Do stuff ... [self

Re: @selector not working with (id)anObject

2009-04-11 Thread Bill Bumgarner
On Apr 11, 2009, at 5:20 PM, Trygve Inda wrote: -(void)threadMethod:(id)anObject { NSAutoreleasePool*pool = [[NSAutoreleasePool alloc] init]; SEL comp = (SEL)anObject; ... Do stuff ... [self performSelectorOnMainThread:comp withObject:nil waitUntilDone:NO];

Re: @selector not working with (id)anObject

2009-04-11 Thread Trygve Inda
On Apr 11, 2009, at 5:20 PM, Trygve Inda wrote: -(void)threadMethod:(id)anObject { NSAutoreleasePool*pool = [[NSAutoreleasePool alloc] init]; SEL comp = (SEL)anObject; ... Do stuff ... [self performSelectorOnMainThread:comp withObject:nil waitUntilDone:NO];

Re: @selector not working with (id)anObject

2009-04-11 Thread Bill Bumgarner
On Apr 11, 2009, at 5:32 PM, Trygve Inda wrote: So one of these needs to be called: [self performSelectorOnMainThread:@selector(cacheComplete) withObject:nil waitUntilDone:NO]; [self performSelectorOnMainThread:@selector(initComlete) withObject:nil waitUntilDone:NO]; Thoughts? On Apr

Re: @selector not working with (id)anObject

2009-04-11 Thread Sherm Pendley
2009/4/11 Trygve Inda cocoa...@xericdesign.com I have a thread. Depending on how it is called, I need to do something different at the end of the main processing so I wanted to pass a selector into the thread so it could call it when it was ready. I could just pass an NSNumber and do case1,

Re: @selector not working with (id)anObject

2009-04-11 Thread Trygve Inda
2009/4/11 Trygve Inda cocoa...@xericdesign.com I have a thread. Depending on how it is called, I need to do something different at the end of the main processing so I wanted to pass a selector into the thread so it could call it when it was ready. I could just pass an NSNumber and do

Re: @selector not working with (id)anObject

2009-04-11 Thread Trygve Inda
It does not seem I can invoke this on the main thread. An NSInvocation? Basically I just need to use a function pointer. How does Cocoa do this? I need to pass either someMethod or someOtherMethod and later call it with [self performSelectorOnMainThread:theMethod withObject:nil

Re: @selector not working with (id)anObject

2009-04-11 Thread Bill Bumgarner
Sigh. Hit shift-cmd-D a bit too soon. :) It does not seem I can invoke this on the main thread. An NSInvocation? [invocation performSelectorOnMainThread: @selector(invokeWithTarget:) withObject: ...whatever... waitUntilDone: NO]; Basically I just need to use a function pointer. How does

NSWorkspace openURL does not launch application

2009-04-11 Thread Edward Chan
Hello, It seems that NSWorkspace.openURL() is not launching my default application. For example, if I try use openURL to open http://www.nhl.com, Safari/Firefox/etc will not launch and ultimately fail to load the url. However, if Safari/Firefox is already running, it will open the url in a new

Re: NSLog with %f and comparisons using ==

2009-04-11 Thread Michael Ash
On Sat, Apr 11, 2009 at 7:47 PM, James Maxwell jbmaxw...@rubato-music.com wrote: oh, geez... Okay, you guys made your point! ;-) One thing I love about this list; I *always* get useful info. I'll find a better way to do this soon. In this particular case, the match could be specified as

Re: @selector not working with (id)anObject

2009-04-11 Thread Michael Ash
2009/4/11 Trygve Inda cocoa...@xericdesign.com: [NSThread detachNewThreadSelector:@selector(threadMethod:) toTarget:self withObject:@selector(myMethod)]; This should have produced a warning like this: warning: passing argument 3 of ‘detachNewThreadSelector:toTarget:withObject:’ from