Re: Selectively using formatter in table view text cell

2009-06-24 Thread Quincey Morris
On Jun 23, 2009, at 22:27, Graham Cox wrote: I have a table view that displays the contents of a dictionary. The values can be string data or numeric data. For numeric, I want to use a formatter to make it nice and pretty, but for string data I want to display it verbatim. If I attach a

about NSThread crash

2009-06-24 Thread Chris(吴潮江)
Hi, I have some problems when to using thread. As we all know, there is a method to create a thread, + (void)detachNewThreadSelector:(SEL)aSelector toTarget:(id)aTarget withObject:(id)anArgument. - (void)aSelector:(id)anArgument { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];

Re: about NSThread crash

2009-06-24 Thread Ken Thomases
On Jun 24, 2009, at 1:12 AM, Chris(吴潮江) wrote: I have some problems when to using thread. As we all know, there is a method to create a thread, + (void)detachNewThreadSelector:(SEL)aSelector toTarget:(id)aTarget withObject:(id)anArgument. - (void)aSelector:(id)anArgument {

Re: Selectively using formatter in table view text cell

2009-06-24 Thread Graham Cox
On 24/06/2009, at 4:00 PM, Quincey Morris wrote: (a) Use the delegate, something like (untested, obviously): -(void)tableView:(NSTableView *)aTableView willDisplayCell:(id)aCell forTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex { if (!this is the correct column)

Re: about NSThread crash

2009-06-24 Thread Chris(吴潮江)
On Jun 24, 2009, at 2:28 AM, Ken Thomases wrote: You probably don't need to use a background thread to do FTP. You can do it using asynchronous methods on the main thread. Since you can, you probably should. It's almost always less error prone and even more efficient. Considering

Re: display Mac id

2009-06-24 Thread Laurent Cerveau
You can use IOKit UserLibg get the MAC hardware address. I did not retest it though (it comes from older code) so you probably have to check for small bugs. laurent kern_return_t kernResult; mach_port_t masterPort; io_service_t tmpService, controllerService; CFDataRef

Re: about NSThread crash

2009-06-24 Thread Ken Thomases
On Jun 24, 2009, at 1:49 AM, Chris(吴潮江) wrote: On Jun 24, 2009, at 2:28 AM, Ken Thomases wrote: You probably don't need to use a background thread to do FTP. You can do it using asynchronous methods on the main thread. Since you can, you probably should. It's almost always less error

Screen capture Cocoa framework

2009-06-24 Thread Andy Bell
Hi All, Does anyone know if there is a screen recording Cocoa framework out there? I want to record the screen much like Camtasia studio does on Windows and don't want to reinvent the wheel. Thanks in advance -- Andy AllBabel Software www.allbabel.com Tel: +44 (0)20 8133 2473 Mob: +34

Re: NSScrollView: special handling of subview's headerView?

2009-06-24 Thread Aaron Burghardt
On Jun 24, 2009, at 12:28 AM, Quincey Morris wrote: Also see: http://codehackers.net/blog/?p=10 Ah, yes, that is precisely the same issue. The behavior is partially described here:

Re: Screen capture Cocoa framework

2009-06-24 Thread Jean-Daniel Dupas
Le 24 juin 09 à 11:38, Andy Bell a écrit : Hi All, Does anyone know if there is a screen recording Cocoa framework out there? I want to record the screen much like Camtasia studio does on Windows and don't want to reinvent the wheel. I'm not aware of any OpenSource framework, but I

Creating a 'complex' ArrayController based view.

2009-06-24 Thread Brian Bruinewoud
All, I'm ok with creating a special view for a simple value - that is, a single item. I'm not sure what the best way is to design a view that displays items from an array. For the single item view, the view is based on three values that are bound to the view. (eg: width, height, colour)

Re: Screen capture Cocoa framework

2009-06-24 Thread Andy Bell
Hi Jean-Daniel, Thanks for that, do you know if it captures the mouse pointer as well? Are there any commercial frameworks? Thanks Andy On Wed, Jun 24, 2009 at 12:37 PM, Jean-Daniel Dupas devli...@shadowlab.orgwrote: Le 24 juin 09 à 11:38, Andy Bell a écrit : Hi All, Does anyone know

Re: How apply a mask (xxx-xxx-xxxx for phone #) to a text field while inputting?

2009-06-24 Thread WT
On Jun 23, 2009, at 9:12 AM, Steve Fogel wrote: Hi, all... In my iPhone app I'd like to have a text field that duplicates the behavior of the phone field in the Contacts application, applying a mask to the field as it's being entered. So if the user types 2125551212, I'd like the text

Re: display Mac id

2009-06-24 Thread KK
I use this in my CF tool: #include sys/types.h #include sys/socket.h #include sys/ioctl.h #include sys/sysctl.h #include net/if.h #include net/if_dl.h #include netinet/in.h #include arpa/inet.h #include errno.h #include stdio.h #include stdlib.h - (NSString *)getHWEthernetMAC {

Re: Cocoa and email (SMTP/POP3)

2009-06-24 Thread David Hoerl
Look at the EDMessage class: http://www.mulle-kybernetik.com/software/EDFrameworks/ . You need its sibling class EDCommon too. With that Cocoa framework, you can send email through a SMTP access point using various types of security - it works with .mac and google too. I know these work as I

Re: Confusion about NIB loading

2009-06-24 Thread Rob Keniger
On 24/06/2009, at 11:20 PM, Chris Idou wrote: Since the doco for loadNibNamed:owner: says that it looks in the bundle associated with the owner, I'm creating an object of a class that exists in the subframework to pass as the owner. However, it doesn't find the NIB. Am I understanding

Re: Screen capture Cocoa framework

2009-06-24 Thread I. Savant
On Jun 24, 2009, at 7:47 AM, Andy Bell wrote: Thanks for that, do you know if it captures the mouse pointer as well? Do you really need to ask the list? It's sample code. Compile it, run it, take a screen capture, and see for yourself. Are there any commercial frameworks? Come on

Re: Screen capture Cocoa framework

2009-06-24 Thread Jean-Daniel Dupas
No, and AFAK, there is no way to capture the cursor. It is not part of the standard video pipeline and it is handle at the hardware level (by the graphic card directly). That said, it should not be difficult to draw a cursor using OpenGL before downloading the frame (in this sample , you may

Re: display Mac id

2009-06-24 Thread Chris Ridd
On 24 Jun 2009, at 13:45, KK wrote: - (NSString *)getHWEthernetMAC { NSString *deviceName = @en0; // Ethernet device is en0 Embedding a device name seems a bit odd to me - why not use getifaddrs() and walk the list of actual interfaces? Something like... struct ifaddrs *ifp, *p;

Re: Screen capture Cocoa framework

2009-06-24 Thread Andy Bell
On Wed, Jun 24, 2009 at 3:36 PM, I. Savant idiotsavant2...@gmail.comwrote: On Jun 24, 2009, at 7:47 AM, Andy Bell wrote: Thanks for that, do you know if it captures the mouse pointer as well? Do you really need to ask the list? It's sample code. Compile it, run it, take a screen capture,

Re: Screen capture Cocoa framework

2009-06-24 Thread I. Savant
On Jun 24, 2009, at 10:26 AM, Andy Bell wrote: I was asking for recommendations not tips on how to use a search engine. Well, you got both. -- I.S. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

Re: UML Diagramming or Other Helpful Software

2009-06-24 Thread Dennis Christopher
Has anyone found a diagramming package that will reverse engineer Cocoa code and output a UML diagram from it? Dennis Christopher ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the

Re: Screen capture Cocoa framework

2009-06-24 Thread Gordon Apple
If you find anything like that, I'd like to know. What I want is a vDig component that could be used with QTBroadcaster that captures frames of the content of a window -- on-screen or off-screen. On 6/24/09 6:30 AM, cocoa-dev-requ...@lists.apple.com cocoa-dev-requ...@lists.apple.com wrote:

Re: UML Diagramming or Other Helpful Software?

2009-06-24 Thread John Velman
I haven't tried it, but it's on my todo list. The other day I ran across ArgoUML at http://argouml.tigris.org/. It runs on any Java platform. I'd be interested in what you end up using. John Velman On Tue, Jun 23, 2009 at 06:49:18PM -0700, Brad Gibbs wrote: Hi, I'm wondering if there are

Re: UML Diagramming or Other Helpful Software

2009-06-24 Thread John Velman
I don't know about UML diagram, but Doxygen can produce diagrams of different types, and can also be used to produce Xcode documentation sets: http://developer.apple.com/tools/creatingdocsetswithdoxygen.html Best, John Velman On Wed, Jun 24, 2009 at 11:16:14AM -0400, Dennis Christopher wrote:

extending NSSavePanel, how to disable save button?

2009-06-24 Thread Eric Slosser
I'm extending NSSavePanel by using an accessory view. The view contains two NSSecureTextFields, to contain the user-typed password and confirmation. I know how to detect when the two password fields don't have identical content, to display a warning string on the dialog, and to prevent

Re: GC pros and cons

2009-06-24 Thread Quincey Morris
On Jun 24, 2009, at 09:14, Philip Aker wrote: Like Gwynne, I'm comfortable with the traditional reap what you sow philosophy. This has benefits in that the basic policy spills over into other areas of programming and gradually, one learns as a matter of habit, to account for things all

Re: extending NSSavePanel, how to disable save button?

2009-06-24 Thread Steve Christensen
I haven't tried myself, but just checking the headers it looks like the closest thing would be to make your controlling class the delegate and then implement either - (BOOL)panel:(id)sender isValidFilename:(NSString *)filename; or - (NSString *)panel:(id)sender

Re: GC pros and cons

2009-06-24 Thread Bill Bumgarner
On Jun 24, 2009, at 12:51 PM, Quincey Morris wrote: In a nutshell, for folks like me who regularly use CFCreate … CFRelease in loops, what are the benefits of GC? If CFCreate/CFRelease is precisely what you want to do, there are no benefits from GC, because the garbage collector isn't

Re: UML Diagramming or Other Helpful Software

2009-06-24 Thread Jeffrey Oleander
On Wed, 2009/06/24, I. Savant idiotsavant2...@gmail.com wrote: From: I. Savant idiotsavant2...@gmail.com Subject: Re: UML Diagramming or Other Helpful Software To: Dennis Christopher dchristop...@pixion.com Cc: cocoa-dev@lists.apple.com cocoa-dev@lists.apple.com Date: Wednesday, 2009 June

Re: UML Diagramming or Other Helpful Software

2009-06-24 Thread Dennis Christopher
Jeff, Object and Class diagrams. I need to diagram class relationships, containment, dependency and so on. But the UML symbols et al have to be correct. Dennis On Jun 24, 2009, at 2:24 PM, Jeffrey Oleander wrote: On Wed, 2009/06/24, I. Savant idiotsavant2...@gmail.com wrote: From: I.

QTMovieView - control-click vs. right-click give different behavior?

2009-06-24 Thread John C. Daub
Hello. I am using a QTMovieView to play back a movie. I wish for there to be no chance of user interaction with the movie: pure playback. The behavior is window shows, movie auto-plays (QTMovieView takes up the whole of the window content area), when movie is done the window closes. I noticed

Re: Cocoa and email (SMTP/POP3)

2009-06-24 Thread David Blanton
Look at CFNetwork Programming Guide. See CFWriteStreamRef and CFReadStreamRef. You can write a simple SMTP process in one page of code. Contact me off list if you want some code. db On Jun 24, 2009, at 1:02 PM, Jeremy Pereira wrote: Everybody seems to have forgotten that this

Re: QTMovieView - control-click vs. right-click give different behavior?

2009-06-24 Thread John C. Daub
on 6/24/09 2:50 PM, John C. Daub at h...@hsoi.com wrote: I am using a QTMovieView to play back a movie. I wish for there to be no chance of user interaction with the movie: pure playback. The behavior is window shows, movie auto-plays (QTMovieView takes up the whole of the window content

icns to Icon\r

2009-06-24 Thread Michael Hanna
Hi all, my goal is to create custom installer icons for a couple of Installer .pkg packages. I'm following the instructions at: http://www.khiltd.com/Downloads/prettypackages.html At the section Into the Fray he suggests to use the Finder to generate the Icon\r file for me by doing a Get Info on

IBPlugin embedding question

2009-06-24 Thread Doug Scott
Question: How can I automate the maintenance of embedded IBPlugins. Xcode Version 3.1.3 Interface Builder Version 3.1.2 (677) I have developed a small series of custom IBPlugin framework projects, two of which include other custom IBPlugin objects. Here is a quick overview of the hierarchy.

Re: Placing an image in the border of NSTextView

2009-06-24 Thread Martin Wierschin
How can I place an image in the left border of an NSTextView, without causing a move or shift of the text to the right? May I suggest learning about the Cocoa text system? There's nothing in there that will do what he wants. Any image one adds via the Cocoa text system is going to be a

Re: Screen capture Cocoa framework

2009-06-24 Thread Paul M
On 25/06/2009, at 2:51 AM, Michael Ash wrote: On Wed, Jun 24, 2009 at 10:26 AM, Andy Bellandy.b...@allbabel.com wrote: I was asking for recommendations not tips on how to use a search engine. Sometimes you get what you need, not what you want. Sometimes you get what you ask for, not what

Re: GC pros and cons

2009-06-24 Thread Chris Idou
On Jun 24, 2009, at 09:14, Philip Aker wrote: Like Gwynne, I'm comfortable with the traditional reap what you sow philosophy. This has benefits in that the basic policy spills over into other areas of programming and gradually, one learns as a matter of habit, to account for things all

Re: Confusion about NIB loading

2009-06-24 Thread Chris Idou
On 24/06/2009, at 11:20 PM, Chris Idou wrote: Since the doco for loadNibNamed:owner: says that it looks in the bundle associated with the owner, I'm creating an object of a class that exists in the subframework to pass as the owner. However, it doesn't find the NIB. Am I understanding

Re: Confusion about NIB loading

2009-06-24 Thread Kevin Cathey
Alternatively you could use NSNib which allows you to explicitly specify the bundle. In addition, when instantiating the nib using NSNib, you can get the top level objects to send a release message to match the implicit retain. For more info, check out the resource programming guide:

Re: Confusion about NIB loading

2009-06-24 Thread Graham Cox
On 25/06/2009, at 10:18 AM, Chris Idou wrote: But loadNibNamed:owner: is a class method, so I can't actually explicitly find the appropriate bundle, and call loadNibNamed: on it to find the right NIB. The doco says that loadNibNamed:owner: will look in the bundle associated with the

RE: GC pros and cons

2009-06-24 Thread Jeff Laing
I think it depends what language you weaned yourself on. If you've used Lisp or some other functional language, manual reclamation is an unthinkable monstrosity. If you weaned yourself on C or similar languages, manual reclamation seems like the default state of play. Its also going to

Re: display Mac id

2009-06-24 Thread Stephen Blinkhorn
Hi Laurent, On 24 Jun 2009, at 00:58, Laurent Cerveau wrote: //now we get the data and do something with them macAddressData = (CFDataRef) IORegistryEntryCreateCFProperty ( controllerService,CFSTR(kIOMACAddress), kCFAllocatorDefault, 0); does macAddressData now contain the raw bytes to a

Re: GC pros and cons

2009-06-24 Thread Stephen J. Butler
On Wed, Jun 24, 2009 at 7:40 PM, Jeff Laingjeff.la...@spatialinfo.com wrote: http://www.simple-talk.com/dotnet/.net-framework/understanding-garbage-collection-in-.net/ (Yes, I do .NET as well as Cocoa) No real surprises there, except for the closing paragraphs which can be paraphrased down

RE: GC pros and cons

2009-06-24 Thread Jeff Laing
Well, no, that's not a good summary of the last couple paragraphs. IF YOU HAVE A FINALIZER, then you should probably be using the Unless you peer into the implementation details of your superclasses, you should assume that all classes may have a finalizer. Unless you don't care about every

Watch for a file

2009-06-24 Thread Tom Jones
I'm trying to use NSNotification to watch for a file but I can not seem to get it to work. Is it possible to use NSNotification to watch for a specific file on the file system? One example would be to run a method once the file shows up on the filesystem. Thanks, tom

Re: Watch for a file

2009-06-24 Thread Graham Cox
On 25/06/2009, at 12:26 PM, Tom Jones wrote: k. Is it possible to use NSNotification to watch for a specific file on the file system? No. There are other ways however - search the documentation for folder watching and kqueue. Uli Kusterer has a small easy-to-use class for this -

Re: Confusion about NIB loading

2009-06-24 Thread Rob Keniger
On 25/06/2009, at 10:18 AM, Chris Idou wrote: But loadNibNamed:owner: is a class method, so I can't actually explicitly find the appropriate bundle, and call loadNibNamed: on it to find the right NIB. The doco says that loadNibNamed:owner: will look in the bundle associated with the

Re: GC pros and cons

2009-06-24 Thread Peter Ammon
On Jun 24, 2009, at 6:02 PM, Stephen J. Butler wrote: On Wed, Jun 24, 2009 at 7:40 PM, Jeff Laingjeff.la...@spatialinfo.com wrote: http://www.simple-talk.com/dotnet/.net-framework/understanding-garbage-collection-in-.net/ (Yes, I do .NET as well as Cocoa) No real surprises there, except

Re: Watch for a file

2009-06-24 Thread Rob Keniger
On 25/06/2009, at 12:38 PM, Graham Cox wrote: No. There are other ways however - search the documentation for folder watching and kqueue. Uli Kusterer has a small easy-to-use class for this - UKKQueue. I'd also recommend Stu Connolly's SCEvents class:

Re: Confusion about NIB loading

2009-06-24 Thread Kyle Sluder
On Wed, Jun 24, 2009 at 6:20 AM, Chris Idouidou...@yahoo.com wrote: Since the doco for loadNibNamed:owner: says that it looks in the bundle associated with the owner, I'm creating an object of a class that exists in the subframework to pass as the owner. In the context of your application,

Re: GC pros and cons

2009-06-24 Thread Kyle Sluder
On Wed, Jun 24, 2009 at 7:55 PM, Peter Ammonpam...@apple.com wrote: Microsoft even says that all objects must be robust against being Dispose()d multiple times, which smacks of sloppiness.  If your program disposes of an object twice, then it is structured so that independent usages of the

Re: GC pros and cons

2009-06-24 Thread Stephen J. Butler
On Wed, Jun 24, 2009 at 8:19 PM, Jeff Laingjeff.la...@spatialinfo.com wrote: Unless you peer into the implementation details of your superclasses, you should assume that all classes may have a finalizer. Unless you don't care about every last little piece of performance. I don't understand

Re: Watch for a file

2009-06-24 Thread Tom Jones
Thanks Graham. I downloaded Uli's class but I dont see any example code. By any chance do you have a quick example? Thanks, tom - Original Message - From: Graham Cox graham@bigpond.com To: Tom Jones tjo...@acworld.com Cc: cocoa-dev@lists.apple.com Sent: Wednesday, June 24, 2009

Re: GC pros and cons

2009-06-24 Thread Quincey Morris
On Jun 24, 2009, at 18:19, Jeff Laing wrote: Unless you peer into the implementation details of your superclasses, you should assume that all classes may have a finalizer. Unless you don't care about every last little piece of performance. In my day app, we regularly cache hundreds of

Re: Watch for a file

2009-06-24 Thread Graham Cox
On 25/06/2009, at 1:25 PM, Tom Jones wrote: Thanks Graham. I downloaded Uli's class but I dont see any example code. By any chance do you have a quick example? Thanks, tom Sure. In some object that wants to respond to changes to a folder: myUKQ = [[UKKQueue alloc] init];

Re: display Mac id

2009-06-24 Thread Finlay Dobbie
On Tue, Jun 23, 2009 at 8:04 AM, Kiran Kumarkiran.kod...@moschip.com wrote: Hi all, i am doing project to change MAC Address ,i want to display MACID in a single textbox like 00:15:e9:4c:c3:d7 or 00-15-e9-4c-c3-d7 can any one help me plz ... Apple has sample code for this:

Setter Getter on NSImageVIew / UIImageView?

2009-06-24 Thread Chunk 1978
i've seen code where this is written: -=-=-=- @property (nonatomic, retain) UIImageView *image; ... @synthisize image; ... [image release];//in dealloc method -=-=-=- aren't setters/getters methods used only for objects that need to have their value changed? assuming the UIImageView in the

Application Support Folder

2009-06-24 Thread Anthony Smith
I'm beginning to delve into Core Data and I've been looking at the generated code for the Xcode Core Data project. I'm finding their implementation of -applicationSupportFolder interesting. They grab the NSApplicationSupportDirectory using NSSearchPathForDirectoriesInDomains, which makes

Re: UML Diagramming or Other Helpful Software

2009-06-24 Thread Alfonso Urdaneta
John Velman wrote: I don't know about UML diagram, but Doxygen can produce diagrams of different types, and can also be used to produce Xcode documentation sets: http://developer.apple.com/tools/creatingdocsetswithdoxygen.html seconded. uml is crap anyway. -- alfonso e. urdaneta red82.com -

Hide Interface Builder Object?

2009-06-24 Thread Chunk 1978
i have a simple black NSView that is positioned the top index level of the main view, covering all other visual elements in IB. it's purpose is to fade out, so the view appears to fade in. i have to often move it out of the way, and i also set it to hidden (then change it to not hidden at

Re: GC pros and cons

2009-06-24 Thread Chris Idou
On Jun 24, 2009, at 18:19, Jeff Laing wrote: we regularly cache hundreds of thousands of objects from a persistent (relational) store and it is absolutely critical to us that the instant that those objects aren't required, they give their memory back - that's how we can run in a machine

Re: Setter Getter on NSImageVIew / UIImageView?

2009-06-24 Thread Graham Cox
On 24/06/2009, at 1:45 PM, Chunk 1978 wrote: aren't setters/getters methods used only for objects that need to have their value changed? assuming the UIImageView in the above code always maintains the same image throughout the program, are setter and getters still required? perhaps the above

Re: Hide Interface Builder Object?

2009-06-24 Thread Graham Cox
On 25/06/2009, at 10:47 AM, Chunk 1978 wrote: i have a simple black NSView that is positioned the top index level of the main view, covering all other visual elements in IB. it's purpose is to fade out, so the view appears to fade in. i have to often move it out of the way, and i also set it

Re: Application Support Folder

2009-06-24 Thread Kyle Sluder
On Tue, Jun 23, 2009 at 9:02 PM, Anthony Smithanth...@sticksnleaves.com wrote: If count is not greater than 0 then it returns an NSTemporaryDirectory. What's the point? Is that check really necessary? Will there ever be an instance where NSSearchPathForDirectoriesInDomains will not return the

Re: Quick DO endian question

2009-06-24 Thread Michael Ash
On Wed, Jun 24, 2009 at 11:43 PM, Michael Vannorsdelmikev...@gmail.com wrote: Do messages to remote proxies (a vended DO object) need to have their arguments adjusted for endianness or does DO handle that on its own? ie: [rootProxy myNumberIs:someInt32]; would I need to standardize

Re: Setter Getter on NSImageVIew / UIImageView?

2009-06-24 Thread Michael Ash
On Tue, Jun 23, 2009 at 11:45 PM, Chunk 1978chunk1...@gmail.com wrote: i've seen code where this is written: -=-=-=- @property (nonatomic, retain) UIImageView *image; ... @synthisize image; ... [image release];    //in dealloc method -=-=-=- aren't setters/getters methods used only for

Re: GC pros and cons

2009-06-24 Thread Marcel Weiher
On Jun 24, 2009, at 11:00 , Bill Bumgarner wrote: On Jun 24, 2009, at 12:51 PM, Quincey Morris wrote: In a nutshell, for folks like me who regularly use CFCreate … CFRelease in loops, what are the benefits of GC? If CFCreate/CFRelease is precisely what you want to do, there are no

Re: GC pros and cons

2009-06-24 Thread Greg Titus
On Jun 24, 2009, at 10:38 PM, Marcel Weiher wrote: On Jun 24, 2009, at 11:00 , Bill Bumgarner wrote: On Jun 24, 2009, at 12:51 PM, Quincey Morris wrote: In a nutshell, for folks like me who regularly use CFCreate … CFRelease in loops, what are the benefits of GC? If CFCreate/CFRelease is