Can't figure out where the memory leak comes from.

2009-07-10 Thread Y. Vera
Hello everyone! I'm somewhat of a cocoa newbie and I simply can't figure out why I'm getting a spike in the leaks graph in Instruments with this code. It seems to be a small leak (i.e. 16 Bytes and the Leaked Object is "Generalblock-16"; that is the only leaking object and says Self 100%) and it se

UIAlertView Confirmation Delete or Cancel

2009-07-10 Thread Steven Haas
Below is the code from Apple's example application call SQLiteBooks. What I was trying to do is simply create a UIAlertView, that asks the user if they are sure they want to delete the book. I am not sure how to incorporate this properly. // Remove a specific book from the array of books an

Re: Announcement + NSSegmentedCell drawing question

2009-07-10 Thread Daniel Furrer
Forwarding because I just noticed we're not on the list anymore. You sent your reply to me directly. On Fri, Jul 10, 2009 at 12:59 PM, Daniel Furrer wrote: > Thanks for your reply. > > So I'm drawing in an image but I just tried to draw on a view (I put the > same calls in the drawRect: method) b

Re: bypass NSApp

2009-07-10 Thread Stephen J. Butler
On Fri, Jul 10, 2009 at 6:50 PM, Julien Isorce wrote: > you are enterely right so then we are moving to the other solution: bypass > NSApp, > making a classic NSRunLoop but add to it the ability to perform/handle the > events that the NSApp usually is the only one able to do. > > I am open to any s

UIWebview issues

2009-07-10 Thread Development
I need to use a UIWebview of an in app paypal purchase, the problem is it does not work. the app hangs up when you try to log in. here is my webview code and the error I get: webViewContainer.autoresizesSubviews = YES; webViewContainer.autoresizingMask = (UIViewAutoresizingFlexibleWi

Re: getting directories created from a certain time

2009-07-10 Thread Scott Thompson
On Jul 10, 2009, at 1:46 PM, I. Savant wrote: On Jul 10, 2009, at 2:43 PM, Angelo Chen wrote: I have a lengthy process where it creates a few directories, I'd like to know how to get a list of directories created since the starting of the process, any hints? Thanks, If you're targeting

Re: bypass NSApp

2009-07-10 Thread Scott Thompson
sure but in the previous mails I tried to explain that I am making a plugin (which consists of a dynamic library) of a program which I have not the source code. OK.. the application for which you are writing the plugin... is it a Cocoa application, a Carbon application, or something else..

Re: bypass NSApp

2009-07-10 Thread Stephen J. Butler
On Fri, Jul 10, 2009 at 6:33 PM, Julien Isorce wrote: > So the final question: is there a way to make [NSThread isMainThread] return > YES in a thread different that the main thread of a process, on MacOSX ? We don't have the source for the Foundation Framework, but there is a pthreads pthread_mai

Re: bypass NSApp

2009-07-10 Thread Julien Isorce
2009/7/11 Mike Abdullah > > On 11 Jul 2009, at 00:33, Julien Isorce wrote: > > Hi, >> >> First, thx for your reply. >> >> 2009/7/10 Scott Thompson >> >> >>> On Jul 10, 2009, at 3:40 PM, Julien Isorce wrote: >>> >>> In GNUstep it's possible to decide which pthread is the "main thread". >>>

Re: bypass NSApp

2009-07-10 Thread Mike Abdullah
On 11 Jul 2009, at 00:33, Julien Isorce wrote: Hi, First, thx for your reply. 2009/7/10 Scott Thompson On Jul 10, 2009, at 3:40 PM, Julien Isorce wrote: In GNUstep it's possible to decide which pthread is the "main thread". I mean the first pthread which call GSRegisterCurrentThread, i

Re: bypass NSApp

2009-07-10 Thread Julien Isorce
Hi, First, thx for your reply. 2009/7/10 Scott Thompson > > On Jul 10, 2009, at 3:40 PM, Julien Isorce wrote: > > In GNUstep it's possible to decide which pthread is the "main thread". >> I mean the first pthread which call GSRegisterCurrentThread, is the main >> thread. >> >> And then the NSA

Re: bypass NSApp

2009-07-10 Thread I. Savant
On Jul 10, 2009, at 5:49 PM, Scott Thompson wrote: What exactly is it that are you trying to do on Mac OS X? What is the environment in which your code is running and what effect are you trying to achieve? And here we have the winning question (asked for the second time in this thread)

Re: bypass NSApp

2009-07-10 Thread Scott Thompson
On Jul 10, 2009, at 3:40 PM, Julien Isorce wrote: In GNUstep it's possible to decide which pthread is the "main thread". I mean the first pthread which call GSRegisterCurrentThread, is the main thread. And then the NSApp must be init and run in this main thread, as it's required on MacOSX.

Re: bypass NSApp

2009-07-10 Thread Julien Isorce
well ok, In GNUstep it's possible to decide which pthread is the "main thread". I mean the first pthread which call GSRegisterCurrentThread, is the main thread. And then the NSApp must be init and run in this main thread, as it's required on MacOSX. Is it possible to change the "main thread" as f

Re: NSConnection Proxy Crash

2009-07-10 Thread Kevin Brock
Greg Parker wrote: On Jul 10, 2009, at 12:18 PM, Kevin Brock wrote: look suspiciously like a Windows error code, 0xc23, STATUS_BUFFER_TOO_SMALL... Is there anywhere that you're getting back that type of error code on the other end of this? No, it looks like a malloc free list pointer. The

Re: NSConnection Proxy Crash

2009-07-10 Thread Greg Parker
On Jul 10, 2009, at 12:18 PM, Kevin Brock wrote: Mr. Gecko wrote: [MGMDaemon setProtocolForProxy:@protocol(MGMDaemonProtocol)]; [MGMDaemon runTest:@"Test"]; The basic code looks OK. I've got code a lot like that which is working fine... What's the declaration of the protocol methods that y

Re: Cocoa Frontend to SDL App

2009-07-10 Thread Anthony Smith
Yes, I have already done the SDL Xcode project. What I would like to do is be able to somehow make the binary of the SDL app use the Cocoa view as the output device and output all the video there or something similar. I've never done an integration like this so I'm slowly trudging through t

Re: Wake computer from sleep

2009-07-10 Thread Mr. Gecko
I decided to write a daemon that my alarm tells where the alarm file is and it tells the system when to wake up automatically. Thanks for helping anyway, Mr. Gecko On Jul 10, 2009, at 3:40 AM, Jean-Daniel Dupas wrote: Le 9 juil. 09 à 18:28, Mr. Gecko a écrit : Hello, I'm working on an alar

Re: NSConnection Proxy Crash

2009-07-10 Thread Mr. Gecko
I found out it was because I was releasing a NSString which had autorelease on. Thanks anyway, Mr. Gecko On Jul 10, 2009, at 2:21 PM, Kevin Brock wrote: Kevin Brock wrote: The low bytes of this: Exception Codes: KERN_INVALID_ADDRESS at 0xc023 look suspiciously like a Windows

Re: NSConnection Proxy Crash

2009-07-10 Thread Kevin Brock
Kevin Brock wrote: The low bytes of this: Exception Codes: KERN_INVALID_ADDRESS at 0xc023 look suspiciously like a Windows error code, 0xc23, STATUS_BUFFER_TOO_SMALL... I meant 0xc023 of course. Kevin ___ Cocoa-dev mailing l

Re: NSConnection Proxy Crash

2009-07-10 Thread Kevin Brock
Mr. Gecko wrote: [MGMDaemon setProtocolForProxy:@protocol(MGMDaemonProtocol)]; [MGMDaemon runTest:@"Test"]; The basic code looks OK. I've got code a lot like that which is working fine... What's the declaration of the protocol methods that you're calling? The low bytes of this: Exception C

Re: getting directories created from a certain time

2009-07-10 Thread I. Savant
On Jul 10, 2009, at 2:43 PM, Angelo Chen wrote: I have a lengthy process where it creates a few directories, I'd like to know how to get a list of directories created since the starting of the process, any hints? Thanks, If you're targeting Leopard, check out the FSEvents API. -- I.S.

getting directories created from a certain time

2009-07-10 Thread Angelo Chen
Hi, I have a lengthy process where it creates a few directories, I'd like to know how to get a list of directories created since the starting of the process, any hints? Thanks, Angelo Yahoo!香港提供網上安全攻略,教你如何防範黑客! 請前往 http://hk.promo.yahoo.com/security/ 了解更多!

Re: how to hide/display titlebar?

2009-07-10 Thread douglas welton
Have you tried using NSView's -enterFullScreenMode:withOptions: method? On Jul 9, 2009, at 12:57 AM, 李剑 wrote: Dear all, how to hide/display titlebar of cocoa window? i hope the window can be show full size when playing vedio! ___ Cocoa-dev mail

Re: how to hide/display titlebar?

2009-07-10 Thread Kyle Sluder
2009/7/8 李剑 : > how to hide/display titlebar of cocoa window? You can't. You'll need to create a borderless window using NSBorderlessWindowMask (which you can specify if you override NSWindow's initializer). That means you'll *never* have a title bar. > i hope the window can be show full size w

Re: How to write ipeg image created with CGImageRef?

2009-07-10 Thread Scott Thompson
I'm trying to save an NSBitmapImageRep initialized with - initWithCGImage: onto a disk. But the image of the saved file is bad. This means only black and white horizontal lines are drawn meaninglessly. The _rep in the below code is the NSBitmapImageRep instance allocated and initialized wi

Re: NSCondition (unlocked when not locked)

2009-07-10 Thread Benjamin Stiglitz
> > What’s the value of SLEEP? -waitUntilDate: can return NO indicating that the > > timeout elapsed and the lock is not locked; you probably want -wait. > > No, I do want the waitUntilDate because I do not solely want to wait > for the signal. In that case you probably want to use an NSCondition

Re: Cocoa Frontend to SDL App

2009-07-10 Thread Sherm Pendley
On Fri, Jul 10, 2009 at 9:58 AM, Anthony Smith wrote: > I'm wanting to integrate an already made SDL app executed through the > command line into a Cocoa app within a custom view. Does anybody have any > insight on where to start something like this? The most obvious starting point would be the Xc

Re: Cocoa Frontend to SDL App

2009-07-10 Thread vinai
Probably not - these programs do not have any intermediate graphical outputs. I actually struggled with a similar question earlier on. I am trying to put together an MRI data reconstruction program. Traditionally, most people have done command line programs (ironic - in that we do imaging ..

Re: NSSavePanel delegate Methods called by NSOpenPanel

2009-07-10 Thread Daniel Demiss
Am 10.07.2009 um 18:32 schrieb Daniel Demiss: Or is there another way I haven't seen yet? Well it seems that I've found the answer to my question. "panel:isValidFilename:" is called exactly once (and not multiple times as I suspected when I wrote it) when the "open" button is clicked. So cha

Re: NSSavePanel delegate Methods called by NSOpenPanel

2009-07-10 Thread Daniel Demiss
Hi Steve! Am 10.07.2009 um 17:37 schrieb Steve Christensen: The documentation for the NSSavePanel class says that the - panel:userEnteredFilename:confirmed: message is "sent when the user confirms a filename choice by hitting OK or Return in the NSSavePanel." That is not an issue for a NSOp

Re: NSCondition (unlocked when not locked)

2009-07-10 Thread Torsten Curdt
Hey Ben Thanks for quick response. > What’s the value of SLEEP? -waitUntilDate: can return NO indicating that the > timeout elapsed and the lock is not locked; you probably want -wait. No, I do want the waitUntilDate because I do not solely want to wait for the signal. So you are saying it shou

Re: NSCondition (unlocked when not locked)

2009-07-10 Thread Greg Guerin
Torsten Curdt wrote: while (!quit) { [pollingCondition lock]; [pollingCondition waitUntilDate: [NSDate dateWithTimeIntervalSinceNow:SLEEP]]; [pollingCondition unlock]; ... } ... } Is it OK to do it like that? Is there

Re: NSSavePanel delegate Methods called by NSOpenPanel

2009-07-10 Thread Steve Christensen
On Jul 9, 2009, at 6:40 AM, Daniel Demiss wrote: Hi all, I'm a little confused by the following situation: I have an NSPathControl (PopUp-Style) that should only allow certain paths to be selected. Therefore I have a controller-object that I set as the delegate of the NSPathControl and the NS

Re: Confused about NSPrintInfo margins

2009-07-10 Thread Keary Suska
On Jul 9, 2009, at 7:48 PM, Graham Cox wrote: Thanks Joel, certainly setting the margins directly does work. What I'm left wondering is what they are actually for - they are never set by he Page Setup panel and never change with changes to paper size, printer, etc. The docs aren't specifi

Re: Confused about NSPrintInfo margins

2009-07-10 Thread Ross Carter
On Jul 9, 2009, at 12:48 AM, Graham Cox wrote: I'm trying to get information about printing margins so my app can show where the edges of the paper are correctly as well as the content area. Don't you want NSPrintInfo - (NSRect)imageablePageBounds ? Ross ___

Re: NSCondition (unlocked when not locked)

2009-07-10 Thread Benjamin Stiglitz
I have a worker thread that is only slowly polling. I would like to be able wake him up from a different thread though. A bit like the select(2) pattern. So what I do is: ... pollingCondition = [[NSCondition alloc] init]; ... - (void) pollNow { [pollingCondition lock]; [

Re: Cocoa Frontend to SDL App

2009-07-10 Thread Anthony Smith
Thanks for the input. SDL is actually a simplified interface to OpenGL so I'm wanting to integrate an already made SDL game into a Cocoa front-end. I think handbrake and ffmpegx are trying to create a front- end for the command line tools where I'm trying to integrate an actual view. Do you

Re: Cocoa Frontend to SDL App

2009-07-10 Thread vinai
Doesn't ffmpegX and handbrake already do this ? I think both are GPL'ed and wrap around ffmpeg. cheers vinai --- On Fri, 7/10/09, Anthony Smith wrote: > I'm wanting to integrate an already made SDL app executed through the > command line into a Cocoa app within a custom view. Does anybody ha

Cocoa Frontend to SDL App

2009-07-10 Thread Anthony Smith
I'm wanting to integrate an already made SDL app executed through the command line into a Cocoa app within a custom view. Does anybody have any insight on where to start something like this? smime.p7s Description: S/MIME cryptographic signature ___

How to write ipeg image created with CGImageRef?

2009-07-10 Thread norio ota
Hi, I'm trying to save an NSBitmapImageRep initialized with - initWithCGImage: onto a disk. But the image of the saved file is bad. This means only black and white horizontal lines are drawn meaninglessly. The _rep in the below code is the NSBitmapImageRep instance allocated and initiali

NSCondition (unlocked when not locked)

2009-07-10 Thread Torsten Curdt
Hey folks, I have a worker thread that is only slowly polling. I would like to be able wake him up from a different thread though. A bit like the select(2) pattern. So what I do is: ... pollingCondition = [[NSCondition alloc] init]; ... - (void) pollNow { [pollingCondition

Re: Wake computer from sleep

2009-07-10 Thread Jean-Daniel Dupas
Le 9 juil. 09 à 18:28, Mr. Gecko a écrit : Hello, I'm working on an alarm and I'm wondering what would be the best way to make it wake up the computer. I've heard of IOPMSchedulePowerEvent and I think it's the best way, but I'll need root privileges and I'm guessing the best way to do that

Retain cycles with NIB instantiations, bindings

2009-07-10 Thread Half Activist
Hi, I'm loading a NIB file at runtime and use a new instance of a class as its owner each time. Everything works fine, until I wish to delete an object. In my software, i'm using several instances of objects that have their own UI but are all part of kind of "project", a co