Re: Logical and - second operator evaluated?

2009-03-03 Thread Peter N Lewis
At 21:06 +0100 1/3/09, Martijn van Exel wrote: I can't seem to get away with if(timer!=nil [timer isValid]) [timer invalidate]; Aside from whatever is actually causing your problems (which is nothing to do with the short circuited and in this line, these three lines are all

setAffineTransform: behaves differently around setLayer:

2009-03-03 Thread rajesh
Hi All, I am stuck again at seemingly obvious point, but I can't figure out where In MyView Class , below lines work fine for flipping the layer (but whenever I try to resize or add a subLayer to it, view flashes for the reason I don't know) -(void)awakeFromNib{ drawLayer = [CALayer

Cocoa - PHP - MySQL

2009-03-03 Thread Steve Cronin
Folks; I've inherited some Cocoa code that uses NSMutableNURLRequest and NSURLConnection to pass .php request to a server. The NSMutableURLRequest packs up some data into the the .php which stuffs this data into a MySQL database. This is all working nicely. Now what I've been asked to

Re: Cocoa - PHP - MySQL

2009-03-03 Thread Peter Blazejewicz
hi Steve, this ADC article: http://developer.apple.com/safari/articles/creatingrestfulclients.html should give you all required pointers I think. Even if written as example of REST with Ruby it describes how to do POST/GET (and others) based requests to server side. Examples in article are

Line height multiple and printing

2009-03-03 Thread Michael Vannorsdel
I have an NSTextFieldCell that draws attributed strings which have non- default kerning and line multiple heights (to tighten line spacing). This all draws as expected in the window but when these cells draw to the print operation context the line multiple is ignored (using default) while

Listening key board event while application in status bar

2009-03-03 Thread Vijay Kanse
Hello, My application remains in system status bar. and i have three menu items with my application icon. I want to add key board listener for my application. so, if i press ctrl + shift + f12 then it should give me some event. the menu should not display this shortcut and menu item. is it

Can't get setDelegate to work on NSMenu attached to NSStatusItem

2009-03-03 Thread Mark D. Gerl
I have a working NSStatusItem installed with a menu. I need to dynamically alter that menu before it's presented. I'm trying to do something along the lines of what the airport menu does (try option- clicking on it). So, I need to tap into some NSMenu events - most notably the

Re: Code Signing for Dummies

2009-03-03 Thread Tim Murison
So do I just create self-signed certificate and select it in the Xcode build settings and that's it? Everything is as desirable and as functional as need be? Pretty much. Although in future versions Apple may elect to nag if the certificate is not signed by a trusted root authority.

Re: Code Signing for Dummies

2009-03-03 Thread Paul Sanders
So do I just create self-signed certificate and select it in the Xcode build settings and that's it? Everything is as desirable and as functional as need be? Pretty much. Although in future versions Apple may elect to nag if the certificate is not signed by a trusted root authority. So

Re: NSSplitView splitViewDidResizeSubviews

2009-03-03 Thread Benjamin Stiglitz
Also, if I want to know when the user has completed the divider movement, how would I find that out? I suspect I'd need to subclass NSSplitView method that handles the mouse events... Yes; specifically, you should look at -mouseDown:, since NSSplitView runs an event loop instead of using

Re: Code Signing for Dummies

2009-03-03 Thread Tim Murison
So do I just create self-signed certificate and select it in the Xcode build settings and that's it? Everything is as desirable and as functional as need be? Pretty much. Although in future versions Apple may elect to nag if the certificate is not signed by a trusted root authority. So

Re: Advice on building a complex user custom control

2009-03-03 Thread Benjamin Stiglitz
I'm working on a small game engine, and as such, I want to create a level editor for the game. I love the old style Doom level editors, so that's what I'm going for [1]. Notice in that screenshot the amount the user can interact with - moving vertices on the grid, creating lines between

Re: Changing NSTableView cell immediately before editing

2009-03-03 Thread K. Darcy Otto
Well, I've tried just about everything I can think of at this point, but can't change the NSTableView cell successfully. To give some more detail, the cell text is red when there is an error, but when the user goes to edit the cell, I want to change the cell text back to black. I can

Re: Code Signing for Dummies

2009-03-03 Thread Paul Sanders
Apple can assume 2 applications calling themselves the same thing, with different versions, signed with the same self-signed cert were published by the same person, and by extension, that any user preferences (firewall and parental controls, are the only preferences that use code-signing at

Re: Changing NSTableView cell immediately before editing

2009-03-03 Thread Paul Sanders
I think what I need is a controlTextMightBeginEditing instead of controlTextDidBeginEditing. ;-) Override -mouseDown, call [super], then check the first responder? If it's a text edit field, fade to black. Something like that anyway, I know not precisely of what I speak.

Re: float from NSData

2009-03-03 Thread Sean McBride
On 3/2/09 8:32 PM, Jay Kickliter said: I know I have to play around to make sure the bytes are in the right order. But what I can't seem to figure out, is how I create a float from those 4 bytes stored in an instance of NSData. Has anybody run into this situation? Not sure if I'm understanding

Re: Path for writeToFile

2009-03-03 Thread Pierce Freeman
I may be crazy here, but could you point me to some documentation? The only one I found is legacy. On 3/2/09 8:56 PM, Graham Cox graham@bigpond.com wrote: On 03/03/2009, at 3:36 PM, Pierce Freeman wrote: Hi everyone: I am running into a bit of a problem when trying to use

Re: Code Signing for Dummies

2009-03-03 Thread Tim Murison
OK, thank you. Is it possible, would you happen to know, for an application to verify its own signature? I do this on Windows (using WinVerifyTrust) to check that the code has not been tampered with. Can't trust anybody these days :) It is possible, but the APIs to code-signing are

Re: float from NSData

2009-03-03 Thread Sean McBride
On 3/3/09 12:42 PM, Graham Cox said: Have a look at NSSwapBigFloatToHost and friends Interesting. I'd not noticed that function, but I'm a bit suspicious of it. It takes a NSSwappedFloat struct, which is a struct with a single 'long'. But a float is 32 bit, and a long is either 32 or 64

Re: Code Signing for Dummies

2009-03-03 Thread Paul Sanders
OK, thank you. Is it possible, would you happen to know, for an application to verify its own signature? I do this on Windows (using WinVerifyTrust) to check that the code has not been tampered with. Can't trust anybody these days :) It is possible, but the APIs to code-signing are

Re: float from NSData

2009-03-03 Thread Michael Ash
On Tue, Mar 3, 2009 at 10:43 AM, Sean McBride s...@rogue-research.com wrote: On 3/3/09 12:42 PM, Graham Cox said: Have a look at NSSwapBigFloatToHost and friends Interesting.  I'd not noticed that function, but I'm a bit suspicious of it.  It takes a NSSwappedFloat struct, which is a struct

Re: EXC_BAD_ACCESS in _class_changeInfo

2009-03-03 Thread Greg Parker
On Mar 2, 2009, at 9:22 PM, Dave DeLong wrote: Hey everyone, I've just come across something that I'm totally lost on. I've got an app that I'm making that uses the Flying Meat database system (this may or may not be relevant; I have no idea), a couple static arrays[], and an

Re: float from NSData

2009-03-03 Thread Sean McBride
On 3/3/09 11:00 AM, Michael Ash said: It's an unsigned int in the 10.5 SDK, which is what you must use if you're going to be using any NS APIs in 64-bit. So it is, sorry for the noise. (The newest documentation still shows 'long', guess I should have checked the headers too!) --

Re: Code Signing for Dummies

2009-03-03 Thread Michael Ash
On Tue, Mar 3, 2009 at 10:34 AM, Paul Sanders p.sand...@dsl.pipex.com wrote: Apple can assume 2 applications calling themselves the same thing, with different versions, signed with the same self-signed cert were published by the same person, and by extension, that any user preferences

Re: The fieldEditor and a focus ring

2009-03-03 Thread Eric Gorr
On Mar 2, 2009, at 6:19 PM, Graham Cox wrote: On 03/03/2009, at 2:30 AM, Eric Gorr wrote: [self lockFocus]; [NSGraphicsContext saveGraphicsState]; NSRect focusRingBounds = [self bounds]; NSSetFocusRingStyle( NSFocusRingOnly ); NSBezierPath *path = [NSBezierPath

Re: float from NSData

2009-03-03 Thread Jay Kickliter
That's what I'm doing. But don't understand how to get the 4 bytes I have in NSData into a float variable. On Mar 3, 2009, at 10:39 AM, Sean McBride wrote: On 3/2/09 8:32 PM, Jay Kickliter said: I know I have to play around to make sure the bytes are in the right order. But what I can't

Re: Can't get setDelegate to work on NSMenu attached to NSStatusItem

2009-03-03 Thread Nick Zitzmann
On Mar 3, 2009, at 7:27 AM, Mark D. Gerl wrote: So, I need to tap into some NSMenu events - most notably the menuNeedsUpdate: delegate method. However, when I call the setDelegate: of my NSMenu that's attached to my NSStatusItem, the icon shows, and highlights when clicked, but the menu

Re: Path for writeToFile

2009-03-03 Thread Nick Zitzmann
On Mar 3, 2009, at 8:40 AM, Pierce Freeman wrote: I may be crazy here, but could you point me to some documentation? The only one I found is legacy. I think the parent meant FSFindFolder(), which will return an FSRef for a given special folder. That API is not legacy, and works on all

Re: float from NSData

2009-03-03 Thread Sean McBride
On 3/3/09 11:51 AM, Jay Kickliter said: That's what I'm doing. But don't understand how to get the 4 bytes I have in NSData into a float variable. NDData* data = ... const float* bytes = [data bytes]; float value = bytes[0]; -- Sean

Re: float from NSData

2009-03-03 Thread Michael Vannorsdel
float f; [myData getBytes:f length:sizeof(float)]; On Mar 3, 2009, at 9:51 AM, Jay Kickliter wrote: hat's what I'm doing. But don't understand how to get the 4 bytes I have in NSData into a float variable. ___ Cocoa-dev mailing list

To run a block of code at every 1 second

2009-03-03 Thread Nick Rogers
Hi, Here's the code: the following method is running in a separate thread: - (void)myFucntion { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; for (;;)// for loop starts here and is very quick, 100s of iterations per second { {

NSCell highlighting for keyboard equivalents

2009-03-03 Thread Benjamin Dobson
Hello, I have a subclass of NSButtonCell. It overrides -drawWithFrame:inView: and -highlight:withFrame:inView: to produce a customised look. However, highlight:withFrame:inView: is not getting called from the keyboard equivalent. I'm sure I'll look pretty stupid for asking this, but I

Re: To run a block of code at every 1 second

2009-03-03 Thread Thomas Davie
On 3 Mar 2009, at 18:17, Nick Rogers wrote: Hi, Here's the code: the following method is running in a separate thread: - (void)myFucntion { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; for (;;)// for loop starts here and is very quick, 100s of iterations per second

Re: Listening key board event while application in status bar

2009-03-03 Thread Eric Schlegel
On Mar 3, 2009, at 4:50 AM, Vijay Kanse wrote: Hello, My application remains in system status bar. and i have three menu items with my application icon. I want to add key board listener for my application. so, if i press ctrl + shift + f12 then it should give me some event. the menu

Latent objects remain associated in NSTokenField after they are deleted/removed?

2009-03-03 Thread Honey Pot
Found the problem, it turns out I wasn't setting one of my objects to nil, so after it was run through once, it was using old data instead of replacing it with new data. Wasn't the tokenfield at all ;) ___ Cocoa-dev mailing list

Re: To run a block of code at every 1 second

2009-03-03 Thread Michael Vannorsdel
Make the main thread method something like this: - (void)myThreadStart { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(myFucntion) userInfo:nil repeats:YES]; [[NSRunLoop currentRunLoop] run];

To run a block of code at every 1 second

2009-03-03 Thread Stuart Malin
On Mar 3, 2009, at 7:24 AM, cocoa-dev-requ...@lists.apple.com wrote: the following method is running in a separate thread: - (void)myFucntion { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; for (;;)// for loop starts here and is very quick, 100s of iterations

Re: To run a block of code at every 1 second

2009-03-03 Thread Joar Wingfors
On Mar 3, 2009, at 9:17 AM, Nick Rogers wrote: Hi, Here's the code: the following method is running in a separate thread: - (void)myFucntion { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; for (;;)// for loop starts here and is very quick, 100s of iterations per

fieldEditor not scrolling to keep insertion point / indicator visible

2009-03-03 Thread Eric Gorr
This behavior can be easily seen in the /Developer/Examples/ Accessibility/AXCanvas sample code as well. Basically, if one starts typing and proceeds to go beyond what the fieldEditor can display, the fieldEditor does not automatically scroll to keep the indicator visible. Is there an

Problem when i connect Add button to NSArrayController

2009-03-03 Thread haresh vavdiya
Hi, I am learning Cocoa Development from Aaron Hillegass's book. In he has given Cor Data document based application example, i am trying to do this example. I have added two button, one for adding new row and second for delete the rows. And then in Interface Builder, we have to

NSDocumentController Problem

2009-03-03 Thread 陈清华
Hi I am transferring my application to Snow. It is a document application based on sdk 10.4. I found it will print this message when invoke [[NSDocumentController sharedDocumentController] openUntitledDocumentAndDisplay:YES error:nil]; Unable to parse the format string (displayFlags == null) ||

Re: How to create a simple pop-up-menu

2009-03-03 Thread Preston Jackson
Alternatively, you can create an NSMenu and use the class method + (void)popUpContextMenu:(NSMenu *)menu withEvent:(NSEvent *)event forView:(NSView *)view to pop it up. Preston Jackson http://sidelightblog.blogspot.com On Mar 2, 2009, at 11:06 AM, Benjamin Dobson wrote: On 2 Mar 2009,

-[UIView actionForLayer:forKey:] returns NSNull

2009-03-03 Thread BJ Homer
I have a UIWebView displaying the contents of a local html file. When the user presses a button, I'd like to transition, with a fade, to another UIWebView (also displaying local content; no need to wait for the network.) The UIView transitions will not do a fade, but a CATransition on a CALayer

Re: Problem when i connect Add button to NSArrayController

2009-03-03 Thread I. Savant
On Tue, Mar 3, 2009 at 3:53 AM, haresh vavdiya vavdiyahar...@gmail.com wrote:       And then in Interface Builder,  we have to control+drag from Add button to NSArrayController's add: method, Sounds fine.       But in my example, when drag from button to NSMutableArray, then it doesn't

Re: NSDocumentController Problem

2009-03-03 Thread I. Savant
On Tue, Mar 3, 2009 at 6:39 AM, 陈清华 yoyo...@gmail.com wrote: I am transferring my application to Snow. You can't discuss Snow Leopard because you've agreed to the NDA. Anybody else who might be able to help you is similarly bound by this agreement, so nobody can help you. -- I.S.

Re: NSDocumentController Problem

2009-03-03 Thread Nick Zitzmann
On Mar 3, 2009, at 4:39 AM, 陈清华 wrote: I am transferring my application to Snow. And the first rule of Fight Club is... Code to invoke: - (void) applicationDidFinishLaunching:(NSNotification *)aNotification { NSError *error = [[NSError alloc] init]; But I don't think I'm violating any

Re: NSDocumentController Problem

2009-03-03 Thread Sean McBride
On 3/3/09 11:30 AM, Nick Zitzmann said: NSLog([e description]); Don't ever do this. NSLog() takes a varargs string, so if there is a % in the description, then the app will crash. Instead, do this: NSLog(@%@, e); The compiler can catch this mistake if you add -Wformat=2. It will warn:

Re: Can't get setDelegate to work on NSMenu attached to NSStatusItem

2009-03-03 Thread Mark D. Gerl
On Mar 3, 2009, at 11:52 AM, Nick Zitzmann wrote: Can you please show your code? I've done this before, and it worked when I tried it. SURE, see below. I should point out that I've also tried implementing other delegate methods, with no luck. And, I've tried setting the menu's delegate

Re: fieldEditor not scrolling to keep insertion point / indicator visible

2009-03-03 Thread Eric Gorr
On Mar 3, 2009, at 1:04 PM, Eric Gorr wrote: This behavior can be easily seen in the /Developer/Examples/ Accessibility/AXCanvas sample code as well. Basically, if one starts typing and proceeds to go beyond what the fieldEditor can display, the fieldEditor does not automatically scroll

Re: Can't get setDelegate to work on NSMenu attached to NSStatusItem

2009-03-03 Thread Nick Zitzmann
On Mar 3, 2009, at 12:30 PM, Mark D. Gerl wrote: [statusItem setMenu:theMenu]; Why are you setting the menu twice? This step might be redundant. [statusItem setEnabled:YES]; This line is redundant and can probably be taken out. // build NSMenu by HAND NSMenu *menu = [[[NSMenu alloc]

Re: -[UIView actionForLayer:forKey:] returns NSNull

2009-03-03 Thread David Duncan
On Mar 3, 2009, at 9:15 AM, BJ Homer wrote: The problem is that, as near as I can tell, UIView's implementation of actionForLayer:forKey: returns an NSNull. Am I missing something here, or is a UIView's layer's actions dictionary only usable if you're subclassing UIView? By default UIKit

Re: Listening key board event while application in status bar

2009-03-03 Thread Tobias Zimmerman
Information and an example of the function Eric references can be found on the following website, which I found very helpful when implementing global hotkeys in my statusItem: http://dbachrach.com/blog/2005/11/28/program-global-hotkeys-in-cocoa-easily/ Tobias Zimmerman Hi Vijay, Take a

Re: Can't get setDelegate to work on NSMenu attached to NSStatusItem

2009-03-03 Thread Quincey Morris
On Mar 3, 2009, at 11:47, Nick Zitzmann wrote: // build NSMenu by HAND NSMenu *menu = [[[NSMenu alloc] initWithTitle:@abc] autorelease]; if (menu != NULL) You don't have to worry about this. There are a few classes that may return nil (not NULL) if initialization fails, such as NSPipe.

Re: To run a block of code at every 1 second

2009-03-03 Thread Charles Srstka
On Mar 3, 2009, at 11:17 AM, Nick Rogers wrote: Hi, Here's the code: the following method is running in a separate thread: - (void)myFucntion { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; for (;;)// for loop starts here and is very quick, 100s of iterations per

Re: Can't get setDelegate to work on NSMenu attached to NSStatusItem

2009-03-03 Thread Nick Zitzmann
On Mar 3, 2009, at 1:33 PM, Quincey Morris wrote: I don't know of any documented API contract that says [NSMenu initWithTitle:] never fails, so checking the returned value seems prudent. In the case of Apple's documentation, it's the other way around. Unless the documentation mentions

integrate google map in cocoa app?

2009-03-03 Thread Jushin
I wonder if it is ok to integrate google map in a cocoa application using webkit. I know it's possible, but I was also told that google map only can be used within a web browser. Do you guys have any experience with this? ___ Cocoa-dev mailing list

Re: integrate google map in cocoa app?

2009-03-03 Thread Andrew Farmer
On 03 Mar 09, at 13:04, Jushin wrote: I wonder if it is ok to integrate google map in a cocoa application using webkit. I know it's possible, but I was also told that google map only can be used within a web browser. Do you guys have any experience with this? WebKit is an embeddable web

Re: Can't get setDelegate to work on NSMenu attached to NSStatusItem

2009-03-03 Thread Quincey Morris
On Mar 3, 2009, at 12:50, Nick Zitzmann wrote: On Mar 3, 2009, at 1:33 PM, Quincey Morris wrote: I don't know of any documented API contract that says [NSMenu initWithTitle:] never fails, so checking the returned value seems prudent. In the case of Apple's documentation, it's the other

Re: Changing NSTableView cell immediately before editing

2009-03-03 Thread K. Darcy Otto
Thanks for this. I think this would solve part of the problem (when it was clicked on by the user), but not if the text edit field were selected in some way other than a mouse click. But you gave me an idea: what about subclassing NSTextView, so that when the field editor is called, the

where to store this kind of data

2009-03-03 Thread Stefan Groschupf
Hi All, I'm very new to cocoa - though have other oo language experience. My goal is write an application that synchronize some servers with a local os x app. When my app starts it basically should list all available server connections if this is empty open a form window where the user can

Re: where to store this kind of data

2009-03-03 Thread Benjamin Dobson
On 3 Mar 2009, at 22:13:08, Stefan Groschupf wrote: Hi All, I'm very new to cocoa - though have other oo language experience. My goal is write an application that synchronize some servers with a local os x app. When my app starts it basically should list all available server connections if

Re: fieldEditor not scrolling to keep insertion point / indicator visible

2009-03-03 Thread Eric Gorr
On Mar 3, 2009, at 2:42 PM, Eric Gorr wrote: On Mar 3, 2009, at 1:04 PM, Eric Gorr wrote: This behavior can be easily seen in the /Developer/Examples/ Accessibility/AXCanvas sample code as well. Basically, if one starts typing and proceeds to go beyond what the fieldEditor can display,

Re: Changing NSTableView cell immediately before editing

2009-03-03 Thread Corbin Dunn
On Mar 3, 2009, at 7:32 AM, K. Darcy Otto wrote: Well, I've tried just about everything I can think of at this point, but can't change the NSTableView cell successfully. To give some more detail, the cell text is red when there is an error, but when the user goes to edit the cell, I want

binding to number of selected rows in a table

2009-03-03 Thread James Walker
I want to use bindings to set certain control attributes (enabled state, tool tip) depending on the number of selected rows in an outline table. I have a controller object that owns an NSOutlineView, and I gave it an accessor - (NSOutlineView*) outlineView; Then I tried to bind to my

Text scrolling with Finder-like label editing. Will a raw field editor (NSTextView) do this, or should I use an NSTextField or NSTextFieldCell?

2009-03-03 Thread Luke Evans
I've been trying to implement label editing a la Finder, and found this useful so far: http://www.cocoadev.com/index.pl?FieldEditorIssues Essentially, this approach uses the regular NSTextView instance served up by -[NSWindow fieldEditor:forObject], and recomputes the size of that is

All my leaks are gone... but now a memory warning?!

2009-03-03 Thread James Cicenia
Hello - I have dutifully tracked down every leak, except for that noted nsindex issue that is a red-herring. Otherwise I get none now with my instruments. However, when I debug on the device one of my screens is getting memory warning and after a few clicks freezes up my phone. I have

Re: All my leaks are gone... but now a memory warning?!

2009-03-03 Thread Roland King
what is the memory warning? James Cicenia wrote: Hello - I have dutifully tracked down every leak, except for that noted nsindex issue that is a red-herring. Otherwise I get none now with my instruments. However, when I debug on the device one of my screens is getting memory warning and

Re: All my leaks are gone... but now a memory warning?!

2009-03-03 Thread James Cicenia
hmmm,,, how do I get that? I just put a nslog in there to see if in fact it was memory. james On Mar 3, 2009, at 9:20 PM, Roland King wrote: what is the memory warning? James Cicenia wrote: Hello - I have dutifully tracked down every leak, except for that noted nsindex issue that

Re: All my leaks are gone... but now a memory warning?!

2009-03-03 Thread Roland King
You said when I debug on the device one of my screens is getting memory warning. What is a 'memory warning', what is the text of the warning you are receiving, what does it say? James Cicenia wrote: hmmm,,, how do I get that? I just put a nslog in there to see if in fact it was memory.

Re: All my leaks are gone... but now a memory warning?!

2009-03-03 Thread David Duncan
On Mar 3, 2009, at 7:16 PM, James Cicenia wrote: I have dutifully tracked down every leak, except for that noted nsindex issue that is a red-herring. Otherwise I get none now with my instruments. However, when I debug on the device one of my screens is getting memory warning and after a

Re: All my leaks are gone... but now a memory warning?!

2009-03-03 Thread James Cicenia
Ok - How do I get more information? Or what kind of information do you need? The memory issue is very opaque to me. It just happens. Is there anyway to get more info? Thanks James Cicenia On Mar 3, 2009, at 9:52 PM, David Duncan wrote: On Mar 3, 2009, at 7:16 PM, James Cicenia wrote: I

Re: All my leaks are gone... but now a memory warning?!

2009-03-03 Thread Roland King
well how much memory is your app using? One of the performance tools should be able to help you not just get rid of leaks, but tell you how big your memory footprint is. Just because you're not leaking objects doesn't mean you're not pooling them up somewhere on an autorelease pool. If you use

Re: All my leaks are gone... but now a memory warning?!

2009-03-03 Thread James Cicenia
I see that on that one screen it does chew up memory after I select and process. My other three screens all behave very nicely. So, maybe it is the way I have architected this screen: When I load the view it seems ok. Then I popup a little view for the user to select a state: -

NSTask -launch/+launchedTaskWithPath:... - externally retained for life of task?

2009-03-03 Thread Jim Correia
Suppose you have the following code, running in either retain/release land or GC land (ends up the behavior is similar because of the autorelease pool or collector after return): NSTask *task = [[NSTask alloc] init]; [task setLaunchPath: @/bin/sleep]; [task

Re: Can't get setDelegate to work on NSMenu attached to NSStatusItem

2009-03-03 Thread Michael Ash
On Tue, Mar 3, 2009 at 4:30 PM, Quincey Morris quinceymor...@earthlink.net wrote: On Mar 3, 2009, at 12:50, Nick Zitzmann wrote: It doesn't seem to be documented, but I think it will return nil only if (1) there was not enough contiguous RAM in the program's VM space to allocate the object, or

Re: All my leaks are gone... but now a memory warning?!

2009-03-03 Thread Charles Srstka
On Mar 3, 2009, at 10:27 PM, James Cicenia wrote: self.spvc = [[StatePickViewController alloc]initWithNibName:@StatePicker bundle:nil]; What type of property is spvc? Does it simply assign, or does it retain its value? If the latter, you may end up with the object above getting a retain

Re: reloading IKImageBrowserView in an IBAction

2009-03-03 Thread Claus Guttesen
I read the excellent article 'Image Kit Programming Guide' at http://developer.apple.com/documentation/graphicsimaging/Conceptual/ImageKitProgrammingGuide/Introduction/chapter_1_section_1.html#//apple_ref/doc/uid/TP40004907-CH1-SW1 and have my ImageBrowser working. I want to use it as the basis

Re: Getting NSDate from EXIF of a image

2009-03-03 Thread Nathan Vander Wilt
On Mar 2, 2009, at 8:48 PM, Jushin wrote: I found that in order to convert NSString format of date to NSDate, we need timezone. But, EXIF doesn't support timezone unless GPS tags exist. Yes, this is an unfortunate fact. Depending on what you need the date for, you may need to let the user

Re: binding to number of selected rows in a table

2009-03-03 Thread Jerry Krinock
On 2009 Mar 03, at 18:38, James Walker wrote: Are these NSOutlineView methods not KVO-friendly, or am I doing something wrong? I would say the answer to your question is both :)) And I also believe that you have two options: 1. Assuming you're using the classic dataSource to drive your

CoreData and NSUndoManager/Undo Grouping...

2009-03-03 Thread Jean-Nicolas Jolivet
I'm trying to set up undo grouping properly for my editing dialog (i.e. when a user edits a ManagedObject, the whole editing process can be undo...) I've read a couple of articles/tutorials about using undo grouping for Core Data but they all involved 2 things: An editing window/sheet and

Newbie: Learning path for my GTD app...

2009-03-03 Thread Biagio
Hello. My first post.  I'm learning to program using Xcode 3.1.2 in OS X Leopard. My current plan of attack is working through these books: Learn C on the Mac C All in One Desktop Reference for Dummies Learn Objective-C On the Mac Cocoa Programming for Mac OS X 3rd edition by Aaron Hillegass I