Image reflection in IKImageBrowserView

2008-05-01 Thread Aby
Hi list, How to implement Image reflection for all the images in IKImageBrowserView. Regards Tom ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators

CGevent and cocoa compatibility

2008-05-01 Thread Ben Lachman
Does anyone know how to get the keycode out of a NX_SYSDEFINED CGEvent? If so, is that keycode the same thing you'd get out of say (([event data1] & 0x) >> 16)? I'm trying to support the media keys on the Apple aluminum keyboards without having iTunes also get the events. Thanks,

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 o

Re: Dragging a window

2008-05-01 Thread Kyle Sluder
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 the window title bar). The dragFrom: method isn't

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 wind

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

2008-05-01 Thread Jens Alfke
On 1 May '08, at 2:12 PM, Angel Todorov wrote: 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). Um, that's ... weird. I suggest you use a regular submenu instead. Many apps

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 it

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 co

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

2008-05-01 Thread Peter Zegelin
Thanks all - that was it. It was an encoding problem and it is now working perfectly. Peter ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-

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: 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 w

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 UR

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

2008-05-01 Thread Andrew Farmer
On 01 May 08, at 21:05, Peter Zegelin wrote: 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] - Requir

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: 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 Lo

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 defau

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 bug

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 states

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];

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

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 mi

Re: Cache Class review (low priority)

2008-05-01 Thread Western Botanicals
Thank you for reviewing this class the previous time. I have revised this class to take into account all of your suggestions. How is my code and comments? Does this class seem useful to anyone? http://giboneydesigns.com/code/Cacheh12.txt http://giboneydesigns.com/code/Cachem12.txt Justin Gibo

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. H

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 progr

Core Data Debug and Profile Libraries won't install on current 10.5.2

2008-05-01 Thread Hal Mueller
The installer wants build 9C31; it pops an error and exits when it sees the wrong build. With current updates to 10.5.2, I am at build 9C7010. rdar://5904950 Hal ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin re

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: 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

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 po

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: from

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

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,

NSWindow With IB

2008-05-01 Thread Philip Bridson
Hi There, Is there any way to create a Window with no title-bar in IB? I want one that is only displayed while the app launches like many apps do. I create all my windows with IB and I know that I can use NSBorderlessWindowMask if I create one programatically but is there anyway of doing

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: beginSheetModalForWindow: and Distributed Objects

2008-05-01 Thread Michael Vannorsdel
Great to hear. Bugs or departures from documentation are not rare, especially with APIs that started at or before Cheetah (10.0). So sometimes things don't work as expected or documentation is misleading or confusing. The docs for this method should probably be revisited by Apple. On

Re: beginSheetModalForWindow: and Distributed Objects

2008-05-01 Thread Andrew Kimpton
On May 1, 2008, at 1:52 AM, Michael Vannorsdel wrote: I'm fairly certain this method keeps the loop in default mode; the docs are probably copy and pasted or contain archaic info. Just to recap, how do you know messages are not being processed? And where are these originating, another pro

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. Adapt

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 (Objective

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

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 o

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: 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, 2

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 "S

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 c

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 Meadow

Re: Programmatic "Size To Fit"

2008-05-01 Thread Randall Meadows
On May 1, 2008, at 11:45 AM, Martin wrote: What about NSControl's sizeToFit method? I guess I didn't mean "controls" exclusively; I should have stuck with "views", as (at least) one of the things I need to create is an NSBox that contains multiple controls. Which is why I was looking in NS

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 know

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 provi

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

2008-05-01 Thread Clark Cox
On Thu, May 1, 2008 at 10:43 AM, stephen joseph butler <[EMAIL PROTECTED]> wrote: > 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

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 app

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

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

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

Re: Text attachment not deleted from NSTextView

2008-05-01 Thread Stéphane Sudre
On May 1, 2008, at 4:51 PM, Luong Dang wrote: Hi all, I'm having a problem with NSTextView: I programmatically insert an image attachment into an NSTextView. However, when I delete the text from my GUI the image didn't go away, even though from the code, I can see that NSAttachmentCharact

[SOLVED] Re: FSCopyObjectASync Not Calling Callback In Cocoa

2008-05-01 Thread Matt Long
Thanks for the help. The first response I got (Steve) was the correct one for what I was needing. I didn't correctly schedule with the run loop. Here's a couple of points Mike Fischer suggested that the operation was completing in less time than the one second specified. This is a good tho

Re: Trouble with NSPopUpButton and hierarchical menus?

2008-05-01 Thread John Stiles
Yup, that was the problem. Thanks for figuring this out, Graham. rdar://5903558[IB3] Items in pull-down-style NSPopUpButtons enable "hidden" for no reason John Stiles wrote: Oh, is that the problem? I didn't see a Hidden checkbox. I'll look again. Guess it's Radar time. Graham Cox wrote:

Re: Immediate memory release

2008-05-01 Thread Ken Thomases
On Apr 30, 2008, at 10:35 PM, Melissa J. Turner wrote: NSAutoreleasePool *pool = [NSAutoreleasePool new]; id exception; Should be initialized to nil: id exception = nil; @try { // insert code here } @catch (NSException *ex) { exception = [ex retain]; @throw ex; } @fin

Re: Trouble with NSPopUpButton and hierarchical menus?

2008-05-01 Thread John Stiles
Oh, is that the problem? I didn't see a Hidden checkbox. I'll look again. Guess it's Radar time. Graham Cox wrote: I can confirm this bug, it's the same (or similar to) one I mentioned a few months ago but had some trouble reproducing at the time. I thought it was related to importing older IB

Rotating an NSTableView.

2008-05-01 Thread Peter Hudson
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. The problem is that when I resize the split view the NSTableView does not change size to fit the spl

Text attachment not deleted from NSTextView

2008-05-01 Thread Luong Dang
Hi all, I'm having a problem with NSTextView: I programmatically insert an image attachment into an NSTextView. However, when I delete the text from my GUI the image didn't go away, even though from the code, I can see that NSAttachmentCharacter is removed from my attributed string. Here'

Re: FSCopyObjectASync Not Calling Callback In Cocoa

2008-05-01 Thread Mike Fischer
Am 01.05.2008 um 16:18 schrieb Michael Vannorsdel <[EMAIL PROTECTED]>: 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. The operative word being "should". N

Re: Immediate memory release

2008-05-01 Thread Clark Cox
On Thu, May 1, 2008 at 2:05 AM, Paul Bailey <[EMAIL PROTECTED]> wrote: > 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)

Re: Xcode debugger quality

2008-05-01 Thread Jeff LaMarche
On May 1, 2008, at 9:47 AM, Simon Wilson wrote: Not sure how you got the impression I'm a C++ or Carbon programmer as I didn't mention anything to this effect. Sorry, it was meant as a general comment, not directed at you, I just quoted part of your e-mail because it seemed to sum up the o

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 attribu

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 environm

Re: FSCopyObjectASync Not Calling Callback In Cocoa

2008-05-01 Thread stephen joseph butler
On Wed, Apr 30, 2008 at 7:42 PM, Matt Long <[EMAIL PROTECTED]> wrote: >FSPathMakeRef( (const UInt8 *)[[sourceFilePath stringValue] > cStringUsingEncoding:NSUTF8StringEncoding], &source, NULL ); >Boolean isDir = true; >FSPathMakeRef( (const UInt8 *)[[destinationFilePath stringValue] > c

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 ha

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 se

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 Bo