Re: Circular references

2009-09-14 Thread DKJ
For the archives: Joar's suggestion did the trick. Now it's all working just the way I want. Thanks to all those who thought about it. dkj On 2009-09-13, at 15:08 , Joar Wingfors wrote: Foo.h == @class Bar; // <- Forward declaration of the Bar class @interface Foo : NSObject {

Artur Zaiat/MOL/CEECIS/UNICEF is out of the office.

2009-09-14 Thread Artur Zaiat
I will be out of the office starting 09/11/2009 and will not return until 11/16/2009. I am in short term assignment in Geneva office from 12.04 – 11.05.2009 Oleg Panta will replace me during my absence. I can be reached anytime via my cell phone +37369148707__

Re: Mac Mini or iMac for Cocoa Development?

2009-09-14 Thread Rob Keniger
On 14/09/2009, at 1:48 PM, Graham Cox wrote: Compile time wise, don't worry about it. While compilation seems to have actually got slower over the years Except when nice new compilers come out. Switching to the Clang-LLVM compiler in Snow Leopard has cut my compile times pretty much in ha

Re: Mac Mini or iMac for Cocoa Development?

2009-09-14 Thread Kyle Sluder
On Sep 14, 2009, at 12:08 AM, Rob Keniger wrote: Except when nice new compilers come out. Switching to the Clang-LLVM compiler in Snow Leopard has cut my compile times pretty much in half. I highly recommend trying it out. Wish I could give it the same ringing endorsement, but we have bugs

Re: testing ppc on intel

2009-09-14 Thread Greg Guerin
Chris Idou wrote: Every program that I build universal but run on intel (OS 10.5) with "arch -ppc" option, crashes with a report like the following, and I've tested quite a few, even simple ones. How simple is simple? Hello world, or simpler? What about programs you didn't write, such as

Re: Developing a Stand-Alone Service in Snow Leopard

2009-09-14 Thread Steve Cronin
Folks To clarify my initial problem statement: If I recompile and then issue a "pbs" and then invoke the service it continues to execute an earlier instance of the service -- NOT the freshly compiled instance…. This is easy to prove A set of followup questions on STAND-ALONE services 1) Ho

Re: Adding an associated reference is memory expensive (was: Adding an observer is memory expensive)

2009-09-14 Thread Torsten Radtke
Hi Ken and Greg This is a bug in the associated reference machinery. That code keeps a C++ std::hash_map per augmented object, mapping associated keys to associated values. std::hash_map uses an std::vector internally, and the default hash_map constructor pre-allocates 100 entries for that

Re: Core Data Manual Migration

2009-09-14 Thread Yvan BARTHÉLEMY
After further research I determined that this problem occured because I didn't set the source type and destination type. I will fill a bug report about the message not containing enough information (by the way, I'm running 10.5.6 as this is my target platform, this might have been solved since that

NSTask launcing executable inside a bundle

2009-09-14 Thread Tomaž & Katja
I'm trying to run an executable from within an .app bundle's Contents/Resources folder (the executable is a standard command line utility) and I end up with "path not accessible" error. If I copy the executable outside the bundle, it works. I can launch the executable from terminal as expected. I a

Re: NSTask launcing executable inside a bundle

2009-09-14 Thread Dave Keck
The current recommendation is to store helper executables in the MacOS directory, rather than the Resources directory of your main bundle. That said, I'm unaware of any enforcement of this that would actually prevent you from executing it. How are you sure that the path is correct? Are you able to

Re: NSTask launcing executable inside a bundle

2009-09-14 Thread Dave Keck
> using NSTask, or something else? Woops, missed your subject line; NSTask, got it. But yes, I would see if you're able to read the executable as plain data, using NSData's dataWithContentsOfFile: to make sure the path is in fact accessible. ___ Cocoa-d

Re: NSTask launcing executable inside a bundle

2009-09-14 Thread Tom
Thanks. It works now. After tripple-checking I found the culprit - the good'ol'typo classic mistake... The error message was leading me to a different direction, so I didn't immediately found the error. Perhaps "path not found" instead of "path not accessible" would be better? Something to remember

How to observe every child entity

2009-09-14 Thread Matthew Lindfield Seager
I have a transient calculatedBalance property in my Account entity that is currently implemented as a read-only property returning: [self valueForKeyPath:@"transactio...@sum.amount"] This appears to work but I'd like observers of this property to be notified every time a transaction is added, modi

Re: Mac Mini or iMac for Cocoa Development?

2009-09-14 Thread Jonathan Hendry
On Sep 13, 2009, at 19:28 PM, Paul Bruneau wrote: The iMac is so much prettier plus can drive a second display. Refurb store = $999 or even sometimes $849 ones show up. The Mini can drive additional displays if you connect them through USB video adapters. They work quite well, although the

Newbie question - core data

2009-09-14 Thread Darren Wheatley
Hi, I'm learning Cocoa / Objective-C. Right now I'm trying to build a simple Core Data application. I've built a helper app to read in CSV and populate an XML core data store. That works fine. I have seen lots of examples of binding a view to core data entities so that the contents of t

Re: Mac Mini or iMac for Cocoa Development?

2009-09-14 Thread Gregory Weston
Graham Cox wrote: I am leaning towards iMacs, because these computers will serve as ambassadors as well as development machines; I want to double-check that if we have to go to Mac Minis, say with 4 GB of RAM, we won't be waiting forever to compile a simple program. iMac will probably be a be

Re: Newbie question - core data

2009-09-14 Thread Stamenkovic Florijan
Darren, On Sep 14, 2009, at 09:11, Darren Wheatley wrote: Hi, I'm learning Cocoa / Objective-C. Right now I'm trying to build a simple Core Data application. I've built a helper app to read in CSV and populate an XML core data store. That works fine. I have seen lots of examples of bin

Re: Mac Mini or iMac for Cocoa Development?

2009-09-14 Thread Graham Cox
On 14/09/2009, at 11:29 PM, Gregory Weston wrote: Funny. To me that's actually an argument in the mini's favor. Or, more broadly, it's extremely important that you actually test, early, on something comparable to the low-end of your supported configs. And since for a lot of small developer

NSTask is "Thread Unsafe". What does that mean?

2009-09-14 Thread Jerry Krinock
According to the Threading Programming Guide [1], NSTask is listed under "Thread Unsafe Classes", which is explained as: "The following classes and functions are generally not thread-safe. In most cases, you can use these classes from any thread as long as you use them from only one thread

coding NSNumber in NSArray?

2009-09-14 Thread jon
I thought i had read that NSNumber knew how to code itself in an NSArray... is this not the case? or is this code below just set up all wrong? and what would the proper way be to set this up? bookMarkNode's coders are below, this object has the one NSNumber, and two NSStrings wh

Re: Printing with Snow Leopard

2009-09-14 Thread Raleigh Ledet
On Sep 12, 2009, at 6:18 AM, Gerriet M. Denkmann wrote: Can you please log a bug on bugreporter.apple.com if you believe it is a bug in the Apple framework. Please include an isolated test case, if possible (that will greatly speed up investigation into the issue, especially if it is a rec

Re: coding NSNumber in NSArray?

2009-09-14 Thread Randall Meadows
On Sep 14, 2009, at 10:11 AM, jon wrote: I thought i had read that NSNumber knew how to code itself in an NSArray... is this not the case? or is this code below just set up all wrong? and what would the proper way be to set this up? bookMarkNode's coders are below, this object has the

Send POST to browser

2009-09-14 Thread Bartosz Białecki
___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com

Re: Scrolling NSScrollView by fractional amounts - why would values get rounded?

2009-09-14 Thread Piotr Grzybowski
Hullo Martin, maybe you should check: v0=[scrollviewfromNib verticalLineScroll]; v1=[otherscrollview verticalLineScroll]; where scrollviewfromNib and otherscrollview correspond to your two controls. then if (fabs(v0-v1)>=0.1) ;-) you know.. hope this helps, pg On Thu, Sep 10, 2009 at 4:01

Re: NSTextView resizeability and scrolling

2009-09-14 Thread Stamenkovic Florijan
On Sep 11, 2009, at 13:36, Ross Carter wrote: It looks like you instantiate the NSTextView in the nib. I would start by setting up the NSTextView manually and adding it as a subview to your FSEmbeddedTextView2 instance. Make sure that the textView has its resizing behavior set up correctly

singleton pattern in cocoa

2009-09-14 Thread Manuel Grau
Hi all, As I come from java world, I was trying to implement the singleton pattern, very usual in java. After searching in internet I found this code from wikipedia: @interface MySingleton : NSObject { } + (MySingleton *)sharedSingleton; @end @implementation MySingleton static MySingleto

NSPanel key equivalents not working

2009-09-14 Thread Andy Bettis
Having upgraded to Snow Leopard and Xcode 3.2 I did some work on an existing project, rebuilt it, and now the key equivalents for buttons on a drop-down sheet don't seem to be working. All looks fine in IB and the buttons work when clicked but the key equivalents (escape and return) aren't

Re: How to observe every child entity

2009-09-14 Thread Kyle Sluder
On Sep 14, 2009, at 5:09 AM, Matthew Lindfield Seager > wrote: I have a transient calculatedBalance property in my Account entity that is currently implemented as a read-only property returning: [self valueForKeyPath:@"transactio...@sum.amount"] This appears to work but I'd like observers of th

Re: NSPanel key equivalents not working

2009-09-14 Thread Andy Bettis
Hi, It appears that the problem is with NSDatePicker - if it's the first responder it 'eats' escape and return keystrokes, although doesn't seem to do anything with them. Seems like a bug but any practical workarounds would be appreciated. Rev. Andy Having upgraded to Snow Leopard and Xc

NSPopUpButton breaks in Snow Leopard

2009-09-14 Thread ALEXander
Hello, on Leopard I used the following construct for providing the items in an NSPopUpButton: 1) in the File's Owner class I defined a function returning an NSArray: - (NSArray*) controlTypes { if ([[self selectedControls] count]) { NSArray *returnArray = [NSArray arrayWithArray:[

Why the Cocoa function can't be called from JavaScript?

2009-09-14 Thread ziqian zhan
Hi all, I'm a newbie of JavaScript. Now I want to call Cooca function from JavaScript. Below is the code: //testcontroller.h #import #import @interface TestController : NSWindowController { IBOutlet NSButton * button; IBOutlet WebView * webView; } -(IBAction)loadPage:(id)sender; -(NSString*)get

Need Help : Iphone Dynamic behavior Tab Controller!

2009-09-14 Thread Waqas Qureshi
Hi all, I am developing an iphone application in which we need dynamic behaviour tab controller. Means in Home page have 6-tabs. When I clicked on any one of them then it will show it's own sub categories on tab controllers. Please help me to design the architecture of this dynamic behaviour tabs

Re: adding a page curl transition

2009-09-14 Thread Matt Neuburg
On Mon, 14 Sep 2009 13:57:32 +1000, Graham Cox said: > >On 14/09/2009, at 1:31 PM, Matt Neuburg wrote: > >> My question is simply this: what's the best strategy for >> implementing this? >> Unlike the Reducer tab view example, I don't have a view in advance >> representing the future state of the

Text Searching system...

2009-09-14 Thread Farooq zaman
Hi Everyone, I want to develop a text searching system for my application. This system should search for a search expressions in all files present is a particular project directory. Can anybody tell me what COCOA classes used for text searching? Any help would be highly appreciated, Faroo

Re: Subversion and Interface Builder

2009-09-14 Thread Luther Baker
+1 for Mercurial. I use it regularly with iPhone and Mac development and have never had a problem. http://mercurial.berkwood.com/ - scroll for the Mac version. -Luther On Fri, Sep 11, 2009 at 10:26 AM, Jens Alfke wrote: > > On Sep 11, 2009, at 1:10 AM, Alexander Hartner wrote: > > Thanks fo

Audio Unit problem in Snow Leopard

2009-09-14 Thread angel noguera camara
Hello, I was developing an Audio Unit Effect on Leopard with no problems, but I've updated my OS to Snow Leopard and now appears 1 error that says "SysError 0 during open of "AUResources.r". What can I do? If I comment the line "#include AUresources.r" I can build the project with no error but the

Re: NSCell setControlSize:NSSmallControlSize doesn't show change

2009-09-14 Thread Corbin Dunn
Setting the controlSize for an NSTextFieldCell doesn't do anything (as far as I know). You probably want to make the font size small to really see a change. Please log a bug requesting -setControlSize to do this for you automatically. I believe IB sets the font for you when this is changed

Re: CALayer renderInContext not rendering all sublayers

2009-09-14 Thread David Duncan
On Sep 13, 2009, at 2:10 PM, Christopher J Kemsley wrote: "CARecorder" is a class I made which spawns a thread and, at a regular interval, tells the given layer's "presentationLayer" to render in a local context, using the following code: [self.layer.presentationLayer renderInContext:self.

Re: singleton pattern in cocoa

2009-09-14 Thread Bryan Henry
This question usually gets asked at least a couple times a month. I suggest you look up the previous responses on CocoaBuilder (http://www.cocoabuilder.com/ ), which archives responses on this mailing list if you want an exhaustive response, since all solutions have been mentioned somewhere

Re: singleton pattern in cocoa

2009-09-14 Thread Dave DeLong
Singleton implementation is something that you see debated back and forth every now and then. People argue about the values over overriding -retain, -release, -autorelease, and so on. I really like Peter Hosey's analysis (and implementation) that he's posted on his blog: http://boredzo.o

Re: NSTask is "Thread Unsafe". What does that mean?

2009-09-14 Thread Adam R. Maxwell
On Sep 14, 2009, at 7:07 AM, Jerry Krinock wrote: According to the Threading Programming Guide [1], NSTask is listed under "Thread Unsafe Classes", which is explained as: "The following classes and functions are generally not thread-safe. In most cases, you can use these classes from any

Re: coding NSNumber in NSArray?

2009-09-14 Thread jon
I put this code in to retain after you said that, but there was no change in the outcome, still the array shows everything in order, except that the NSNumber comes out as garbage. I checked node1 to see if it was well defined, before and after putting it into the array, and it is.

Re: FreeTDS Cocoa Sample?

2009-09-14 Thread Grigutis, John A
On Aug 10, 2009, at 4:34 PM, Robert Mullen wrote: > I have scoured the archives and the web in general looking for a > sample XCode project that uses FreeTDS. Does anyone know where one can > be found or would anyone be kind enough to share some source code with > me? What I have done so far is to

Re: singleton pattern in cocoa

2009-09-14 Thread Christopher J Kemsley
About the only thing that I'd recommend is that the "static" be inside the +sharedSingleton method so that you aren't able to take the cheap- way-out and call that variable directly in other class methods before it's created. For the rest of it: it seems to follow Apple's patterns - for in

Re: singleton pattern in cocoa

2009-09-14 Thread Jean-Daniel Dupas
Definition of true singleton is generally discouraged and not really useful. See more info about it here: http://eschatologist.net/blog/?p=178 Le 10 sept. 2009 à 22:07, Manuel Grau a écrit : Hi all, As I come from java world, I was trying to implement the singleton pattern, very usual i

Re: Help book content

2009-09-14 Thread jonat...@mugginsoft.com
On 12 Sep 2009, at 14:31, Andy Bettis wrote: Hi, I'm trying to add a help book to one of my apps and am falling at what seems like the last hurdle. I've added a folder with the help files to my Resources group and added Help Book directory name, Help Book identifier and Help file to my I

Help book content

2009-09-14 Thread Andy Bettis
Hi, I'm trying to add a help book to one of my apps and am falling at what seems like the last hurdle. I've added a folder with the help files to my Resources group and added Help Book directory name, Help Book identifier and Help file to my Info.plist file. When I run the app I can choos

Re: How to display AboutBox window in Agent Application

2009-09-14 Thread cocoa learner
Thanks TONs n TONs Nathan.I was struggling for this solution. Regards Cocoa.learner On Mon, Sep 14, 2009 at 12:36 AM, Nathan Kinsinger < nkinsin...@brotherbard.com> wrote: > On Sep 12, 2009, at 10:02 PM, cocoa learner wrote: > > Hi All, >> I have created an Agent Application using key - Applica

Re: singleton pattern in cocoa

2009-09-14 Thread Alex Kac
Probably best to use Apple's example: http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaObjects/CocoaObjects.html#//apple_ref/doc/uid/TP40002974-CH4-SW32 I love Google, but I always prefer to look at Apple's docs first. I found the above by going to de

Re: coding NSNumber in NSArray?

2009-09-14 Thread Quincey Morris
On Sep 14, 2009, at 09:11, jon wrote: I thought i had read that NSNumber knew how to code itself in an NSArray... is this not the case? or is this code below just set up all wrong? and what would the proper way be to set this up? bookMarkNode's coders are below, this object has the one

Re: Text Searching system...

2009-09-14 Thread Jens Alfke
On Sep 11, 2009, at 4:47 AM, Farooq zaman wrote: I want to develop a text searching system for my application. This system should search for a search expressions in all files present is a particular project directory. Can anybody tell me what COCOA classes used for text searching? There

Re: coding NSNumber in NSArray?

2009-09-14 Thread Jens Alfke
On Sep 14, 2009, at 9:11 AM, jon wrote: I thought i had read that NSNumber knew how to code itself in an NSArray... is this not the case? or is this code below just set up all wrong? and what would the proper way be to set this up? The code looks OK to me. Have you single-stepped throug

Re: Need Help : Iphone Dynamic behavior Tab Controller!

2009-09-14 Thread Jens Alfke
On Sep 13, 2009, at 9:19 PM, Waqas Qureshi wrote: Please help me to design the architecture of this dynamic behaviour tabs ... That's really not an appropriate type of question to ask here. If you want someone to design an architecture for you, that's a consulting job and you should expe

Re: NSPopUpButton breaks in Snow Leopard

2009-09-14 Thread Quincey Morris
On Sep 13, 2009, at 15:11, ALEXander wrote: 1) in the File's Owner class I defined a function returning an NSArray: - (NSArray*) controlTypes { if ([[self selectedControls] count]) { NSArray *returnArray = [NSArray arrayWithArray:self selectedControls] objectAtIndex:0] configT

Re: Audio Unit problem in Snow Leopard

2009-09-14 Thread Stephen Blinkhorn
On 14 Sep 2009, at 10:33, angel noguera camara wrote: Hello, I was developing an Audio Unit Effect on Leopard with no problems, but I've updated my OS to Snow Leopard and now appears 1 error that says "SysError 0 during open of "AUResources.r". What can I do? If I comment the line "#include

Re: coding NSNumber in NSArray?

2009-09-14 Thread Jens Alfke
On Sep 14, 2009, at 10:17 AM, Quincey Morris wrote: Whatever your question is, the answer likely is: don't try to use 'encodeObject:forKey:' to encode NSNumber objects. Use one of the variants like "encodeInteger:forKey:" or "encodeInt32:forKey:" -- you need to tell the archiver which *kin

Re: Help book content

2009-09-14 Thread Kyle Sluder
You should try asking on the apple-help-authoring list. --Kyle Sluder ___ 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.

Re: coding NSNumber in NSArray?

2009-09-14 Thread Quincey Morris
On Sep 14, 2009, at 10:38, Jens Alfke wrote: That's not true. NSNumber implements NSCoding, so it's perfectly capable of archiving and unarchiving itself. It already knows internally what the number's representation is. It wasn't me talking, it was those damn typewriter-obsessed monkeys a

Re: Help book content

2009-09-14 Thread Matt Neuburg
On Sat, 12 Sep 2009 14:31:14 +0100, Andy Bettis said: >Hi, > >I'm trying to add a help book to one of my apps and am falling at what >seems like the last hurdle. I've added a folder with the help files to >my Resources group and added Help Book directory name, Help Book >identifier and Help file t

Re: How to determine if a PDFPage is image based? (A scanned page)

2009-09-14 Thread John Calhoun
On Sep 13, 2009, at 5:01 AM, DairyKnight wrote: Is there a way to determine if a PDFPage contains only a picture? You could see if NULL is returned for -[PDFPage string]. That sort of indirectly implies an image (or a blank page — or one perhaps with line art only ...). John Calhoun—

Re: Not receiving mouseDown/Up events in borderless window . . .

2009-09-14 Thread Michael A. Crawford
Ok. I went back and did some experimenting and it doesn't look good. First of all the ignoresMouseEvents property was already set to NO. Assuming I had some issue with intercepting mouse clicks at the NSWindow level when an NSView was present, I decided to implement support for event han

Re: sprintf and 64-bit integers

2009-09-14 Thread Sean McBride
On 9/13/09 12:01 PM, Jens Alfke said: >It would be best to convert all your sprintf calls to snprintf, which >is a safer equivalent that won't overflow the buffer. Yes, sprintf is pure evil. snprintf is less evil. Also, I recommend adding -fstack-protector -D_FORTIFY_SOURCE=2, they can help cat

Garbage collecting live threads

2009-09-14 Thread Edward Chan
Hi, How does the garbage collector react to live threads in which there are no references to it? For example, myclass { NSThread *mythread; } mythread = [[NSThread alloc] initWith]; [mythread start]; ... //mythread is still running its main method mythread = nil; Would mythread be considered

Re: coding NSNumber in NSArray?

2009-09-14 Thread Henry McGilton (Boulevardier)
On Sep 14, 2009, at 9:11 AM, jon wrote: I thought i had read that NSNumber knew how to code itself in an NSArray... is this not the case? or is this code below just set up all wrong? and what would the proper way be to set this up? bookMarkNode's coders are below, this object has the

Re: coding NSNumber in NSArray?

2009-09-14 Thread Jon
I don't quite understand why you don't see the word "NSNumber" in my code... when you said twice incorrectly that it doesn't involve an NSNumber nor why you don't see the word "NSArray" in my code. when you said again incorrectly you don't see an array being used? Nor why you d

Re: Garbage collecting live threads

2009-09-14 Thread Jens Alfke
On Sep 14, 2009, at 11:54 AM, Edward Chan wrote: Would mythread be considered garbage and be collected even though it hasn't finished running? If so, would it be cancelled first? Or would it just get killed? Threads aren't garbage collected; they're implemented at a lower level. (Or you

Re: coding NSNumber in NSArray?

2009-09-14 Thread Jens Alfke
On Sep 14, 2009, at 12:09 PM, Henry McGilton (Boulevardier) wrote: You're creating an auto-released NSNumber instance, and then releasing it.At a first guess, it's over-released . . . No. Look at the code more carefully. The -release call is on node1, which is a BookMarkNode object no

Re: coding NSNumber in NSArray?

2009-09-14 Thread Jens Alfke
On Sep 14, 2009, at 12:10 PM, Jon wrote: I don't quite understand why you don't see the word "NSNumber" in my code... when you said twice incorrectly that it doesn't involve an NSNumber nor why you don't see the word "NSArray" in my code. when you said again incorrectly you don't se

Re: Garbage collecting live threads

2009-09-14 Thread Edward Chan
thanks! On Mon, Sep 14, 2009 at 3:26 PM, Jens Alfke wrote: > > On Sep 14, 2009, at 11:54 AM, Edward Chan wrote: > > Would mythread be considered garbage and be collected even though it >> hasn't >> finished running? If so, would it be cancelled first? Or would it just get >> killed? >> > > Thre

Re: coding NSNumber in NSArray?

2009-09-14 Thread Kyle Sluder
On Mon, Sep 14, 2009 at 9:42 AM, jon wrote: > - (void)setTypeOfLeaf:(NSNumber*)flag > { >    if (!typeOfLeaf || ![typeOfLeaf isEqual:flag]) >        { >                [typeOfLeaf release]; >                typeOfLeaf = [flag retain]; >    } > } This is how how you should be implementing this set

Re: Help book content

2009-09-14 Thread Andy Bettis
Hi, Many thanks to all who replied, most especially Matt for your very helpful screencast. The main problem seemed to be that I'd added a 'help file' entry to my info.plist that was screwing things up. It seems like changes to the help book don't percolate through to Xcode very well, espe

Re: coding NSNumber in NSArray?

2009-09-14 Thread Quincey Morris
On Sep 14, 2009, at 12:10, Jon wrote: maybe you ought to look and see if you can see where those words are used, and how they are used... Well, sorry, wasn't trying to cause offense. BookMarkNode *node1 = [[BookMarkNode alloc] init]; [node1 setTypeOfLeaf:[NSN

Re: coding NSNumber in NSArray?

2009-09-14 Thread Jens Alfke
On Sep 14, 2009, at 12:33 PM, Kyle Sluder wrote: This is how how you should be implementing this setter. In particular, the !typeOfLeaf condition shouldn't be there. Why not? It looks harmless. I think there are nearly as many favorite ways to write accessor methods as there are Cocoa pro

authorization services

2009-09-14 Thread Mark Thomas
Hi ALL, I was wondering if anybody could tell me if it's correct to use authorizationExecuteWithPrivileges and wait() calls together, so the parent process wait's until that new child process finishes. Googling seems to imply this from the examples I've seen. However reading the documentat

Re: authorization services

2009-09-14 Thread Todd Heberlein
On Sep 14, 2009, at 12:57 PM, Mark Thomas wrote: I was wondering if anybody could tell me if it's correct to use authorizationExecuteWithPrivileges and wait() calls together, so the parent process wait's until that new child process finishes. Googling seems to imply this from the examples

Re: authorization services

2009-09-14 Thread Nick Zitzmann
On Sep 14, 2009, at 1:57 PM, Mark Thomas wrote: I was wondering if anybody could tell me if it's correct to use authorizationExecuteWithPrivileges and wait() calls together, so the parent process wait's until that new child process finishes. Googling seems to imply this from the examples I

Re: coding NSNumber in NSArray?

2009-09-14 Thread Kyle Sluder
On Mon, Sep 14, 2009 at 12:45 PM, Jens Alfke wrote: > Why not? It looks harmless. Eh, you're right. I had misread the condition. I've never been a fan of IF NOT A OR NOT B THEN C… I've preferred IF NOT (A AND B) THEN C. Obviously the former form is more confusing to me. :) But we still need t

Re: Mac Mini or iMac for Cocoa Development?

2009-09-14 Thread Gregory Weston
On Sep 14, 2009, at 9:39 AM, Graham Cox wrote: On 14/09/2009, at 11:29 PM, Gregory Weston wrote: Funny. To me that's actually an argument in the mini's favor. Or, more broadly, it's extremely important that you actually test, early, on something comparable to the low-end of your supported

Re: NSPopUpButton breaks in Snow Leopard

2009-09-14 Thread ALEXander
Hello, please excuse the lousy error description. I must have been in a mood. What does not work is that no menu items are displayed. The function correctly returns an NSArray containing NSStrings. But despite of the bindings the menu is always empty. What do you mean by KVO compliant? I already

Re: coding NSNumber in NSArray?

2009-09-14 Thread jon
here is what is in typeOfLeaf. Jon. // --- - (NSNumber*)typeOfLeaf { return typeOfLeaf; } On Sep 14, 2009, at 2:21 PM, Kyle Sluder wrote: But we still need to see -typeOfLeaf to make sure it's doing the

Re: NSPopUpButton breaks in Snow Leopard

2009-09-14 Thread Quincey Morris
On Sep 14, 2009, at 14:07, ALEXander wrote: What do you mean by KVO compliant? I already have added a setControlTypes function, this was not necessary in Leopard and also does not fix the bug in Snow Leopard. On Sep 13, 2009, at 15:11, ALEXander wrote: 1) in the File's Owner class I defined

Custom Fonts in UI Webview

2009-09-14 Thread Ben Lachman
Hey all. I was looking at the NYTimes iPhone app today and noticing that it looks like they're using a UIWebView with a custom font (not sure what font though, anyone know?). I did some digging on how to do this and couldn't come up with anything except one bit about @font-face being dep

Matching braces and [NSTextView selectionRangeForProposedRange:granularity:];

2009-09-14 Thread Iceberg-Dev
I'm currently trying to match braces in a text editor and intend to use selectionRangeForProposedRange:granularity: for that. While I don't see any problem in finding the matching brace, I'm a bit surprised by the way this method is called repeatedly. So far, I don't see a good way to tell

Re: Custom Fonts in UI Webview

2009-09-14 Thread Jens Alfke
On Sep 14, 2009, at 2:43 PM, Ben Lachman wrote: I was looking at the NYTimes iPhone app today and noticing that it looks like they're using a UIWebView with a custom font (not sure what font though, anyone know?). I did some digging on how to do this and couldn't come up with anything exc

Re: Mac Mini or iMac for Cocoa Development?

2009-09-14 Thread Mark Allan
On 14 Sep 2009, at 1:59 pm, Jonathan Hendry wrote: On Sep 13, 2009, at 19:28 PM, Paul Bruneau wrote: The iMac is so much prettier plus can drive a second display. Refurb store = $999 or even sometimes $849 ones show up. The Mini can drive additional displays if you connect them through USB

NSPathControl not displaying icons initially

2009-09-14 Thread Markus Spoettl
I'm using an NSPathControl which is bound to the window controller's path property. The path control uses NSPathStylePopUp as style (statically set up in IB). The setup works correctly except that the path control does not display any directory icons initially. The icons are also missing fr

XCode Developer issue. Debugger errors since upgrading to Snow Leopard: unable to read unknown load command 0x80000022

2009-09-14 Thread maxwellmac99
Hi Folks, running XCode in debug mode shows this error countless times in the debug console: unable to read unknown load command 0x8022 I've started seeing this since upgrading to SL. Anyone else spotted it? Cheers, Max ___ Cocoa-dev mailing l

Overriding managedObjectContext for a new Persistent Document

2009-09-14 Thread Carol Clark
I'm trying to override managedObjectContext in my NSPersistentDocument subclass. My document does some work in its init methods (it's modeled on the NSPersistentDocument Core Data Tutorial), so my managedObjectContext method is invoked at init time. If I understand correctly, creating a NSM

Re: NSPathControl not displaying icons initially

2009-09-14 Thread Quincey Morris
On Sep 14, 2009, at 15:14, Markus Spoettl wrote: [myPathControl setURL:[NSURL URLWithString:NSHomeDirectory()]]; Try: [myPathControl setURL:[NSURL fileURLWithPath:NSHomeDirectory()]]; IIRC, the path control needs to know that the URL is a file URL.

Re: NSPathControl not displaying icons initially

2009-09-14 Thread Markus Spoettl
On Sep 15, 2009, at 12:32 AM, Quincey Morris wrote: Try: [myPathControl setURL:[NSURL fileURLWithPath:NSHomeDirectory()]]; IIRC, the path control needs to know that the URL is a file URL. Yes, exactly. I figured this out a few seconds too late. Sorry for the noise and thanks for he

Re: How to observe every child entity

2009-09-14 Thread Matthew Lindfield Seager
2009/9/15 Kyle Sluder : > If the only reason you want this is so that observers of calculatedBalance > are notified when transactions changes (and therefore calculatedBalance), > implement -keyPathsAffectingCalculatedBalance: to return a set that includes > @"transactions". That was my original i

Filtering a table view using NSSearchField

2009-09-14 Thread PCWiz
Hi, I'm trying to filter a NSTableView using the contents of an NSSearchField. I have an Array Controller and table columns bound to key paths in the array controller. So for example I have the table column for name is bound to Array Controller.arrangedObjects.name. Everything up to this

NSNumber bound to NSTextField

2009-09-14 Thread Todd Heberlein
I am trying to understand the behavior of an NSNumber bound to an NSTextField. It seems that an NSNumber isn't always and NSNumber. -- SET UP I have a class with an NSNumber* bound to an NSTextField via an Object Controller NSNumber* <---> NSObjectController <-

Re: Help book content

2009-09-14 Thread Matt Neuburg
On Mon, 14 Sep 2009 20:39:30 +0100, Andy Bettis said: >Hi, > >Many thanks to all who replied, most especially Matt for your very >helpful screencast. Ye! :) >It seems like changes to the help book don't percolate through to >Xcode very well, especially in debug builds. Yeah, this is a major

Re: adding a page curl transition

2009-09-14 Thread Graham Cox
Sorry, I hadn't read your message carefully. But you say "this must be such a common thing to do..." then go on to describe an interface so uncommon I don't think I've ever seen anything like it! Essentially the Page Curl transition is just a time-based image processing operation, so yes, y

Re: Help book content

2009-09-14 Thread Kyle Sluder
On Mon, Sep 14, 2009 at 5:44 PM, Matt Neuburg wrote: > I'm surprised it *ever* works since that is not HTML. You need to say href="presets.html"> (notice the quotes). This is not true, but it is a good idea: http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.2 > Always run your HTML thru a > v

Re: Help book content

2009-09-14 Thread Graham Cox
On 12/09/2009, at 11:31 PM, Andy Bettis wrote: Any help (sic) would be most appreciated. Have you run the content through the HelpIndexer utility? --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin request

Re: NSNumber bound to NSTextField

2009-09-14 Thread Quincey Morris
On Sep 14, 2009, at 17:17, Todd Heberlein wrote: (1) Why does [myNum isMemberOfClass:[NSNumber class]] return NO when I explicitly did an [NSNumber alloc]? (2) [myNum isKindOfClass:[NSNumber class]] returns YES, so what type of subclasses are there to NSNumber? (3) After changing the v

Shutdown/Restart computer

2009-09-14 Thread PCWiz
How would I shut down and restart the computer using Objective-C code? Thanks ___ 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)lis

Re: NSNumber bound to NSTextField

2009-09-14 Thread Quincey Morris
Sorry, today appears to Trip Over Your Own Tongue day for some of us. Slight corrections: On Sep 14, 2009, at 17:59, Quincey Morris wrote: [NSNumber alloc] always returns a subclass. It's actually an implementation detail what [NSNumber alloc] returns. It might be some kind of placeholder

  1   2   >