Re: [Math] sin(), cos() not working? What special magic must I use to summon their powers?

2008-10-04 Thread Graham Cox
On 4 Oct 2008, at 2:17 pm, Michael Robinson wrote: Now I'd like to replace this: NSGradient* aGradient = [[[NSGradient alloc] initWithColorsAndLocations:[gradientColour1 color], (CGFloat)0.0, [gradientColour2 color], (CGFloat)1.0,nil] autorelease]; [aGradient

Re: [Math] sin(), cos() not working? What special magic must I use to summon their powers?

2008-10-04 Thread Michael Robinson
I'll do that, thanks for the push in the right direction. “You know the world is going crazy when the best rapper is a white guy, the best golfer is a black guy, the tallest guy in the NBA is Chinese, the Swiss hold the America’s Cup, France is accusing the U.S. of arrogance, Germany

Re: A way to use multiple colours with one NSBezierPath?

2008-10-04 Thread Graham Cox
On 4 Oct 2008, at 1:54 pm, Michael Robinson wrote: I would like to draw one path, which is used as a border. I naively assumed I could change the colour of the path as it is constructed, but it seems this is not the case. If I change the colour (using [[NSColor blackColor] set]; for

Re: NSCoding protocol

2008-10-04 Thread Graham Cox
On 4 Oct 2008, at 9:29 am, [EMAIL PROTECTED] wrote: But now I'm confused about how to de-allocate MyClass. Given this in its initialisation: S1 = @a string; S2 = [[NSString alloc] init]; S3 = [NSString string]; I would only release S2 in the dealloc method. But if

Re: Accessing Menu in Another Nib

2008-10-04 Thread Kyle Sluder
On Sat, Oct 4, 2008 at 12:01 AM, Kevin Ferguson [EMAIL PROTECTED] wrote: Basically, is there any way for me to load that second NIB file (using something like 'loadNibNamed:' or the like) and then get the menu that I have connected to the File's Owner 'menu' outlet Sure. You've already

Re: Accessing Menu in Another Nib

2008-10-04 Thread Rob Keniger
On 04/10/2008, at 5:06 PM, Kyle Sluder wrote: Basically, is there any way for me to load that second NIB file (using something like 'loadNibNamed:' or the like) and then get the menu that I have connected to the File's Owner 'menu' outlet Sure. You've already described how to do it.

file fixtures for unit testing

2008-10-04 Thread Brent Hargrave
To unit test an XML parsing method, I would like keep a dummy XML file in a project directory and import it into my FooTests class as a fixture of sorts. What is the right way to do this sort of thing? Many thanks! JB ___ Cocoa-dev mailing list

Customize NSScroller

2008-10-04 Thread Mr. Gecko
Hello I have been working on making a custom NSScroller and so far I got a lot done. the only thing I am having trouble with is drawing the knob. I have three images top, center, and bottom. how can i put that together to make a scroll bar. Top and Bottom width is 15 and height is 12.

Accessing IB Inspector Identity Interface Builder Identity name programatically?

2008-10-04 Thread Ken Tozier
Hi I created a custom view with several subviews some of which I gave names in the Identity Interface Builder Identity name tab. Is there any way to reference these items by their given name if the nib is loaded programatically using NSNib? Thanks in advance

Re: Play Playlist in iTunes

2008-10-04 Thread has
On 4 Oct 2008, at 03:54, Mr. Gecko wrote: I am not using AppleScript to do this, I am using AppleEvents, as you can see in code below. Aware of that. You'll often find that folks use the name AppleScript as a catch-all term for anything relating to Apple event IPC. It's easy to lapse

Bizarre [NSWindowController window] returning null

2008-10-04 Thread Ken Tozier
I created the following NSWindowController subclass which loads and displays a window without problem, but am finding that whenever I try to actually access the window with [NSWindowController window] it always returns null. - (id) init { NSBundle *bundle = [NSBundle

Re: Bizarre [NSWindowController window] returning null

2008-10-04 Thread Roland King
did you connect the window outlet of Files Owner in interface builder to the window? On Oct 4, 2008, at 6:08 PM, Ken Tozier wrote: I created the following NSWindowController subclass which loads and displays a window without problem, but am finding that whenever I try to actually access

Re: Bizarre [NSWindowController window] returning null

2008-10-04 Thread Ken Tozier
Bingo! Thanks Roland. On Oct 4, 2008, at 6:15 AM, Roland King wrote: did you connect the window outlet of Files Owner in interface builder to the window? On Oct 4, 2008, at 6:08 PM, Ken Tozier wrote: I created the following NSWindowController subclass which loads and displays a window

Re: Accessing IB Inspector Identity Interface Builder Identity name programatically?

2008-10-04 Thread Graham Cox
On 4 Oct 2008, at 6:27 pm, Ken Tozier wrote: I created a custom view with several subviews some of which I gave names in the Identity Interface Builder Identity name tab. Is there any way to reference these items by their given name if the nib is loaded programatically using NSNib?

Fwd: Python, Mac OS X 10.5.5 and CoreGraphics

2008-10-04 Thread Ronny Reichmann
Von: Ronny Reichmann [EMAIL PROTECTED] Datum: 4. Oktober 2008 12:44:26 MESZ An: Bill Bumgarner [EMAIL PROTECTED] Betreff: Re: Python, Mac OS X 10.5.5 and CoreGraphics Am 04.10.2008 um 04:29 schrieb Bill Bumgarner: On Oct 3, 2008, at 5:02 PM, Ronny Reichmann wrote: Hello there,

Re: file fixtures for unit testing

2008-10-04 Thread Colin Barrett
On Fri, Oct 3, 2008 at 10:01 PM, Brent Hargrave [EMAIL PROTECTED] wrote: To unit test an XML parsing method, I would like keep a dummy XML file in a project directory and import it into my FooTests class as a fixture of sorts. What is the right way to do this sort of thing? Add it to the

Re: NSTreeController rearrangeObjects doesn't always trigger sorting

2008-10-04 Thread Alexey Zakhlestin
I see this behaviour since 10.5.3. (10.5.2 was ok) My solution is manual re-sorting, for now. On Tue, Jul 29, 2008 at 2:41 AM, Jonathan Fewtrell [EMAIL PROTECTED] wrote: I know that similar issues have been raised in the past, but I haven't been able to find a clear solution. I have a Core

Re: Help for a beginner..

2008-10-04 Thread Jason Stephenson
Rob Keniger wrote: On 04/10/2008, at 9:46 AM, mmalc crawford wrote: Start with Programming in Objective-C by Stephen Kochan (depending on how quickly you want to get underway, you may consider waiting for the second edition):

NSNetService connection difficulty

2008-10-04 Thread Cate Tony
I've created a small server that appears to set up and publish itself. I then created a small client app that 'sees' the server but fails to connect. The error I'm getting is: Address family not supported by protocol family. The address-sa_family is AF_INET. The socket type is:

Re: file fixtures for unit testing

2008-10-04 Thread Timothy Reaves
On Oct 4, 2008, at 1:01 AM, Brent Hargrave wrote: To unit test an XML parsing method, I would like keep a dummy XML file in a project directory and import it into my FooTests class as a fixture of sorts. What is the right way to do this sort of thing? Put the file into the Resources

Re: Play Playlist in iTunes

2008-10-04 Thread Mr. Gecko
Ok thanks for the tips I ran the time test on my play playlist function and it was time = -0.005 sec which is more than fast enough for me. especially when my computer is 733Mhz. On Oct 4, 2008, at 4:26 AM, has wrote: On 4 Oct 2008, at 03:54, Mr. Gecko wrote: I am not using AppleScript

Re: Re: Python, Mac OS X 10.5.5 and CoreGraphics

2008-10-04 Thread Ronny Reichmann
On Oct 3, 2008, at 5:02 PM, Ronny Reichmann wrote: Hello there, unfortunately none of the examples in /Developer/Examples/Quartz/ Python/ work anymore. I don't know if recently, I just encountered it today. According to your answer, there should be wrappers as part of PyObjC. Unfortunately

Re: Play Playlist in iTunes

2008-10-04 Thread Graham Cox
On 5 Oct 2008, at 12:07 am, Mr. Gecko wrote: ran the time test on my play playlist function and it was time = -0.005 sec which is more than fast enough Cool! You get the result back before you sent the query - that is fast! ;-) G. ___

Clueless about this warning

2008-10-04 Thread Andre Masse
Hi, Can someone explain to me why I get this compiler warning (BigLetterView is a subclass of NSView): 'BigLetterView' may not respond to '-prepareAttributes' - (id)initWithFrame:(NSRect)rect { if(![super initWithFrame:rect]) { return nil; }

Re: Clueless about this warning

2008-10-04 Thread Jonathan del Strother
On Sat, Oct 4, 2008 at 3:43 PM, Andre Masse [EMAIL PROTECTED] wrote: Hi, Can someone explain to me why I get this compiler warning (BigLetterView is a subclass of NSView): 'BigLetterView' may not respond to '-prepareAttributes' - (id)initWithFrame:(NSRect)rect { if(![super

Re: Clueless about this warning

2008-10-04 Thread Andre Masse
Ah! That's it! I forgot about this order of declaration in C source files. Thanks, Andre Masse On Oct 4, 2008, at 10:49, Jonathan del Strother wrote: I'm guessing that the times where it doesn't warn occur after - (void)prepareAttributes ? To avoid those warnings, the method declaration

Re: Customize NSScroller

2008-10-04 Thread Mr. Gecko
Never mind I found out how - (void)drawKnob { NSRect position = [self rectForPart:NSScrollerKnob]; NSImage *topImg = [NSImage imageNamed:@kt]; [topImg setFlipped:YES]; NSSize topImgSize = [topImg size]; [topImg drawInRect:NSMakeRect(position.origin.x,

UINavigationItem backButtonTitle property is missing?

2008-10-04 Thread Steve Wart
Hi, I'm working through the iPhone UINavigationController tutorial and noticed that the class reference for UINavigationItem contains the following *backButtonTitle* The title to use when this item is represented by a back button on the navigation bar. @property(nonatomic, copy) NSString

Re: UINavigationItem backButtonTitle property is missing?

2008-10-04 Thread Roland King
no iPhone discussions allowed here yet. On Oct 4, 2008, at 11:47 PM, Steve Wart wrote: Hi, I'm working through the iPhone UINavigationController tutorial and noticed that the class reference for UINavigationItem contains the following ___

Re: UINavigationItem backButtonTitle property is missing?

2008-10-04 Thread Steve Wart
Sorry about that. I should have checked the discussion thread. On Sat, Oct 4, 2008 at 9:23 AM, Roland King [EMAIL PROTECTED] wrote: no iPhone discussions allowed here yet. On Oct 4, 2008, at 11:47 PM, Steve Wart wrote: Hi, I'm working through the iPhone UINavigationController tutorial

[Moderator] Re: UINavigationItem backButtonTitle property is missing?

2008-10-04 Thread Scott Anguish
Please re-read http://developer.apple.com/iphone/program/. The new list rules will be posted when the new program terms are. For the moment this is still not for public discussion on this list. Thanks scott [moderator] On 4-Oct-08, at 11:47 AM, Steve Wart wrote: Hi, I'm working

Re: Python, Mac OS X 10.5.5 and CoreGraphics

2008-10-04 Thread Bill Bumgarner
On Oct 4, 2008, at 7:13 AM, Ronny Reichmann wrote: I'm running the systems Python on both Macs. Funnily enough, the problem I described isn't appearing on my MacBook. The two versions of Python on the MacBook and the stationary Mac are not the same. Both systems are set to automatic

Class Extensions (Re: Clueless about this warning)

2008-10-04 Thread Bill Bumgarner
On Oct 4, 2008, at 7:49 AM, Jonathan del Strother wrote: To avoid those warnings, the method declaration or definition needs to appear before it's used. Â I usually add a private category at the top of my .m files where you can declare private methods - something like this : @interface

Re: Help for a beginner..

2008-10-04 Thread Brad Gibbs
I had no knowledge of or experience with programming when I started last April. I started with Kochan's Objective-C book, then Hillegass Third Edition, then XCode Unleashed. That happened to be the order in which they were released, but it was a good way to go -- I felt one led right

NSGlyph

2008-10-04 Thread hatzicware
I can't figure out how NSGlyph works in methods like this: [path appendBezierPathWithGlyph:'x' inFont:[NSFont userFontOfSize: 14.0]] (Of course 'path' is an NSBezierPath.) What I get on the screen is not an '+', but an upper-case H in some outline font. And when I put in explicit

Re: NSGlyph

2008-10-04 Thread hatzicware
Sorry, that method should have looked like this: [path appendBezierPathWithGlyph:'+' inFont:[NSFont userFontOfSize: 14.0]] On 4 Oct, 2008, at 11:59, [EMAIL PROTECTED] wrote: I can't figure out how NSGlyph works in methods like this: [path appendBezierPathWithGlyph:'x' inFont:[NSFont

Re: NSGlyph

2008-10-04 Thread Douglas Davidson
On Oct 4, 2008, at 11:59 AM, [EMAIL PROTECTED] wrote: I can't figure out how NSGlyph works in methods like this: [path appendBezierPathWithGlyph:'x' inFont:[NSFont userFontOfSize: 14.0]] (Of course 'path' is an NSBezierPath.) What I get on the screen is not an '+', but an upper-case H in

Re: file fixtures for unit testing

2008-10-04 Thread Chris Hanson
On Oct 4, 2008, at 3:59 AM, Colin Barrett wrote: On Fri, Oct 3, 2008 at 10:01 PM, Brent Hargrave [EMAIL PROTECTED] wrote: To unit test an XML parsing method, I would like keep a dummy XML file in a project directory and import it into my FooTests class as a fixture of sorts. What is the

Re: NSTableView confusion

2008-10-04 Thread James Maxwell
Thanks, Keary. I eventually found the article you linked me to and worked it out. I think I've done everything correctly, in that I am pointing the choices to an array of objects, and using the name property to display in the popup... It seems to be okay, but I won't really know until I

Re: NSOutlineView assertion failures

2008-10-04 Thread Jeff Wilcox
I played around with what Uli seemed to be hinting at, and indeed it does seem that NSOutlineView is not particularly thread safe. If you update the content for the NSTreeController that is the data source for the outline view outside of the main thread it blows up as I described, and

Re: Class Extensions (Re: Clueless about this warning)

2008-10-04 Thread Andrew Merenbach
On Oct 4, 2008, at 10:32 AM, Bill Bumgarner wrote: Class extensions are also the one place where you can redeclare that a property is readwrite. Hi! Bill makes a very well-written explanation, but I beg to append (in a very nit-picky fashion) to this point, if only for the sake of the

Re: NSOutlineView assertion failures

2008-10-04 Thread Chris Hanson
On Oct 3, 2008, at 10:48 PM, Jeff Wilcox wrote: Not explicitly, but maybe. This seems to be taking place when the content for the NSTreeController is changing (explicitly) in one thread, causing a reload in the outline view, and in another thread the NSOutlineView's drawrect is getting

Re: NSOutlineView assertion failures

2008-10-04 Thread Chris Hanson
On Oct 4, 2008, at 12:37 PM, Jeff Wilcox wrote: I played around with what Uli seemed to be hinting at, and indeed it does seem that NSOutlineView is not particularly thread safe. It's not a matter of whether a facility seems thread-safe. In Cocoa, the rule is very simple: If it's not

Re: NSOutlineView assertion failures

2008-10-04 Thread Jeff Wilcox
Thanks Chris, see my last reply to myself. I basically ended up doing what you are describing at found that this works. Your explanation makes it a bit clearer as to why though. Jeff On Oct 4, 2008, at 1:00 PM, Chris Hanson wrote: On Oct 3, 2008, at 10:48 PM, Jeff Wilcox wrote: Not

Re: Class Extensions (Re: Clueless about this warning)

2008-10-04 Thread Bill Bumgarner
On Oct 4, 2008, at 12:43 PM, Andrew Merenbach wrote: On Oct 4, 2008, at 10:32 AM, Bill Bumgarner wrote: Class extensions are also the one place where you can redeclare that a property is readwrite. Hi! Â Bill makes a very well-written explanation, but I beg to append (in a very nit-picky

Can't bind image cells in a table to file's owner?

2008-10-04 Thread Ken Tozier
Hi My file's owner class has a method to return a file icon but I'm finding that when I do the following, it reverts back to shared user defaults whenever I select other things in the user interface. Here are my bind settings Value Bind to: file's owner Model Key Path:

Re: NSGlyph

2008-10-04 Thread Graff
On Oct 4, 2008, at 11:59 AM, hatzicware wrote: I can't figure out how NSGlyph works in methods like this: [path appendBezierPathWithGlyph:'x' inFont:[NSFont userFontOfSize: 14.0]] (Of course 'path' is an NSBezierPath.) What I get on the screen is not an '+', but an upper-case H in

Re: Can't bind image cells in a table to file's owner?

2008-10-04 Thread Ken Tozier
After two more hours of futzing, I find that I can't bind any controllers to file's owner. I can bind some of the gui object values directly to files owner but controllers always unbind spontaneously whenever I click on another object in the interface and back to the controller. What could

Should not use mogenerator in Mac OS 10.5+ ?

2008-10-04 Thread Jerry Krinock
When developing NSManagedObjects for Mac OS 10.4, after about 25 trips to Xcode's menu Design Data Model Copy Method -tions to Clipboard, my wrist got sore and I started using mogenerator [1]. Now, developing for Mac OS X 10.5+, I read that On Mac OS X v10.5, Core Data dynamically

Re: Can't bind image cells in a table to file's owner?

2008-10-04 Thread Ken Tozier
On Oct 4, 2008, at 8:16 PM, Quincey Morris wrote: After you choose File's Owner from the popup, and type the model key in the text field below, press Return or Tab, and verify that the check mark next to File's Owner has become checked. If you click away without committing the edit, the

Re: Should not use mogenerator in Mac OS 10.5+ ?

2008-10-04 Thread mmalc crawford
On Oct 4, 2008, at 4:11 PM, Jerry Krinock wrote: So, I don't ^need^ mogenerator, although I still may want to use it in order to get type checking and generate code needed to avoid compiler warnings. Why? You get type checking and avoid compiler warnings by following the

Re: Cocoa Programming for Mac OsX Third Edition eBook search

2008-10-04 Thread David Orriss Jr
I ran into the same thing. Probably one of my biggest complaints about Addison is that the ebooks they do are digitally signed and that the ONE platform Acrobat reader doesn't support for digitally signed ebooks (aside from a beta reader if you dig around) is the Mac. Rather ironic given the

Re: Cocoa Programming for Mac OsX Third Edition eBook search

2008-10-04 Thread Jason Stephenson
Jamie Daniel wrote: Anyone know where I can get the above book in eBook ? If you have a Safari account (http://safari.oreilly.com/) and enough download tokens, you could download each chapter as a PDF. Other than that, I don't know how you could get a Mac-compatible copy of the book.

NSURLConnection willSendRequest: not behaving as expected on a 302 response - no further response after nil return

2008-10-04 Thread Steve Mykytyn
I'm using NSURLConnection to contact a URL that returns a 302 response along with some data, and then returns a 200 response with some different data. I want to stop it at the 302 response and get the data that comes along with the 302 response. To make this happen I understand the delegate

Adding sublayer causes dropped frames?

2008-10-04 Thread Britt Durbrow
Hi - I'm having a weird problem with Core Animation. What I've got is a small particle system, with one layer per particle. There are only 10-20 particles in the system at any given time. The system updates the layers at 60 Hz from an NSTimer, and disables automatic animations during the

Re: Can I put UTIs in NSFilesPromisePboardType promise drag array?

2008-10-04 Thread Nathan Vander Wilt
On Oct 1, 2008, at 3:09 PM, Jim Correia wrote: On Oct 1, 2008, at 5:27 PM, Nathan Vander Wilt wrote: I am initiating a promise drag by adding an array of strings to my pasteboard using for the NSFilesPromisePboardType. The documentation states that the types can be specified as filename

Best way to implement a dynamic panel

2008-10-04 Thread Andreas Eriksson
Hi, I'm wondering what's the best way to implement a panel with a very dynamic layout, similar to the iCal panel used to edit events? I need the panel to resize, and other controls to move as other controls are inserted, removed, or resized. In Qt, I guess I would use the layout classes to do

premature dealloc of the datasource of a NSTableView crashes my application

2008-10-04 Thread Dr. Rolf Jansen
Mac OS X 10.5.5, Xcode 3.1.1, PowerBook G4. I have developed a Document Based Cocoa application, and the main document window contains a simple datasource based NSTableView. After I recently re-built everything with Xcode 3.1.1, my application crashes when I close any document window.

Memory Leak in XIB file?

2008-10-04 Thread Jens Beuckenhauer
Hello, I have created a project in that I found a memory leak. The leak seems to be located in a XIB file?!? In the XIB file 'MainView' is an ImageView that shows an image file (TIFF file) that is set via the IB inspector panel. In no way is the ImageView connected via an outlet or

wasting space?

2008-10-04 Thread Thomas Schönfeld
Hi. I am new to Cocoa as well as mailing lists. So please tell me, if I am doing something unpolite. And please excuse my bad writing. I am not a native english speaking person. I started with Cocoa® Programming for Mac® OS X, Third Edition a few days ago. The challenges seem to be not so

Re: Cocoa Programming for Mac OsX Third Edition eBook search

2008-10-04 Thread David Orriss Jr
Given how many chapters there are you'd probably use up all of your available PDF credits that way just to get a copy of the book (presuming you've had your account for a few months). But yes, that's probably the only readily available option at this point (aside from just buying a print version

Re: Memory Leak in XIB file?

2008-10-04 Thread j o a r
On Oct 4, 2008, at 12:29 PM, Jens Beuckenhauer wrote: I have created a project in that I found a memory leak. The leak seems to be located in a XIB file?!? In the XIB file 'MainView' is an ImageView that shows an image file (TIFF file) that is set via the IB inspector panel. In no way is

Re: Can I put UTIs in NSFilesPromisePboardType promise drag array?

2008-10-04 Thread Jim Correia
On Oct 4, 2008, at 10:45 PM, Nathan Vander Wilt wrote: HFS types seem to be well deprecated in nearly every other area, the drag destination guides don't encourage checking the types anyway Can you post a reference? You generally should check the type in the drag, and not offer to accept

Re: premature dealloc of the datasource of a NSTableView crashes my application

2008-10-04 Thread Michael Ash
On Sat, Oct 4, 2008 at 4:01 PM, Dr. Rolf Jansen [EMAIL PROTECTED] wrote: Mac OS X 10.5.5, Xcode 3.1.1, PowerBook G4. I have developed a Document Based Cocoa application, and the main document window contains a simple datasource based NSTableView. After I recently re-built everything with

Re: Best way to implement a dynamic panel

2008-10-04 Thread Jerry Krinock
On 2008 Oct, 04, at 10:07, Andreas Eriksson wrote: I'm wondering what's the best way to implement a panel with a very dynamic layout, similar to the iCal panel used to edit events? I need the panel to resize, and other controls to move as other controls are inserted, removed, or resized.

Re: Can I put UTIs in NSFilesPromisePboardType promise drag array?

2008-10-04 Thread Nathan Vander Wilt
On Oct 4, 2008, at 8:31 PM, Jim Correia wrote: On Oct 4, 2008, at 10:45 PM, Nathan Vander Wilt wrote: HFS types seem to be well deprecated in nearly every other area, the drag destination guides don't encourage checking the types anyway Can you post a reference? You generally should

Re: Memory Leak in XIB file?

2008-10-04 Thread Jens Beuckenhauer
Hello, I have created a project in that I found a memory leak. The leak seems to be located in a XIB file?!? In the XIB file 'MainView' is an ImageView that shows an image file (TIFF file) that is set via the IB inspector panel. In no way is the ImageView connected via an outlet or

Re: wasting space?

2008-10-04 Thread Quincey Morris
On Oct 4, 2008, at 16:39, Thomas Schönfeld wrote: I used the example, but the extra method setoutString is kinda useless. After a bit thinking I did this (see below). I didn't use the extra method and it works fine. So my question is, did I just do something not-Cocoa-like and am I