Re: SelectedRowIndexes

2009-10-15 Thread Peter Hudson
The user has an NSTableView in which is presented a number of elements ( 1 per row, typically 20 - 200 rows ) out of which they need to produce a number of sequenced sub groups. The user presses the 'Start Sub Group' key ( i.e. clear the sequence selection cache ) and then by picking a

Re: SelectedRowIndexes

2009-10-15 Thread Graham Cox
On 15/10/2009, at 5:24 PM, Peter Hudson wrote: The user has an NSTableView in which is presented a number of elements ( 1 per row, typically 20 - 200 rows ) out of which they need to produce a number of sequenced sub groups. The user presses the 'Start Sub Group' key ( i.e. clear the

Re: SelectedRowIndexes

2009-10-15 Thread Peter Hudson
We offer a drag and drop option as well - very similar to your idea. The problem is that our users find it easier to scroll their way through the list and command click on the appropriate rows. Users prefer to have their way I find. Peter On 15 Oct 2009, at 07:45, Graham Cox wrote: On

Re: SelectedRowIndexes

2009-10-15 Thread Chris Williams
Graham's solution is excellent. You could also have a couple of buttons between the two lists, with arrows (one right, one left) to move items to and remove them from, the sub-group list. And an additional pair to the right of the sub-group list (one up, one down) allowing reordering. This

Re: SelectedRowIndexes

2009-10-15 Thread Graham Cox
On 15/10/2009, at 5:56 PM, Peter Hudson wrote: The problem is that our users find it easier to scroll their way through the list and command click on the appropriate rows. Users prefer to have their way I find. Ah, users. The bane of our lives! If only they didn't pay our wages... ;-)

Record and Playback immediately

2009-10-15 Thread Symadept
Hi, I took the examples of afplay afrecord. But it does the normal record to completion and play to completion manner. How can I Record into buffer and play from there. I hope instead of AFPlay, Queue based recording and playing would help. Can anybody put some light on this example. Regards

Re: Record and Playback immediately

2009-10-15 Thread Jean-Daniel Dupas
Le 15 oct. 2009 à 09:41, Symadept a écrit : Hi, I took the examples of afplay afrecord. But it does the normal record to completion and play to completion manner. How can I Record into buffer and play from there. I hope instead of AFPlay, Queue based recording and playing would help.

NSSplitView and NSScrollView

2009-10-15 Thread Harry Sfougaris
I have placed a NSSplitView inside a NSScrollView in code. However, when the user resizes one of the views so part of it outside the NSScrollView visible bounds, the NSScrollView does not display the scroll bars. Is this not possible? Thank you, Harry Sfougaris

Re: Can I make custom pasteboard type for an object reference?

2009-10-15 Thread Timothy Stafford Larkin
I messed around with this problem for some time, before I gave up trying to be clever and cast the pointer as an unsigned long. NSNumber *p = [NSNumber numberWithUnsignedLong:(unsigned long)object]; The number can be added to a pasteboard. Or if dragging more than one

Re: Can I make custom pasteboard type for an object reference?

2009-10-15 Thread Graham Cox
On 15/10/2009, at 9:34 PM, Timothy Stafford Larkin wrote: I messed around with this problem for some time, before I gave up trying to be clever and cast the pointer as an unsigned long. NSNumber *p = [NSNumber numberWithUnsignedLong:(unsigned long) object]; The number can be added to a

NSArrayController performance using NSManagedObject content on 10.6

2009-10-15 Thread jonat...@mugginsoft.com
I am using an array of simple NSManagedObject subclasses bound to an NSArrayController. The object graph is shallow with a tiny number of objects (500). All objects are loaded into the NSArrayController MOC using an NSFetchRequest with setReturnsObjectsAsFaults:YES. Therefore no faulting

NSArrayController performance using NSManagedObject content on 10.6 (fixed typo)

2009-10-15 Thread jonat...@mugginsoft.com
The following is correct: All objects are loaded into the NSArrayController MOC using an NSFetchRequest with setReturnsObjectsAsFaults:NO. Jonathan Mitchell Developer http://www.mugginsoft.com ___ Cocoa-dev mailing list

Mixed font sizes in a UILabel?

2009-10-15 Thread Eric E. Dolecki
I have a simple question. In my application (iPhone) I am displaying the current time. NSDateFormatter *formatter = [[[NSDateFormatter alloc] init] autorelease]; [formatter setTimeStyle:NSDateFormatterShortStyle]; NSDate *date = [NSDate date]; [formatter setDateFormat:@h:mm a]; [clockLabel

Re: Mixed font sizes in a UILabel?

2009-10-15 Thread Luke the Hiesterman
If you don't want to use labels, you can draw the text yourself using UIStringDrawing methods. Otherwise, you need two labels for this. Luke On Oct 15, 2009, at 6:45 AM, Eric E. Dolecki wrote: I have a simple question. In my application (iPhone) I am displaying the current time.

Re: Opening a NSSavePanel as a Sheet, and blocking like in [panel runModal]

2009-10-15 Thread glenn andreas
On Oct 14, 2009, at 8:02 AM, Motti Shneor wrote: Hello. I'm in a strange situation, where I am implementing a plugin component that runs within a host application which I don't have access to. Within this context, The host sometimes calls my plug-in to open an NSSavePanel (or NSOpenPanel).

Re: Code Sign verification on Leopard

2009-10-15 Thread Clark S. Cox III
The malicious code could just move the entire original bundle wholesale. Code signature check still sees the original bundle. Sent from my iPhone On Oct 14, 2009, at 21:42, Charles Srstka cocoa...@charlessoft.com wrote: On Oct 14, 2009, at 11:40 PM, Jeff Laing wrote: Actually, heck,

Re: Code Sign verification on Leopard

2009-10-15 Thread Charles Srstka
On Oct 15, 2009, at 9:57 AM, Clark S. Cox III wrote: The malicious code could just move the entire original bundle wholesale. Code signature check still sees the original bundle. Sent from my iPhone Presumably, this would be more noticeable to the user than simply copying a binary file

Re: Code Sign verification on Leopard

2009-10-15 Thread David Duncan
On Oct 15, 2009, at 8:51 AM, Charles Srstka wrote: Presumably, this would be more noticeable to the user than simply copying a binary file inside an opaque app bundle that most users never look inside. The malicious code could also break the code sign checking APIs to always return

Re: Code Sign verification on Leopard

2009-10-15 Thread Clark Cox
On Thu, Oct 15, 2009 at 8:51 AM, Charles Srstka cocoa...@charlessoft.com wrote: On Oct 15, 2009, at 9:57 AM, Clark S. Cox III wrote: The malicious code could just move the entire original bundle wholesale.  Code signature check still sees the original bundle. Sent from my iPhone

Re: Can I make custom pasteboard type for an object reference?

2009-10-15 Thread Michael Ash
On Wed, Oct 14, 2009 at 8:21 PM, Rick Mann rm...@latencyzero.com wrote: I'm trying to implement a library like Interface Builder's. When the user drags an item out of the library and onto one of my custom views, it should instantiate an object and place it in the view accordingly. I'm trying

Re: Mixed font sizes in a UILabel?

2009-10-15 Thread Eric E. Dolecki
Thanks Luke. This might be a nice feature request to be able to do this easily (and let's say truncation and resizing would not work if implemented (I realize the pitfalls)). Eric On Thu, Oct 15, 2009 at 9:46 AM, Luke the Hiesterman luket...@apple.comwrote: If you don't want to use labels, you

Re: Mixed font sizes in a UILabel?

2009-10-15 Thread Alex Kac
Truncation and resizing would be super simple to implement since the UIStringDrawing handles all that for you. Simply make UIView that autoresizes and have the content style to redraw. SO a couple lines there. Then a drawRect with the UIStringDrawing methods to the size of the view and

Re: shared preferences.

2009-10-15 Thread Sandro Noel
Thank a bunch guy's , this is exactly what i was looking for! Tegards. Sandro Noël sandro.n...@mac.com Mac OS X : Swear by your computer, not at it. -Pensez vert! avant d’imprimer ce courriel. -Go Green! please consider the environment before printing this email. On 2009-10-15, at 11:20 AM,

Re: Mixed font sizes in a UILabel?

2009-10-15 Thread Jon Drukman
On Thu, Oct 15, 2009 at 9:20 AM, Eric E. Dolecki edole...@gmail.com wrote: Thanks Luke. This might be a nice feature request to be able to do this easily (and let's say truncation and resizing would not work if implemented (I realize the pitfalls)). You might want to check out Joe Hewitt (of

How to switch the default printer?

2009-10-15 Thread Laurent Daudelin
I tried different options to transparently switch the default printer and restore it (lpoptions called from my app) but although it works under SL, it doesn't seem to work so well for Leopard. Anybody has any suggestion on how to do that? Thanks in advance! -Laurent. -- Laurent Daudelin

Re: NSSplitView and NSScrollView

2009-10-15 Thread Karolis Ramanauskas
Good day, Would you like to share some of your code? It would be a lot easier to see what may be going on... Cheers! On Thu, Oct 15, 2009 at 3:31 AM, Harry Sfougaris hsfouga...@mac.com wrote: I have placed a NSSplitView inside a NSScrollView in code. However, when the user resizes one of the

Re: NSSplitView and NSScrollView

2009-10-15 Thread Kyle Sluder
On Thu, Oct 15, 2009 at 1:31 AM, Harry Sfougaris hsfouga...@mac.com wrote: I have placed a NSSplitView inside a NSScrollView in code. Obligatory question: why are you doing this in code, and not in Interface Builder? However, when the user resizes one of the views so part of it outside the

Re: How to switch the default printer?

2009-10-15 Thread Kyle Sluder
On Thu, Oct 15, 2009 at 10:33 AM, Laurent Daudelin laurent.daude...@verizon.net wrote: Anybody has any suggestion on how to do that? This sounds like a terrible idea. If you want to maintain a separate default printer for your app or for a document (InDesign does this, for example, because

Re: How to switch the default printer?

2009-10-15 Thread Laurent Daudelin
Yes, I know, it's terrible, but it's part of being able to convert any document to PDF and so far, I haven't found any other way then using a virtual printer driver. So, I have to temporarily switch to that printer to convert a document, then revert back to what it was. It's not only for my

Re: NSSplitView and NSScrollView

2009-10-15 Thread Harry Sfougaris
I need it to be dynamic, as I am trying to build something similar to a report designer with multiple user-defined bands. My problem is that the split view just tries to autofit itself in the scroll view, and the size of the views changes as I resize the scroll view I'm doing the

Re: How to switch the default printer?

2009-10-15 Thread Kyle Sluder
On Thu, Oct 15, 2009 at 10:58 AM, Laurent Daudelin laurent.daude...@verizon.net wrote: Yes, I know, it's terrible, but it's part of being able to convert any document to PDF and so far, I haven't found any other way then using a virtual printer driver. So, I have to temporarily switch to that

Re: How to switch the default printer?

2009-10-15 Thread David Duncan
On Oct 15, 2009, at 10:58 AM, Laurent Daudelin wrote: Yes, I know, it's terrible, but it's part of being able to convert any document to PDF and so far, I haven't found any other way then using a virtual printer driver. So, I have to temporarily switch to that printer to convert a

Re: language based scaning

2009-10-15 Thread Nz Gmail
what I'm trying to do is sort of Twitter client, in which the tweets can be English or Arabic so in case of Arabic the alignment should be from right to left, i hope I made it clear this time cheers On Oct 13, 2009, at 2:26 PM, Ricky Sharp rsh...@mac.com wrote: You probably do not

Re: How to switch the default printer?

2009-10-15 Thread Laurent Daudelin
Well... suppose from my application, I want to convert a Word document to PDF. How would I do that? I did quite a bit of research and the only way I found was to use CUPS-PDF and have Word print to that printer. Then, I can retrieve the converted PDF document. Is there any other way? I don't

Re: How to switch the default printer?

2009-10-15 Thread Kyle Sluder
On Thu, Oct 15, 2009 at 11:17 AM, Laurent Daudelin laurent.daude...@verizon.net wrote: Well... suppose from my application, I want to convert a Word document to PDF. How would I do that? I did quite a bit of research and the only way I found was to use CUPS-PDF and have Word print to that

Re: How to switch the default printer?

2009-10-15 Thread Laurent Daudelin
A print Apple Event? Can you elaborate a bit? -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin http://nemesys.dyndns.org Logiciels Nemesys Software laurent.daude...@verizon.net Photo Gallery Store:

Re: How to switch the default printer?

2009-10-15 Thread Kyle Sluder
On Thu, Oct 15, 2009 at 11:27 AM, Laurent Daudelin laurent.daude...@verizon.net wrote: A print Apple Event? Can you elaborate a bit? Apple Events are the IPC mechanism underlying AppleScript and Automator. I won't go into a detailed explanation, but open up AppleScript Editor and take a look at

Re: language based scaning

2009-10-15 Thread Ricky Sharp
On Oct 15, 2009, at 1:11 PM, Nz Gmail wrote: what I'm trying to do is sort of Twitter client, in which the tweets can be English or Arabic so in case of Arabic the alignment should be from right to left, i hope I made it clear this time cheers In that case, you can probably scan the

NSURLConnection timeout -- what happens?

2009-10-15 Thread Stuart Malin
I have looked through the NSURLConnection class reference, the NSURLRequest class reference, the URL Loading System guide, queried Google, searched mailing list archives, and even looked through NSURLConnection.h, but can not find documentation about what happens when an NSURLConnection

Malloc leak from ImageIO library

2009-10-15 Thread Karolis Ramanauskas
Good day, I was running my app with Instruments - Leaks. This is a document-based-application. Whenever I save or open a file I get this leak: Category: Malloc 4.50 KB Event Type: Malloc RefCt: 1 Address: 0x103108000 Size: 4608 Responsible Library: ImageIO Responsible Caller:

Re: How to switch the default printer?

2009-10-15 Thread Laurent Daudelin
On Oct 15, 2009, at 11:42, Kyle Sluder wrote: On Thu, Oct 15, 2009 at 11:27 AM, Laurent Daudelin laurent.daude...@verizon.net wrote: A print Apple Event? Can you elaborate a bit? Apple Events are the IPC mechanism underlying AppleScript and Automator. I won't go into a detailed

Re: language based scaning,

2009-10-15 Thread Nasser Al Zahrani
thanks Ricky, so what classes should i be looking at ? ___ 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

Re: Opening a NSSavePanel as a Sheet, and blocking like in [panel runModal]

2009-10-15 Thread Steve Christensen
I had written this NSOpenPanel category to work in a plugin environment, and I think it should do the right thing. Just set up the NSOpenPanel as you like then call - runModalForDirectory:file:types:relativeToWindow: and it will return when the user has selected (or not) a file. steve

Re: NSURLConnection timeout -- what happens?

2009-10-15 Thread Jens Alfke
On Oct 15, 2009, at 11:44 AM, Stuart Malin wrote: I have looked through the NSURLConnection class reference, the NSURLRequest class reference, the URL Loading System guide, queried Google, searched mailing list archives, and even looked through NSURLConnection.h, but can not find

Re: language based scaning,

2009-10-15 Thread Jens Alfke
On Oct 15, 2009, at 12:33 PM, Nasser Al Zahrani wrote: so what classes should i be looking at ? NSString, mostly. Call -characters and loop over the UniChar[] array it returns. It's possible there are APIs for language/script detection at a lower level, like CoreText, but this may be

Re: Malloc leak from ImageIO library

2009-10-15 Thread Ken Ferry
Hi Karolis, That one's a false positive. The JPEG2000 library allocates memory at pointer p, but holds onto a pointer q and constant k such that q + k is p. Leaks cannot tell that the app can still get at the pointer, so it thinks the memory has been leaked. Of course, one never wants to see

Re: Malloc leak from ImageIO library

2009-10-15 Thread Karolis Ramanauskas
Thank you On Thu, Oct 15, 2009 at 3:05 PM, Ken Ferry kenfe...@gmail.com wrote: Hi Karolis, That one's a false positive. The JPEG2000 library allocates memory at pointer p, but holds onto a pointer q and constant k such that q + k is p. Leaks cannot tell that the app can still get at the

A good Obc-C framework for sending email?

2009-10-15 Thread Ben Haller
Hi all. I need a good Obj-C framework for sending email. I used to use the Message.framework associated with Apple's Mail, but they killed that a long time ago, sadly. Then I used Pantomime; but it seems to also be abandoned, now, and it is crashing on 10.5 (and it was never terribly

Re: A good Obc-C framework for sending email?

2009-10-15 Thread Bryan Matteson
Perhaps EDMessage? http://www.mulle-kybernetik.com/software/EDFrameworks/ -B ___ 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

Re: A good Obc-C framework for sending email?

2009-10-15 Thread Ben Haller
On 15-Oct-09, at 4:57 PM, Bryan Matteson wrote: Perhaps EDMessage? http://www.mulle-kybernetik.com/software/EDFrameworks/ EDMessage looks good, thanks! Ben Haller Stick Software ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: language based scaning,

2009-10-15 Thread Douglas Davidson
On Oct 15, 2009, at 1:02 PM, Jens Alfke wrote: NSString, mostly. Call -characters and loop over the UniChar[] array it returns. It's possible there are APIs for language/script detection at a lower level, like CoreText, but this may be the wrong list to find experts on that. Another

Re: How to switch the default printer?

2009-10-15 Thread Laurent Daudelin
Any more suggestion on this problem? After I reported that the little script I tried was not working, everybody suddenly went mute. I'm still having to find a solution to this nagging and, quite stupid problem. Thanks in advance. -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin

iSync: getting events attachments?

2009-10-15 Thread Laurent Daudelin
Hi. Am I missing something or is it not possible to retrieve events' attachments when using iSync? I don't see any property in the default event schema. Anyone? -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin http://nemesys.dyndns.org Logiciels

GC crash due to being naughty

2009-10-15 Thread Ben Haller
Hi all. I'm getting a crash in auto_zone_root_write_barrier() that I don't understand. I suspect it has to do with this little blurb in the Garbage Collection Programming Guide: Limitations on Mac OS X v10.5: You may pass addresses of strong globals or statics into routines expecting

Re: GC crash due to being naughty

2009-10-15 Thread Oftenwrong Soong
Hi Ben, Have you considered the so-called Flyweight design pattern? It is designed to solve the problem of having a zillion objects to allocate. It sounds like this pattern might prevent your having to play the dirty tricks that are causing you problems. In the frameworks, Flyweight is used,

Re: Subclassing a view class from an external framework

2009-10-15 Thread Kevin Cathey
Although Interface Builder 3 is supposed to automatically sync with header files in your project, it seems to have trouble with headers in frameworks. Which version of Interface Builder were you seeing this on? IB 3.2.x will parse the headers for all frameworks you've linked against in your

Status Bar Search Field Can't Get Focus w/ LSUIElement PList Setting

2009-10-15 Thread Dalmazio Brisinda
I'm having a problem getting a NSSearchField to work properly in an NSStatusItem a la the Apple Help menu or the Apple Spotlight menu. Here's what's happening. I create my custom NSStatusItem / menu / custom view/ search field, and insert into into the status bar in -awakeFromNib. Setting

Re: GC crash due to being naughty

2009-10-15 Thread Ben Haller
That looks like it is more a matter of decreasing memory usage than decreasing alloc/dealloc/containment overhead. A flyweight is an object that minimizes memory use by sharing as much data as possible with other similar objects; it is a way to use objects in large numbers when a simple

Re: GC crash due to being naughty

2009-10-15 Thread Greg Parker
On Oct 15, 2009, at 3:54 PM, Ben Haller wrote: Hi all. I'm getting a crash in auto_zone_root_write_barrier() that I don't understand. I suspect it has to do with this little blurb in the Garbage Collection Programming Guide: Limitations on Mac OS X v10.5: You may pass addresses of

Re: Subclassing a view class from an external framework

2009-10-15 Thread Mark Gallegly
Turns out the issue I was having was caused by the fact that I did not have the headers in the framework bundle, once I figured out how to add the header files to the framework - which was not easy to figure out - and did the 'reload all class files' menu item in IB for each xib the problem went

Re: A good Obc-C framework for sending email?

2009-10-15 Thread Peter Hudson
The ED code looks like interesting and I will give it a try as well. Does anybody know of a good primer on creating / sending email ( possibly in a Cocoa / Objective-C environment ) Peter ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: GC crash due to being naughty

2009-10-15 Thread Ben Haller
On 15-Oct-09, at 7:30 PM, Greg Parker wrote: A pointer value stored in an ordinary malloc block is neither a strong nor a weak reference. It is a dangling pointer. It can be used safely, but requires great care because the garbage collector has no knowledge of what you're doing. The

Re: GC crash due to being naughty

2009-10-15 Thread Dave DeLong
I'd start by taking a look at the CHDataStructures framework: http://cocoaheads.byu.edu/wiki/chdatastructures It's a framework hosted by our local CocoaHeads group that includes most of the data structures that Apple forgot. =) Cheers, Dave On Oct 15, 2009, at 5:44 PM, Ben Haller wrote:

Re: How to switch the default printer?

2009-10-15 Thread Graham Cox
On 16/10/2009, at 6:05 AM, Laurent Daudelin wrote: Any other suggestion? Log a bug with Microsoft? As usual, they have a tendency to do things their way rather than the right way. --Graham ___ Cocoa-dev mailing list

Re: GC crash due to being naughty

2009-10-15 Thread Ben Haller
I'd start by taking a look at the CHDataStructures framework: http://cocoaheads.byu.edu/wiki/chdatastructures It's a framework hosted by our local CocoaHeads group that includes most of the data structures that Apple forgot. =) An interesting framework, looks useful. Looking at the

Re: GC crash due to being naughty

2009-10-15 Thread Oftenwrong Soong
Hi Ben, You say the crash occurs in this line: individuals[individualCount++] = individualsForPop[i]; The problem may be in the post-increment (individualCount++). IIRC, there is no agreed-upon compiler standard as to whether the post-increment will occur before or after the assignment.

Serial comm in Cocoa?

2009-10-15 Thread Oftenwrong Soong
Hi All, What is the Cocoa-fied way to communicate via a serial port? Using a kext to support the Prolific PL2303 chip and a shell utility like cu, it is possible to communicate via many USB-based serial ports. (For those who need it, the kext is at sourceforge.net/projects/osx-pl2303.) I am

Re: GC crash due to being naughty

2009-10-15 Thread Ben Haller
On 15-Oct-09, at 8:10 PM, Oftenwrong Soong wrote: Hi Ben, You say the crash occurs in this line: individuals[individualCount++] = individualsForPop[i]; The problem may be in the post-increment (individualCount++). IIRC, there is no agreed-upon compiler standard as to whether the post-

Re: How to switch the default printer?

2009-10-15 Thread Laurent Daudelin
Yes, I guess I could do that. And then go after every application developer that doesn't support the Apple Event print properties. That probably means I would never finish the application I'm working on. Unfortunately, that's the bottom line, I have to find a way to convert any document that

Re: GC crash due to being naughty

2009-10-15 Thread Greg Parker
On Oct 15, 2009, at 4:44 PM, Ben Haller wrote: On 15-Oct-09, at 7:30 PM, Greg Parker wrote: A pointer value stored in an ordinary malloc block is neither a strong nor a weak reference. It is a dangling pointer. It can be used safely, but requires great care because the garbage collector

Re: Serial comm in Cocoa?

2009-10-15 Thread Greg Guerin
Oftenwrong Soong wrote: What is the Cocoa-fied way to communicate via a serial port? http://lists.apple.com/archives/Cocoa-dev/2009/Jun/msg00976.html -- GG ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: Serial comm in Cocoa?

2009-10-15 Thread Kiel Gillard
Look for AMSerialPort on this page: http://www.harmless.de/cocoa-code.php Kiel On 16/10/2009, at 11:12 AM, Oftenwrong Soong wrote: Hi All, What is the Cocoa-fied way to communicate via a serial port? Using a kext to support the Prolific PL2303 chip and a shell utility like cu, it is

Re: GC crash due to being naughty

2009-10-15 Thread Ben Haller
On 15-Oct-09, at 8:26 PM, Greg Parker wrote: I don't see any global pointer variables involved. My guess is that `individuals` is uninitialized or NULL or `individuals[individualCount]` is out of bounds. The write barrier objc_assign_strongCast() does range checks on the destination

Re: GC crash due to being naughty

2009-10-15 Thread Clark S. Cox III
That is simply not true. That code is perfectly well defined. Sent from my iPhone On Oct 15, 2009, at 17:10, Oftenwrong Soong oftenwrongso...@yahoo.com wrote: Hi Ben, You say the crash occurs in this line: individuals[individualCount++] = individualsForPop[i]; The problem may be in

Programming Style: Method Definition with or without a semicolon.

2009-10-15 Thread Frederick C. Lee
1) I've seen an alternative way of defining a method, with the semicolon after the declaration, before the body: - (NSArray *)sortedIncredients; -- notice the semicolon { ... } 2) ... versus the standard declaration + body of the definition (without the semicolon): -

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-15 Thread Nick Zitzmann
On Oct 15, 2009, at 6:54 PM, Frederick C. Lee wrote: Is there any benefit of (1) over (2) or is it merely style of programming? IMHO (1) should not be allowed, because you can't write C functions that way (the compiler throws a parsing error if you do that), so it's odd that you can

Re: Serial comm in Cocoa?

2009-10-15 Thread Oftenwrong Soong
Thanks Louis... I'm studying the code right now. -Soong - Original Message From: Louis Demers louisdem...@mac.com To: Oftenwrong Soong oftenwrongso...@yahoo.com Sent: Thu, October 15, 2009 5:58:02 PM Subject: Re: Serial comm in Cocoa? I use 2 C routines I found on the net and

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-15 Thread Graham Cox
On 16/10/2009, at 11:54 AM, Frederick C. Lee wrote: Both seem to work the same. Is there any benefit of (1) over (2) or is it merely style of programming? (1) isn't really an alternative way of implementing a method, it's just that the trailing semicolon is ignored. I'm not even sure if

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-15 Thread Roland King
Graham Cox wrote: On 16/10/2009, at 11:54 AM, Frederick C. Lee wrote: Both seem to work the same. Is there any benefit of (1) over (2) or is it merely style of programming? (1) isn't really an alternative way of implementing a method, it's just that the trailing semicolon is ignored.

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-15 Thread Graham Cox
On 16/10/2009, at 12:30 PM, Roland King wrote: I'm ploughing it with you, I hate it too and spend 30 seconds every time I let XCode stub out a function for me moving the brace onto the correct line, andputtingspacesbackbetweenparanetheses,bracketsandarguments so I have a hope in hell of

Re: Automatic language detection - a bug (again) or what. Snow Foundation NSSpellServer.

2009-10-15 Thread MacProjects
Dear Mr. Davidson / to whom it may concern: Just had a little time to work on the project/problem (hope I'm not the only one) and found out that: Steps to reproduce pt. 16 and Actual Results pt. 4 should sound now: 4) If the new method introduced in 10.6 –

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-15 Thread Dave Keck
Agree 2000%! Same here. A side note: in (Objective-)C you can also type jibberish after the trailing quote of an #include and it gets ignored (at least with GCC, not sure about Clang.) Not as useful as the semicolon bug, but I think it helps illuminate just because you can, doesn't mean you

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-15 Thread Robert Tillyard
I keep meaning to file an enhancement request for the space before ()'s, I have to go back and manually change every occurrence and then add spaces after the commas in the function arguments. I also prefer - (void)foo { } over - (void)foo { } Regards, Rob. On 16 Oct 2009, at 02:30,

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-15 Thread Symadept
Hi Rols, The same happened to me once. Accidently part of copy paste from header to .m, it happened that structure. But why Objective C compiler won't give any error for this. Really frustrating. Regards Mustafa On Fri, Oct 16, 2009 at 10:32 AM, Robert Tillyard r...@atvetsystems.comwrote: I

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-15 Thread Marc Respass
Ric 1) I've seen an alternative way of defining a method, with the semicolon after the declaration, before the body: - (NSArray *)sortedIncredients; -- notice the semicolon { ... } 2) ... versus the standard declaration + body of the definition (without the semicolon):

Re: Record and Playback immediately

2009-10-15 Thread Symadept
Hi Jean, Thank you very much for your response. Similarly Cocoa dev do we have any Macos Dev forums where I can ask this kind of questions. And I am working on AQRecord/Play. But still I haven't figured it out how to make it immediately. Regards Mustafa On Thu, Oct 15, 2009 at 4:27 PM,

Re: Custom NSComboBox

2009-10-15 Thread Symadept
Hi, Can anybody put some light on this. Regards Mustafa On Wed, Oct 14, 2009 at 7:09 PM, Symadept symad...@gmail.com wrote: Hi, I am designing a custom NSComboBox to display the rect image as some ComboboxBg.png and set foreground (text) color to Red. To render image I am doing the following

Re: Background image of CustomTableView Cells

2009-10-15 Thread Symadept
Hi,Can anybody please help me regarding this. Regards Symadept On Wed, Oct 14, 2009 at 6:50 PM, Symadept symad...@gmail.com wrote: Hi, Can you help me to fix this problem. I am customizing my table view to show various images in the background of the cells accordingly as Selected : Font

Re: Custom NSComboBox

2009-10-15 Thread Graham Cox
On 16/10/2009, at 1:42 PM, Symadept wrote: Can anybody put some light on this. Well, it might help if you format your email so it's readable to some extent. I took one look at it and passed it over because I'm not going to bother unravelling the unformatted mess to find out what it is

Re: A good Obc-C framework for sending email?

2009-10-15 Thread Andrew Farmer
On 15 Oct 2009, at 13:34, Ben Haller wrote: Hi all. I need a good Obj-C framework for sending email. I used to use the Message.framework associated with Apple's Mail, but they killed that a long time ago, sadly. Then I used Pantomime; but it seems to also be abandoned, now, and it is

Simultaneous Recording and Playback

2009-10-15 Thread Symadept
Hi, Can anyone help me how to achieve playback immediately the recorded voice and shall be able to stop them simultaneously. I am following the AQRecord/Play of the AudioQueueTools of CoreAudio Samples. But unable to reach to the target. I am putting more effort on it to converge what exactly I

Toolbar with capsule style items (Similiar to Mail)

2009-10-15 Thread Mazen Abdel-Rahman
Hi All, I am new at programming with Cocoa - so I had a basic question. Is it possible to create a capsule style toolbar with a search field in it (like how Mail's toolbar is) just using interface building to create the UI? And if so - how would it be done? I am trying to create by first

How to detect and disable/delay sleep event in cocoa for some critical threads to complete

2009-10-15 Thread Parimal Das
Hi All When my app is doing some critical I/O transactions with OpenSsl, And the user is sleeping the machine (just by folding the laptop). Some of the app threads are hanging Is there any way in cocoa to do following steps? Also is this logic correct? 1. Detect when a sleep (soft or hard) is

Re: odd behavior with NSError?

2009-10-15 Thread Nathan Vander Wilt
On Oct 2, 2009, at 7:45 AM, Bill Bumgarner wrote: In either case, assuming the undefined reference is nil would be a bug. Initializing the variables to nil prior to the call isn't going to change anything in that regard. (And, yes, there are methods that modify their error parameter on

Re: odd behavior with NSError?

2009-10-15 Thread Bill Bumgarner
(response is pedantic for the purposes of the archive :) On Oct 15, 2009, at 10:41 PM, Nathan Vander Wilt wrote: Ouch. So the following pattern is incorrect? Yes; it is incorrect. NSError* internalError = nil; (void)[foo somethingReturningBool:bar error:internalError]; if (internalError)

Re: odd behavior with NSError?

2009-10-15 Thread Kyle Sluder
On Thu, Oct 15, 2009 at 10:41 PM, Nathan Vander Wilt nate-li...@calftrail.com wrote: Ouch. So the following pattern is incorrect? NSError* internalError = nil; (void)[foo somethingReturningBool:bar error:internalError]; if (internalError) { Indeed, this is very incorrect. If the existence