Re: display Mac id

2009-06-23 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-23 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 t

Re: Selectively using formatter in table view text cell

2009-06-23 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 (!) return; id

Re: about NSThread crash

2009-06-23 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 { NSAutoreleasePo

about NSThread crash

2009-06-23 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: Selectively using formatter in table view text cell

2009-06-23 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 for

Re: UML Diagramming or Other Helpful Software?

2009-06-23 Thread Philip Mötteli
Hi, Am 24.06.2009 um 03:49 schrieb Brad Gibbs: I'm wondering if there are some tools commonly in use in the Mac software development community for diagramming an app, creating use cases and / or requirements, etc. I've seen OmniGraffle and ConceptDraw. I'm just wondering how other peopl

RE: Cocoa and email (SMTP/POP3)

2009-06-23 Thread Jeff Laing
I won't argue too strongly on this (though I should because I *have* configured sendmail systems and its just not that hard, if you're a developer. And I have rolled my own Perl scripts that talked enough SMTP to connect directly, so its not that big a deal, again for a developer), but my point

Re: Cocoa and email (SMTP/POP3)

2009-06-23 Thread Andrew Farmer
On 23 Jun 2009, at 21:52, Jeff Laing wrote: Ok, I'll bite. How does the mail server that Mail.app is talking to distinguish between Mail.app and /usr/sbin/sendmail ? They both presumably just talk SMTP ? Mail.app is configurable by the user to connect to a specific relay mail server, po

Selectively using formatter in table view text cell

2009-06-23 Thread Graham Cox
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 formatter to the text cell it refuses to validat

RE: Cocoa and email (SMTP/POP3)

2009-06-23 Thread Jeff Laing
Ok, I'll bite. How does the mail server that Mail.app is talking to distinguish between Mail.app and /usr/sbin/sendmail ? They both presumably just talk SMTP ? If the scriptable solution works, then roll-your-own-smtp should also work, provided you go the hard yards and implement everything it

Re: Cocoa and email (SMTP/POP3)

2009-06-23 Thread Nick Zitzmann
On Jun 23, 2009, at 10:13 PM, Nick Zitzmann wrote: I can't really recommend doing that in a non-internal app, though, because if the user only has a static IP address and no domain name, then a good deal of mail servers won't accept the mail from the host unless they identify using a fake

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

2009-06-23 Thread Quincey Morris
On Jun 23, 2009, at 18:11, Aaron Burghardt wrote: I recently encountered a problem with a custom NSView sublcass that is designed to be a container for 3 WebViews and is embedded in a scroll view. The problem was that once the view was added to the view hierarchy, one of its WebViews was r

Re: Cocoa and email (SMTP/POP3)

2009-06-23 Thread Andrew Farmer
On 23 Jun 2009, at 20:42, Dave DeLong wrote: 3.5: Use /usr/sbin/sendmail: Create an NSTask that launches /usr/ sbin/sendmail, configures the headers, and then just pipes your email through the task's standardInput. That doesn't work for users behind residential ISPs that block port 25, or

Re: Cocoa and email (SMTP/POP3)

2009-06-23 Thread Dave DeLong
That's a good point, and one that I brushed past because I was using it for an internal app. So yeah: use at your own risk. =) Dave On Jun 23, 2009, at 10:13 PM, Nick Zitzmann wrote: On Jun 23, 2009, at 9:42 PM, Dave DeLong wrote: 3.5: Use /usr/sbin/sendmail: Create an NSTask that launch

Re: Warnings suggest compiler confusion between 32 and 64 bit code.

2009-06-23 Thread Michael Ash
On Tue, Jun 23, 2009 at 12:41 AM, Dave Carrigan wrote: > > On Jun 22, 2009, at 9:01 PM, Michael Ash wrote: > >> -Wconversion warns you every time >> a function call has the parameter passing altered by the presence of >> the function's prototype, which is to say that it will warn you every >> time

Re: Cocoa and email (SMTP/POP3)

2009-06-23 Thread Nick Zitzmann
On Jun 23, 2009, at 9:42 PM, Dave DeLong wrote: 3.5: Use /usr/sbin/sendmail: Create an NSTask that launches /usr/ sbin/sendmail, configures the headers, and then just pipes your email through the task's standardInput. I can't really recommend doing that in a non-internal app, though, be

Re: [Q] CFStringGetCStringPtr( ..., kCFStringEncodingUTF8)

2009-06-23 Thread Michael Ash
On Tue, Jun 23, 2009 at 3:13 PM, JongAm Park wrote: > Oh.. one more thing... > > I think you didn't catch what I wanted to say. > It will be OK to return NULL if it can't convert a given string to a string > in a given text encoding method. > ( But, yes.. Apple's document mentioned that its behavio

Re: Cocoa and email (SMTP/POP3)

2009-06-23 Thread Dave DeLong
3.5: Use /usr/sbin/sendmail: Create an NSTask that launches /usr/sbin/ sendmail, configures the headers, and then just pipes your email through the task's standardInput. I had to do this earlier today and it works pretty well. You obviously can't do anything too complex with it, but in my

Re: Cocoa and email (SMTP/POP3)

2009-06-23 Thread Nick Zitzmann
On Jun 23, 2009, at 11:25 AM, Isaac Alston wrote: How do I deal with email in Cocoa? You either: 1. Use a third party framework or library 2. Use the Scripting Bridge to communicate with an existing mail client 3. Do the work yourself There are no built-in network protocols other than FTP a

Re: Opinion on managed memory and garbage collection

2009-06-23 Thread Rob Keniger
On 24/06/2009, at 7:39 AM, Sean McBride wrote: If you were writing a new Cocoa application from scratch, would garbage collection be the preferred method over the reference counting (retain/release) method. I switched to GC-only during the 10.5 betas, and my answer is: Yes. Same here, a

NSScrollView: special handling of subview's headerView?

2009-06-23 Thread Aaron Burghardt
Hi All, I recently encountered a problem with a custom NSView sublcass that is designed to be a container for 3 WebViews and is embedded in a scroll view. The problem was that once the view was added to the view hierarchy, one of its WebViews was removed and inserted as a sibling to the

problem with "selection" controller key when showing NSComboBoxCell content values

2009-06-23 Thread Eli Manjarrez
I have a Core Data Document-Based Application, and I'm running into a problem with bindings and the NSComboBoxCell. Background: I have a table, the columns of which are bound (via an array controller) to respective properties of one entity ("mainEntity") in my data model. mainEntity has a to-many

Cocoa and email (SMTP/POP3)

2009-06-23 Thread Isaac Alston
Hi, I've started learning Cocoa. I want to write a simple email client to do some 'real world' coding and to learn more about the framework. I thought there would be a simple way to send email in Cocoa, but a quick search on Google only turned up http://vafer.org/blog/20080604120118, which dates f

display Mac id

2009-06-23 Thread Kiran Kumar
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 ... Thanks, kiran The information contained in this email and any attachments is confidential and may be subject to copyright or

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

2009-06-23 Thread Steve Fogel
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 field to display (212) 555-1212. I know about the

Re: Beginner Question Re: Memory Management

2009-06-23 Thread Peter N Lewis
On 23/06/2009, at 12:31 , WT wrote: So, after I scratched my head silly for several minutes, it suddenly came to me. If I'm going to use a property, I *must* refer to it as object.property rather than simply as property. In the specific example I had, I should not have replaced all those rep

re: Cascade Delete won't delete Department in Apple Sample Code

2009-06-23 Thread Ben Trumbull
Core Data documentation [1] describes the Cascade Delete Rule as follows: "Delete the objects at the destination of the relationship. For example, if you delete a department, fire all the employees in that department at the same time." In order to understand another problem, I tried this on thi

Re: UML Diagramming or Other Helpful Software?

2009-06-23 Thread WT
I'm with Dave on this one. In fact, I am writing the design document for an iPhone game and I'm using Omnigraffle for every diagram, and even some of the art work. Just make sure to get extra stencils. http://www.graffletopia.com/ Wagner On Jun 24, 2009, at 3:50 AM, Dave DeLong wrote: You'

Re: UML Diagramming or Other Helpful Software?

2009-06-23 Thread Dave DeLong
You're already mentioned it, but I'm a big fan of Omnigraffle and use it quite frequently. Dave On Jun 23, 2009, at 7:49 PM, Brad Gibbs wrote: Hi, I'm wondering if there are some tools commonly in use in the Mac software development community for diagramming an app, creating use cases a

UML Diagramming or Other Helpful Software?

2009-06-23 Thread Brad Gibbs
Hi, I'm wondering if there are some tools commonly in use in the Mac software development community for diagramming an app, creating use cases and / or requirements, etc. I've seen OmniGraffle and ConceptDraw. I'm just wondering how other people go about laying out their apps from 30,00

Re: Problem: how to get glyph descent and ascent

2009-06-23 Thread Adam R. Maxwell
On Jun 23, 2009, at 6:20 PM, WT wrote: On 24/06/2009, at 4:02 AM, Anders Lassen wrote: The font descent is the maximum descent for all characters in that font, so it will not help me to position the character correct. You know, I have no clue if this is going to help or not, because I

Re: Problem: how to get glyph descent and ascent

2009-06-23 Thread Graham Cox
On 24/06/2009, at 11:20 AM, WT wrote: On 24/06/2009, at 4:02 AM, Anders Lassen wrote: The font descent is the maximum descent for all characters in that font, so it will not help me to position the character correct. You know, I have no clue if this is going to help or not, because I h

[Announce] Expense: A Core Data Tutorial part 3 posted.

2009-06-23 Thread Michael Swan
I just posted the third part of my Core Data tutorial dealing with user preferences. The series also deals with bindings a good deal. http://themikeswan.wordpress.com/2009/06/23/expenses-a-core-data-tutorial-part-3/ Mike Swan ETCP Certified Entertainment Electrician http://www.michaelsswan.com

Re: Problem: how to get glyph descent and ascent

2009-06-23 Thread WT
On 24/06/2009, at 4:02 AM, Anders Lassen wrote: The font descent is the maximum descent for all characters in that font, so it will not help me to position the character correct. You know, I have no clue if this is going to help or not, because I have no experience whatsoever with typeset

Re: Problem: how to get glyph descent and ascent

2009-06-23 Thread Graham Cox
On 24/06/2009, at 4:02 AM, Anders Lassen wrote: The font descent is the maximum descent for all characters in that font, so it will not help me to position the character correct. In general, I don't think it's meaningful to ask for the metrics ascender, descender, and so on for an individ

Re: Cascade Delete won't delete Department in Apple Sample Code

2009-06-23 Thread Andy Lee
On Tuesday, June 23, 2009, at 07:23PM, "Jerry Krinock" wrote: >Although eyebrows are raised at the on-the-fly invention of the term >"back pointers" (not defined in wikipedia.org), I suppose that "back >pointers ... are nullified" could be loosely interpreted to mean that, "Back pointer" is

Re: Cascade Delete won't delete Department in Apple Sample Code

2009-06-23 Thread Quincey Morris
On Jun 23, 2009, at 16:23, Jerry Krinock wrote: The documentation of the NSDeleteRule simply states: "NSCascadeDeleteRule. If the object is deleted, the destination object or objects of this relationship are also deleted." That's all, chief. There is an "if", but there are no "ands" or "

Re: Cascade Delete won't delete Department in Apple Sample Code

2009-06-23 Thread Jerry Krinock
On 2009 Jun 23, at 00:48, Quincey Morris wrote: The delete rules are really about ownership. Department->Employee ownership is clear: *the* department owns each of its employees. But Employee->Department ownership isn't well defined. (If two employees "own" the same department, who gets to

Re: Core Data "Uniqueing" not happening as expected

2009-06-23 Thread Jerry Krinock
I tried to reproduce this in a demo project but gave up on it. In the demo project, attempting to set a cross-store relationship always results in a nice warning and program termination. It would just take too long to pick my project apart. ___

Re: Warnings suggest compiler confusion between 32 and 64 bit code.

2009-06-23 Thread Sean McBride
On 6/22/09 9:41 PM, Dave Carrigan said: >> -Wconversion warns you every time >> a function call has the parameter passing altered by the presence of >> the function's prototype, which is to say that it will warn you every >> time you call any function (or method) which takes a char, unsigned >> ch

Re: Opinion on managed memory and garbage collection

2009-06-23 Thread Sean McBride
On 6/22/09 7:58 AM, Phil Hystad said: >If you were writing a new Cocoa application from scratch, would >garbage collection be the preferred method over the reference counting >(retain/release) method. I switched to GC-only during the 10.5 betas, and my answer is: Yes. Others have made good comme

RE: Core Data Fetching Limitations?

2009-06-23 Thread Ulai Beekam
Sure. It is not mentioned in the "Core Data Programming Guide". However it is mentioned in "Predicate Programming Guide". Take a look at the section called "Constraints and Limitations" (second item in the list) on this page: http://developer.apple.com/documentation/Cocoa/Conceptual/Predicat

Re: bluetooth on the iPhone

2009-06-23 Thread Greg Guerin
David Brennan wrote: I am looking to create a iPhone app that will display a reading from a bluetooth device. I don't know where to start with this or if it can even be done. Any help or advice would be great. Visit this URL: http://developer.apple.com/search/search.html Enter plausible

Re: [Q] CFStringGetCStringPtr( ..., kCFStringEncodingUTF8)

2009-06-23 Thread JongAm Park
Hello, Aki Oh.. I see. "when it can do efficiently" is the key! Thank you very much for pointing that out. Aki Inoue wrote: JongAm, The keyword here is that the function returns non-NULL when it can do so "efficiently". It all depends on a particular CFString instance's internal representat

Re: Problem: how to get glyph descent and ascent

2009-06-23 Thread Anders Lassen
Yes, thanks, I am sure this will help. On Jun 23, 2009, at 8:02 PM, Quincey Morris wrote: On Jun 23, 2009, at 10:32, Anders Lassen wrote: I am working on a project that involves writing math formulas.: 2 * x^2 + sqrt(3) - + aB 3 note that the above is only to

Re: Problem: how to get glyph descent and ascent

2009-06-23 Thread Anders Lassen
Hi, I have learned a bit more since I started this investigation. So now I know that I can use Core Text or ATSUI to get glyph metrics. (see former email responses about this) Anders Lassen On Jun 23, 2009, at 8:39 PM, Scott Thompson wrote: On Jun 23, 2009, at 1:02 PM, Anders Lassen wro

Re: [Q] CFStringGetCStringPtr( ..., kCFStringEncodingUTF8)

2009-06-23 Thread Aki Inoue
JongAm, The keyword here is that the function returns non-NULL when it can do so "efficiently". It all depends on a particular CFString instance's internal representation and the encoding being passed. The best encoding for a particular string is CFStringGetFastestEncoding (). Aki On Ju

bluetooth on the iPhone

2009-06-23 Thread David Brennan
Hi, I am looking to create a iPhone app that will display a reading from a bluetooth device. I don't know where to start with this or if it can even be done. Any help or advice would be great. Kind regards, Dave. ___ Cocoa-dev mailing list (Cocoa

Re: [Q] CFStringGetCStringPtr( ..., kCFStringEncodingUTF8)

2009-06-23 Thread JongAm Park
Oh.. one more thing... I think you didn't catch what I wanted to say. It will be OK to return NULL if it can't convert a given string to a string in a given text encoding method. ( But, yes.. Apple's document mentioned that its behaviour can be changed, so don't rely on it. ) What I wanted to

Re: [Q] CFStringGetCStringPtr( ..., kCFStringEncodingUTF8)

2009-06-23 Thread JongAm Park
Thanks for your reply. However, even with CFStringGetCString() with the 2nd parameter "kCFStringEncodingUTF8" doesn't work correctly. Laurent Cerveau wrote: According to the doc it is completely OK for the CFStringPtr to return NULL. CFStringGetCStringPtr() CFStringGetCharactersPtr

Re: Cocoa equivalent to Quartz's CGImageCreateWithImageInRect(image, imageRect);

2009-06-23 Thread Frederick C. Lee
This is for the iPhone/iTouch environment. I discovered: CGContextTranslateCTM(). I'll also check out subclassing the scrollview. Ric. On Jun 14, 2009, at 7:53 PM, David Duncan wrote: On Jun 12, 2009, at 11:53 AM, Frederick C. Lee wrote: Is there a Cocoa/iPhone equivalent to Quartz's CGIm

Re: Problem: how to get glyph descent and ascent

2009-06-23 Thread Scott Thompson
On Jun 23, 2009, at 1:02 PM, Anders Lassen wrote: The font descent is the maximum descent for all characters in that font, so it will not help me to position the character correct Unfortunately the documentation on the text system in Mac OS X can be very difficult to navigate (as you have

Re: [Q] CFStringGetCStringPtr( ..., kCFStringEncodingUTF8)

2009-06-23 Thread Greg Guerin
JongAm Park wrote: My problem is that CFStringGetCStringPtr( ..., kCFStringEncodingUTF8) doesn't convert a string passed through its first parameter and returns 0 on English system. However, on Japanese system, it returns a pointer to converted string correctly. It seems like you don't unde

Re: [Q] CFStringGetCStringPtr( ..., kCFStringEncodingUTF8)

2009-06-23 Thread Laurent Cerveau
According to the doc it is completely OK for the CFStringPtr to return NULL. CFStringGetCStringPtr() CFStringGetCharactersPtr() These functions are provided for optimization only. They will either return the desired pointer quickly, in constant time, or they return NULL. They might

Re: Problem: how to get glyph descent and ascent

2009-06-23 Thread Anders Lassen
Hi, The font descent is the maximum descent for all characters in that font, so it will not help me to position the character correct. Anders Lassen On Jun 23, 2009, at 7:37 PM, I. Savant wrote: On Jun 23, 2009, at 12:44 PM, Anders Lassen wrote: To clarify this and my original question:

Re: Problem: how to get glyph descent and ascent

2009-06-23 Thread Quincey Morris
On Jun 23, 2009, at 10:32, Anders Lassen wrote: I am working on a project that involves writing math formulas.: 2 * x^2 + sqrt(3) - + aB 3 note that the above is only to explain, what I mean by math formulas. In my project, I have a object type that handles let

Re: renaming executable files

2009-06-23 Thread Mr. George Warner
On Jun 23, 2009, at 12:40 AM, Jens Miltner wrote: Am 22.06.2009 um 19:22 schrieb Mr. George Warner: On Sun, 21 Jun 2009 06:47:26 -0700 (PDT), Angelo Chen > wrote: > I need to rename the executable file without renaming the project, how to do that? thanks

Re: Problem: how to get glyph descent and ascent

2009-06-23 Thread I. Savant
On Jun 23, 2009, at 12:44 PM, Anders Lassen wrote: To clarify this and my original question: It is easy to find infomation about how to get a fonts ascent and descent, but I cant find any info about getting ascent/descent fot individual glyphs. I'm not sure if this is correct, but looking

Re: Problem: how to get glyph descent and ascent

2009-06-23 Thread Anders Lassen
Hi, I am working on a project that involves writing math formulas.: 2 * x^2 + sqrt(3) - + aB 3 note that the above is only to explain, what I mean by math formulas. In my project, I have a object type that handles letters. Because letters must be aligned to s

[Q] CFStringGetCStringPtr( ..., kCFStringEncodingUTF8)

2009-06-23 Thread JongAm Park
Hello. I didn't find any CoreFoundation mailing list, so I post my question about CFStringEtCStringPtr() here in Cocoa mailing list. My problem is that CFStringGetCStringPtr( ..., kCFStringEncodingUTF8) doesn't convert a string passed through its first parameter and returns 0 on English syst

Re: Realtime, GC and ObjC (Was Re: Opinion on managed memory and garbage collection)

2009-06-23 Thread Andy Lee
On Tuesday, June 23, 2009, at 12:29PM, "Andrea Gozzi" wrote: >> On Jun 23, 2009, at 1:39 AM, Chris Idou wrote: [...] >> One of the concerns I see with GC is "I can't use it because my app >> is realtime or near-realtime". In this case, GC or not is moot and >> the real issue is that you can'

Re: Problem: how to get glyph descent and ascent

2009-06-23 Thread I. Savant
On Jun 23, 2009, at 12:44 PM, Anders Lassen wrote: To clarify this and my original question: It is easy to find infomation about how to get a fonts ascent and descent, but I cant find any info about getting ascent/descent fot individual glyph What exactly are you trying to accomplish? In

Re: Short-circuit evaluation

2009-06-23 Thread Andy Lee
On Tuesday, June 23, 2009, at 11:14AM, "Kyle Sluder" wrote: >There is no reason you can't do this: > >BOOL a = [foo bar]; >BOOL b = [baz quux]; >return a || b; And I would add a brief comment to each of the lines where you're relying on side effects, in case someone comes along later and is tem

Re: Problem: how to get glyph descent and ascent

2009-06-23 Thread Anders Lassen
Hi, I have read: TrueType Reference Manual: http://developer.apple.com/textfonts/TTRefMan/ FontHandling: http://developer.apple.com/documentation/Cocoa/Conceptual/FontHandling/FontHandling.pdf and About drawing text with Cocoa NSString and NSAtrributedString, etc. and "Introduction to Quart

Re: Realtime, GC and ObjC (Was Re: Opinion on managed memory and garbage collection)

2009-06-23 Thread Andrea Gozzi
On Jun 23, 2009, at 4:53 PM, Bill Bumgarner wrote: On Jun 23, 2009, at 1:39 AM, Chris Idou wrote: I haven't noticed GC pauses. It seems to me that the GC collects memory extremely quickly, relative to when it becomes unreachable. Given that it apparently does a lot of work in another thread,

Re: Problem: how to get glyph descent and ascent

2009-06-23 Thread I. Savant
On Jun 23, 2009, at 12:14 PM, Anders Lassen wrote: I need to know the descent and ascent for individual glyphs. I have looked in several document sets -- both cocoa and carbon, but I did not have any luck. Hope someone can help, What specific documentation did you read? What did you not

Problem: how to get glyph descent and ascent

2009-06-23 Thread Anders Lassen
Hi, I need to know the descent and ascent for individual glyphs. I have looked in several document sets -- both cocoa and carbon, but I did not have any luck. Hope someone can help, Anders Lassen ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.

Re: Amount of Arguments per Method

2009-06-23 Thread WT
On Jun 23, 2009, at 4:57 PM, mmalc Crawford wrote: On Jun 23, 2009, at 4:05 AM, WT wrote: Why is it so baffling? The question is not wanting something to be changed, but wanting *bad enough* to have something changed. Because, as has been stated so often, posting messages to a list will n

Re: Netscape Plugin error

2009-06-23 Thread Michael Ash
On Tue, Jun 23, 2009 at 7:37 AM, Reza Farhad wrote: > > Dear All > > I am not sure if this is right place for this, however: > In my application when I try to load a certain web pages into a Webview I > get the following error: > > > #0      0x9096d9b7 in Debugger > #1      0x13de47f5 in .objc_clas

Re: Short-circuit evaluation

2009-06-23 Thread Kai Brüning
On 23.6.2009, at 17:14, Kyle Sluder wrote: On Tue, Jun 23, 2009 at 7:47 AM, Graham Cox wrote: I'd like to if I could - unfortunately in this case the method in question is -validateMenuItem: which is designed to have intentional side- effects, like setting the item's state or title, as well

Re: Debugging NSService

2009-06-23 Thread Laurent Cerveau
I realize I did not provide a lot of information. So the Plist of my apps looks like : NSServices NSMenuItem default EnclickTo

How to disable selection on Mouse down for NSOutlineView?

2009-06-23 Thread Arun
Hi All, I have an application in which i use NSOutlineView Control. I need to disable selection of leaf nodes when the mouse is down and select onlt on mouse up. How can i do this? Thanks Arun KA ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: Problem with NSValueTransformer, NSTableView and NSAttributedString

2009-06-23 Thread Jim Correia
On Jun 23, 2009, at 11:06 AM, Kyle Sluder wrote: On Tue, Jun 23, 2009 at 6:53 AM, Jim Correia wrote: On Jun 23, 2009, at 1:35 AM, Kyle Sluder wrote: I do not see where you're finding this. The bindings documentation says: "The object should be suitable for the passing to setObjectValue." Ma

Re: Short-circuit evaluation

2009-06-23 Thread Kyle Sluder
On Tue, Jun 23, 2009 at 7:47 AM, Graham Cox wrote: > I'd like to if I could - unfortunately in this case the method in question > is -validateMenuItem: which is designed to have intentional side-effects, > like setting the item's state or title, as well as returning a boolean value > for the enable

Re: Problem with NSValueTransformer, NSTableView and NSAttributedString

2009-06-23 Thread Kyle Sluder
On Tue, Jun 23, 2009 at 6:53 AM, Jim Correia wrote: > On Jun 23, 2009, at 1:35 AM, Kyle Sluder wrote: >> I do not see where you're finding this.  The bindings documentation >> says: "The object should be suitable for the passing to >> setObjectValue."  Maybe it's in the conceptual docs? > > In the

Re: Amount of Arguments per Method

2009-06-23 Thread mmalc Crawford
On Jun 23, 2009, at 4:05 AM, WT wrote: Why is it so baffling? The question is not wanting something to be changed, but wanting *bad enough* to have something changed. Because, as has been stated so often, posting messages to a list will not cause any change. If you complain about something

Re: Service not working

2009-06-23 Thread Guillem Palou
Hi all, I've just solved the problem! Thanks for the answers! On Jun 22, 2009, at 11:37 PM, Guillem Palou wrote: Hi folks, I'm trying to develop an application that acts as a service, but I cannot make it appear on the Services Menu and I cannot execute it on the applications. I tried to

Realtime, GC and ObjC (Was Re: Opinion on managed memory and garbage collection)

2009-06-23 Thread Bill Bumgarner
On Jun 23, 2009, at 1:39 AM, Chris Idou wrote: I haven't noticed GC pauses. It seems to me that the GC collects memory extremely quickly, relative to when it becomes unreachable. Given that it apparently does a lot of work in another thread, I wouldn't expect there to be much pausing in "nor

Re: Amount of Arguments per Method

2009-06-23 Thread Sean McBride
That can be better, but then you end up with 2x as many arguments, in a way: [NSDictionary dictionaryWithObjectsAndKeys: ob1, key1, ob2, key2, ... etc. On 6/22/09 7:10 AM, Jack Carbaugh said: >With that many arguments, i'd make a dictionary and pass only that >dictionary. I understand y

Re: Short-circuit evaluation

2009-06-23 Thread Graham Cox
On 24/06/2009, at 12:24 AM, Michael Ash wrote: If both expressions must be evaluated, then store them into separate variables before combining them. Or better yet, if possible, redesign your code so that it does not require side effects of boolean expressions to happen in the first place. I'

Re: What is the best way to store some kind of identifying string in an interface builder object?

2009-06-23 Thread Sean McBride
On 6/18/09 2:52 PM, Greg Guerin said: >Chilton Webb wrote: > >> Is there a way to add a tag an IB object in such a way that it is >> not visible to the user, but in such a way that I could reference >> it from my app? > > >Maybe the -tag method: it returns a 32-bit integer.. It's settable >in IB

Debugging NSService

2009-06-23 Thread Laurent Cerveau
Hi I want to add a service to my application. So I created the service entry in the plist, implemented the methods with proper signature, register the service at Application Did Finish launching time but unfortunately I never see my service appearing in the Services menu (after login and

Re: Short-circuit evaluation

2009-06-23 Thread Michael Ash
On Tue, Jun 23, 2009 at 8:16 AM, Graham Cox wrote: > > On 23/06/2009, at 10:03 PM, Igor Mozolevsky wrote: > >> BOOL someValue = [object returnsBool] | [anotherObject alsoReturnsBool]; >> >> which is a bitwise OR of two YESes, essentially. > > > OK, makes sense... and since ||= is not valid, there s

Re: Beginner Question Re: Memory Management

2009-06-23 Thread Michael Ash
On Tue, Jun 23, 2009 at 2:05 AM, WT wrote: > On Jun 23, 2009, at 7:37 AM, Eric Hermanson wrote: > >> UNFORTUNATELY, the iPhone Simulator does not support instance variable >> synthesis (at least it didn't in 2.x, maybe that changed in 3.0). > > I just tested that in the 3.0 simulator and it does NO

Re: Beginner Question Re: Memory Management

2009-06-23 Thread Michael Ash
On Tue, Jun 23, 2009 at 12:31 AM, WT wrote: > What the heck??? > > So, after I scratched my head silly for several minutes, it suddenly came to > me. If I'm going to use a property, I *must* refer to it as object.property > rather than simply as property. In the specific example I had, I should not

Re: Opinion on managed memory and garbage collection

2009-06-23 Thread Michael Ash
On Tue, Jun 23, 2009 at 2:09 AM, Quincey Morris wrote: > On Jun 22, 2009, at 21:21, Michael Ash wrote: > >> IMO there are three major reasons to avoid GC at this point: > > Your reasons are clearly stated, rational, compelling ... and almost > *entirely* anecdotal. That means what you say is a pers

Re: Problem with NSValueTransformer, NSTableView and NSAttributedString

2009-06-23 Thread Jim Correia
On Jun 23, 2009, at 1:35 AM, Kyle Sluder wrote: On Mon, Jun 22, 2009 at 9:12 PM, Jim Correia wrote: The documentation for the value binding of NSTableView says that NSString and NSNumber are the supported value types. I do not see where you're finding this. The bindings documentation says

Re: Short-circuit evaluation

2009-06-23 Thread Graham Cox
On 23/06/2009, at 10:03 PM, Igor Mozolevsky wrote: BOOL someValue = [object returnsBool] | [anotherObject alsoReturnsBool]; which is a bitwise OR of two YESes, essentially. OK, makes sense... and since ||= is not valid, there should be no hidden gotcha with organising things this way.

Re: Short-circuit evaluation

2009-06-23 Thread Roland King
no. | is bitwise, not logical, || is the short-circuit one and there is no ||=. On Jun 23, 2009, at 7:56 PM, Graham Cox wrote: Just a quickie... If I have: BOOL someValue = [object returnsBool]; someValue |= [anotherObject alsoReturnsBool]; is the second line subject to short-circuit eva

Re: Short-circuit evaluation

2009-06-23 Thread Igor Mozolevsky
2009/6/23 Igor Mozolevsky : > 2009/6/23 Graham Cox : >> Just a quickie... >> >> If I have: >> >> BOOL someValue = [object returnsBool]; >> >> someValue |= [anotherObject alsoReturnsBool]; >> >> is the second line subject to short-circuit evaluation? In other words if >> the first method returns YES

Re: Short-circuit evaluation

2009-06-23 Thread Igor Mozolevsky
2009/6/23 Graham Cox : > Just a quickie... > > If I have: > > BOOL someValue = [object returnsBool]; > > someValue |= [anotherObject alsoReturnsBool]; > > is the second line subject to short-circuit evaluation? In other words if > the first method returns YES, is the second called? The second one

Short-circuit evaluation

2009-06-23 Thread Graham Cox
Just a quickie... If I have: BOOL someValue = [object returnsBool]; someValue |= [anotherObject alsoReturnsBool]; is the second line subject to short-circuit evaluation? In other words if the first method returns YES, is the second called? --Graham ___

Netscape Plugin error

2009-06-23 Thread Reza Farhad
Dear All I am not sure if this is right place for this, however: In my application when I try to load a certain web pages into a Webview I get the following error: #0 0x9096d9b7 in Debugger #1 0x13de47f5 in .objc_class_name_SwitchablePlugin #2 0x13de4aaf in NP_Initialize #3

Re: Warnings suggest compiler confusion between 32 and 64 bit code.

2009-06-23 Thread Brian Bruinewoud
Thanks to all the responses. -Wconversion made the warnings go away. Hopefully that wont come back and bite me later... On 23/06/2009, at 15:11 , Kyle Sluder wrote: On Mon, Jun 22, 2009 at 9:01 PM, Michael Ash wrote: I think you mean -Wshorten-64-to-32. -Wconversion warns you every time a f

Re: Amount of Arguments per Method

2009-06-23 Thread WT
On Jun 23, 2009, at 9:33 AM, mmalc Crawford wrote: On Jun 22, 2009, at 10:59 PM, WT wrote: Devpubs listens, and our delivery team (the folks that take the XML and output it to the various formats) ROCK. I am now leaning more and more towards filing a documentation enhancement request. T

Re: Beginner Question Re: Memory Management

2009-06-23 Thread Mike Abdullah
Note also that you should really be using -copy for string properties. It has the same effect as -retain, but also handles the possibility of someone handing in an NSMutableString. On 23 Jun 2009, at 06:15, Graham Cox wrote: On 23/06/2009, at 2:31 PM, WT wrote: [textFieldPreviousContent

*** -[NSBundle Load] : Error loading code

2009-06-23 Thread Arjun SM
Hi all, I am get the following error every time i run my application on Tiger 10.4.11 *** -[NSBundle Load] : Error loading code /Library/Application Support/appName.bundle/Contents/MacOS/appName for bundle /Library/Application Support/appName.bundle/Contents/MacOS/appName, error code 2 (link edit

Re: Service not working

2009-06-23 Thread Gregory Weston
Guillem Palou wrote: I'm trying to develop an application that acts as a service, but I cannot make it appear on the Services Menu and I cannot execute it on the applications. ... NSServices ... NSMenuItem

Re: Any Cocoa Developers on this list in Tallinn, Estonia?

2009-06-23 Thread John C. Randolph
On Jun 21, 2009, at 5:17 PM, Kok-Yong Tan wrote: There's a potential client there I'd like to refer to you. Please reply to me off-list. Don't know about Estonia, but the guys at Software MacKiev would probably know. -jcr ___ Cocoa-dev maili

  1   2   >