Re: Interface Builder .xib deployment/development targets

2009-09-14 Thread Graham Cox
On 15/09/2009, at 4:44 PM, Steve Cronin wrote: Reporting machine is MacBookPro5,1 - 10.5.8 Whoops, just realised you already answered my question. Maybe the logging got added in 10.5.(late)... ??? --Graham ___ Cocoa-dev mailing list (Cocoa

Re: Interface Builder .xib deployment/development targets

2009-09-14 Thread Graham Cox
On 15/09/2009, at 4:44 PM, Steve Cronin wrote: 15:01:38.292 XYZ[11756:20b] HIToolbox: ignoring exception '*** -[NSCFString substringToIndex:]: Range or index out of bounds' that raised inside Carbon event dispatch This is occurring just as nib is about to open a first window. I've not seen

Interface Builder .xib deployment/development targets

2009-09-14 Thread Steve Cronin
Folks; I have an app with a 10.4 Deployment target. I have recently begun using XC 3.2 and IB 3.2 - spp compiles cleanly and all IB 'sibling' issues have been resolved. I've gotten a field report (release) where I'm seeing: 15:01:38.292 XYZ[11756:20b] HIToolbox: ignoring exception '*** -[NS

Re: NSPopUpButton breaks in Snow Leopard

2009-09-14 Thread ALEXander
Hi, actually, I used the binding to the "Content" fields of NSPopUpButton because the possible selection that has to be displayed in the PopUp changes dynamically. Otherwise I could just have set the menu in IB. I put a breakpoint on controlTypes and it does return an NSArray filled with

Re: sprintf and 64-bit integers

2009-09-14 Thread Andrew Farmer
On 14 Sep 2009, at 11:48, Sean McBride wrote: 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-p

Re: NSOperation and lazy loading

2009-09-14 Thread Roland King
Christopher Drum wrote: A recurring theme in Cocoa development is that of "being lazy" and of "lazy loading" and the like. Given this Cocoa development pattern, I am having a difficult time understanding the architecture of the following scenario. 1. We have a "Person" object which will

Re: NSOperation and lazy loading

2009-09-14 Thread Graham Cox
On 15/09/2009, at 2:18 PM, Christopher Drum wrote: So what is the recommended architecture for the original requester to remain interested in receiving the image when it finally finishes loading? I believe I need the requesting object to register for a notification of some sort, which mean

Re: NSOperation and lazy loading

2009-09-14 Thread Kyle Sluder
Make your Person class KVO-compliant for the image property. If the object has not yet downloaded and cached it's image, have its -image method return a generic placeholder image (or nil) and start a background fetch. When the download is complete, have it call - setImage: on the Person for

NSOperation and lazy loading

2009-09-14 Thread Christopher Drum
A recurring theme in Cocoa development is that of "being lazy" and of "lazy loading" and the like. Given this Cocoa development pattern, I am having a difficult time understanding the architecture of the following scenario. 1. We have a "Person" object which will fetch an image of said Pers

Re: How to implement to rename the file by single click its name column

2009-09-14 Thread Jens Alfke
On Sep 14, 2009, at 8:12 PM, James wrote: I can implement to play the file by double click its name column only. But I do not know how to implement to rename the file by single click its name column. Unfortunately this isn't one of the things NSTableView makes easy for you. If I recal

Re: Need -[NSTask waitUntilExitOrTimeout:] (was NSTask "Thread Unsafe"...)

2009-09-14 Thread Jens Alfke
On Sep 14, 2009, at 6:29 PM, Jerry Krinock wrote: Uh, yeah, it took me a while to track that one down. Apparently, running a run loop that is already running is not a good idea. That's not generally true; there's definitely code that does this. I've found that generally it helps to run th

How to implement to rename the file by single click its name column

2009-09-14 Thread James
Hi all, I have implemented to play the music file by double click its name in a table view using the setDoubleAction: method. Now, I am in trouble. I want to realize the result that similar to the "name" column in iTunes. Namely,it will play the music file if user double-clicks on th

Re: testing ppc on intel

2009-09-14 Thread Chris Idou
10.5.8. Now that I try, a new empty Cocoa app in XCode works. My app is just a one window Cocoa program that links with two frameworks (both of which are universal with ppc). arch -ppc works with /bin/cat, iTunes and so forth. Just not with my programs. I'm pretty sure I have no input managers,

Re: adding a page curl transition

2009-09-14 Thread Dave Keck
> (4) Now I perform the animated transition in the layer, using the second > screen shot as the target image. Is that necessary? Couldn't image1 be the current state of the window, and image2 just be a transparent image? If I'm picturing this correctly, image1 would curl away, to reveal the actual

Re: Shutdown/Restart computer

2009-09-14 Thread Nick Zitzmann
On Sep 14, 2009, at 6:59 PM, PCWiz wrote: How would I shut down and restart the computer using Objective-C code? Don't use the /sbin/shutdown command as previously recommended. That command will not give users the chance to save their work before the reboot/shutdown. Instead, send events

Need -[NSTask waitUntilExitOrTimeout:] (was NSTask "Thread Unsafe"...)

2009-09-14 Thread Jerry Krinock
The reason why I asked this is because I need: -[NSTask waitUntilExitOrTimeout:(NSTimeInterval)]. But there is no such method. So, I wrote a wrapper around NSTask that does this. On 2009 Sep 14, at 07:41, Adam R. Maxwell wrote: Ordinarily, I'd guess that it's supposed to mean that you c

Re: Shutdown/Restart computer

2009-09-14 Thread Kyle Sluder
On Sep 14, 2009, at 6:14 PM, vinai wrote: A call to the system command, like: system ("sudo /sbin/shutdown -h now'); Nononono. This is entirely the wrong way to do this. ESPECIALLY for privileged operations. Read the section Application Responsibilities in Logout Responsibilities in

Re: Help book content

2009-09-14 Thread Kyle Sluder
On Sep 14, 2009, at 6:14 PM, Matt Neuburg wrote: I didn't say it was. But it does work. :) All my help books are XHTML. m. Well if you're going to write XHTML, that makes sense. But using an XHTML validator on HTML is worse than not validating at all, because it can give you incorrect re

Re: adding a page curl transition

2009-09-14 Thread Matt Neuburg
On or about 9/14/09 5:53 PM, thus spake "Graham Cox" : > I'm not sure your interface will really make much sense to an end-user > (since it's uncommon and therefore unexpected behaviour) Well, it wasn't uncommon back on System 6 and 7 using HyperCard. :) m. -- matt neuburg, phd = m...@tidbits.c

Re: Shutdown/Restart computer

2009-09-14 Thread vinai
A call to the system command, like: system ("sudo /sbin/shutdown -h now'); You'd have to make sure your user is authenticated to use shutdown via sudo ... I'm not sure if there's a cleaner way specific to OS X. The above should work a reasonable portion of UNIX and UNIX-type systems. vina

Re: Help book content

2009-09-14 Thread Matt Neuburg
On or about 9/14/09 5:55 PM, thus spake "Kyle Sluder" : >> Always run your HTML thru a >> validator and if at all feasible use XHTML because it is even stricter and >> clearer. m. > > Don't do this. XHTML is not a strict subset of HTML. I didn't say it was. But it does work. :) All my help book

Re: adding a page curl transition

2009-09-14 Thread Matt Neuburg
On Mon, 14 Sep 2009 09:32:11 -0700, Matt Neuburg said: >For example, I can imagine something like this. Take a "screen shot" of the >window. Cover the whole window with a secondary window. Behind the secondary >window, move the primary window on to the next entity. Take a second "screen >shot" of

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

2009-09-14 Thread Rob Keniger
On 14/09/2009, at 1:41 PM, ziqian zhan wrote: When first time welcome.html is loaded into webView from -(void)awakeFromNib;, push the "change it" button on web page the -(NSString*)getName function is called. The "hello world" is replaced with "hi I'm here.". But when welcome.html loaded aga

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

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
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

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: 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: 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 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

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 <-

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

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

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: 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.

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

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

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

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

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

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

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

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

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 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: 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: 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: 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: 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

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: 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

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: 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 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: 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 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: 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: 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 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: 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

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: 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

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: 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: 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: 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 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 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: 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: 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: 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: 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: 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 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: 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

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: 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: 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: 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: 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: 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: 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.

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: 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

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: 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

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

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

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:[

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

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: 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: 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: 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

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

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

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: 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

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

  1   2   >