Re: what replaces ICARegisterEventNotificationPB

2008-11-20 Thread Gerriet M. Denkmann
On 21 Nov 2008, at 00:56, Scott Anguish <[EMAIL PROTECTED]> wrote: please file a bug on the doc.. it should tell you this. bugreporter.apple.com Well, why don't you do it yourself? No, this is not an attack on you, Mr. Anguish. But almost daily I see some Apple engineer advising people to

Re: Autorelease Question

2008-11-20 Thread Filip van der Meeren
On 21 Nov 2008, at 04:55, Adam Leonard wrote: See the Cocoa Fundamentals Guide: "Class factory methods are implemented by a class as a convenience for clients. They combine allocation and initialization in one step and return the created object autoreleased. These methods are of the form

Re: Autorelease Question

2008-11-20 Thread Filip van der Meeren
They are. On 21 Nov 2008, at 02:54, Klaus Backert wrote: Am 20.11.2008 um 22:04 schrieb Adam Leonard: Just to clarify: They probably are identical, but not in the way everyone seems to be assuming. To make sure I don't misrepresent anything, I'll just quote the rule: "You take ownership

Re: Popups Binding problem

2008-11-20 Thread Ken Thomases
On Nov 20, 2008, at 8:02 AM, Kiran Kumar S wrote: I have two popups which I want to bind together; the first popup contains a list of Categories, which has an array of reports. The reports array is a content array of the second popup. I want to select a Category in the first popup and get a lis

Re: Wrapping C functions in Objective C proxy objects: naming convention?

2008-11-20 Thread Austin Ziegler
On Thu, Nov 20, 2008 at 6:09 PM, Ken Tozier <[EMAIL PROTECTED]> wrote: > Just out of curiosity, why do you need to send such common math > operations to a soap request? Wouldn't it be easier to do simple stuff > like calculations in your Soap class and only make requests for the > unique services t

Re: Autorelease Question

2008-11-20 Thread Kiel Gillard
On 21/11/2008, at 3:45 PM, Jim Correia wrote: On Nov 20, 2008, at 11:36 PM, Kiel Gillard wrote: While your discovery is interesting, maybe we're not supposed to know how NSString is implemented. Even if on your computer you do not get double free messages in your run log, a crash or whate

Button and Matrix problems

2008-11-20 Thread John MacMullin
My application started in 10.2.8 and has progressed to the current state of affairs with 10.5.5 and XCode 3.1.1. I am now experiencing two problems with the current stuff. First, when I send setEnabled:No to a new popup that I just added, the popup does not dim. All of the old stuff doe

Re: Autorelease Question

2008-11-20 Thread Luke Hiesterman
So thinking gets in the way of understanding and not thinking is the path to enlightenment? Sent from my iPhone. On Nov 20, 2008, at 8:45 PM, Jim Correia <[EMAIL PROTECTED]> wrote: On Nov 20, 2008, at 11:36 PM, Kiel Gillard wrote: On 21/11/2008, at 2:55 PM, Adam Leonard wrote: I think

Re: Autorelease Question

2008-11-20 Thread Jim Correia
On Nov 20, 2008, at 11:36 PM, Kiel Gillard wrote: On 21/11/2008, at 2:55 PM, Adam Leonard wrote: I think this is a bug in the documentation. I am curious to know what others think. While your discovery is interesting, maybe we're not supposed to know how NSString is implemented. Even i

Re: Autorelease Question

2008-11-20 Thread Kiel Gillard
On 21/11/2008, at 2:55 PM, Adam Leonard wrote: I think this is a bug in the documentation. I am curious to know what others think. While your discovery is interesting, maybe we're not supposed to know how NSString is implemented. Even if on your computer you do not get double free messa

Re: Autorelease Question

2008-11-20 Thread Adam Leonard
See the Cocoa Fundamentals Guide: "Class factory methods are implemented by a class as a convenience for clients. They combine allocation and initialization in one step and return the created object autoreleased. These methods are of the form + (type)className... (where className excludes a

Re: Cocoa-dev Digest, Vol 5, Issue 1993

2008-11-20 Thread mark . rock
I'm away till 24th November and may not be near the internet. ___ 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 He

Re: MD5 Checksum of a file with CommonDigest.h

2008-11-20 Thread Robert Martin
I use CocoaCryptoHashing - which you can find at: http://github.com/ddfreyne Works like a charm. On Nov 20, 2008, at 5:22 PM, Andrew Farmer wrote: On 20 Nov 08, at 14:12, Sebastian Pape wrote: Hi, I'm trying to get a MD5 Checksum of a file. This is my code: [...] CC_MD5(cStr, strlen(cStr

Re: Wrapping C functions in Objective C proxy objects: naming convention?

2008-11-20 Thread Jonathon Kuo
On Nov 20, 2008, at 5:53 PM, Charles Srstka wrote: On Nov 20, 2008, at 7:40 PM, Jonathon Kuo wrote: On Nov 20, 2008, at 5:06 PM, Charles Srstka wrote: On Nov 20, 2008, at 5:58 PM, Jonathon Kuo wrote: On Nov 20, 2008, at 2:07 PM, Shawn Erickson wrote: On Thu, Nov 20, 2008 at 1:23 PM, Jo

Re: GC and print operations cause objects not to finalize?

2008-11-20 Thread Gordon Apple
Speaking of which -- What does it take to print a view with layers? (GC also.) On 11/20/08 5:17 PM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I've got a GC-only document-based application and I'm trying to add > basic print operations to my documents. I've reduced this down to what > I t

Re: NSPointerArray + fast enumeration for non-object types?

2008-11-20 Thread Ken Ferry
Hi Jim, On Thu, Nov 20, 2008 at 4:02 PM, Jim Correia <[EMAIL PROTECTED]> wrote: > The header documentation for NSPointerArray says: > >> Fast enumeration, copying, and archiving protocols are applicable only >> when NSPointerArray is configured for Object uses. Since the array may >> contain NULLs

Re: How do you get the OS X version number in C or C++?

2008-11-20 Thread Sean McBride
On 11/15/08 12:40 AM, Michael Ash said: >>>+ (BOOL)MacOSTigerOrLower >>>{ >>> UInt32 version; >>> return (Gestalt(gestaltSystemVersion,(SInt32 *) &version) == >>>noErr) && (version < 0x01050 ); >>>} >> >> Gestalt() is a good approach, but never use gestaltSystemVersion. See >> Gestalt.h f

Re: Autorelease Question

2008-11-20 Thread Luke the Hiesterman
If you think about it, it becomes clear why convenience methods return autoreleased objects. As a heuristic, whoever retains an object should release it. Since you're having the class method perform an implicit retain (by calling alloc) then it needs to do a release. It obviously cannot rel

Re: Difference between "Target" and "Executable" ?

2008-11-20 Thread Kiel Gillard
On 21/11/2008, at 12:08 PM, Jean-Nicolas Jolivet wrote: thanks you for all the information! I'm still reading However, this makes me think: Even though the "Executable" (in XCode that is) has the old name, if I look in my project directory under / Build/Debug or /Build/Release , my resu

Re: Autorelease Question

2008-11-20 Thread Dave DeLong
On 20 Nov, 2008, at 6:54 PM, Klaus Backert wrote: "Class factory methods are implemented by a class as a convenience for clients. They combine allocation and initialization in one step and return the created object autoreleased. These methods are of the form + (type)className... (where cl

Re: Autorelease Question

2008-11-20 Thread Klaus Backert
Am 20.11.2008 um 22:04 schrieb Adam Leonard: Just to clarify: They probably are identical, but not in the way everyone seems to be assuming. To make sure I don't misrepresent anything, I'll just quote the rule: "You take ownership of an object if you create it using a method whose name b

Re: Wrapping C functions in Objective C proxy objects: naming convention?

2008-11-20 Thread Charles Srstka
On Nov 20, 2008, at 7:40 PM, Jonathon Kuo wrote: On Nov 20, 2008, at 5:06 PM, Charles Srstka wrote: On Nov 20, 2008, at 5:58 PM, Jonathon Kuo wrote: On Nov 20, 2008, at 2:07 PM, Shawn Erickson wrote: On Thu, Nov 20, 2008 at 1:23 PM, Jonathon Kuo <[EMAIL PROTECTED]> wrote: Just my 2 cents

Re: Wrapping C functions in Objective C proxy objects: naming convention?

2008-11-20 Thread Jonathon Kuo
On Nov 20, 2008, at 5:06 PM, Charles Srstka wrote: On Nov 20, 2008, at 5:58 PM, Jonathon Kuo wrote: On Nov 20, 2008, at 2:07 PM, Shawn Erickson wrote: On Thu, Nov 20, 2008 at 1:23 PM, Jonathon Kuo <[EMAIL PROTECTED]> wrote: Just my 2 cents, but it seems an abuse to turn functions into ob

Using PDF for help --- with spotlight search?

2008-11-20 Thread Russ
I think this is an "old feature" request. I have a large existing PDF help file --- many hundreds of pages. Fact: it's not getting re-authored in Apple Help. Even Apple does not use Apple Help for products such as Motion --- very few pro apps do. So we work with what we've got. I do have a la

Re: Difference between "Target" and "Executable" ?

2008-11-20 Thread Jean-Nicolas Jolivet
thanks you for all the information! I'm still reading However, this makes me think: Even though the "Executable" (in XCode that is) has the old name, if I look in my project directory under / Build/Debug or /Build/Release , my resulting app is there with the new name... So does the "E

Re: Cocoa-dev Digest, Vol 5, Issue 1992

2008-11-20 Thread mark . rock
I'm away till 24th November and may not be near the internet. ___ 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 He

Re: Wrapping C functions in Objective C proxy objects: naming convention?

2008-11-20 Thread Charles Srstka
On Nov 20, 2008, at 5:58 PM, Jonathon Kuo wrote: On Nov 20, 2008, at 2:07 PM, Shawn Erickson wrote: On Thu, Nov 20, 2008 at 1:23 PM, Jonathon Kuo <[EMAIL PROTECTED]> wrote: Just my 2 cents, but it seems an abuse to turn functions into objects. Functions don't retain state; objects do. Objec

Re: Difference between "Target" and "Executable" ?

2008-11-20 Thread Kiel Gillard
Exectuables specify settings that the running executable should honour (for example, run-time arguments). Targets describe how the source should be compiled, linked, packaged, etc. Therefore, the name of your (compiled, linked, packaged etc) product will be defined in the active target. O

Re: Difference between "Target" and "Executable" ?

2008-11-20 Thread Mark Dawson
On Thursday, November 20, 2008, at 04:32PM, "Jean-Nicolas Jolivet" <[EMAIL PROTECTED]> wrote: >I just renamed my project (according to the instructions here: >http://aplus.rs/cocoa/how-to-rename-project-in-xcode-3x/ > ) > >However, I noticed that the "Executable" in my project still has the

Re: Difference between "Target" and "Executable" ?

2008-11-20 Thread Corbin Dunn
Le Nov 20, 2008 à 7:32 PM, Jean-Nicolas Jolivet a écrit : I just renamed my project (according to the instructions here: http://aplus.rs/cocoa/how-to-rename-project-in-xcode-3x/ ) However, I noticed that the "Executable" in my project still has the old name... should I (and how do I) renam

Re: Difference between "Target" and "Executable" ?

2008-11-20 Thread Kyle Sluder
On Thu, Nov 20, 2008 at 7:32 PM, Jean-Nicolas Jolivet <[EMAIL PROTECTED]> wrote: > However, I noticed that the "Executable" in my project still has the old > name... should I (and how do I) rename it to the new name? Get Info on the Target and change the Product Name setting. > Also, what exactly

Re: Difference between "Target" and "Executable" ?

2008-11-20 Thread Nick Zitzmann
On Nov 20, 2008, at 5:32 PM, Jean-Nicolas Jolivet wrote: Also, what exactly is the difference between "Targets" and "executables" ?? Targets set up a product to be built; executables tell Xcode to launch an executable when running or debugging or launching Instruments or something simil

Re: Setter Declaration for Scalar, with @property --> Silent Runtime Failure

2008-11-20 Thread Jim Correia
On Nov 19, 2008, at 11:40 PM, Jerry Krinock wrote: Build and run the above project. No warnings, no errors, no exceptions, but the output logs: JunkProps[7449:10b] foo.bar = 0 Remove the old getter declaration under // Whoops, and it's fixed: JunkProps[7462:10b] foo.bar = 600 If I cha

Difference between "Target" and "Executable" ?

2008-11-20 Thread Jean-Nicolas Jolivet
I just renamed my project (according to the instructions here: http://aplus.rs/cocoa/how-to-rename-project-in-xcode-3x/ ) However, I noticed that the "Executable" in my project still has the old name... should I (and how do I) rename it to the new name? Also, what exactly is the difference

question about colorSpace conversions

2008-11-20 Thread Jeffrey Goines
i process the color from a colorPanel further around in my app and don't know the appropriate place where to handle some conversion.it seems neccessary since i wan't to get the components. don't know what kind of NSColor is the color, NSColorPanels "color" method delivers. thanks for your help __

NSPointerArray + fast enumeration for non-object types?

2008-11-20 Thread Jim Correia
The header documentation for NSPointerArray says: Fast enumeration, copying, and archiving protocols are applicable only when NSPointerArray is configured for Object uses. Since the array may contain NULLs, fast enumeration (for..in) will yield NULLs. As a convenience, fast enumeration wil

Re: Wrapping C functions in Objective C proxy objects: naming convention?

2008-11-20 Thread Jonathon Kuo
On Nov 20, 2008, at 2:07 PM, Shawn Erickson wrote: On Thu, Nov 20, 2008 at 1:23 PM, Jonathon Kuo <[EMAIL PROTECTED]> wrote: Just my 2 cents, but it seems an abuse to turn functions into objects. Functions don't retain state; objects do. Objective C very gracefully allows objects to call C

Re: Table scroll bars

2008-11-20 Thread Kyle Sluder
On Thu, Nov 20, 2008 at 6:38 PM, Richard S. French <[EMAIL PROTECTED]> wrote: > The table does not show any scroll bars until I resize the window and the > items above and below sometimes get overlaid. I'm assuming this isn't what you want. In that case, make sure you've set up your UI so that th

Re: Questions about Garbage Collection

2008-11-20 Thread Ken Ferry
If you do decide to go to ref counting, you should check out the llvm static analyzer. It can help keep easy common cases from falling through the cracks. http://clang.llvm.org/StaticAnalysis.html -Ken On Thu, Nov 20, 2008 at 9:32 AM, Gordon Apple <[EMAIL PROTECTED]> wrote: >Last year when

Re: GC and print operations cause objects not to finalize?

2008-11-20 Thread Ashley Clark
Filed: rdar://6390443 I was kind of hoping it was something I was doing though. Any ideas for a workaround? Ashley On Nov 20, 2008, at 5:21 PM, Bill Bumgarner wrote: Please file a bug. It may also be that something is CFRetaining the document that shouldn't be. On Nov 20, 2008, at 5:1

Table scroll bars

2008-11-20 Thread Richard S. French
In Interface builder I have a TableView that I want to stay fixed in relation to items above and below. The table does not show any scroll bars until I resize the window and the items above and below sometimes get overlaid. How do I fix this in IB? I¹ve tried changing the size on NSScrollView in th

Single clicks in views in menus not registered?

2008-11-20 Thread Nick Zitzmann
I've tried searching and didn't see anything relevant. I'm placing custom views in a menu. These views respond to mouse events, and -acceptsFirstResponder returns YES. When I click on one of the views, however, -mouseDown: is not sent to the view. When I double- click on one of the views, -m

Re: GC and print operations cause objects not to finalize?

2008-11-20 Thread Bill Bumgarner
Please file a bug. It may also be that something is CFRetaining the document that shouldn't be. On Nov 20, 2008, at 5:13 PM, Ashley Clark wrote: I've got a GC-only document-based application and I'm trying to add basic print operations to my documents. I've reduced this down to what I thi

Re: Cocoa-dev Digest, Vol 5, Issue 1991

2008-11-20 Thread mark . rock
I'm away till 24th November and may not be near the internet. ___ 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 He

Set Text Color of NSBox (ANSWERED)

2008-11-20 Thread Russ
Once I fixed the color of my checkboxes and radio buttons to match the overall light on dark UI scheme (user-configurable), my NSBox text stuck out as a sore thumb. NSBox does not support setAttributedTitle, but fortunately there is an incredibly simple way to set the color of NSBox text:

GC and print operations cause objects not to finalize?

2008-11-20 Thread Ashley Clark
I've got a GC-only document-based application and I'm trying to add basic print operations to my documents. I've reduced this down to what I think is the absolute minimum required here and I'm still seeing this bug. With a completely new Document-based application I'm adding these 3 metho

Re: Wrapping C functions in Objective C proxy objects: naming convention?

2008-11-20 Thread Ken Tozier
Just out of curiosity, why do you need to send such common math operations to a soap request? Wouldn't it be easier to do simple stuff like calculations in your Soap class and only make requests for the unique services the endpoint provides? On Nov 20, 2008, at 12:27 AM, Austin Ziegler wro

Re: propblems w/ outline view delegate and notifications

2008-11-20 Thread Corbin Dunn
Le Nov 20, 2008 à 1:42 PM, [EMAIL PROTECTED] a écrit : given the following sequence of events: 1) load a window (NSWindow subclass) from a nib using an NSWindowController subclass 2) the window contains an NSOutlineView, and the delegate of the outline view is the window 3) in the window'

Re: Crash in Attributed String (x64)

2008-11-20 Thread Russ
It turned out that the problem was really occurring in the setAttributedTitle --- a bad control value was getting passed in. Pretty sure I single-stepped through it a dozen different time, but whatever. - Original Message From: Shawn Erickson <[EMAIL PROTECTED]> To: Russ <[EMAIL PRO

Re: MD5 Checksum of a file with CommonDigest.h

2008-11-20 Thread Andrew Farmer
On 20 Nov 08, at 14:12, Sebastian Pape wrote: Hi, I'm trying to get a MD5 Checksum of a file. This is my code: [...] CC_MD5(cStr, strlen(cStr), result); Does your file contain any null bytes? If so, strlen() will return the wrong length. (It'll just return the length of everything up to th

MD5 Checksum of a file with CommonDigest.h

2008-11-20 Thread Sebastian Pape
Hi, I'm trying to get a MD5 Checksum of a file. This is my code: __ #import - (NSString*)getMD5ChecksumOfFile:(NSString*)pathOfFile { const char *cStr = [[NSData dataWithContentsOfFile:pathOfFile] bytes]; unsigned char result[CC_MD5_DIGEST_LENGTH];

Re: Is -rangeOfUserTextChange: supposed to wipe out marked text/diacritical marks?

2008-11-20 Thread Keith Blount
Great, thank you. I've changed the validation code as per your suggestion and everything seems to be working fine now; I had been under the mistaken impression that these methods were always the right ones to call when checking the text that *could* be changed, so I had changed many references t

Re: Wrapping C functions in Objective C proxy objects: naming convention?

2008-11-20 Thread Shawn Erickson
On Thu, Nov 20, 2008 at 1:23 PM, Jonathon Kuo <[EMAIL PROTECTED]> wrote: > Just my 2 cents, but it seems an abuse to turn functions into objects. > Functions don't retain state; objects do. Objective C very gracefully allows > objects to call C functions. If you're doing something like [calc > add

Re: BAD_EXC_ACESS

2008-11-20 Thread Graff
On Nov 20, 2008, at 4:28 PM, Richard S. French wrote: My program compiled and ran once. Appeared that possible run away where table view was just being populated over and over again. I did a force quit. Now I am getting a debug error of ³BAD_EXC_ACCESS². All that¹s displayed on the debug sc

Re: Autorelease Question

2008-11-20 Thread Shawn Erickson
On Thu, Nov 20, 2008 at 1:04 PM, Adam Leonard <[EMAIL PROTECTED]> wrote: > However, I think it *would* be a bad idea to call [[[NSWorkspace > sharedWorkspace]retain]autorelease] > A good singleton will override -retain, -release, and -autorelease to do > nothing and return an appropriate value. Bu

Re: NSImageView and releasing it's images...

2008-11-20 Thread Nick Zitzmann
On Nov 20, 2008, at 2:43 PM, Jean-Nicolas Jolivet wrote: From what I can see... it seems like OS X (or BSD or whatever manages that) will use a lot of memory if it has a lot of memory available (I have 4gb)... and use less if it has less... I might be wrong about that but it seems to be wo

Re: Cocoa-dev Digest, Vol 5, Issue 1990

2008-11-20 Thread mark . rock
I'm away till 24th November and may not be near the internet. ___ 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 He

Re: NSImageView and releasing it's images...

2008-11-20 Thread Jean-Nicolas Jolivet
Well, I posted my other msg before I saw your reply... but I guess you're right, it would explain the unreliable results I am getting... I'll trust Instrument on that one! :) From what I can see... it seems like OS X (or BSD or whatever manages that) will use a lot of memory if it has a lot

propblems w/ outline view delegate and notifications

2008-11-20 Thread [EMAIL PROTECTED]
given the following sequence of events: 1) load a window (NSWindow subclass) from a nib using an NSWindowController subclass 2) the window contains an NSOutlineView, and the delegate of the outline view is the window 3) in the window's awakeFromNib call: [[NSNotificationCenter defaultC

Re: BAD_EXC_ACESS

2008-11-20 Thread Nick Zitzmann
On Nov 20, 2008, at 2:28 PM, Richard S. French wrote: My program compiled and ran once. Appeared that possible run away where table view was just being populated over and over again. I did a force quit. Now I am getting a debug error of “BAD_EXC_ACCESS”. All that’s displayed on the debug s

Re: BAD_EXC_ACESS

2008-11-20 Thread Gary L. Wade
Maybe the problem is that your last name is French; try launching it in English rather than in Greek. ;-p Okay, seriously, maybe you should start by looking at the code in your NSTableDataSource protocol methods for an infinite loop. On 11/20/2008 2:28 PM, "Richard S. French" <[EMAIL PROTECTED]>

Re: NSImageView and releasing it's images...

2008-11-20 Thread Jean-Nicolas Jolivet
Just a quick update... I ran Leaks (From the Instruments utility)... apparently the only "leaks" I have are not related to images (some NSPathStore and strings that I am not responsible for...those appear to be the only leaks) So basically should I assume I am not doing anything wrong?

Re: NSImageView and releasing it's images...

2008-11-20 Thread Nick Zitzmann
On Nov 20, 2008, at 2:10 PM, Jean-Nicolas Jolivet wrote: However it seems like something is not getting released properly... I'm looking at Activity Monitor and the memory usage is climbing fast each time I click the preview button... (like 2-3mb each time)... Is there a better way to do i

Re: NSArrayController and table column bindings retain/dealloc woes

2008-11-20 Thread Shawn Erickson
On Thu, Nov 20, 2008 at 1:11 PM, Keith Blount <[EMAIL PROTECTED]> wrote: > Thanks for the reply. I did consider that but from what I had read I only > thought that was a fix for the retain cycles created when file's own is an > NSWindowController. I already manuallet setContent: and setContent:ni

Re: Autorelease Question

2008-11-20 Thread Sherm Pendley
On Nov 20, 2008, at 4:04 PM, Adam Leonard wrote: Now, I agree that it is mostly paranoia, but it is simply incorrect to say that any object you send autorelease to, or get through a method "whose name [DOES NOT] begins with "alloc" or "new" or contains "copy"" will be sent release in the ne

Re: Autorelease Question

2008-11-20 Thread Chris Kane
I feel compelled to wade in here, to clarify a point. I'll pick on Luke's comment but there were some other similar ones ... On Nov 19, 2008, at 15:44, Luke the Hiesterman wrote: It's simply not true that you have "no idea" when an object will be autoreleased. If you're on the main thread,

BAD_EXC_ACESS

2008-11-20 Thread Richard S. French
My program compiled and ran once. Appeared that possible run away where table view was just being populated over and over again. I did a force quit. Now I am getting a debug error of ³BAD_EXC_ACCESS². All that¹s displayed on the debug screen is greek to me. How do I determine the error and correct?

Re: Wrapping C functions in Objective C proxy objects: naming convention?

2008-11-20 Thread Jonathon Kuo
On Nov 19, 2008, at 9:27 PM, Austin Ziegler wrote: For a project that I'm working on, I have a need to write a code generator that will wrap certain kinds of C functions as Objective C messages on an Objective C proxy. Because I don't ultimately control the input, the parameters on the C functio

NSImageView and releasing it's images...

2008-11-20 Thread Jean-Nicolas Jolivet
I'm using an NSImageView to preview an image result (i.e. you adjust brightness etc.. then click preview and the image is displayed in the NSImaveView)... Basically everytime the image is previewed, a new NSImage object is created... right now I'm using: NSImage *displayPreviewImage = [[[

Re: NSArrayController and table column bindings retain/dealloc woes

2008-11-20 Thread Keith Blount
Thanks for the reply. I did consider that but from what I had read I only thought that was a fix for the retain cycles created when file's own is an NSWindowController. I already manuallet setContent: and setContent:nil on my NSArrayController, does that not have the same effect? I'll certainly

Re: Is -rangeOfUserTextChange: supposed to wipe out marked text/diacritical marks?

2008-11-20 Thread Douglas Davidson
On Nov 20, 2008, at 12:59 PM, Keith Blount wrote: I've had some bug reports from users saying that accented characters don't always work correctly in my software, but I've never been able to reproduce it - until now. It seems that calling NSTextView's - rangeOfUserTextChange: and -rangeOfUs

Re: Autorelease Question

2008-11-20 Thread Adam Leonard
Just to clarify: They probably are identical, but not in the way everyone seems to be assuming. To make sure I don't misrepresent anything, I'll just quote the rule: "You take ownership of an object if you create it using a method whose name begins with "alloc" or "new" or contains "copy" (

Is -rangeOfUserTextChange: supposed to wipe out marked text/diacritical marks?

2008-11-20 Thread Keith Blount
Hi, I've had some bug reports from users saying that accented characters don't always work correctly in my software, but I've never been able to reproduce it - until now. It seems that calling NSTextView's -rangeOfUserTextChange: and -rangeOfUserCharacterAttributeChange: wipes out marked text i

Re: NSArrayController and table column bindings retain/dealloc woes

2008-11-20 Thread Shawn Erickson
On Thu, Nov 20, 2008 at 12:36 PM, Keith Blount <[EMAIL PROTECTED]> wrote: > Thanks for your reply, Ken. I did search the archives (and other places to) > but didn't see the recent discussion you mentioned, so I must have missed it. > The window controller method isn't a great solution for me, unf

Re: NSArrayController and table column bindings retain/dealloc woes

2008-11-20 Thread Keith Blount
Thanks for your reply, Ken. I did search the archives (and other places to) but didn't see the recent discussion you mentioned, so I must have missed it. The window controller method isn't a great solution for me, unfortunately - I tried it but it causes all sorts of responder issues given how d

Re: Which Mac models use the new 64-bit Objective-C ABI?

2008-11-20 Thread Nick Zitzmann
On Nov 20, 2008, at 9:41 AM, Påhl Melin wrote: But if I create a universal project with both x86-64 and i386 code and run the application on a 32-bit system, is it possible to detect in the code that I'm running the 32-bit ABI? Use the __LP64__ preprocessor definition to differentiate between

Re: Cocoa-dev Digest, Vol 5, Issue 1989

2008-11-20 Thread mark . rock
I'm away till 24th November and may not be near the internet. ___ 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 He

Re: Which Mac models use the new 64-bit Objective-C ABI?

2008-11-20 Thread Påhl Melin
2008/11/20 Nick Zitzmann <[EMAIL PROTECTED]>: > > On Nov 20, 2008, at 7:50 AM, Påhl Melin wrote: > >> I'm very tempted to use the new 64-bit Objective-C ABI in my next >> project. Primarily because of the improved interoperability with C++ >> destructors, that are now called when unwinding Objectiv

Re: Info request on developing codec

2008-11-20 Thread Shawn Erickson
On Wed, Nov 19, 2008 at 7:18 PM, Arnab Ganguly <[EMAIL PROTECTED]> wrote: > I am going to develop audio codec.Want to support AACplus file streaming.The > player I have developed using QT SDK.So can you tell me what would be best > approach to develop the codec. For this type of question you shoul

Re: Which Mac models use the new 64-bit Objective-C ABI?

2008-11-20 Thread Påhl Melin
On Thu, Nov 20, 2008 at 8:55 AM, Shawn Erickson <[EMAIL PROTECTED]> wrote: >On Thu, Nov 20, 2008 at 8:39 AM, Påhl Melin <[EMAIL PROTECTED]> wrote: >> On Thu, Nov 20, 2008 at 7:43 AM, Shawn Erickson <[EMAIL PROTECTED]> wrote: >>> The decision between 64b and 32b is made at compile time for your >>>

Re: Which Mac models use the new 64-bit Objective-C ABI?

2008-11-20 Thread Påhl Melin
On Thu, Nov 20, 2008 at 7:43 AM, Shawn Erickson <[EMAIL PROTECTED]> wrote: > The decision between 64b and 32b is made at compile time for your > compiled code. As a result your 64b executable wont run under the 32b > runtime not matter what you do. > > ...however you can of course (normally you wou

Re: Crash in Attributed String (x64)

2008-11-20 Thread Shawn Erickson
On Thu, Nov 20, 2008 at 10:52 AM, Russ <[EMAIL PROTECTED]> wrote: > > > I'm trying to change the color of a button's text by setting it's title using > an attributed string; there are code snippets on the web, but I'm seeing a > crash Make sure to file bug reports (if you haven't already)... ht

Re: Forcing toolbar validation...

2008-11-20 Thread Jean-Nicolas Jolivet
Thank you, that's good to know! :) I was more worried about the fact that there might be a "better" way to do it (i.e. in the same way that you don't call "becomeFirstResponder" on an NSResponder, you call the makeFirstResponder method of NSWindow... but then again, NSResponder doc insist

Re: Wrapping C functions in Objective C proxy objects: naming convention?

2008-11-20 Thread Austin Ziegler
On Thu, Nov 20, 2008 at 12:15 PM, Michael Ash <[EMAIL PROTECTED]> wrote: > Please excuse a foolish question, but Why wrap this in Objective-C > at all? Looks like the resulting ObjC code is essentially the same, > except uglier, slower, and harder to use. Why not just keep the C and > use it di

Crash in Attributed String (x64)

2008-11-20 Thread Russ
I'm trying to change the color of a button's text by setting it's title using an attributed string; there are code snippets on the web, but I'm seeing a crash NSAttributedString *attrTitle; NSDictionary *dict; dict = [NSDictionary dictionaryWithObjectsAndKeys: colr, NSForegroundColorA

Re: [moderator] Re: Cocoa apps protection software

2008-11-20 Thread Donnie Lee
Thank you, guys, for all your replies! Donnie. ___ 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/U

Re: Forcing toolbar validation...

2008-11-20 Thread Peter Ammon
On Nov 20, 2008, at 9:26 AM, Jean-Nicolas Jolivet wrote: I have to disable all toolbar items during a long process... I did it basically by overriding - (BOOL)validateToolbarItem:(NSToolbarItem *)toolbarItem { return !longProcessIsRunning; } So that everything is disabled when my pr

Re: Questions about Garbage Collection

2008-11-20 Thread Nick Zitzmann
On Nov 20, 2008, at 10:32 AM, Gordon Apple wrote: Has anyone else had to go through this reverse transition? I've usually done both at once, just in case. Is GC really that problematic? It's not problematic per se, although it has some bugs here and there. It's just different, and work

Re: Cocoa-dev Digest, Vol 5, Issue 1988

2008-11-20 Thread mark . rock
I'm away till 24th November and may not be near the internet. ___ 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 He

Re: Forcing toolbar validation...

2008-11-20 Thread Andrew Merenbach
On Nov 20, 2008, at 9:26 AM, Jean-Nicolas Jolivet wrote: I have to disable all toolbar items during a long process... I did it basically by overriding - (BOOL)validateToolbarItem:(NSToolbarItem *)toolbarItem { return !longProcessIsRunning; } So that everything is disabled when my pro

Questions about Garbage Collection

2008-11-20 Thread Gordon Apple
Last year when I moved to 10.5 and Objective C 2.0, I made the decision to move to garbage collection (GC). After seemingly working ok, I deleted most of my pre-GC code, e.g., retain, release, dealloc. I am now regretting that decision. I am running into major problems in working with images

Re: Fastest way to resize an image?

2008-11-20 Thread Jean-Nicolas Jolivet
It didn't actually The problem was that, with certain images (only a small percentage) I would get a size that is *totally* off... keep in mind I have to draw them anyway because I'm also drawing a border around the image (basically just resizing the image down a bit and filling the b

Forcing toolbar validation...

2008-11-20 Thread Jean-Nicolas Jolivet
I have to disable all toolbar items during a long process... I did it basically by overriding - (BOOL)validateToolbarItem:(NSToolbarItem *)toolbarItem { return !longProcessIsRunning; } So that everything is disabled when my process is running, however, once the process is done, the t

Re: Fastest way to resize an image?

2008-11-20 Thread Randall Meadows
On Nov 19, 2008, at 11:51 PM, Ken Ferry wrote: however I found out that just using the setSize: method of NSImage was unreliable -[NSImage setSize:] doesn't change the pixels of an image, it changes the natural size that the image is drawn at. If you try to write the NSImage back out as a TIF

Re: Wrapping C functions in Objective C proxy objects: naming convention?

2008-11-20 Thread Michael Ash
On Thu, Nov 20, 2008 at 12:27 AM, Austin Ziegler <[EMAIL PROTECTED]> wrote: > For a project that I'm working on, I have a need to write a code > generator that will wrap certain kinds of C functions as Objective C > messages on an Objective C proxy. Because I don't ultimately control > the input, t

Re: Wrapping C functions in Objective C proxy objects: naming convention?

2008-11-20 Thread Bill Bumgarner
On Nov 20, 2008, at 10:54 AM, Alexander Spohr wrote: I’d go for #1. If you have an error in status, throw an exception. In this case, an exception might actually be OK, given that the library is in isolation. However, it goes against the design patterns of Cocoa and if the code is ever re

Re: what replaces ICARegisterEventNotificationPB

2008-11-20 Thread Scott Anguish
On 20-Nov-08, at 11:31 AM, Jean-Daniel Dupas wrote: Just a question about doc bug. Ah! Thanks for asking! We can submit them using bugreporter.apple.com And we can submit them using the "Did this document help you? > It’s good, but" link at bottom of all online doc page. Is there a pr

Re: Autorelease Question

2008-11-20 Thread Michael Ash
On Wed, Nov 19, 2008 at 11:48 PM, Kyle Sluder <[EMAIL PROTECTED]> wrote: > On Wed, Nov 19, 2008 at 11:38 PM, Michael Ash <[EMAIL PROTECTED]> wrote: >> Seriously, this kind of hysteria does nobody any good. Nothing you do >> besides explicitly releasing/draining an NSAutoreleasePool instance >> that

Re: Which Mac models use the new 64-bit Objective-C ABI?

2008-11-20 Thread Nick Zitzmann
On Nov 20, 2008, at 7:50 AM, Påhl Melin wrote: I'm very tempted to use the new 64-bit Objective-C ABI in my next project. Primarily because of the improved interoperability with C++ destructors, that are now called when unwinding Objective-C exceptions and should make it possible to use RAII de

Re: Using properties (was Re: Outlets / IBOutlet declarations)

2008-11-20 Thread Michael Ash
On Wed, Nov 19, 2008 at 11:53 PM, mmalcolm crawford <[EMAIL PROTECTED]> wrote: > > On Nov 19, 2008, at 8:40 PM, Michael Ash wrote: > >> On Wed, Nov 19, 2008 at 5:41 PM, mmalcolm crawford <[EMAIL PROTECTED]> >> wrote: >>> >>> On Nov 19, 2008, at 2:29 PM, Michael Ash wrote: Because there's

  1   2   >