Re: Hints for supporting dragging a file onto the dock icon, then onto a row in menu presented at that point?

2012-09-13 Thread Jens Alfke
On Sep 13, 2012, at 12:40 PM, Chris Markle wrote: > I saw an app called Dragster that > allows you to drag a file over the dock icon for the app, at which > point a menu of rows opens up form the app icon, and you can continue > to drag the file over a particular row. I think they are using som

Re: Arghh bindings

2012-09-13 Thread Marcel Weiher
On Sep 11, 2012, at 4:28 , Charles Srstka wrote: > On Sep 10, 2012, at 9:23 PM, Quincey Morris > wrote: > >> It doesn't need "all the extra scaffolding". KVC will peer quite happily >> into your instance variables by default. What you don't get for free, in >> that case, is KVO compliance

Re: kABHomeLabel … and companions

2012-09-13 Thread Erik Stainsby
I understand that ABAddressBook methods are concerned with ABPerson and ABGroup entities, subclasses of ABRecord. However, the ABMultiValue collections are less intuitive. Among these are stored the (potentially) multiple instances of addresses, phone numbers and email addresses. For each insta

Re: kABHomeLabel … and companions

2012-09-13 Thread Jerry Krinock
On 2012 Sep 13, at 19:45, Erik Stainsby wrote: > So the AddressBook framework's xxxLabel keys render out as strings encoded > like so: _$!!$_, _$!!$_, _$!!$_ Is there framework > method I am meant to use with the property keys kABHomeLabel, kABWorkLabel, > etc, to render a legible text outc

Re: Timeout after application:openFile: stalling applescript

2012-09-13 Thread Jerry Krinock
On 2012 Aug 23, at 21:34, George Nachman wrote: > My application implements the NSApplicationDelegate method > -application:openFile: in its app delegate. There seems to be a problem new > to OS 10.8 where after receiving the apple event to open a file, five > seconds pass before some kind of in

Re: Hints for supporting dragging a file onto the dock icon, then onto a row in menu presented at that point?

2012-09-13 Thread Stephen J. Butler
On Thu, Sep 13, 2012 at 2:40 PM, Chris Markle wrote: > I'm pretty new to OS X development and just looking for hints about > how to do something like this... I saw an app called Dragster that > allows you to drag a file over the dock icon for the app, at which > point a menu of rows opens up form

kABHomeLabel … and companions

2012-09-13 Thread Erik Stainsby
Hello folks, So the AddressBook framework's xxxLabel keys render out as strings encoded like so: _$!!$_, _$!!$_, _$!!$_ Is there framework method I am meant to use with the property keys kABHomeLabel, kABWorkLabel, etc, to render a legible text outcome ? Or am I meant to create my own lookup

Re: maintaining alpha value for intersecting lines?

2012-09-13 Thread Koen van der Drift
On Sep 13, 2012, at 7:24 PM, Graham Cox wrote: > > On 14/09/2012, at 7:56 AM, Koen van der Drift > wrote: > >> >> On Sep 13, 2012, at 1:01 PM, Andy Lee wrote: >> Is that possible, since they all have different begin and end points? >>> >>> Yes. An NSBezierPath can contain mult

Re: maintaining alpha value for intersecting lines?

2012-09-13 Thread Graham Cox
On 14/09/2012, at 7:56 AM, Koen van der Drift wrote: > > On Sep 13, 2012, at 1:01 PM, Andy Lee wrote: > >>> >>> Is that possible, since they all have different begin and end points? >> >> Yes. An NSBezierPath can contain multiple unconnected paths. > > This did the trick, I created all lin

Re: Sandboxing not so bad

2012-09-13 Thread Graham Cox
On 14/09/2012, at 9:14 AM, Kyle Sluder wrote: > I'm _sick_ of this argument. I'm sick of it too. When sandboxing has finally been implemented in a way that is non-buggy, covers all the edge cases and is reasonably straightforward for developers to use, perhaps it will go away. --Graham __

Another sandboxing snafu

2012-09-13 Thread Graham Cox
Grrr... and here's exactly the sort of stupid thing that I was referring to a moment ago in another thread... I'm attempting to show an NSOpenPanel as a sheet, app is sandboxed. This has always worked perfectly fine: NSOpenPanel*op = [NSOpenPanel openPanel]; [op se

Re: Sandboxing not so bad

2012-09-13 Thread Kyle Sluder
Gentlemen, I'm not a moderator, but I'm _sick_ of this argument. Can we please not have it again? --Kyle Sluder On Thu, Sep 13, 2012, at 03:53 PM, Graham Cox wrote: > > On 14/09/2012, at 5:45 AM, James Merkel wrote: > > > So unless I'm missing something, sandboxing is a piece of cake. > > >

Re: Sandboxing not so bad

2012-09-13 Thread Graham Cox
On 14/09/2012, at 5:45 AM, James Merkel wrote: > So unless I'm missing something, sandboxing is a piece of cake. Congratulations, your app uses the file system in a simple way, and in the way that was largely anticipated by the sandboxing design. It's when you have slightly unusual requireme

Re: maintaining alpha value for intersecting lines?

2012-09-13 Thread Koen van der Drift
On Sep 13, 2012, at 1:01 PM, Andy Lee wrote: >> >> Is that possible, since they all have different begin and end points? > > Yes. An NSBezierPath can contain multiple unconnected paths. This did the trick, I created all lines within the same NSBezierPath, and when they overlap, the color rem

Sandboxing not so bad

2012-09-13 Thread James Merkel
Sandboxing is not as restrictive than I though it would be. For example, the documentation for the entitlement: com.apple.security.files.user-selected.read-write says this entitlement provides: "Read/write access to files the user has selected using an Open or Save dialog" . I was reading more

Hints for supporting dragging a file onto the dock icon, then onto a row in menu presented at that point?

2012-09-13 Thread Chris Markle
I'm pretty new to OS X development and just looking for hints about how to do something like this... I saw an app called Dragster that allows you to drag a file over the dock icon for the app, at which point a menu of rows opens up form the app icon, and you can continue to drag the file over a par

Re: Mac cursor hotspot is not at the tip of the cursor

2012-09-13 Thread Seth Willits
On Sep 5, 2012, at 5:16 AM, Ernesto Monde wrote: > Is there any way to make using default cursor as customer expects… Yes. Leave it alone. That's what the customer expects. Why should the arrow cursor behave any differently in your application versus every other application? -- Seth Willits

Re: maintaining alpha value for intersecting lines?

2012-09-13 Thread Marcel Weiher
More specifically, CGContextBeginTransparencyLayer() and CGContextEndTransparencyLayer() will do what you need, in case you can't use a single bezier path. You set the global alpha to the transparency you want, start the transparency layer, draw *without the alpha*, end the transparency layer.

Re: maintaining alpha value for intersecting lines?

2012-09-13 Thread Koen van der Drift
On Thu, Sep 13, 2012 at 1:01 PM, Andy Lee wrote: > On Sep 13, 2012, at 12:02 PM, Koen van der Drift > wrote: >> On Sep 13, 2012, at 11:44, Ken Thomases wrote: >>> Does this still happen with a single NSBezierPath containing both lines? >> >> Is that possible, since they all have different begin

Re: maintaining alpha value for intersecting lines?

2012-09-13 Thread Andy Lee
On Sep 13, 2012, at 12:02 PM, Koen van der Drift wrote: > On Sep 13, 2012, at 11:44, Ken Thomases wrote: >> Does this still happen with a single NSBezierPath containing both lines? > > Is that possible, since they all have different begin and end points? Yes. An NSBezierPath can contain multip

Re: maintaining alpha value for intersecting lines?

2012-09-13 Thread Erik Stainsby
On 2012-09-13, at 9:02 AM, Koen van der Drift wrote: > On Sep 13, 2012, at 11:44, Ken Thomases wrote: > >> On Sep 13, 2012, at 7:40 AM, Koen van der Drift wrote: >> >>> When I draw two lines using NSBezierPaths, both of which have an alpha >>> value of let's say 0.5, the alpha value appears to

Re: maintaining alpha value for intersecting lines?

2012-09-13 Thread Koen van der Drift
On Thu, Sep 13, 2012 at 12:00 PM, Andy Lee wrote: > Are the lines the same color? Is it possible you can do your drawing in a > layer, draw the Bezier paths *without* transparency (alpha = 1), and then > apply alpha to the layer? > I am not usijng layers for this. Just drawing paths in my drawR

Re: maintaining alpha value for intersecting lines?

2012-09-13 Thread Koen van der Drift
On Sep 13, 2012, at 11:44, Ken Thomases wrote: > On Sep 13, 2012, at 7:40 AM, Koen van der Drift wrote: > >> When I draw two lines using NSBezierPaths, both of which have an alpha >> value of let's say 0.5, the alpha value appears to be higher at the >> intersection (the color becomes more opaqu

Re: maintaining alpha value for intersecting lines?

2012-09-13 Thread Andy Lee
Are the lines the same color? Is it possible you can do your drawing in a layer, draw the Bezier paths *without* transparency (alpha = 1), and then apply alpha to the layer? --Andy On Sep 13, 2012, at 8:40 AM, Koen van der Drift wrote: > When I draw two lines using NSBezierPaths, both of whi

Re: maintaining alpha value for intersecting lines?

2012-09-13 Thread Ken Thomases
On Sep 13, 2012, at 7:40 AM, Koen van der Drift wrote: > When I draw two lines using NSBezierPaths, both of which have an alpha > value of let's say 0.5, the alpha value appears to be higher at the > intersection (the color becomes more opaque). Is there a way to > maintain the original alpha valu

Re: maintaining alpha value for intersecting lines?

2012-09-13 Thread Jean Suisse
I'm afraid it won't work. That's the principle of transparency: you can see what's below, tinted by the color of what's on top. What are you trying to do ? Maybe there's an other way around. On 13 sept. 2012, at 14:59, Koen van der Drift wrote: > That would be too bad. But maybe I can use one o

Re: NSSplitView crash upon restore from 10.8 Versions Browser

2012-09-13 Thread Jerry Krinock
I was able to reproduce and fix this problem that went away a few weeks ago. The mystery factor was that the crash only occurs if user clicks on the old (right-screen side) version while in the Versions Browser, which causes its window to resize, before restoring. On 2012 Aug 20, at 14:14, Ke

Re: maintaining alpha value for intersecting lines?

2012-09-13 Thread Alex Zavatone
It is higher. That's what happens when the lines intersect. The effect is additive. Unless you have a mode setting where the compositing replaces what's below it. The alpha of the top curve doesn't change at the intersection point. What you're doing is putting one alpha-ed pixel on top of a

Re: Setting NSTableColumnIdentifier in Xcode 4.4.1?

2012-09-13 Thread Erik Stainsby
Same place as earlier. Second row input field in the properties inspector. Make sure the column is the active node. Erik Roaring Sky On 2012-08-24, at 2:31 PM, Gerd Knops wrote: > > On Aug 24, 2012, at 4:27 PM, Laurent Daudelin > wrote: > >> Am I missing something? Where do you set the co

Re: maintaining alpha value for intersecting lines?

2012-09-13 Thread Jean Suisse
It is the expected behavior, since the stacking of two partially transparent objects leads to a less transparent set. So I don't know what you want is possible. Are your lines straight ? If so, maybe you could try to draw one of them in two segments, to avoid the intersection (beware of the anti

Re: maintaining alpha value for intersecting lines?

2012-09-13 Thread Koen van der Drift
Just to clarify, I set the color of the path as follows: [[NSColor colorWithCalibratedRed: 0.1 green: 0.1 blue: 0.1 alpha: 0.5] setStroke]; On Thu, Sep 13, 2012 at 8:40 AM, Koen van der Drift wrote: > When I draw two lines using NSBezierPaths, both of which have an alpha > value of let's say

maintaining alpha value for intersecting lines?

2012-09-13 Thread Koen van der Drift
When I draw two lines using NSBezierPaths, both of which have an alpha value of let's say 0.5, the alpha value appears to be higher at the intersection (the color becomes more opaque). Is there a way to maintain the original alpha value for lines that intersect? - Koen. ___

Re: UINavigationBar, global right button logo for the entire application, how?

2012-09-13 Thread Alex Zavatone
This is a traditional (irritating) message that could be better handled in Objective-C. You're sending a message to do something to an object that doesn't have that method implemented in it. OC likes to crash in that case. Check to make sure that you are sending setRightBarButtonItem to an obje

Re: Mac cursor hotspot is not at the tip of the cursor

2012-09-13 Thread Quincey Morris
On Sep 5, 2012, at 05:16 , Ernesto Monde wrote: > Is there any way to make using default cursor as customer expects and make > it's hotspot at the tip of the white border, not inside it, of the default > cursor arrow? Ever since the beginning of [Mac] time, the hotspot is at the tip of the black

Re: Targeting actions/methods on selected object in NSObjectController

2012-09-13 Thread Quincey Morris
On Sep 9, 2012, at 00:18 , Luke Evans wrote: > I have some list of objects (like a master list), out of which selection > allows a single object to show details in UI below. So, this is a pretty > standard Master-Detail set up. I have an NSObjectController managing the > selected object and

Re: NSComboBox with NSNumberFormatter DataSource works but not Content binding

2012-09-13 Thread Quincey Morris
On Sep 4, 2012, at 23:12 , Luke Evans wrote: > I understand that I must present NSDecimalNumber objects for list content and > I'd prefer to use bindings for this, Why must you use NSDecimalNumber instead of NSNumber? > so I create a simple NSArray of NSDecimalNumber values and provide this as

Re: Converting NSImage with multiple image representations (HiDPI+LowDPI) into grayscale NSImage

2012-09-13 Thread Kyle Sluder
On Sep 10, 2012, at 12:31 AM, Abhijit Apte wrote: > I can pick out NSImageRep objects of NSImage and then use [NSImageRep > CGImageForProposedRect:context:hints:] method to extract CGImageRef. I can > do grayscale conversion on each of these CGImageRefs, however I cannot put > these back into a s

Re: Getting local IP of Wi-Fi device

2012-09-13 Thread Markus Soelter
Hi tamas [[nshost currenthost] address] should either return an IPv4 or an IPv6 address (you probably saw an IPv6) Von unterwegs gesendet Am 12.09.2012 um 08:58 schrieb Tamas Nagy : > Hello List, > > I'm looking for a way to get the IP address of the Wi-Fi device. For some > reason, [NSHost cu

Converting NSImage with multiple image representations (HiDPI+LowDPI) into grayscale NSImage

2012-09-13 Thread Abhijit Apte
Hi, I have been running into a problem wherein I need to grayscale all the NSImageRep objects within a NSImage (i.e. say NSImage contains two representations for testimg.png and test...@2x.png). CGImageRef which has a one-to-one correspondence with one image representation. With CGImageRef, the

Targeting actions/methods on selected object in NSObjectController

2012-09-13 Thread Luke Evans
I'm not clear on the options for targeting actions on a selected object in bound UI. I have some list of objects (like a master list), out of which selection allows a single object to show details in UI below. So, this is a pretty standard Master-Detail set up. I have an NSObjectController ma

UINavigationBar, global right button logo for the entire application, how?

2012-09-13 Thread nebiros
Hey!, I'm trying to set a logo image at the right side of the navigation bar for the entire application, so far I got this: http://pastie.org/private/pmwhfasyaskynw7xupinrw and I got this exception: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_UIBarItemA

NSTextView frame issue inside NSTableView

2012-09-13 Thread jun1st.f...@gmail.com
I want to put a attributed string on a nstextview, and manually calculate the height of the textview and row -(CGFloat)tableView:(NSTableView *)tableView heightOfRow:(NSInteger)row inside -(NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSIn

Mac cursor hotspot is not at the tip of the cursor

2012-09-13 Thread Ernesto Monde
Hi all! Just figured out that for some reason on Mac OS X default cursor (black with white border) has it's hotspot not on the tip of the white border, but inside - on the tip of the black arrow inside. Assuming this, using default cursors with small custom graphics elements is weird - you think

NSComboBox with NSNumberFormatter DataSource works but not Content binding

2012-09-13 Thread Luke Evans
Here's a little mystery that maybe someone can help me with… I have an NSComboBox for numbers (and hence with an NSNumberFormatter attached to its text field) for which I'd like to populate some items in the drop down list. I understand that I must present NSDecimalNumber objects for list conte

Timeout after application:openFile: stalling applescript

2012-09-13 Thread George Nachman
My application implements the NSApplicationDelegate method -application:openFile: in its app delegate. There seems to be a problem new to OS 10.8 where after receiving the apple event to open a file, five seconds pass before some kind of internal timeout is hit, a response is sent to the apple even

Re: Setting NSTableColumnIdentifier in Xcode 4.4.1?

2012-09-13 Thread Gerd Knops
On Aug 24, 2012, at 4:27 PM, Laurent Daudelin wrote: > Am I missing something? Where do you set the column identifier in Xcode 4.4? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the