Re: Converting From Simple to Doc Based App - Problems with Menus

2008-05-01 Thread Peter Zegelin
OK - thanks - that makes sense. Bummer - I had it all set up nicely:-) regards, Peter On 01/05/2008, at 3:48 PM, Graham Cox wrote: Change the targets for the menu items to be first responder instead of the views themselves. The views will still get the actions when they are made first

Re: Read-Only ABRecord

2008-05-01 Thread Alexander Hartner
That's what I was afraid of :-( Thanks Alex On 1 May 2008, at 03:28, Jens Alfke wrote: On 30 Apr '08, at 4:47 PM, Alexander Hartner wrote: I would like to find out how to set a ABRecord as read-only, and if a record is configured to be read-only is it possible to edit it in the Address

Re: FSCopyObjectASync Not Calling Callback In Cocoa

2008-05-01 Thread Mike Fischer
Am 01.05.2008 um 06:55 schrieb Matt Long [EMAIL PROTECTED]: I execute this code and it successfully copies my file from source to destination: [snip] status returns with no error. However my callback never gets called. Why do you assume it should be called? You passed a minimum of 1

Re: FSCopyObjectASync Not Calling Callback In Cocoa

2008-05-01 Thread Michael Vannorsdel
I read over the docs for this function and not coming to the same conclusions. Being an async function it should be implied the callback will be used if the starting function succeeded. This is the whole point of async operations and the only way to get status reports from them besides

Re: Immediate memory release

2008-05-01 Thread Paul Bailey
The class documentation for NSAutoreleasePool notes that release is a no-op on garbage-collected environments, and one should use drain to give the garbage collector a hint to do its job (that's my limited understanding). It notes that drains behaves the same as release in a memory managed

NSFormatter, NSTextfield and bindings

2008-05-01 Thread Yann Disser
I have a NSTextfield which is bound to some string-valued attribute. It is set to update continuously and everything works fine. As I only want to allow the user to enter numbers, I subclassed NSFormatter and attached an instance to the NSTextField formatter outlet in IB. Now my

trouble debugging input method remotely

2008-05-01 Thread Daniel Child
I am trying to set up remote debugging for input methods using Xcode. For starters, I'm trying to use Apple's sample, but am having a number of issues. One is that I am not sure where/how to set up the shared build location in the case of an input method. To run an input method, you need

Programmatic Size To Fit

2008-05-01 Thread Randall Meadows
I am creating a bunch of controls (at least NSTextfield, NSPopupButton, NSSlider, and perhaps others) programmatically (that will eventually be shown in an NSTableView), and would like to apply the Size To Fit feature that IB provides. However, there doesn't seem to be any API that does

Re: [SOLVED] Re: FSCopyObjectASync Not Calling Callback In Cocoa

2008-05-01 Thread stephen joseph butler
On Thu, May 1, 2008 at 12:03 PM, Matt Long [EMAIL PROTECTED] wrote: Stephen Butler pointed out that I need to use -[NSString fileSystemRepresentation]. I have switched to this and it works. I not real familiar with this call, but it looks like it's working. I'll look into why this is the

Re: Programmatic Size To Fit

2008-05-01 Thread Martin
What about NSControl's sizeToFit method? -Martin On May 1, 2008, at 7:39 PM, Randall Meadows wrote: I am creating a bunch of controls (at least NSTextfield, NSPopupButton, NSSlider, and perhaps others) programmatically (that will eventually be shown in an NSTableView), and would like to

Re: Programmatic Size To Fit

2008-05-01 Thread John Stiles
There is in fact an API, -sizeToFit. Randall Meadows wrote: I am creating a bunch of controls (at least NSTextfield, NSPopupButton, NSSlider, and perhaps others) programmatically (that will eventually be shown in an NSTableView), and would like to apply the Size To Fit feature that IB

Re: trouble debugging input method remotely

2008-05-01 Thread Daniel Child
People from Apple who develop input methods told me as much. Presumably, since you are typing from the keyboard to test the input method itself, having it run on the same computer causes problems: you are trying to allow the interaction with the executable to be natural, but how do you

Re: Programmatic Size To Fit

2008-05-01 Thread Michael Watson
Others have mentioned -[NSControl sizeToFit], but I thought it was worth reminding that when you can't find a method to do what you want in a given class, remember to check its superclasses for methods the class inherits for what you seek. -- m-s On 01 May, 2008, at 13:39, Randall

Re: [SOLVED] Re: FSCopyObjectASync Not Calling Callback In Cocoa

2008-05-01 Thread Douglas Davidson
On May 1, 2008, at 10:43 AM, stephen joseph butler wrote: On Thu, May 1, 2008 at 12:03 PM, Matt Long [EMAIL PROTECTED] long.com wrote: Stephen Butler pointed out that I need to use -[NSString fileSystemRepresentation]. I have switched to this and it works. I not real familiar with this

Re: Programmatic Size To Fit

2008-05-01 Thread Rob Napier
The method is called -sizeToFit. -Rob On May 1, 2008, at 1:39 PM, Randall Meadows wrote: I am creating a bunch of controls (at least NSTextfield, NSPopupButton, NSSlider, and perhaps others) programmatically (that will eventually be shown in an NSTableView), and would like to apply the

Re: Programmatic Size To Fit

2008-05-01 Thread John Stiles
An NSView doesn't have an associated cell, so size to fit doesn't really have a meaningful answer. Size-to-fit works by asking the cell what size it should be. For a box, you could just enumerate the subviews and get the union of all the subview frames. Randall Meadows wrote: On May 1,

Re: trouble debugging input method remotely

2008-05-01 Thread Daniel Child
I should have been clearer explaining why you need remote debugging. The focus while test-typing the input method will be something like TextEdit. You cannot be inside TextEdit and Xcode at the same time. You are either typing in one app or the other. So the idea is to run the executable

Re: trouble debugging input method remotely

2008-05-01 Thread j o a r
On May 1, 2008, at 11:31 AM, Daniel Child wrote: I should have been clearer explaining why you need remote debugging. The focus while test-typing the input method will be something like TextEdit. You cannot be inside TextEdit and Xcode at the same time. You are either typing in one app or

Re: Programmatic Size To Fit

2008-05-01 Thread RICKY SHARP
On Thursday, May 01, 2008, at 01:14PM, John Stiles [EMAIL PROTECTED] wrote: An NSView doesn't have an associated cell, so size to fit doesn't really have a meaningful answer. Size-to-fit works by asking the cell what size it should be. For a box, you could just enumerate the subviews and get

Cocoa Developer Needed

2008-05-01 Thread Darren Tessitore
Location: Montvale, NJ Salary: Open Relocation: For the right candidate Info: This is a Full-Time position Overview: Our client is seeking an low to mid level Mac Cocoa Developer with 2+ years experience to maintain, troubleshoot and extend existing codebase of internal Cocoa

Re: Programmatic Size To Fit

2008-05-01 Thread Stuart Malin
SizeToFit will expand horizontally. If you need to constrain horizontal width... here's some code I use resize NSTextField instances vertically while constraining the horizontal width to fit within some contained view. I believe this approach would work with other sorts of controls.

Re: Rotating an NSTableView.

2008-05-01 Thread Corbin Dunn
On May 1, 2008, at 8:27 AM, Peter Hudson wrote: I have an NSTable View inside an NSSplitView. I rotate the table view by sending rotateByAngle:270 to the enclosing scroll view. The table lands up exactly as I want it with vertical rows. That's cool! The problem is that when I resize

Re: NSWindow With IB

2008-05-01 Thread Kyle Sluder
On Thu, May 1, 2008 at 4:53 PM, Philip Bridson [EMAIL PROTECTED] wrote: I don't mind manipulating it with code if I have to. Subclass NSWindow and override -initWithContentRect:styleMask:backing:defer to pass your custom window mask to super's implementation. Then in the identity pane of IB,

Re: NSWindow With IB

2008-05-01 Thread Philip Bridson
Why is it that when you get the answer you always wonder why you hadn't thought of it yourself? I've done this method so many times with other classes but it just didn't occur to me. Never-mind. Thank you for your help. Phil. On 1 May 2008, at 21:58, Kyle Sluder wrote: On Thu, May 1, 2008

NSArrayController issue

2008-05-01 Thread Måns Severin
Hi, I've been working with an NSArrayController containing CoreData entity objects. I've created a segmented control for cycling through these object (similar to Safari's Back/Forward buttons). For some reason, after calling the NSArrayController methods selectNext: and selectPrevious:

NSPopUpButton doesn't show list when used inside a menu item

2008-05-01 Thread Angel Todorov
Hi, I have a regular menu (File menu) for my app. One of the menu items (New ...) is a custom view , which happens to contain a NSPopUpButton (i.e. simple drop down). I create that by linking / connecting (Ctrl + drag) the New... item to my custom view. At runtime, the drop down is correctly

Re: LED backlight control?

2008-05-01 Thread Michael Vannorsdel
Checkout this code sample: http://osxbook.com/book/bonus/chapter10/light it shows setting the display brightness and dealing with the ambient light sensor on portables using IOKit. On May 1, 2008, at 3:05 PM, Rick Mann wrote: Hi. I was posting questions on Carbon Dev, but this is probably

Re: NSPopUpButton doesn't show list when used inside a menu item

2008-05-01 Thread John Stiles
Recursive menu tracking? I can't say I'm surprised that this doesn't work :) Honestly I have to say that this sounds like a really weird UI. I would consider a more normal approach (submenus?) Angel Todorov wrote: Hi, I have a regular menu (File menu) for my app. One of the menu items (New

Re: TransformProcessType fails to show menu bar

2008-05-01 Thread Michael Ash
On Thu, May 1, 2008 at 12:52 AM, Michael Ash [EMAIL PROTECTED] wrote: So, the actual problem: I set LSUIElement to 1 in my Info.plist and use TransformProcessType to bump to a foreground application. This works except that it fails to show my app's menu bar. Switching to another program

Re: Programmatic Size To Fit

2008-05-01 Thread Stéphane Sudre
On May 1, 2008, at 7:39 PM, Randall Meadows wrote: I am creating a bunch of controls (at least NSTextfield, NSPopupButton, NSSlider, and perhaps others) programmatically (that will eventually be shown in an NSTableView), and would like to apply the Size To Fit feature that IB provides.

Displaying one NSTextStorage with two sets of temporary attributes

2008-05-01 Thread Adam C.M. Solove
Hello all, In the episode of Late Night Cocoa on the text system, [ http://www.macdevnet.com/index.php/shows/latenightcocoa/37-latenightcocoa/93-lnc005 ] Juan Pablo Claude described a setup with multiple NSLayoutManagers editing text from the same NSTextStorage and then said, off-hand, that you

Interesting NSPathControl Behavior

2008-05-01 Thread Mike Rossetti
So I've discovered an interesting behavior in NSPathControl and am wondering if it warrants a Radar. I'm building up my own presentation of the file path to be shown in the NSPathControl. Specifically, if the file for which the path is being presented is in some standard location then I'm

Re: Calculating file size

2008-05-01 Thread Aaron Burghardt
Yes, nice catch. Thanks, Aaron On Apr 29, 2008, at 7:56 AM, Jean-Daniel Dupas wrote: Shouldn't be !isDirectory ? if (isDirectory) { FileInfo *fileInfo = (FileInfo *) info.finderInfo; fileHFSType = [NSNumber numberWithUnsignedLong:fileInfo-fileType];

class_addMethod and type encodings.

2008-05-01 Thread Ross Tulloch
Hi, I've been experimenting with adding methods to classes at runtime and have some questions regarding the use and importance of type encodings. 1) class_addMethod requires a types array. This array describes the types of the arguments to the method. The type encodings page simply

How Do You Open Default Web Browser and goto URL?

2008-05-01 Thread Peter Zegelin
I would like my application to have a 'Visit Website..' menu but I can't figure out how to get the users default web browser to open and automatically send it to my website. I would also like to be able to automatically fire up their email client and fill in the address and subject (for

Re: How Do You Open Default Web Browser and goto URL?

2008-05-01 Thread Michael Vannorsdel
Checkout NSWorkspace's openURL:. NSWorkspace is there to help your program when dealing with external programs and functionality. On May 1, 2008, at 9:02 PM, Peter Zegelin wrote: I would like my application to have a 'Visit Website..' menu but I can't figure out how to get the users

Re: Xcode debugger quality

2008-05-01 Thread William Squires
Not sure if this applies, but - for those experiencing all these problems - did you turn off that 'zerolink' thing? I've heard that throws it for a loop, too. (This may not apply anymore, but I remember that used to be a 'feature' back in XCode 1 or so.) On May 1, 2008, at 10:57 AM, Bill

Re: How Do You Open Default Web Browser and goto URL?

2008-05-01 Thread Peter Zegelin
Thanks - I have got it to work in both cases except where I add a subject to the mailto: This works: NSString *applicationURL = @mailto:[EMAIL PROTECTED] ; but this doesn't: NSString *applicationURL = @mailto:[EMAIL PROTECTED] - Require Registration Help ; into: [[NSWorkspace

Re: How Do You Open Default Web Browser and goto URL?

2008-05-01 Thread Jens Alfke
On 1 May '08, at 9:05 PM, Peter Zegelin wrote: If I shorten the Subject to just subject=AlphaDraw it works but it looks like any spaces are causing the method to fail. Any suggestions what may be wrong? Spaces aren't legal in URLs, so the NSURL object you're getting is nil. You have to

Re: How Do You Open Default Web Browser and goto URL?

2008-05-01 Thread Michael Vannorsdel
Those URLs usually need escapes to work. Try running the URL through CFURLCreateStringByAddingPercentEscapes before sending the NSWorkspace. On May 1, 2008, at 10:05 PM, Peter Zegelin wrote: Thanks - I have got it to work in both cases except where I add a subject to the mailto: This

Re: class_addMethod and type encodings.

2008-05-01 Thread Jens Alfke
On 1 May '08, at 7:29 PM, Ross Tulloch wrote: 1) class_addMethod requires a types array. This array describes the types of the arguments to the method. The type encodings page simply states that this info assists the runtime. I'm wondering how (and when) this type information is used by

Re: Xcode debugger quality

2008-05-01 Thread Scott Ribe
This may not apply anymore It doesn't even exist in Xcode 3. -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Re: Cache Class review (low priority)

2008-05-01 Thread Jens Alfke
On 1 May '08, at 4:49 PM, Western Botanicals wrote: How is my code and comments? Much better! But here are a few remaining issues: In general, your autorelease pools (in all these methods) aren't necessary. Typically you only need to add pools as optimizations, if you have a loop that

Dragging a window

2008-05-01 Thread Geert B. Clemmensen
Hello, Looking at an old NEXTSTEP application where you e.g. in a mouseDown method could have the window dragged by using the dragFrom: method (as if you were clicking on the window title bar). The dragFrom: method isn't available in Cocoa. Any recommendation as to how one can drag a

Re: Dragging a window

2008-05-01 Thread Henry McGilton (Starbase)
On May 1, 2008, at 10:15 PM, Kyle Sluder wrote: On Fri, May 2, 2008 at 1:11 AM, Geert B. Clemmensen [EMAIL PROTECTED] wrote: Looking at an old NEXTSTEP application where you e.g. in a mouseDown method could have the window dragged by using the dragFrom: method (as if you were clicking on