Re: CFBundleIconFile: heiß or hot?

2008-08-29 Thread Jean-Daniel Dupas
Le 28 août 08 à 23:00, Kyle Sluder a écrit : On Thu, Aug 28, 2008 at 12:50 PM, Gerriet M. Denkmann [EMAIL PROTECTED] wrote: It starts with: ?xml version=1.0 encoding=UTF-8? Just because it *says* it's encoded in UTF-8 doesn't mean it *is*. For all you know it was saved in MacRoman. --Kyle

Re: File Extensions Problem

2008-08-29 Thread Uli Kusterer
On 29.08.2008, at 02:12, Graham Cox wrote: Well, that was me. But I do see the error of my ways... I guess it was Michael Ash's comment that NSArray *could* change its storage half way through enumeration (if the collection were mutated) that woke me up. I suspect it would only do this if

Busy doing nothing

2008-08-29 Thread Gerriet M. Denkmann
I have an app which does not take any Cpu-time when it is doing nothing. So what? you might say. Every app does this. Well, not quite. If I add these magic lines it will use 0.2% of my Cpu just doing nothing: NSMetadataQuery *query = [ [ NSMetadataQuery alloc] init]; [ query

Re: programatically quit a program

2008-08-29 Thread Stéphane Sudre
On Aug 28, 2008, at 10:45 PM, Robert Claeson wrote: On 28 Aug 2008, at 22:38, Wayne Shao wrote: What is the correct way to quit a cocoa app? I could use C exit() but that would loose the chance to invoke the right callbacks for clean up. What is the call that would be equivalent to user

Convert unicode string into ascii

2008-08-29 Thread Davide Scheriani
yes, it is for a small hex reader. I need to read some old c64 file (.prg) then visualize the hex and the ascii so when I translate this: 01 08 0B 08 01 00 9E 32 30 36 31 00 00 00 A9 93 20 D2 FF A9 08 85 FC 8D 6B 10 A9 38 8D DC 17 A9 30 8D DB 17 A9 37 85 01 A9 13 I get this: î2061

Re: NSXMLNode and NSXMLElement issue

2008-08-29 Thread Andrew R. Kinnie
Thanks, I have no idea how I missed that. Exactly what I was looking for! Andrew On Aug 28, 2008, at 9:40 PM, Graff wrote: On Aug 28, 2008, at 3:11 PM, Andrew R. Kinnie wrote: I am attempting to programmatically create an html (rather, xhtml) document using NSXMLDocument, NSXMLElement,

Image in NSOutlineView

2008-08-29 Thread mahaboob
Hi all, I'm trying to develop an application that uses an OutlineView in which it displays items like a disclosure triangle, then one checkbox, then a text field int the same column. For that I gone through the DragNDropOutlineview example provided with Xcode. Then I copied the ImageAndTextCell

Re: Deploying project

2008-08-29 Thread Filip van der Meeren
On 29 Aug 2008, at 14:22, [EMAIL PROTECTED] wrote: Hi all, I developed one application that uses some files.I can deploy the application. Now what I want is when double clicking the .app file in any system it should be installed in a specific folder like :Macintosh HD | Library | Application

NSColorPanel picker mask

2008-08-29 Thread Ivy Feraco
Hello I am having trouble customizing NSColorPanel. I want the user to be able to pick colors for parts of the app using color wells. But I need to have some color wells only allow grayscale while others can be set to the full range of color. My solution for this was to have the

Re: Busy doing nothing

2008-08-29 Thread Phil
On Fri, Aug 29, 2008 at 9:42 PM, Gerriet M. Denkmann [EMAIL PROTECTED] wrote: If I add these magic lines it will use 0.2% of my Cpu just doing nothing: NSMetadataQuery *query = [ [ NSMetadataQuery alloc] init]; [ query startQuery ]; [ query stopQuery ]; NSArray

Path animation with CGPathAddArcToPoint

2008-08-29 Thread Gordon Hughes
In my attempts to animate objects along a circular/elliptical path, I naturally turned to CGPathAddEllipseToPoint. Imagine a clock face with four equidistant objects located on the path; I want the objects to animate 360 degrees from their start points. Using the elliptical path, all four

Re: NSTableColumn not usable with binder of class NSTextValueBinder?

2008-08-29 Thread Dave Dribin
On Aug 27, 2008, at 1:34 AM, Ron Lue-Sang wrote: Woah. If you really want to use a custom cell, you're gonna want a custom column as well. The bindings for the tableColumn come from the tableColumn's dataCell's available bindings. Yea, as you've found, NSActionCell has a value binding,

Image in NSOutlineView

2008-08-29 Thread mahaboob pa
Hi all, I'm trying to develop an application that uses an OutlineView in which it displays items like a disclosure triangle, then one checkbox, then a text field int the same column. For that I gone through the DragNDropOutlineview example provided with Xcode. Then I copied the ImageAndTextCell

Re: programatically quit a program

2008-08-29 Thread Ben Stiglitz
What is the correct way to quit a cocoa app? I could use C exit() but that would loose the chance to invoke the right callbacks for clean up. FWIW, if you don’t have any termination delegate methods of your own, and don’t have any user defaults that might not be synchronized, it’s safe

Re: Image in NSOutlineView

2008-08-29 Thread Ben Stiglitz
I'm trying to develop an application that uses an OutlineView in which it displays items like a disclosure triangle, then one checkbox, then a text field int the same column. For that I gone through the DragNDropOutlineview example provided with Xcode. Then I copied the ImageAndTextCell class

RE: Convert unicode string into ascii

2008-08-29 Thread Gary L. Wade
Maybe I'm missing something from your example, previous postings, and my ISP's web mail client, but it appears your desired output doesn't seem to match in character count to your original text. Nevertheless, if all you want is to turn low-ASCII (values less than 0x20) and high-ASCII (values

Re: What to use observeValueForKeyPath: context

2008-08-29 Thread Dave Dribin
On Aug 29, 2008, at 10:03 AM, Phil wrote: On Sat, Aug 30, 2008 at 2:56 AM, Dave Dribin [EMAIL PROTECTED] wrote: Is there some benefit to using number values over string constants, or is it just stylistic differences? Using NSStrings (or any other object) will work fine, but comparing two

Re: Image in NSOutlineView

2008-08-29 Thread Corbin Dunn
You'll want to look at the PhotoSearch demo I presented at WWDC a few years ago. It shows how to do exactly what you are talking about (well, it is similar, but the concepts should be the same). http://developer.apple.com/samplecode/PhotoSearch/index.html corbin On Aug 29, 2008, at 5:08

NSPredicateEditorRowTemplates and preserving user input

2008-08-29 Thread Jim Turner
Hi List, I noticed something today while building a new popup-popup-popup template: when the user changes the comparator (a simple is/is not in my case), the third popup resets itself to the default value instead of maintaining the selection the user had already chosen. The same is true if the

Re: File Extensions Problem

2008-08-29 Thread Michael Ash
On Thu, Aug 28, 2008 at 9:50 PM, Gerriet M. Denkmann [EMAIL PROTECTED] wrote: While if fully agree with you about valid assumptions and so, I am still wondering what is the disadvantage of forgetting about NSEnumerator, Fast Enumeration and the like and simply doing: unsigned count = [ array

Re: What to use observeValueForKeyPath: context

2008-08-29 Thread Ron Lue-Sang
On Aug 29, 2008, at 8:13 AM, Dave Dribin wrote: On Aug 29, 2008, at 10:03 AM, Phil wrote: On Sat, Aug 30, 2008 at 2:56 AM, Dave Dribin [EMAIL PROTECTED] wrote: Is there some benefit to using number values over string constants, or is it just stylistic differences? Using NSStrings (or

Re: Quitting all active applications

2008-08-29 Thread Michael Ash
On Thu, Aug 28, 2008 at 1:52 PM, Martin Stoufer [EMAIL PROTECTED] wrote: I had always naively assumed that all the some *Framework underneath an app was setting up signal handlers for you with default behaviours. If this isn't the case, then yes any killall approach will cause loss of data.

Re: What to use observeValueForKeyPath: context

2008-08-29 Thread Michael Ash
On Fri, Aug 29, 2008 at 10:56 AM, Dave Dribin [EMAIL PROTECTED] wrote: Hi all, It seems that KVO best practice is to use the context in observeValueForKeyPath:ofObject:change:context: to differentiate between different key paths, rather than check key path strings for equality. Since

Re: What to use observeValueForKeyPath: context

2008-08-29 Thread Dave Dribin
On Aug 29, 2008, at 11:27 AM, Michael Ash wrote: This (void *)1091 business seems highly dangerous to me. After all, what prevents somebody else from using 1091 too? If everybody uses a pointer value that's guaranteed to be unique (like a unique string literal) then you know you're safe. It

Re: What to use observeValueForKeyPath: context

2008-08-29 Thread Keith Duncan
After all, what prevents somebody else from using 1091 too? Nothing whatsoever. But that isn't a problem. So long as the observation context remains internal it doesn't have to be universally unique. If you're performing [anotherObjectNotSelf addObserver... then yes, I'd make sure that

Re: What to use observeValueForKeyPath: context

2008-08-29 Thread Jim Correia
On Aug 29, 2008, at 10:56 AM, Dave Dribin wrote: It seems that KVO best practice is to use the context in observeValueForKeyPath:ofObject:change:context: to differentiate between different key paths, rather than check key path strings for equality. Since context is a void *, it also seems

Re: What to use observeValueForKeyPath: context

2008-08-29 Thread mmalc crawford
On Aug 29, 2008, at 7:56 AM, Dave Dribin wrote: Since context is a void *, it also seems best practice to just use some unique pointer values. For example, mmalc's Graphics Bindings sample does this: static void *PropertyObservationContext = (void *)1091; static void

Re: What to use observeValueForKeyPath: context

2008-08-29 Thread Michael Ash
On Fri, Aug 29, 2008 at 12:41 PM, Dave Dribin [EMAIL PROTECTED] wrote: On Aug 29, 2008, at 11:27 AM, Michael Ash wrote: This (void *)1091 business seems highly dangerous to me. After all, what prevents somebody else from using 1091 too? If everybody uses a pointer value that's guaranteed to

Help with ditto

2008-08-29 Thread Dale Jensen
I sure wish that some of these command line tools had weird names so that google was more helpful. If I have a file that I've compressed with ditto and navigate to it in the Finder and double click on it, it extracts the file in the same directory, as expected. If, however, I use NSTask

Re: What to use observeValueForKeyPath: context

2008-08-29 Thread j o a r
On Aug 29, 2008, at 9:56 AM, Michael Ash wrote: It really just needs to be unique in your class hierarchy, right? True, but not particularly useful. Your class hierarchy includes NSObject, which is free to observe whatever it feels like in your objects. No this is not generally true, so

Re: Help with ditto

2008-08-29 Thread Randall Meadows
On Aug 29, 2008, at 11:19 AM, Dale Jensen wrote: I sure wish that some of these command line tools had weird names so that google was more helpful. If I have a file that I've compressed with ditto and navigate to it in the Finder and double click on it, it extracts the file in the same

Re: Help with ditto

2008-08-29 Thread Dale Jensen
On Aug 29, 2008, at 12:29 PM, Randall Meadows wrote: On Aug 29, 2008, at 11:19 AM, Dale Jensen wrote: I sure wish that some of these command line tools had weird names so that google was more helpful. If I have a file that I've compressed with ditto and navigate to it in the Finder and

Re: Bindings: Specifying the Class of a Con troller’s Content

2008-08-29 Thread Dave Dribin
On Aug 29, 2008, at 12:38 PM, Oleg Krupnov wrote: My question is: what is a real example of a case when the controller needs to create new content objects? -[NSArrayController add:] ? You can use that as an action for a button in IB. -Dave ___

Re: Busy doing nothing

2008-08-29 Thread Gerriet M. Denkmann
On 29 Aug 2008, at 20:57, Phil wrote: On Fri, Aug 29, 2008 at 9:42 PM, Gerriet M. Denkmann [EMAIL PROTECTED] wrote: If I add these magic lines it will use 0.2% of my Cpu just doing nothing: NSMetadataQuery *query = [ [ NSMetadataQuery alloc] init]; [ query startQuery ];

Checking for memory leaks with Instruments

2008-08-29 Thread Christian Giordano
Hi guys, I'm new to Objective-C and didn't have so much experience, in general, with manual managed memory. Despite I'm using Objective-C 2.0 I'm keen on not using the autorelease garbage collector. I'm try to understand if my application has memory leaks using Instruments. To check the total ram

Dynamic right-sizing of TextContainer

2008-08-29 Thread Martin Stoufer
I am able to set the initial height/width of the NSTextContainer object of a NSTextView object in IB. However, I cannot find any method that will allow the programmatic re-sizing of the container when the text I'm adding exceeds this size. Optimally, I'd like to utilize the setContainerSize

Re: Checking for memory leaks with Instruments

2008-08-29 Thread I. Savant
On Fri, Aug 29, 2008 at 2:08 PM, I. Savant [EMAIL PROTECTED] wrote: Without more (a LOT more) information about your application, it's hard (if not impossible) to tell you where your problem is. Sorry, I hit send before adding this: Try the Object Allocations instrument (read the

Convert unicode string into ascii

2008-08-29 Thread Davide Scheriani
this is a cool idea. mapping into an array all the chars I need and run the parse.. quite cool.tnx! I need to call the parse only one time after loaded the .prg C64 file. Maybe I'm missing something from your example, previous postings, and my ISP's web mail client, but it appears your

Re: File Extensions Problem

2008-08-29 Thread Gerriet M. Denkmann
On Fri, 29 Aug 2008 12:13:34 -0400, Michael Ash [EMAIL PROTECTED] wrote: On Thu, Aug 28, 2008 at 9:50 PM, Gerriet M. Denkmann [EMAIL PROTECTED] wrote: While if fully agree with you about valid assumptions and so, I am still wondering what is the disadvantage of forgetting about

Re: Dynamic right-sizing of TextContainer

2008-08-29 Thread Douglas Davidson
On Aug 29, 2008, at 11:01 AM, Martin Stoufer wrote: I am able to set the initial height/width of the NSTextContainer object of a NSTextView object in IB. However, I cannot find any method that will allow the programmatic re-sizing of the container when the text I'm adding exceeds this

Re: Checking for memory leaks with Instruments

2008-08-29 Thread I. Savant
On Fri, Aug 29, 2008 at 1:49 PM, Christian Giordano [EMAIL PROTECTED] wrote: On th e Leaks Instrument though, no leak is shown. I can't really find why the ram continues to increase, and my app is really simple. I tested then a sample app from apple and this a part having an increase memory

Re: What to use observeValueForKeyPath: context

2008-08-29 Thread Dave Dribin
On Aug 29, 2008, at 12:35 PM, Dave Dribin wrote: On Aug 29, 2008, at 12:23 PM, j o a r wrote: The penalty for using constant strings is that they will end up wasting space in your binary... Rons suggestion is probably optimal. I'm definitely leaning towards that way, now. Though I may

Re: What to use observeValueForKeyPath: context

2008-08-29 Thread Keith Duncan
Use PropertyObservationContext as the context. This way you could po *(id *)context in gdb for a human readable context. That was my main concern of using the address of a static variable, but combining the two approaches works nicely. Keith ___

Explanation

2008-08-29 Thread J. Todd Slack
Hi All, Continuing learning the Quicktime API. I am confused about QTTimeRanges, etc Consider the following: QTMovie *aQTMovie = [QTMovie movieWithFile:path error:nil]; [aQTMovie setAttribute:[NSNumber numberWithBool:YES] forKey:QTMovieEditableAttribute]; QTTime qStartTime =

Cocoa Developer Needed - San Jose, Ca

2008-08-29 Thread Darren Tessitore
Software Developer - COCOA Company:Confidential Job ID#:8082102 # of Positions: 1 Posted: Aug 21, 2008 Job Type: Full Time Permanent or Contract on-site Location: San Jose, Ca Contact:Darren

Connecting NSToolbar and NSTabView

2008-08-29 Thread David Reitter
To create a preference window with a NSToolbar at the top and a tabless NSTabView containing a few panels. How would I go about connecting the two in Interface Builder? I can set the NSToolbar selector to invoke takeSelectedTabViewItemFromSender on the NSTabView, which seems promising.

understanding conversions between CF and NS datatypes

2008-08-29 Thread Allen Curtis
Hello, I am writing a Cocoa application for accessing a serial device. (IOKit) In order to do this, you need to translate between CF and NS data types. (I believe) For instance: CFMutableArrayRef devicePaths = CFArrayCreateMutable(NULL, 0, NULL);

Re: understanding conversions between CF and NS datatypes

2008-08-29 Thread Randall Meadows
On Aug 29, 2008, at 11:38 AM, Allen Curtis wrote: I am writing a Cocoa application for accessing a serial device. (IOKit) In order to do this, you need to translate between CF and NS data types. (I believe) For instance: CFMutableArrayRef devicePaths = CFArrayCreateMutable(NULL, 0,

Re: understanding conversions between CF and NS datatypes

2008-08-29 Thread Dave Carrigan
On Aug 29, 2008, at 10:38 AM, Allen Curtis wrote: 1. Where can I get a better understanding of the data conversion between these different frameworks? As I understand it, it's not a data conversion. If a class is toll- free bridged, a CFRef is also an objective-c object. So whether you do

Re: Bindings: Specifying the Class of a Con troller’s Content

2008-08-29 Thread Ron Lue-Sang
On Aug 29, 2008, at 10:38 AM, Oleg Krupnov wrote: Here's a fragment of documentation from the Cocoa Bindings Programming Topics guide: In order for a controller to create new content objects automatically or in response to the target-action methods, it must know the appropriate class to use.

Re: understanding conversions between CF and NS datatypes

2008-08-29 Thread Jason Coco
On Aug 29, 2008, at 13:38 , Allen Curtis wrote: The problem: I found that if you release the CFMutableArray, you also loose the NSMutableArray Question: 1. Where can I get a better understanding of the data conversion between these different frameworks? 2. Ultimately the device path

Re: Connecting NSToolbar and NSTabView

2008-08-29 Thread Quincey Morris
On Aug 29, 2008, at 08:20, David Reitter wrote: To create a preference window with a NSToolbar at the top and a tabless NSTabView containing a few panels. How would I go about connecting the two in Interface Builder? I can set the NSToolbar selector to invoke

Re: Dynamic right-sizing of TextContainer

2008-08-29 Thread Paul Archibald
Doug is correct. Check out NSText in the APIs. I used this method just yesterday to size a text view: -sizeToFit Resizes the receiver to fit its text. - (void)sizeToFit Discussion The text view will not be sized any smaller than its minimum size, however. Availability •

Re: Connecting NSToolbar and NSTabView

2008-08-29 Thread Quincey Morris
On Aug 29, 2008, at 12:49, Quincey Morris wrote: On Aug 29, 2008, at 08:20, David Reitter wrote: To create a preference window with a NSToolbar at the top and a tabless NSTabView containing a few panels. How would I go about connecting the two in Interface Builder? I can set the NSToolbar

Re: understanding conversions between CF and NS datatypes

2008-08-29 Thread Allen Curtis
Based on the information in the interchangable data types document, Would it be possible to do the following? NSMutableArray serialPorts = [[NSMutableArray alloc] init]; GetSerialPortPaths(serialServices, (CFMutableArrayRef)serialPorts); printf(Found %d serial ports\n, [serialPorts count]);

Re: File Extensions Problem

2008-08-29 Thread Greg Parker
Gerriet Denkmann wrote: While if fully agree with you about valid assumptions and so, I am still wondering what is the disadvantage of forgetting about NSEnumerator, Fast Enumeration and the like and simply doing: unsigned count = [ array count ]; if ( count == 0 ) return; for( unsigned i =

Re: understanding conversions between CF and NS datatypes

2008-08-29 Thread Randall Meadows
On Aug 29, 2008, at 2:28 PM, Allen Curtis wrote: Based on the information in the interchangable data types document, Would it be possible to do the following? NSMutableArray serialPorts = [[NSMutableArray alloc] init]; GetSerialPortPaths(serialServices, (CFMutableArrayRef)serialPorts);

Re: NSPredicateEditorRowTemplates and preserving user input

2008-08-29 Thread Jim Turner
Thanks for the reply Peter. Just for the archives, my subclassed NSPopUpButton wasn't showing up because, like you said, it was being treated differently and I was initializing it with NSZeroRect. Giving it a starting size and sending it sizeToFit in templateViews got it on screen. Jim On Fri,

RE: ODBCKit problems with MySQL DB [SOLVED]

2008-08-29 Thread Matthew Youney
Well, solved kinda... I have worked around the inability to use ODBC to access my MySQL database by using the MCPkit framework (AKA MySQLCocoa). This is a very complete library that works well. It does however have the obvious limitation of being MySQL only. I would prefer to be using ODBC, and

Re: mark added object in NSArrayController as dirty?

2008-08-29 Thread Matt Neuburg
On Thu, 28 Aug 2008 16:49:04 -0700, Quincey Morris [EMAIL PROTECTED] said: If the insertion *must* be modal, it might be better to be explicit about it: instead of creating an invalid object when the Add button is clicked, display a sheet that has fields for the required object properties, and

Re: Connecting NSToolbar and NSTabView

2008-08-29 Thread David Reitter
On 29 Aug 2008, at 15:52, Quincey Morris wrote: On Aug 29, 2008, at 12:49, Quincey Morris wrote: On Aug 29, 2008, at 08:20, David Reitter wrote: To create a preference window with a NSToolbar at the top and a tabless NSTabView containing a few panels. How would I go about connecting the

Re: Connecting NSToolbar and NSTabView

2008-08-29 Thread Quincey Morris
On Aug 29, 2008, at 15:08, David Reitter wrote: Sorry, where in IB do I set the identifier of the NSToolbarItem? Is it just the Label? At least this is what can be bound. Doh, I forgot that IB 3.1 fails to expose the toolbar item identifiers. Perhaps a future version of IB might do this.

Re: What to use observeValueForKeyPath: context

2008-08-29 Thread Chris Kane
On Aug 29, 2008, at 10:23, j o a r wrote: If you use a constant string, you should make sure that the string *contents* are unique, in order to ensure uniqueness of the pointer to it. So don't call it @context, use @MyFunkyClass KVO observer context. After all there's no penalty for being

Target change problem

2008-08-29 Thread James Pengra
A program I have developed will not run on a PPC machine (G5 iMac) using OS 10.4.11. It was developed on Xcode 3.0 on an Intel machine running OS 10.5.4. Initially the projects Cross_Develop Using Target SDK was set to Current Mac OS, so it's not surprising that it wouldn't run on the G5

Newb Question re NSUserDefaults and Ints

2008-08-29 Thread Brad Gibbs
I'm having a hard time with what should be a simple task - storing an integer for a gradient angle as a user default and then updating the screen. When I quit the app and open it again, the NSTextField shows the last value I set for the gradient, but with the following code: -

Re: Newb Question re NSUserDefaults and Ints

2008-08-29 Thread Brad Gibbs
Thanks. I'd read that dictionaries and plists were particular in the types they accept, but I was looking at page 201 of Hillegass (3rd edition), which shows: - (void)setInteger:(int)value forKey:(NSString *)defaultName and - (int)integerForKey:(NSString *)defaultName and blindly

Re: Newb Question re NSUserDefaults and Ints

2008-08-29 Thread Andrei Kolev
Brad, You can't store an int into a Dictionary or user defaults. For the objects you can use, see here: http://developer.apple.com/documentation/Cocoa/Conceptual/PropertyLists/Articles/AboutPropertyLists.html#/ /apple_ref/doc/uid/20001010 NSNumber and NSString should work. Also,

Re: Newb Question re NSUserDefaults and Ints

2008-08-29 Thread Brad Gibbs
Well, it appears that I need to convert either an NSNumber or an NSString to a CGFloat, rather than an int: - (void)drawInRect:(NSRect)rect angle:(CGFloat)angle There don't appear to be any methods in either NSNumber or NSString to do this On Aug 29, 2008, at 7:36 PM, Brad Gibbs

Re: understanding conversions between CF and NS datatypes

2008-08-29 Thread Michael Ash
On Fri, Aug 29, 2008 at 1:38 PM, Allen Curtis [EMAIL PROTECTED] wrote: 1. Where can I get a better understanding of the data conversion between these different frameworks? 2. Ultimately the device path names will appear in a ComboBox. Was it necessary to convert the CFMutableArray to a

Re: Design Question: Bindings Custom Views

2008-08-29 Thread Erik Buck
Cocoa Design Patterns Chapter 29, Controllers, contains an MVC solution to exactly the problem Oleg Krupnov describes. The chapter presents a relatively simple MVC MYShapeDraw application. The chapter leads the reader through the step by step process of re-inventing NSArrayController

Re: Newb Question re NSUserDefaults and Ints

2008-08-29 Thread Graham Cox
On 30 Aug 2008, at 12:14 pm, Andrei Kolev wrote: Brad, You can't store an int into [...] user defaults. Sure you can: - (void)setInteger:(NSInteger)value forKey:(NSString *)defaultName; Note that NSInteger == int, so the book doesn't have a typo, it's just using the pre-Leopard type

Re: Design Question: Bindings Custom Views

2008-08-29 Thread Erik Buck
Sorry. When I posted about the problem Oleg Krupnov describes, I wasn't caught up on my reading of the list. The VC MYShapeDraw application I describe is a drawing application and not related to image thumbnail caching. Of course, the pattern is general and applicable to image thumbnail

Re: Newb Question re NSUserDefaults and Ints

2008-08-29 Thread Ken Thomases
On Aug 29, 2008, at 8:54 PM, Brad Gibbs wrote: I'm having a hard time with what should be a simple task - storing an integer for a gradient angle as a user default and then updating the screen. When I quit the app and open it again, the NSTextField shows the last value I set for the

Re: Newb Question re NSUserDefaults and Ints

2008-08-29 Thread Graham Cox
On 30 Aug 2008, at 11:54 am, Brad Gibbs wrote: NSLog(@gradient angle is %d, [elementBarGradientAngleTextField intValue]); [defaults setInteger:[elementBarGradientAngleTextField intValue] forKey:ICNElementBarGradientAngleKey]; NSLog(@Element bar angle is now: %d,

Re: Newb Question re NSUserDefaults and Ints

2008-08-29 Thread Graham Cox
On 30 Aug 2008, at 2:04 pm, Graham Cox wrote: You can really tell I meant of course that you CAN'T really tell... G. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list.

-dataWithPDFInsideRect: unsafe within -drawRect:?

2008-08-29 Thread Graham Cox
I'm getting a problem when I call -dataWithPDFInsideRect: within a view's -drawRect: method. I'm doing this as part of an attempt to cache the contents as a PDF under some circumstances, but I get a number of assertions/exceptions thrown. This was previously working so I'm not sure what's

Re: Explanation

2008-08-29 Thread Rob Keniger
On 30/08/2008, at 4:50 AM, J. Todd Slack wrote: Continuing learning the Quicktime API. I am confused about QTTimeRanges, etc Hi Jason, You might be better off asking these questions on the QuickTime API list: http://lists.apple.com/mailman/listinfo/quicktime-api -- Rob Keniger

Re: -dataWithPDFInsideRect: unsafe within -drawRect:?

2008-08-29 Thread Graham Cox
On 30 Aug 2008, at 2:23 pm, Graham Cox wrote: Any ideas? Is it just not safe to try generating a PDF within drawRect? Clarification: these are in two *different* views - i.e. one is in the middle of -drawRect: and creates a new view and calls its - dataWithPDFInsideRect: method.