Re: NSForegroundColorAttributeName without AppKit

2010-03-01 Thread Ken Ferry
On Mon, Mar 1, 2010 at 9:19 PM, Graham Cox wrote: > > On 02/03/2010, at 4:00 PM, Ken Ferry wrote: > > > When you use a symbol like NSForegroundColorAttributeName, a reference to > the symbol is embedded in your binary, not the value. So it could possibly > change. > > > > Barriers to this would b

Re: NSForegroundColorAttributeName without AppKit

2010-03-01 Thread Graham Cox
On 02/03/2010, at 4:00 PM, Ken Ferry wrote: > When you use a symbol like NSForegroundColorAttributeName, a reference to the > symbol is embedded in your binary, not the value. So it could possibly change. > > Barriers to this would be (1) people persisting attribute dictionaries,[...] > (1) mi

Re: NSForegroundColorAttributeName without AppKit

2010-03-01 Thread Ken Ferry
On Mon, Mar 1, 2010 at 7:51 PM, Graham Cox wrote: > > On 02/03/2010, at 2:39 PM, Steven Degutis wrote: > > > NSAttributedString is part of Foundation.framework and so are all > NSStrings > > (including literal constants like @"NSColor"). Thus, you can use that > safely > > without linking against

Re: Catching double click (any mouse events) in an NSTableView

2010-03-01 Thread Keary Suska
On Mar 1, 2010, at 7:26 AM, Eric Giguere wrote: > I'm a newbie with the Mac programming and been trying for a couple of hours > to do something that should be straightforward, no success so I'm asking the > Pros for some help :). > > I'm have a small application, using Core Data, that shows in

Re: NSForegroundColorAttributeName without AppKit

2010-03-01 Thread Graham Cox
On 02/03/2010, at 3:04 PM, Murat Konar wrote: > And what would you set the value of an NSColor attribute to? ;) Yes, fair comment :) --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comm

Re: NSForegroundColorAttributeName without AppKit

2010-03-01 Thread Murat Konar
On Mar 1, 2010, at 7:53 PM, Graham Cox wrote: On 02/03/2010, at 2:42 PM, Murat Konar wrote: Unfortunately it seems that using the @"NSColor" key as part of an NSAttributedString also requires AppKit. Well, that's because NSColor (the class) is part of AppKit. You can still create a lit

Re: NSCollectionView deselection

2010-03-01 Thread Markus Spoettl
On Mar 1, 2010, at 2:42 PM, Thomas Davie wrote: > However, when the user clicks on item B after clicking on item A, > setSelected:NO is *not* sent to the NSCollectienViewItem subclass for A. > This displeases me greatly :(. Works fine for me. Are you sure it's not called/set? Put a breakpoint

Re: NSForegroundColorAttributeName without AppKit

2010-03-01 Thread Graham Cox
On 02/03/2010, at 2:42 PM, Murat Konar wrote: >> Unfortunately it seems that using the @"NSColor" key as part of an >> NSAttributedString also requires AppKit. > > Well, that's because NSColor (the class) is part of AppKit. You can still create a literal string @"NSColor" without AppKit - it

Re: NSForegroundColorAttributeName without AppKit

2010-03-01 Thread Graham Cox
On 02/03/2010, at 2:39 PM, Steven Degutis wrote: > NSAttributedString is part of Foundation.framework and so are all NSStrings > (including literal constants like @"NSColor"). Thus, you can use that safely > without linking against AppKit.framework; however, I advise against using > string litera

Re: NSForegroundColorAttributeName without AppKit

2010-03-01 Thread Sean McBride
BareFeet (list.develo...@tandb.com.au) on 2010-03-02 22:27 said: >>> I have some working code for adding attributes to a string. I'd like >to modify it so it will work without needing AppKit. I can get it all >going except the NSForegroundColorAttributeName constant which seems to >only exist in A

Re: NSForegroundColorAttributeName without AppKit

2010-03-01 Thread Ken Thomases
On Mar 1, 2010, at 9:27 PM, BareFeet wrote: >>> I have some working code for adding attributes to a string. I'd like to >>> modify it so it will work without needing AppKit. I can get it all going >>> except the NSForegroundColorAttributeName constant which seems to only >>> exist in AppKit. >>

Re: Menu Items

2010-03-01 Thread David Blanton
Cool .. ."hook up the window's initialFirstResponder outlet to the view" is the last piece for me. Thanks a bunch Graham! - db On Mar 1, 2010, at 8:12 PM, Graham Cox wrote: On 02/03/2010, at 2:07 PM, David Blanton wrote: Then the light bulb went off ... and by clicking in the view, acc

Re: NSForegroundColorAttributeName without AppKit

2010-03-01 Thread Murat Konar
On Mar 1, 2010, at 7:27 PM, BareFeet wrote: Unfortunately it seems that using the @"NSColor" key as part of an NSAttributedString also requires AppKit. Well, that's because NSColor (the class) is part of AppKit. _murat ___ Cocoa-dev mailing list

Re: NSWindow - makeKeyAndOrderFront problem

2010-03-01 Thread Alexander Bokovikov
Hi, All, I'm sorry for an offtopic, so I'm writing just to close the thread. On 02.03.2010, at 7:37, Andy Lee wrote: If I feel my app should come forward in both cases I do think it should be okay to implement it that way, but there *is* precedent for not activating the app. I'd even say,

Re: Forcing the package bit

2010-03-01 Thread Sean McBride
Graham Cox (graham@bigpond.com) on 2010-03-02 20:14 said: >I need to write a package file that is not listed as one of my document >types. How do I ensure that this will be seen as a package in the >Finder? It looks to me as though some new flags were added to NSURL to >cover this but the code

Re: NSForegroundColorAttributeName without AppKit

2010-03-01 Thread Steven Degutis
NSAttributedString is part of Foundation.framework and so are all NSStrings (including literal constants like @"NSColor"). Thus, you can use that safely without linking against AppKit.framework; however, I advise against using string literals in place of Apple's constants, since they might change u

Re: Forcing the package bit

2010-03-01 Thread Ken Thomases
On Mar 1, 2010, at 9:06 PM, Graham Cox wrote: > [[NSFileManager defaultManager] setAttributes:[[self class] > defaultFileAttributes] ofItemAtPath:[self path] error:&error]; > > Where the default attributes are: > > + (NSDictionary*) defaultFileAttributes > { > return [NSDictionary dic

Re: NSForegroundColorAttributeName without AppKit

2010-03-01 Thread BareFeet
Thanks Graham for your reply: >> I have some working code for adding attributes to a string. I'd like to >> modify it so it will work without needing AppKit. I can get it all going >> except the NSForegroundColorAttributeName constant which seems to only exist >> in AppKit. > > If you log the

Re: Menu Items

2010-03-01 Thread Graham Cox
On 02/03/2010, at 2:07 PM, David Blanton wrote: > Then the light bulb went off ... and by clicking in the view, > acceptsFirstResponder is called and then the validateMenuItem etc etc. Also, if you want the view to be first responder by default when the window is activated, hook up the windo

Interface Builder plugin for NSWindow subclass?

2010-03-01 Thread Murat Konar
Is it possible to create an Interface Builder plugin for NSWindow (or NSPanel) subclasses? In NSWindow's docs it says "Although the NSWindow class inherits the NSCoding protocol from NSResponder, the class does not support coding. [...] Any attempt to archive or unarchive an NSWindow object

Re: Menu Items

2010-03-01 Thread David Blanton
Ok. This is all very interesting. I did have acceptsFirstResponder returning YES in the view that contains the action but it was not being called. Then the light bulb went off ... and by clicking in the view, acceptsFirstResponder is called and then the validateMenuItem etc etc. This d

Re: Forcing the package bit

2010-03-01 Thread Graham Cox
On 02/03/2010, at 1:34 PM, Graham Cox wrote: > Thanks, though it doesn't compile. What the hell is: > >union FinderInfoTransmuter finderInfoPointers = { .bytes = > catInfo.finderInfo }; Never mind, I just got rid of it and cast the struct directly: - (void) setBundleBitOfFile:(NSStri

Re: Forcing the package bit

2010-03-01 Thread Graham Cox
On 02/03/2010, at 1:04 PM, Neil Allain wrote: > > On Mar 1, 2010, at 7:14 PM, Graham Cox wrote: > >> I need to write a package file that is not listed as one of my document >> types. How do I ensure that this will be seen as a package in the Finder? It >> looks to me as though some new flags

Re: IsReadableFileAtPath

2010-03-01 Thread Charles Srstka
On Mar 1, 2010, at 3:24 PM, Jens Alfke wrote: > -isReadableFileAtPath is just a convenience. If you don't want to traverse > symlinks, call -fileAttributesAtPath:traverseLink: and use NO for the second > parameter. Unfortunately, fileAttributesAtPath:traverseLink: is deprecated. The replacemen

Re: Private ivars, not marked as IBOutlet, visible in IB

2010-03-01 Thread Shane Stanley
On 2/3/10 3:36 AM, "Joanna Carter" wrote: >> That is a legacy of Interface Builder on NextStep, from the days before the >> IBOutlet marker was added. > > Heheh, I was afraid if that. Surely it's about time, with all the other > breaking changes for Snow Leopard, that that got broken as well? :-

Re: NSWindow - makeKeyAndOrderFront problem

2010-03-01 Thread Andreas Mayer
Am 02.03.2010 um 00:27 Uhr schrieb Matthew Lindfield Seager: If I've told a video player to start playing files on open I would generally expect the player to bring itself to the front after specifically dropping a media file onto it. Well, yes. But that's not what we are talking about. We ar

Re: Forcing the package bit

2010-03-01 Thread Neil Allain
On Mar 1, 2010, at 7:14 PM, Graham Cox wrote: > I need to write a package file that is not listed as one of my document > types. How do I ensure that this will be seen as a package in the Finder? It > looks to me as though some new flags were added to NSURL to cover this but > the code needs t

Re: Forcing the package bit

2010-03-01 Thread Steven Degutis
I believe this can be accomplished by exporting a new UTI that describes your package type (probably by extending com.apple.package or something like that). This would be done inside your app's Info.plist file. -Steven On Mon, Mar 1, 2010 at 8:14 PM, Graham Cox wrote: > I need to write a packag

Forcing the package bit

2010-03-01 Thread Graham Cox
I need to write a package file that is not listed as one of my document types. How do I ensure that this will be seen as a package in the Finder? It looks to me as though some new flags were added to NSURL to cover this but the code needs to work on 10.5 or later. --Graham ___

Re: NSWindow - makeKeyAndOrderFront problem

2010-03-01 Thread Andy Lee
On Mar 1, 2010, at 6:27 PM, Matthew Lindfield Seager wrote: > On Monday, March 1, 2010, Andreas Mayer wrote: >> Try dragging something onto the iTunes source list. iTunes will import it, >> but will not activate itself. > > Apples & Oranges... iTunes is (was?) a library application more than a >

Re: Connecting Outlet on Derived Array Controller

2010-03-01 Thread Joanna Carter
Hi Quincey > With Objective-C 2.0, I can't think of any reason to stick with an informal > protocol. Formal protocols mean actual compile-time checking, and they rarely > blow up in your face any more. OK, so forget about informal protocols, otherwise known as categories without implementation

Re: Menu Items

2010-03-01 Thread Graham Cox
On 02/03/2010, at 10:47 AM, David Blanton wrote: > I connected a menu item to an action in First Responder. The action is > defined in a view. > > This, apparently, does not define the Target as I put validateMenuItem in the > same view as the action but it is not called. > > So, how does one

Re: Custom NSCell

2010-03-01 Thread Sean McBride
On 3/1/10 8:45 PM, Tilo Villwock said: >In applicationDidFinishLaunching: I created an instance of my custom >NSCell class and put it in place for the right column. Could you elaborate? I have found that I needed to set the custom cell in IB. You can drag a custom cell from the library to the t

Re: Menu Items

2010-03-01 Thread Gideon King
There is no target when you connect to the first responder - in effect the target is determined at runtime by the window order, view hierarchies, controllers etc. I suggest you read up on the responder chain. Once you understand it, it's very logical and powerful. HTH Gideon On 02/03/2010, at

Re: Where in the MVC should my code go?

2010-03-01 Thread Jean-Henri Duteau
On 2010-03-01, at 3:20 PM, Chase Meadors wrote: > 2. On the other hand, if you want the view to be more independent and > flexible as according to MVC, you have more options. If you're binding > the model to the view, you can simply use a custom NSValueTransformer > class to change your mod

Re: XCode's Special Buttons

2010-03-01 Thread Kevin Wojniak
It's probably an NSPopUpButton subclass, with a custom NSPopUpButtonCell subclass to change its appearance. I don't think IB lets you create custom popup buttons that small, so you'd probably have to either use a standard button or a custom view, and then set the class name and finish up any oth

Menu Items

2010-03-01 Thread David Blanton
I connected a menu item to an action in First Responder. The action is defined in a view. This, apparently, does not define the Target as I put validateMenuItem in the same view as the action but it is not called. So, how does one define the Target? The view and the Menu Item are in differ

Re: Is there any Cocoa API (or other way) to determine if an application is running in a VNC or ARD session?

2010-03-01 Thread Ken Ferry
If you are going to look at stuff like that, please make sure your application is still usable if it stops working. You're looking at implementation details, not API. They can break between OS releases. -Ken On Mon, Mar 1, 2010 at 3:16 PM, Joe Jones wrote: > Great, thanx! > > From: Jonathan H

Re: NSWindow - makeKeyAndOrderFront problem

2010-03-01 Thread Matthew Lindfield Seager
On Monday, March 1, 2010, Andreas Mayer wrote: > Try dragging something onto the iTunes source list. iTunes will import it, > but will not activate itself. Apples & Oranges... iTunes is (was?) a library application more than a player. It also has origins in audio, not video. Then again I think t

RE: Is there any Cocoa API (or other way) to determine if an application is running in a VNC or ARD session?

2010-03-01 Thread Joe Jones
Great, thanx! From: Jonathan Hendry [mailto:jonhen...@mac.com] Sent: Monday, March 01, 2010 3:15 PM To: Joe Jones Cc: cocoa-dev@lists.apple.com Developers Subject: Re: Is there any Cocoa API (or other way) to determine if an application is running in a VNC or ARD session? Checking on my lsof -i

Re: Is there any Cocoa API (or other way) to determine if an application is running in a VNC or ARD session?

2010-03-01 Thread Jonathan Hendry
Checking on my lsof -i suggestion now that I'm at work... I just set up a screen sharing session from my laptop to another machine. lsof -i on my laptop produced the following output: AppleVNCS 19770 jon5u IPv6 0x69d9b2c 0t0 TCP *:vnc-server (LISTEN) AppleVNCS 19770 jon6u

Re: [NSString characterAtIndex:] -> [NSString stringWithCString:encoding:]

2010-03-01 Thread Nick Zitzmann
On Mar 1, 2010, at 10:25 AM, Gabriel Fernandez wrote: > if I change the encoding: to ascii, I get one character in the new NSString, > as I'd expect, but with Unicode encoding, I get no characters - WHY?! The method you're using takes a buffer of 1-byte characters, not 2-byte characters. Use +

Re: IsReadableFileAtPath

2010-03-01 Thread Kevin Perry
In general, this kind of check-then-do pattern opens the door for file system race conditions. The documentation for this method (and related methods) has a little more information about this in the "Note" section. Could you just try to copy the symlink and then deal with any errors that result

[NSString characterAtIndex:] -> [NSString stringWithCString:encoding:]

2010-03-01 Thread Gabriel Fernandez
Hi, I'm having trouble with NSString - I'm capturing NSTextField edits and analyzing the typed (uni-)chars: { int bufsize = 3*sizeof(unichar) ; static unichar *buf = nil ; if( nil == buf ) { buf = (unichar*) malloc( bufsize ) ; if( n

Drawing an NSView into an NSGraphicsContext

2010-03-01 Thread Brian Postow
I have a CGContext, which I can turn into an NSGraphicsContext. I have an NSWindow with a clipRect for the context. I want to put a scrollview into the context and then some other view into the scrollview so I can put an image into it... However, I can't figure out how to attach the scrollview

Catching double click (any mouse events) in an NSTableView

2010-03-01 Thread Eric Giguere
Hi all I'm a newbie with the Mac programming and been trying for a couple of hours to do something that should be straightforward, no success so I'm asking the Pros for some help :). I'm have a small application, using Core Data, that shows in the Main Window a list of entities. I'm trying to

Re: Where in the MVC should my code go?

2010-03-01 Thread Chase Meadors
Just my 2 cents, but I see these possibilities: 1. If it's a fairly custom application, small, or simple, just combine the code with the view since it's likely that the view will not need to be particularly flexible or used over and over. 2. On the other hand, if you want the view to be mor

XCode's Special Buttons

2010-03-01 Thread Jean-Henri Duteau
Okay, simple question here... I'd like to replicate the + and - buttons that are found in XCode's Data modeller view. This is the one where you click on '+' and it shows a menu of attribute/property/relationship. Is it a simple button that's scaled down and is combined to a pop-up? I've trie

[Moderator] Re: Audio APIs [Carbon is C++?]

2010-03-01 Thread Scott Anguish
On Mar 1, 2010, at 2:05 PM, Roni Music wrote: > There was a similar discussion on the coreaudio-api list a year ago, And with this, I think we can close this discussion as no longer productive. Greg Parker’s answer earlier in the thread should likely be considered definitive. scott moderator

Re: Trouble with core data and Save As

2010-03-01 Thread Gideon King
10.6.2. I did receive a suggestion from Jerry Krinock over the weekend to try switching to an XML store and seeing whether that fixed the problem, so I could narrow it down as to what was causing the problem, but haven't had time to look into that yet (I have a lot of custom code for transformab

Re: IsReadableFileAtPath

2010-03-01 Thread Jens Alfke
On Mar 1, 2010, at 11:20 AM, gMail.com wrote: > I have just seen that the Cocoa API isReadableFileAtPath traverses the > symlink, so, in case the target file is not readable, my app doesn't copy > the symlink, while the Finder can properly do. So my app does wrong. -isReadableFileAtPath is just

Re: NSXMLDocument outputs numbers in exponential format?

2010-03-01 Thread Fritz Anderson
On 1 Mar 2010, at 1:37 PM, Colin Cornaby wrote: > I'm working with NSXMLDocument and serializing it to a file... The issue is > the serialized output contains numbers in exponential formal, i.e. > installKBytes="1.744E3". Other programs aren't parsing this correctly... Is > there any way to mod

Re: Custom NSCell

2010-03-01 Thread Tilo Villwock
Well, since I'm subclassing NSCell and only override the method drawInteriorWithFrame: why is there a need to override copyWithZone: as well? I don't store any data within the Class. Am 01.03.2010 um 20:59 schrieb Nick Zitzmann: > > On Mar 1, 2010, at 12:45 PM, Tilo Villwock wrote: > >> I've

Re: Trouble with core data and Save As

2010-03-01 Thread Sean McBride
On 2/27/10 4:50 PM, Gideon King said: >I'm having another look at an issue I posted about a couple of weeks >ago, where Save As was causing an error. I've had quite a few bugs with Save As. One was fixed in 10.6.2. What OS are you using? -- _

Re: Custom NSCell

2010-03-01 Thread Nick Zitzmann
On Mar 1, 2010, at 12:45 PM, Tilo Villwock wrote: > I've created a custom NSCell Object to layout some different text attributes > of a custom data object in a NSTableView, but for some reason all the > attributes of the different data objects are only displayed in the first row > and nothing

Custom NSCell

2010-03-01 Thread Tilo Villwock
Hi, I've created a custom NSCell Object to layout some different text attributes of a custom data object in a NSTableView, but for some reason all the attributes of the different data objects are only displayed in the first row and nothing at all in the other rows. Every row receives a separate

NSCollectionView deselection

2010-03-01 Thread Thomas Davie
Hi, I have, after much struggling with the documentation, managed to create an NSCollectionView that displays all the items I want it to. However, selection isn't quite working right. When the user clicks on item A, setSelected:YES is sent to the NSCollectionViewItem subclass for A. This ple

NSXMLDocument outputs numbers in exponential format?

2010-03-01 Thread Colin Cornaby
I'm working with NSXMLDocument and serializing it to a file... The issue is the serialized output contains numbers in exponential formal, i.e. installKBytes="1.744E3". Other programs aren't parsing this correctly... Is there any way to modify the output to just format the numbers normally? _

Re: IsReadableFileAtPath

2010-03-01 Thread Nick Zitzmann
On Mar 1, 2010, at 12:20 PM, gMail.com wrote: > I need to check whether a file or a symlink could be really copied. > I have just seen that the Cocoa API isReadableFileAtPath traverses the > symlink, so, in case the target file is not readable, my app doesn't copy > the symlink, while the Finder

Re: Connecting Outlet on Derived Array Controller

2010-03-01 Thread Quincey Morris
On Mar 1, 2010, at 11:00, Joanna Carter wrote: > I have a brain the size of a planet and you still expect me to make cogent > sense of the English language? No, planet-brain wins. ;) > Can I just indulge by asking whether the protocol, in this situation, would > best be formal or informal?

IsReadableFileAtPath

2010-03-01 Thread gMail.com
Hi, I need to check whether a file or a symlink could be really copied. I have just seen that the Cocoa API isReadableFileAtPath traverses the symlink, so, in case the target file is not readable, my app doesn't copy the symlink, while the Finder can properly do. So my app does wrong. The question

Re: Audio APIs [Carbon is C++?]

2010-03-01 Thread Roni Music
There was a similar discussion on the coreaudio-api list a year ago, it ended like this with an answer from one of the CoreAudio engineers: From: William Stewart I don't want a full-blown discussion here, but from everything we've seen (including the guts of obj_message send) ObjC is complet

Re: Connecting Outlet on Derived Array Controller

2010-03-01 Thread Joanna Carter
Hi Quincey > You want to "pass a property"? What does that mean? Never mind -- it's clear > from your second paragraph that you mean "pass a value". I'm rudely pointing > this out because using precise terms precisely is important, and you've led > yourself astray multiple times in this thread

Re: NSMenu problems

2010-03-01 Thread slasktrattena...@gmail.com
OK, I can live with this. Thanks. On Mon, Mar 1, 2010 at 6:17 PM, Eric Schlegel wrote: > > On Mar 1, 2010, at 8:33 AM, slasktrattena...@gmail.com wrote: > >> 3) When typing in the search field, the menu is updated to show the >> search results. This means the width of the menu is expanded to fit

Re: [Solved]registering Defaults with NSUserDefaults not working

2010-03-01 Thread Gustavo Pizano
Ok I have finished with the defaults things, I think I got desperate after the first step which was setting the Application defaults, and I didn't realize I needed to complete the second step which is allow the user to set his/defaults, so after I did so,, all was fine, the .plist in the librar

Re: Customize UIBarButtonItem

2010-03-01 Thread Fritz Anderson
On 26 Feb 2010, at 10:21 AM, Michael Abendroth wrote: > I want to customize a UIBarButtonItem's background image. I have > already tried using the customView property (with a UIButton) , but it > does not work, instead it shows nothing. Searching around the web > gives some results, but none have

Re: Connecting Outlet on Derived Array Controller

2010-03-01 Thread Quincey Morris
On Mar 1, 2010, at 08:48, Joanna Carter wrote: > Actually, I don't really want a "dependent" property. All I want is a way to > be able to pass a property on the main controller class to each of three > derived array controllers, so that they can use that value to set a property > on every new

Customize UIBarButtonItem

2010-03-01 Thread Michael Abendroth
Hi, I want to customize a UIBarButtonItem's background image. I have already tried using the customView property (with a UIButton) , but it does not work, instead it shows nothing. Searching around the web gives some results, but none have worked for me. Thanks for any input! - Michael _

Re: Audio APIs [Carbon is C++?]

2010-03-01 Thread Kyle Sluder
On Mon, Mar 1, 2010 at 9:22 AM, Jens Alfke wrote: > IMHO the worst problem with CoreAudio isn't what language it's in, but that > the APIs don't form a coherent framework, rather a patchwork of complex > procedural interfaces plus a pile of undocumented, mostly-unsupported and > poorly-structur

Re: Audio APIs [Carbon is C++?]

2010-03-01 Thread Paul Bruneau
On Mar 1, 2010, at 12:22 PM, Jens Alfke wrote: IMHO the worst problem with CoreAudio isn't what language it's in, but that the APIs don't form a coherent framework, rather a patchwork of complex procedural interfaces plus a pile of undocumented, mostly-unsupported and poorly-structured wrap

Re: NSNull vs nil in NSManagedObject setValue: v forKey: k

2010-03-01 Thread Ben Trumbull
>> NSManagedObject* obj; // gets created somehow >> >> [obj setValue: nil forKey: @"bar"]; // succeeds where NSDictionary fails >> [obj setValue: [NSNull null] forKey: @"bar"]; // fails where NSDictionary >> succeeds >> >> so - this is conceptually buggy thinking and the thoughtful developer co

Re: Private ivars, not marked as IBOutlet, visible in IB

2010-03-01 Thread Jens Alfke
In most cases there are better types to use than 'id' for an ivar. Using a specific class or protocol will get you type-checking. If it's something like a delegate and you don't care what class it is but will be sending one or two specific messages to it, you can create an @protocol containing t

NSMenu problems

2010-03-01 Thread slasktrattena...@gmail.com
Hello! I've got a couple of problems with NSMenu. 1) All menu items have a custom view. Therefore the default action for the menu item never gets called. Instead, I'm catching the mouse up event in my custom view and call the appropriate selector from there. This works fine. The problem I'm havin

Re: Audio APIs [Carbon is C++?]

2010-03-01 Thread Jens Alfke
On Feb 28, 2010, at 11:39 PM, Eagle Offshore wrote: > There is no good reason not to have the base classes for AudioUnit be in > Objective-C rather than C++ other than the personal biases of certain > CoreAudio team members. That's kind of insulting to those team members. The real reason is th

Re: NSMenu problems

2010-03-01 Thread Eric Schlegel
On Mar 1, 2010, at 8:33 AM, slasktrattena...@gmail.com wrote: > 3) When typing in the search field, the menu is updated to show the > search results. This means the width of the menu is expanded to fit > the new items. But when I clear the search field and the menu items > are reset to their defa

Re: Using CFMutableDictionaryRef

2010-03-01 Thread Matt Neuburg
On Sun, 28 Feb 2010 23:09:41 +, Alexander Hartner said: >This is what I have come up with, but it's not working. The documentation refers to a MultiTouchDemo which I can't find anywhere online. Please do not hesitate to file a bug against the documentation! Referring to a non-existent exampl

Re: Connecting Outlet on Derived Array Controller

2010-03-01 Thread Joanna Carter
Hi Quincey > You need to clarify your thinking. What you want (it appears) is a KVO > derived property in a certain class -- in this case, one whose value is > dependent on a property in a different class. Actually, I don't really want a "dependent" property. All I want is a way to be able to

Re: Writing string to pasteboard on 10.5 causes crash

2010-03-01 Thread jonat...@mugginsoft.com
On 1 Mar 2010, at 16:43, Abhinay Kartik Reddyreddy wrote: >>> >> Try preparing the pasteboard first with either of the following: >> >> - (NSInteger)clearContents > > looks like this is the available only on SL. how to clear a pasteboard in > Leopard ? Yes. Sorry about that. 10.6 only. > >>

Re: Writing string to pasteboard on 10.5 causes crash

2010-03-01 Thread Abhinay Kartik Reddyreddy
On Mar 1, 2010, at 11:17 AM, jonat...@mugginsoft.com wrote: > > On 1 Mar 2010, at 16:03, Martin Hewitson wrote: > >> Dear list, >> >> I have developed an app on SL but at all times compiled the app for 10.5. >> Today I got my hands on a leopard test machine to try out the app, and I get >> c

Fwd: NSMenu problems

2010-03-01 Thread slasktrattena...@gmail.com
This is the third time I'm posting this, but it seems it doesn't come through. Apologies if they all show up at once. -- Forwarded message -- Date: Sun, Feb 28, 2010 at 8:08 PM Subject: NSMenu problems To: cocoa-dev@lists.apple.com Hello! I've got a couple of problems with NSMen

Re: Private ivars, not marked as IBOutlet, visible in IB

2010-03-01 Thread Joanna Carter
Hi Henry > Not a bug --- a Feature . . . > > That is a legacy of Interface Builder on NextStep, from the days before the > IBOutlet marker was added. Heheh, I was afraid if that. Surely it's about time, with all the other breaking changes for Snow Leopard, that that got broken as well? :-) >

Re: Connecting Outlet on Derived Array Controller

2010-03-01 Thread Quincey Morris
On Mar 1, 2010, at 05:45, Joanna Carter wrote: > Does it help if I rephrase my question? > > How can I derive from an existing class and add a means of binding a property > on the derived class to a property of another object? > > It would seem, from Ken's response (and from common sense thinki

Re: Private ivars, not marked as IBOutlet, visible in IB

2010-03-01 Thread Henry McGilton
On Mar 1, 2010, at 4:40 AM, Joanna Carter wrote: > I have discovered that adding a private ivar of type id to a class makes it > visible as an IBOutlet in Interface Builder. > > @interface MyController : NSObject > { > @private > id anIvar; > > ... > } > > @end > > Is this a known bug, or

Re: Writing string to pasteboard on 10.5 causes crash

2010-03-01 Thread jonat...@mugginsoft.com
On 1 Mar 2010, at 16:03, Martin Hewitson wrote: > Dear list, > > I have developed an app on SL but at all times compiled the app for 10.5. > Today I got my hands on a leopard test machine to try out the app, and I get > crashes due to various things. Some of these I've fixed, but I'm stuck at

Writing string to pasteboard on 10.5 causes crash

2010-03-01 Thread Martin Hewitson
Dear list, I have developed an app on SL but at all times compiled the app for 10.5. Today I got my hands on a leopard test machine to try out the app, and I get crashes due to various things. Some of these I've fixed, but I'm stuck at this one: Part of the app has an NSTableView filled with st

Re: registering Defaults with NSUserDefaults not working

2010-03-01 Thread Gustavo Pizano
On Mar 1, 2010, at 4:07 PM, Keary Suska wrote: > On Mar 1, 2010, at 3:01 AM, Gustavo Pizano wrote: > >> [[NSUserDefaults standardUserDefaults] registerDefaults:appDefaults]; >> if([[NSUserDefaults standardUserDefaults] synchronize])NSLog(@"Could Save"); > > -registerDefaults: does not actually

Re: registering Defaults with NSUserDefaults not working

2010-03-01 Thread Keary Suska
On Mar 1, 2010, at 3:01 AM, Gustavo Pizano wrote: > [[NSUserDefaults standardUserDefaults] registerDefaults:appDefaults]; > if([[NSUserDefaults standardUserDefaults] synchronize])NSLog(@"Could Save"); -registerDefaults: does not actually change default values, it simply sets what the default val

Re: Connecting Outlet on Derived Array Controller

2010-03-01 Thread Joanna Carter
Hi folks Does it help if I rephrase my question? How can I derive from an existing class and add a means of binding a property on the derived class to a property of another object? It would seem, from Ken's response (and from common sense thinking :-) ) that an outlet is not suitable as that c

Re: Private ivars, not marked as IBOutlet, visible in IB

2010-03-01 Thread Joanna Carter
Le 1 mars 2010 à 13:13, Roland King a écrit : > http://bugreport.apple.com > > you need at least some kind of apple developer ID, free one is fine. Thanks. Reported #7701200. Joanna -- Joanna Carter Carter Consulting ___ Cocoa-dev mailing list (Co

Re: Private ivars, not marked as IBOutlet, visible in IB

2010-03-01 Thread Roland King
http://bugreport.apple.com you need at least some kind of apple developer ID, free one is fine. On 01-Mar-2010, at 9:10 PM, Joanna Carter wrote: > Le 1 mars 2010 à 12:59, Roland King a écrit : > >> I can't find this in the Apple documentation (it says that you need >> IBOutlet) however I beli

Re: Private ivars, not marked as IBOutlet, visible in IB

2010-03-01 Thread Joanna Carter
Le 1 mars 2010 à 12:59, Roland King a écrit : > I can't find this in the Apple documentation (it says that you need IBOutlet) > however I believe that the nutshell cocoa guide stated that to be the case. > > Doesnt have to be private actually, just id seems to be enough. > > It has that 'lega

Re: Private ivars, not marked as IBOutlet, visible in IB

2010-03-01 Thread Roland King
I can't find this in the Apple documentation (it says that you need IBOutlet) however I believe that the nutshell cocoa guide stated that to be the case. Doesnt have to be private actually, just id seems to be enough. It has that 'legacy' feel about it. On 01-Mar-2010, at 8:40 PM, Joanna Car

Private ivars, not marked as IBOutlet, visible in IB

2010-03-01 Thread Joanna Carter
I have discovered that adding a private ivar of type id to a class makes it visible as an IBOutlet in Interface Builder. @interface MyController : NSObject { @private id anIvar; ... } @end Is this a known bug, or expected behaviour? Joanna -- Joanna Carter Carter Consulting

Re: UITextView as its own delegate - infinite loop on keyboard select

2010-03-01 Thread Roland King
On 01-Mar-2010, at 7:34 PM, Uli Kusterer wrote: > On 01.03.2010, at 12:05, Roland King wrote: >> Firstly if that's what happened, the program would recurse, the stack would >> be full of textViewDidChangeSelection: calls each calling the next, but that >> is not what happens, the program hangs,

Re: UITextView as its own delegate - infinite loop on keyboard select

2010-03-01 Thread Uli Kusterer
On 01.03.2010, at 12:05, Roland King wrote: > Firstly if that's what happened, the program would recurse, the stack would > be full of textViewDidChangeSelection: calls each calling the next, but that > is not what happens, the program hangs, the code infinitely loops, but it > does not recurse,

Re: Carbon is C++?

2010-03-01 Thread Ariel Feinerman
Hi, everyone say: "ObjC is slower then C++", but I/O Kit in the NextStep was written in ObjC, I really don`t think Next`s engineers didn`t know that. Now many crazy people write games in C# (managed language), but says that ObjC is not appropriate because it dynamically. Your experience is greater

Re: Carbon is C++?

2010-03-01 Thread Uli Kusterer
On 26.02.2010, at 15:12, Sean McBride wrote: > the STL Debug mode is broken on 10.6, etc., etc. C++ support is good, but > it's not great. I guess this is off-topic for this list, but could you maybe give a short link or so regarding what "the STL debug mode" would be, and how it is broken? I

Re: UITextView as its own delegate - infinite loop on keyboard select

2010-03-01 Thread Roland King
On 01-Mar-2010, at 9:29 AM, Kyle Sluder wrote: > On Sat, Feb 27, 2010 at 6:37 PM, Roland King wrote: >> Thanks that's what I see too. That thread doesn't explain why of course. I >> have a trivial test case so I'll file this as a bug and see what comes back >> because I think the behaviour is wr

Re: Carbon is C++?

2010-03-01 Thread Greg Parker
On Feb 28, 2010, at 7:24 PM, Erik Buck wrote: > I disagree. I have written very low latency device drivers in Objective-C. > Why do you think Objective-C has too much "latency" for audio? When properly > used, Objective-C programs are no more likely to be preempted than any other > kind of pr

Re: Is there any Cocoa API (or other way) to determine if an application is running in a VNC or ARD session?

2010-03-01 Thread Uli Kusterer
On 27.02.2010, at 00:53, Joe Jones wrote: > Why? So we can limit certain functionality over a remote connection. We do > this for Terminal Services connections on Windows and I was asked about doing > it for Mac. If you want this so you can limit e.g. whether users can see the contents of cer

  1   2   >