Re: where is the basic NSString literal escape documentation?

2010-04-20 Thread Laurent Cerveau
There is some documentation in the CoreFoundation part for all CFStringRef formatting, which applies here. http://developer.apple.com/Mac/library/documentation/CoreFoundation/Conceptual/CFStrings/formatSpecifiers.html#//apple_ref/doc/uid/TP40004265-SW1 laurent On Tuesday, April 20, 2010, at

CoreData: updating property of fetched object and refetching

2010-04-20 Thread olivier destrebecq
I create an object and insert it into the context, then i update a couple properties. Later I i do a fetch request with a predicate on the property i updated after the insertion. If i do this fetch right after the update of the property (using the accessors provided by coreData), then the fetch do

Re: CoreData: updating property of fetched object and refetching

2010-04-20 Thread Joanna Carter
Hi Olivier > I create an object and insert it into the context, then i update a couple > properties. > > Later I i do a fetch request with a predicate on the property i updated > after the insertion. If i do this fetch right after the update of the > property (using the accessors provided by core

NSOperation and WebView

2010-04-20 Thread Hao Lü
Hi, I am doing some analyzing work on a WebView (going through the DOM, checking links and texts). Since, sometimes this blocks the GUI, I am experimenting using NSOperation/NSInvocationOperation. What confuses me is that, my operation stops (not sure if it sleeps or is terminated) upon accessing

Carbon pasteboard/service events not firing in Cocoa app

2010-04-20 Thread Kevin Walzer
I'm trying to port some Carbon code that provides basic services menu integration to a Cocoa application. This code implements the basic Carbon event handlers for this functionality, cf: const EventTypeSpec carbonServiceEvents[] = { { kEventClassService, kEventServiceGetTypes }, { kEventCla

Drawing glitches in NSTableView with variable row hight (just like Console.app)

2010-04-20 Thread Marco Masser
Hi, I'm trying to implement a logging facility for an app that should behave quite the same as OS X's Console.app in terms of displaying the log, i.e. an NSTableView with varying row heights. I got it working so far, but there are major drawing glitches when resizing the window or scrolling thr

OpenGL Shading Issues on PPC

2010-04-20 Thread Peter Willsey
Hello All, I've been developing a screensaver in Objective-C using OpenGL to render an object in wavefront .obj format. The object is displayed and rotated on the X, Y and Z axis. I have enabled lighting and I'm calculating surface normals so that shading works properly. I have been dev

newbie question - number of lines a text string wraps to

2010-04-20 Thread Paul J. Ascenzo
Hello all! If this question doesn't belong on this list, please let me know, and I'll try elsewhere - thanks! WHAT I NEED: I'm looking to find out how many lines a given string of text will wrap to in a given NSTextField. in other words, once I know the string and the size of the field it

Simple low memory warning?

2010-04-20 Thread Bill
Does there exist a low-memory warning for Mac apps similar to the didReceiveMemoryWarning for the iPhone? I have looked at NSCache and other related classes, but for my purposes it would be better to simply receive a low memory warning and then act on the warning. Does such a warning exist for

Re: NSOperation and WebView

2010-04-20 Thread Nick Zitzmann
On Apr 18, 2010, at 4:36 PM, Hao Lü wrote: > I am doing some analyzing work on a WebView (going through the DOM, checking > links and texts). Since, sometimes this blocks the GUI, I am experimenting > using NSOperation/NSInvocationOperation. What confuses me is that, my > operation stops (not sur

Re: Simple low memory warning?

2010-04-20 Thread Nick Zitzmann
On Apr 20, 2010, at 10:10 AM, Bill wrote: > Does there exist a low-memory warning for Mac apps similar to the > didReceiveMemoryWarning for the iPhone? I have looked at NSCache and other > related classes, but for my purposes it would be better to simply receive a > low memory warning and the

Re: Simple low memory warning?

2010-04-20 Thread Laurent Cerveau
One possibility is to install a CFRunLoopObserverRef that would query for available memory, using task_info on mach_task_self(). Then you can check if you start to are coming nearer to "dangerous territories". Not perfect though as usually the moment you can not alloc some memory it can be alre

Re: CoreData: updating property of fetched object and refetching

2010-04-20 Thread olivier destrebecq
Just to clarify, when i say save, i mean call save: on the context and write it to disk. Which the documentation state that you don't have to call save: to be able to query for objects and that modified object will be found. If i wait a little bit (probably for the next event in the event loop) t

Re: Simple low memory warning?

2010-04-20 Thread Bill
On Apr 20, 2010, at 10:17 AM, Nick Zitzmann wrote: > > On Apr 20, 2010, at 10:10 AM, Bill wrote: > >> Does there exist a low-memory warning for Mac apps similar to the >> didReceiveMemoryWarning for the iPhone? I have looked at NSCache and other >> related classes, but for my purposes it wou

Re: Simple low memory warning?

2010-04-20 Thread Jean-Daniel Dupas
Le 20 avr. 2010 à 19:23, Bill a écrit : > > On Apr 20, 2010, at 10:17 AM, Nick Zitzmann wrote: > >> >> On Apr 20, 2010, at 10:10 AM, Bill wrote: >> >>> Does there exist a low-memory warning for Mac apps similar to the >>> didReceiveMemoryWarning for the iPhone? I have looked at NSCache and

Re: Simple low memory warning?

2010-04-20 Thread Bill
On Apr 20, 2010, at 10:34 AM, Jean-Daniel Dupas wrote: > > Le 20 avr. 2010 à 19:23, Bill a écrit : > >> >> On Apr 20, 2010, at 10:17 AM, Nick Zitzmann wrote: >> >>> >>> On Apr 20, 2010, at 10:10 AM, Bill wrote: >>> Does there exist a low-memory warning for Mac apps similar to the

Hi!

2010-04-20 Thread Rajashekhar Managoli
___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com

Hi!

2010-04-20 Thread Rajashekhar Managoli
___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com

Re: Simple low memory warning?

2010-04-20 Thread Jean-Daniel Dupas
Le 20 avr. 2010 à 19:36, Bill a écrit : > > On Apr 20, 2010, at 10:34 AM, Jean-Daniel Dupas wrote: > >> >> Le 20 avr. 2010 à 19:23, Bill a écrit : >> >>> >>> On Apr 20, 2010, at 10:17 AM, Nick Zitzmann wrote: >>> On Apr 20, 2010, at 10:10 AM, Bill wrote: > Does there ex

Re: Simple low memory warning?

2010-04-20 Thread Jens Alfke
On Apr 20, 2010, at 10:36 AM, Bill wrote: >> And what make NSCache and NSDiscardableContent not appropriate here ? > > They are not inappropriate, but they require a lot more work than a simple > warning sent via a notification or other means. The iPhone has a much simpler memory model than M

Re: Simple low memory warning?

2010-04-20 Thread Bill
On Apr 20, 2010, at 11:48 AM, Jens Alfke wrote: > > On Apr 20, 2010, at 10:36 AM, Bill wrote: > >>> And what make NSCache and NSDiscardableContent not appropriate here ? >> >> They are not inappropriate, but they require a lot more work than a simple >> warning sent via a notification or oth

Re: newbie question - number of lines a text string wraps to

2010-04-20 Thread Jens Alfke
On Apr 19, 2010, at 11:55 AM, Paul J. Ascenzo wrote: > I'm looking to find out how many lines a given string of text will wrap to in > a given NSTextField. in other words, once I know the string and the size of > the field it is going into, how do I find out how many lines the system will > wr

[ANN]: RegexKitLite 4.0

2010-04-20 Thread John Engelhart
RegexKitLite 4.0 has been released.  Links: Download: http://downloads.sourceforge.net/regexkit/RegexKitLite-4.0.tar.bz2 (139.1K) Documentation: http://regexkit.sourceforge.net/RegexKitLite/index.html PDF Documentation: http://downloads.sourceforge.net/regexkit/RegexKitLite-4.0.pdf (1.1M) On a pe

Re: OpenGL Shading Issues on PPC

2010-04-20 Thread Peter Willsey
Hi Thanks for your reply. .obj is an ASCII file format, I don't think byte order would be an issue here. On 2010-04-20, at 11:55 AM, A.M. wrote: > > On Apr 19, 2010, at 12:33 PM, Peter Willsey wrote: > >> Hello All, >> >> I've been developing a screensaver in Objective-C using OpenGL to rende

NSMutable setArray Behavior

2010-04-20 Thread Brent Fulgham
Can anyone clarify whether the NSMutableArray object's "setArray" performs a deep copy of the NSArray provided, or does it simply build an NSMutableArray object with additionally-retained elements pointing back to the source object? Thanks, -Brent ___

Re: NSMutable setArray Behavior

2010-04-20 Thread Seth Willits
On Apr 20, 2010, at 1:06 PM, Brent Fulgham wrote: > Can anyone clarify whether the NSMutableArray object's "setArray" > performs a deep copy of the NSArray provided, > or does it simply build an NSMutableArray object with > additionally-retained elements pointing back to the source object? setArr

Re: NSMutable setArray Behavior

2010-04-20 Thread Jens Alfke
On Apr 20, 2010, at 1:06 PM, Brent Fulgham wrote: Can anyone clarify whether the NSMutableArray object's "setArray" performs a deep copy of the NSArray provided, or does it simply build an NSMutableArray object with additionally-retained elements pointing back to the source object? It does no

Re: NSMutable setArray Behavior

2010-04-20 Thread Kyle Sluder
On Tue, Apr 20, 2010 at 2:07 PM, Jens Alfke wrote: > In general I can't think of any deep-copy behavior in any of the Cocoa > collection classes. With one exception*, objects only get copied when you > explicitly call -copy. And even -copy is implemented shallowly in existing > classes (so copying

Re: Carbon pasteboard/service events not firing in Cocoa app

2010-04-20 Thread Peter Ammon
On Apr 19, 2010, at 7:46 AM, Kevin Walzer wrote: > I'm trying to port some Carbon code that provides basic services menu > integration to a Cocoa application. This code implements the basic Carbon > event handlers for this functionality, cf: > > const EventTypeSpec carbonServiceEvents[] = { >

Re: Carbon pasteboard/service events not firing in Cocoa app

2010-04-20 Thread Kevin Walzer
On 4/20/10 5:52 PM, Peter Ammon wrote: I'm not sure how to fix this. In my Carbon application, simply installing these event handlers made the Services menu available. It's not clear to me why the kEventServiceCopy event does not fire, but the kEventServiceGetTypes event (necessary to determi

Re: Baffling Button Behavior [SOLVED]

2010-04-20 Thread koko
To not leave this hanging as some kind of view resize issue ... I was moving the Save button programatically on a split view resize, added the same to the Save As button and all is well koko On Apr 19, 2010, at 2:05 PM, Keary Suska wrote: On Apr 19, 2010, at 10:02 AM, k...@highrolls.net

Re: Drawing glitches in NSTableView with variable row hight (just like Console.app)

2010-04-20 Thread Jerry Krinock
On 2010 Apr 19, at 08:56, Marco Masser wrote: > I'm trying to implement a logging facility for an app ..., i.e. an > NSTableView with varying row heights. > I found three different approaches to calculating the height for a given > width, but they all seem to be very performance-hungry: > 1) (

Re: CoreData: updating property of fetched object and refetching

2010-04-20 Thread Keary Suska
On Apr 20, 2010, at 11:22 AM, olivier destrebecq wrote: > Just to clarify, when i say save, i mean call save: on the context and write > it to disk. Which the documentation state that you don't have to call save: > to be able to query for objects and that modified object will be found. Yes. Ever

Re: Drawing glitches in NSTableView with variable row hight (just like Console.app)

2010-04-20 Thread Jens Alfke
On 2010 Apr 19, at 08:56, Marco Masser wrote: I'm trying to implement a logging facility for an app ..., i.e. an NSTableView with varying row heights. I found three different approaches to calculating the height for a given width, but they all seem to be very performance-hungry: 1) (my favor

Why is compiler warning for +setKeys:triggerChangeNotificationsForDependentKey: ??

2010-04-20 Thread Steve Cronin
Folks; Subclassed NSObject now getting compiler warnings - don't understand why? @interface ABC : NSObject { } @end @implementation ABC + (void)initialize { ... keys = [NSArray ..]; [self setKeys:keys triggerChangeNotificationsForDependentKey:@"xyz"]; ... } @end I'm seeing compiler

Re: Drawing glitches in NSTableView with variable row hight (just like Console.app)

2010-04-20 Thread Jerry Krinock
On 2010 Apr 20, at 17:03, Jens Alfke wrote: > I wouldn't do it this way (and I speak from past experience, having tried to > do this once). You're using NSTableView for something it's not good at — > updating layout on the fly as the width changes OK, the -tableView:heightOfRow: delegate metho

Re: Why is compiler warning for +setKeys:triggerChangeNotificationsForDependentKey: ??

2010-04-20 Thread Graham Cox
On 21/04/2010, at 11:48 AM, Steve Cronin wrote: > I'm seeing compiler warnings -> : warning: 'ABC' may not respond to > '+setKeys:triggerChangeNotificationsForDependentKey:' > > What have I overlooked? As a method that has been deprecated for a long time, perhaps it's no longer being include

Re: Why is compiler warning for +setKeys:triggerChangeNotificationsForDependentKey: ??

2010-04-20 Thread Markus Spoettl
On Apr 20, 2010, at 9:48 PM, Steve Cronin wrote: > Subclassed NSObject now getting compiler warnings - don't understand why? > > @interface ABC : NSObject { > } > @end > > @implementation ABC > + (void)initialize > { > ... > keys = [NSArray ..]; >[self setKeys:keys triggerChangeNotificat

Re: Why is compiler warning for +setKeys:triggerChangeNotificationsForDependentKey: ??

2010-04-20 Thread Steve Cronin
Graham; Directly from the current Apple docs:Key-Value Observing Programming Guide No mention of deprecation… Registering Dependent Keys It’s common that the value of one property of a class is dependent on the value of another property of the same class. Key-value observing provides a lightwe

Re: Why is compiler warning for +setKeys:triggerChangeNotificationsForDependentKey: ??

2010-04-20 Thread Roland King
http://developer.apple.com/mac/library/documentation/cocoa/Conceptual/KeyValueObserving/Concepts/DependentKeys.html#//apple_ref/doc/uid/20002179-SW3 It's very deprecated, that documentation splits into Mac OS X 10.5 and later and Mac OS X 10.4 and earlier. http://developer.apple.com/mac/librar

Re: Why is compiler warning for +setKeys:triggerChangeNotificationsForDependentKey: ??

2010-04-20 Thread Graham Cox
From the NSKeyValueObserving Protocol reference: Deprecated NSKeyValueObserving Methods A method identified as deprecated has been superseded and may become unsupported in the future. Deprecated in Mac OS X v10.5 and later setKeys:triggerChangeNotificationsForDependentKey: Configures the recei

Re: Why is compiler warning for +setKeys:triggerChangeNotificationsForDependentKey: ??

2010-04-20 Thread Ken Ferry
Other reasonable responses aside, what did you #import? If you #import'd Cocoa/Cocoa.h, I would be surprised to see this. If you brought in only NSObject.h, well, the declaration isn't in that file. -Ken On Tue, Apr 20, 2010 at 6:48 PM, Steve Cronin wrote: > Folks; > > Subclassed NSObject now

Custom progress bar for QTMovie??

2010-04-20 Thread Chase Meadors
I'm making a completely custom CoreAnimation-based view that plays an audio media stored in a QT movie. However, I'm struck with an implementation problem with indicating the current time in the movie. Ideally, if QTMovie defined a currentTime property, I could use bindings or a binding-lik

Re: Drawing glitches in NSTableView with variable row hight (just like Console.app)

2010-04-20 Thread Adam R. Maxwell
On Apr 19, 2010, at 8:56 AM, Marco Masser wrote: > I'm trying to implement a logging facility for an app that should behave > quite the same as OS X's Console.app in terms of displaying the log, i.e. an > NSTableView with varying row heights. I got it working so far, but there are > major draw

Re: Questions about 2D drawing in Cocoa

2010-04-20 Thread Henry McGilton
On Apr 19, 2010, at 1:21 PM, Philip Mobley wrote: > I am fairly new to Cocoa, and so I have 2 questions I would appreciate some > feedback. For a beginner, Cocoa suffers from the "too much info" problem and > its often difficult to find the answers to seemly simple questions. I have > had be

Re: Custom progress bar for QTMovie??

2010-04-20 Thread Kyle Sluder
On Tue, Apr 20, 2010 at 8:09 PM, Chase Meadors wrote: > Ideally, if QTMovie defined a currentTime property, I could use bindings or > a binding-like design to handle the implementation of some time text & > progress bar. However, QTMovie does not define it as a property. It appears > setCurrentTim