Re: JDBC Frameworks?

2008-07-11 Thread Nick Zitzmann
On Jul 10, 2008, at 9:21 PM, Tom Jones wrote: Hmm, this is really a shame. I guess I was just looking for a good framework to use to connect to a database. I think this is a big hole that Apple should really fill. It would be really cool if we could connect to other databases rather than j

Re: garbage collection and NSConnection

2008-07-11 Thread Marcel Weiher
There are several ways to share the implementation: 1. Do nothing, CF and Foundation already do it for most of their objects (and they share their implementation...probably unreasonably...) This, obviously, doesn't work for your own classes. But a lot of the objects you will use

Re: Storing structured data in file - any easy way?

2008-07-11 Thread Jules Colding
On 11/07/2008, at 01.28, Chris Hanson wrote: On Jul 10, 2008, at 6:09 AM, Jules Colding wrote: I'm trying to figure out how to write and read structured data to a specific file. I have a very bad feeling that the answer is Core Data, but I'm feeling totally at lost after having been readin

Re: Setting DPI of image data

2008-07-11 Thread Marcel Weiher
On Jul 10, 2008, at 20:16 , Graham Cox wrote: I'm using NSBitMapImageRep's -representationUsingType:properties: method to convert data to JPEG, TIFF, etc. I'd like to be able to specify the DPI of the image. I can calculate the right number of pixels needed for a given DPI OK, but the imag

Re: Setting DPI of image data

2008-07-11 Thread Heinrich Giesen
On 11.07.2008, at 05:37, Graham Cox wrote: I'm using NSBitMapImageRep's -representationUsingType:properties: method to convert data to JPEG, TIFF, etc. I'd like to be able to specify the DPI of the image. I can calculate the right number of pixels needed for a given DPI OK, but the image always

Re: How do I copy a view?

2008-07-11 Thread Mike Abdullah
Well assuming this so-called "UIButton" is a view class of your own creation, why are you using NSArchiver but then NSKeyedUnarchiver (keyed is recommended for all modern apps). The more common Cocoa approach is not to "copy" the view, but instead have it in its own dedicated nib where you

NSImage Crash

2008-07-11 Thread parag vibhute
Hi all, Following is the statement in my code NSImage *img = [[[NSImage alloc] initWithContentsOfFile:[[NSBundle bundleForClass:[self class]] pathForImageResource:@"testicon"]] autorelease]; Here testicon is Apple Icon Image file i.e. its extension is .icns This application was running fine f

Re: Calling autorelease on CFAllocated objects?

2008-07-11 Thread Ken Ferry
One caveat: If you're writing code that needs to function with garbage collection on, CFRelease and -release are not equivalent. See http://developer.apple.com/documentation/Cocoa/Conceptual/GarbageCollection/Articles/gcCoreFoundation.html for details, but the form thats safe for both gc and non-

Re: JDBC Frameworks?

2008-07-11 Thread Jonathan Monroe
On Jul 11, 2008, at 9:39 AM, Nick Zitzmann wrote: Hmm, this is really a shame. I guess I was just looking for a good framework to use to connect to a database. I think this is a big hole that Apple should really fill. It would be really cool if we could connect to other databases rather than ju

Re: NSImage Crash

2008-07-11 Thread Mike Abdullah
Core Foundation is crashing trying to read in a bundle's info.plist. I've seen this happen with our own app a few times but am yet to track it down. Presumably, some bundle somewhere has a corrupted info.plist file. Even so, if you can find the culprit, it should not be crashing Core Founda

Learning How to Program in Objective-C

2008-07-11 Thread sica203
Hello forum, This is my very first post and will get right to the point. First, I have no programming experience at all. I want to learn how to program using Xcode. I'd like to do it at home self paced and I also understand that this is going to be a very long journey and I'm ready for it. So,

RE: Learning How to Program in Objective-C

2008-07-11 Thread Luca Ciciriello
Hi. You are right. If you have no programming experienced at all, yours will be a very long journey. Anyway you can start with a good tutorial in OOP (object oriented programming) and then start to learn some basis of Objective-C and COCOA framework. Yes, Xcode 2.5 on 10.4.11 (2.5 is the last

Re: Learning How to Program in Objective-C

2008-07-11 Thread Jon Buys
I'm in the same boat. The best thing I can recommend is to buy the Cocoa Programming book by Hillegass: http://www.amazon.com/exec/obidos/ASIN/0321503619/bignerdranch-20 I'm halfway through, working on the chapter 18 challenge. Between that book, Apple's developer web site, and this mailling lis

Re: Learning How to Program in Objective-C

2008-07-11 Thread Toporek, Chuck
You might also look for a CocoaHeads group near you (http://www.cocoaheads.org), and start combing through blogs of other Mac developers (see http://www.cocoablogs.com/). Chuck On 7/11/08 9:30 AM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello forum, > This is my very first post and wil

Re: Learning How to Program in Objective-C

2008-07-11 Thread Joe Kavanagh
Hi, I understand where you're coming from having just come down this road not to recently myself... The path I took was Learn C -> Obj-C -> Cocoa. It worked really well because it went from the most basic to the more advanced starting at quite a low level. The C tutorial I used was htt

Re: Learning How to Program in Objective-C

2008-07-11 Thread mmalc Crawford
On Jul 11, 2008, at 6:54 AM, Jon Buys wrote: The best thing I can recommend is to buy the Cocoa Programming book by Hillegass: http://www.amazon.com/exec/obidos/ASIN/0321503619/bignerdranch-20 If you have no programming experience, this is probably too advanced a starting point. Start with

NSSpeechSynthesizer lifetime and garbage collected (GC) applications

2008-07-11 Thread Sean McBride
Hi all, The following works just fine in non-GC apps when called in an IBAction method: NSSpeechSynthesizer* speechSynthesizer = [[[NSSpeechSynthesizer alloc] init] autorelease]; [speechSynthesizer startSpeakingString: @"Hello. I'm Macintosh. It sure is great to get out of

Re: Learning How to Program in Objective-C

2008-07-11 Thread Jason Coco
Also, if you do choose to get Hillegass's book, keep in mind that the current edition (3rd Edition) is for Xcode 3.x/Obj-C 2.0... so if you're sticking to 2.5, I suggest trying to find a copy of the 2nd edition somewhere. If you print out the Obj-C 2.0 reference as was suggested, note that

Re: Learning How to Program in Objective-C

2008-07-11 Thread mmalc crawford
On Jul 11, 2008, at 7:16 AM, Joe Kavanagh wrote: Then I echo the recommendation for Aaron Hillegass's Cocoa Programming and as an added recommendation -- grab the ADC doc "The Objective-C 2.0 Programming Langauge" and print a copy (I recommend getting it spiral bound). While learning it's

Re: Learning How to Program in Objective-C

2008-07-11 Thread Dave DeLong
The BYU CocoaHeads group is actively collecting links to just about every Cocoa related resource we can find. We have several pages to browse through: http://cocoaheads.byu.edu/resources Cheers, Dave DeLong On Fri, Jul 11, 2008 at 8:00 AM, Toporek, Chuck <[EMAIL PROTECTED]> wrote: > You might

Re: Any good advice for naming parameters of init methods?

2008-07-11 Thread Kai
On 11.7.2008, at 04:59, William Xu wrote: Jens Alfke <[EMAIL PROTECTED]> writes: With any naming convention, the possible problem is a conflict with a name in a superclass. Apple's Cocoa frameworks tend to use a "_" prefix for both ivars and private method names. How about using "_" as

Trashing files and undo

2008-07-11 Thread Ruotger Skupin
Hi, my app trashes files with -[NSWorkspace performFileOperation:source:destination:files:tag:] and NSWorkspaceRecycleOperation. This works flawlessly but users want undo. NSWorkspace does not seem to allow undoing said file operation (or any file operation for that matter). Correct me if

RE: Trashing files and undo

2008-07-11 Thread Abernathy, Joshua
~/.Trash? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] ] On Behalf Of Ruotger Skupin Sent: Friday, July 11, 2008 10:39 AM To: Cocoa-dev@lists.apple.com Subject: Trashing files and undo Hi, my app trashes files with -[NSWorkspace performFileOperation:source:desti

Re: Trashing files and undo

2008-07-11 Thread Michael Watson
Note that if a file is on a secondary volume, and you move the file to the Trash, it doesn't get moved to ~/.Trash; you'll find it in the .Trashes directory on the root of the volume on which it resides. -- m-s On 11 Jul, 2008, at 10:42, Abernathy, Joshua wrote: ~/.Trash? -Original M

Re: Setting DPI of image data

2008-07-11 Thread Graham Cox
Thanks, that was the step I'd missed (sort of obvious in hindsight!). Thanks also to Marcel who pointed out the same thing. Graham On 11 Jul 2008, at 7:13 pm, Heinrich Giesen wrote: If you create image data of Type jpeg, tiff, png, etc from a sourceRep (NSBitMapImageRep) with -representatio

Re: Learning How to Program in Objective-C

2008-07-11 Thread Toporek, Chuck
Thanks, mmalc, It's worth noting that Kochan is updating his book to cover Objective-C 2.0. >From what I'm told, that book should come out in October, and the first bits should be available in Rough Cuts early- to mid-August (see http://safari.informit.com/roughcuts). Also, Fritz Anderson has com

Re: Learning How to Program in Objective-C

2008-07-11 Thread Sherm Pendley
On Fri, Jul 11, 2008 at 10:16 AM, Joe Kavanagh <[EMAIL PROTECTED]> wrote: > > grab the ADC doc "The Objective-C 2.0 > Programming Langauge" and print a copy (I recommend getting it spiral > bound). While learning it's a great reference to help refresh you when you > get stuck. It may also confuse

#define and #ifdef statements for different build configs

2008-07-11 Thread Carter R. Harrison
I have an app that uses different frameworks and method calls based upon the currently selected build configuration. How can I easily setup an #ifdef statement that will only execute if I've chosen the "Release" build configuraiton? Thanks in advance. ___

starting external program at runtime

2008-07-11 Thread Daniel Richman
Hi All, I want to start an application (it's bundled with my main app) in a specific case. It was previously installed to a known location (it's a helper app, so I put it in ~/Library/Application Support -- was that the right thing to do?), so is there any class I can call upon, or is the bes

RE: starting external program at runtime

2008-07-11 Thread Abernathy, Joshua
NSWorkspace can launch applications for you. Check out http://theocacao.com/document.page/183 and http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/ Classes/NSWorkspace_Class/Reference/Reference.html. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED

Re: starting external program at runtime

2008-07-11 Thread Jason Coco
If your helper application is a console app, however, you should keep it with your main application bundle and use NSTask to run it and interact with it. (By console app I simply mean something that doesn't interact directly with the user). On Jul 11, 2008, at 11:19 , Abernathy, Joshua wrot

Is there any way to show disclosure button always closed

2008-07-11 Thread Aman Alam
I am working on a project that needs the disclosure button of NSOutlineView always closed whether its row are expanded or not. Does anyone know that how to do that? Please tell me. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do n

Re: #define and #ifdef statements for different build configs

2008-07-11 Thread Sherm Pendley
On Fri, Jul 11, 2008 at 11:01 AM, Carter R. Harrison <[EMAIL PROTECTED]> wrote: > I have an app that uses different frameworks and method calls based upon the > currently selected build configuration. > > How can I easily setup an #ifdef statement that will only execute if I've > chosen the "Releas

RE: #define and #ifdef statements for different build configs

2008-07-11 Thread Andy Klepack
What I've always done is to have that block in code like #ifdef RELEASE { ... code ... } #endif and then, in the build configuration of either the project or target, I select the Release configuration and add the pre processor macro "RELEASE". I forget the setting name exactley, but it's along

Re: Trashing files and undo

2008-07-11 Thread Gregory Weston
Ruotger Skupin wrote: my app trashes files with -[NSWorkspace performFileOperation:source:destination:files:tag:] and NSWorkspaceRecycleOperation. This works flawlessly but users want undo. NSWorkspace does not seem to allow undoing said file operation (or any file operation for that matter)

Re: Trashing files and undo

2008-07-11 Thread glenn andreas
On Jul 11, 2008, at 10:44 AM, Gregory Weston wrote: Ruotger Skupin wrote: my app trashes files with -[NSWorkspace performFileOperation:source:destination:files:tag:] and NSWorkspaceRecycleOperation. This works flawlessly but users want undo. NSWorkspace does not seem to allow undoing said

Re: Trashing files and undo

2008-07-11 Thread Charles Srstka
On Jul 11, 2008, at 10:44 AM, Gregory Weston wrote: Drop-dead simple. FSFindFolder is your friend. Give it a volume reference number and tell it you're looking for the user's trash and it'll hand it back to you (creating it if necessary and you asked for that behavior). I think possibly a

Re: Trashing files and undo

2008-07-11 Thread Sean McBride
On 7/11/08 10:49 AM, glenn andreas said: > >On Jul 11, 2008, at 10:44 AM, Gregory Weston wrote: > >> Ruotger Skupin wrote: >> >>> my app trashes files with -[NSWorkspace >>> performFileOperation:source:destination:files:tag:] and >>> NSWorkspaceRecycleOperation. This works flawlessly but users wan

Re: NSOutlineView hiding a column while editing a row in another column

2008-07-11 Thread Corbin Dunn
On Jul 10, 2008, at 4:17 PM, Joan Lluch (casa) wrote: I have a NSOutlineView which I want to make several columns hidden in response to a user action. I have set up the outlineColumn to resize with table and the rest have fixed size, so that when one or more columns are hidden, the outline

Re: garbage collection and NSConnection

2008-07-11 Thread Michael Ash
On Fri, Jul 11, 2008 at 3:21 AM, Marcel Weiher <[EMAIL PROTECTED]> wrote: >> [not referring to scanning overhead] >> >> - Temporary objects get a 'release' at the end of their life, and >> usually an 'autorelease' at the beginning. > > The cost of a single refcounting op is negligible compared to t

Re: Trashing files and undo

2008-07-11 Thread Charles Srstka
On Jul 11, 2008, at 10:54 AM, Sean McBride wrote: Unless of course between trashing the file and trying to undo the trashing, a file of the same name as the trashed item is put in its old location. 1) that would cause the wrong alias resolution (since aliases resolve by path first) and 2) i

KVO notifications and threads

2008-07-11 Thread Jerry Isdale
I have an application whose data model (classes, shared Instances, etc) gets updated by various threads for calculations, network comms, etc. Some of the application's Views use binding and KVO. For example an NSTextField may get bound to SharedInstance.currentLattitude It the property get

CFBundleIdentifier & Application Version

2008-07-11 Thread Eric Gorr
Reading things like, http://developer.apple.com/qa/qa2004/qa1373.html which discuss CFBundleIdentifier, the example always given for what it should look like is of the form: com.mycompany.MyApp My question is, as different versions, of the same application, are released, it is a good i

RE: CFBundleIdentifier & Application Version

2008-07-11 Thread Gary L. Wade
It's really up to you and the kinds of changes that you expect to happen between each version. Having a single ID allows preferences to be mixed and matched if different versions of the product are used, but if you want to support the simultaneous use of last year's version and this year's vers

Re: CFBundleIdentifier & Application Version

2008-07-11 Thread Douglas Davidson
On Jul 11, 2008, at 9:40 AM, Eric Gorr wrote: My question is, as different versions, of the same application, are released, it is a good idea or recommended that the CFBundleIdentifier reflect the version of the application as well. For example, one might have: com.mycompany.MyApp2007 co

Re: Trashing files and undo

2008-07-11 Thread Gregory Weston
On Jul 11, 2008, at 11:49 AM, glenn andreas wrote: On Jul 11, 2008, at 10:44 AM, Gregory Weston wrote: Ruotger Skupin wrote: my app trashes files with -[NSWorkspace performFileOperation:source:destination:files:tag:] and NSWorkspaceRecycleOperation. This works flawlessly but users want u

Re: Mini Popup Window (Like iCal)

2008-07-11 Thread Jonathan Dann
On 10 Jul 2008, at 19:33, Seth Willits wrote: Has anyone created a custom window like the event info editor in iCal in 10.5? There's a few things I'm not sure how to do: 1) Drawing the window background gradient is pretty straightforward, but creating the thin border on the window is not

Re: CFBundleIdentifier & Application Version

2008-07-11 Thread Clark Cox
On Fri, Jul 11, 2008 at 9:40 AM, Eric Gorr <[EMAIL PROTECTED]> wrote: > Reading things like, > > http://developer.apple.com/qa/qa2004/qa1373.html > > which discuss CFBundleIdentifier, the example always given for what it > should look like is of the form: > > com.mycompany.MyApp > > > My question

Re: NSSpeechSynthesizer lifetime and garbage collected (GC) applications

2008-07-11 Thread Clark Cox
On Fri, Jul 11, 2008 at 7:20 AM, Sean McBride <[EMAIL PROTECTED]> wrote: > Hi all, > > The following works just fine in non-GC apps when called in an IBAction > method: > >NSSpeechSynthesizer* speechSynthesizer = >[[[NSSpeechSynthesizer alloc] init] autorelease]; >[speechSynthes

Re: Quick look preview multipage rich text

2008-07-11 Thread Philip Dow
That's right, I realized after posting the message that I should have boiled it down to the following: + (NSPrintOperation *)PDFOperationWithView:insideRect:toData:printInfo: This operation produces a single page of PDF no matter what print settings I pass in, one very long page. + (NSPri

Re: Learning How to Program in Objective-C

2008-07-11 Thread Rob Ross
It has been my experience that it's much easier to learn programming in a procedure language than an OO-language. I don't think this will ever really change, since OO is an abstraction built on top of a procedural foundation, which is closer to how a CPU actually executes a software progr

Re: garbage collection and NSConnection

2008-07-11 Thread Marcel Weiher
On Jul 11, 2008, at 8:59 , Michael Ash wrote: The cost of a single refcounting op is negligible compared to the cost of object allocation, so these two are quite irrelevant. A quick test of this claim would appear to disprove it. On my Mac Pro, an alloc/init/release cycle of NSObject costs

Re: KVO notifications and threads

2008-07-11 Thread Ken Thomases
On Jul 11, 2008, at 11:30 AM, Jerry Isdale wrote: I have an application whose data model (classes, shared Instances, etc) gets updated by various threads for calculations, network comms, etc. Some of the application's Views use binding and KVO. For example an NSTextField may get bound to S

Re: CFBundleIdentifier & Application Version

2008-07-11 Thread Eric Gorr
On Jul 11, 2008, at 1:01 PM, Douglas Davidson wrote: Remember that preferences and the like are keyed off of the bundle identifier, so changing it would give you some work to do in migrating older settings. I am focused on your phrase 'and the like'. Other then preferences, what else is k

Re: Trashing files and undo

2008-07-11 Thread Ken Thomases
On Jul 11, 2008, at 11:11 AM, Charles Srstka wrote: At any rate, if you do the resolution immediately after performing the trash operation, this should prevent this situation from happening in the first place. I don't know if this ever happens in practice, but in theory performFileOperati

Completely cleaning the Launch Services Database & handler's

2008-07-11 Thread Eric Gorr
So, occasionally, I need to clean out my Launch Services Database. Most of the work can be done by executing: lsregister -kill -r -domain local -domain system -domain user However, this leaves behind information such as: handler id:3160 extension: dtd options:

Re: KVO notifications and threads

2008-07-11 Thread Clark Cox
On Fri, Jul 11, 2008 at 9:30 AM, Jerry Isdale <[EMAIL PROTECTED]> wrote: > I have an application whose data model (classes, shared Instances, etc) gets > updated by various threads for calculations, network comms, etc. > Some of the application's Views use binding and KVO. For example an > NSTextF

Re: CFBundleIdentifier & Application Version

2008-07-11 Thread Douglas Davidson
On Jul 11, 2008, at 11:54 AM, Eric Gorr wrote: Other then preferences, what else is keyed off of the bundle identifier? So, just to be clear, would you generally consider it to be the case that a unique bundle identifier is intended to identify a unique application and not different vers

looking for some help

2008-07-11 Thread Gary Robertson
Hi everybody I'm very new to programming the mac & looking for some help also #1 I want to make the " about my app " window larger I cant seem to figure out where to do this #2 if i wanted a document with a image in the center basically a text document where the text would flow over an image.

Re: KVO notifications and threads

2008-07-11 Thread Jerry Isdale
So having mutiple CPUs and cores doesnt buy us much more than bragging rights, at least as far as KVO and UI goes. oh well. I like Clark Cox's suggestion for wrapping the set methods in a category that forces the actual set to occur on the MainThread note to Apple developers observing: it w

Re: CFBundleIdentifier & Application Version

2008-07-11 Thread Eric Gorr
On Jul 11, 2008, at 12:58 PM, Gary L. Wade wrote: It's really up to you and the kinds of changes that you expect to happen between each version. Having a single ID allows preferences to be mixed and matched if different versions of the product are used, but if you want to support the simul

Problem with undo in a secondary nib file

2008-07-11 Thread Vishnumoorthi bhat
Hello list, I have an application with two nib files. I have one text view each in both the nibs. The problem is, I can undo the text view in the Mainmenu.nib but can't undo in the text view in the second nib. What I'm missing here? Any help would be greatly appreciated. Thanks in advance, Vish

Re: KVO notifications and threads

2008-07-11 Thread Bill Bumgarner
On Jul 11, 2008, at 12:22 PM, Jerry Isdale wrote: So having mutiple CPUs and cores doesnt buy us much more than bragging rights, at least as far as KVO and UI goes. oh well. I like Clark Cox's suggestion for wrapping the set methods in a category that forces the actual set to occur on the Main

Re: garbage collection and NSConnection

2008-07-11 Thread Michael Ash
On Fri, Jul 11, 2008 at 2:17 PM, Marcel Weiher <[EMAIL PROTECTED]> wrote: > > On Jul 11, 2008, at 8:59 , Michael Ash wrote: > >>> The cost of a single refcounting op is negligible compared to the cost of >>> object allocation, so these two are quite irrelevant. >> >> A quick test of this claim woul

Re: looking for some help

2008-07-11 Thread I. Savant
> #1 I want to make the " about my app " window larger > I cant seem to figure out where to do this The about panel is a standard panel that can't be edited. There's an old archived tutorial at cocoadevcentral.com that shows how to create your own About panel (the "scrolling" panel, I believe)

Re: Why can't I name a property `tag'?

2008-07-11 Thread an0
It is just simple as you said. And it is cool just after I know what's on earthing happening there. Thanks a lot. On Fri, Jul 11, 2008 at 2:03 AM, Bill Bumgarner <[EMAIL PROTECTED]> wrote: > On Jul 10, 2008, at 8:55 AM, an0 wrote: >> >> Sure. >> I'm grateful that you tell me the internal truth ins

Re: Quick look preview multipage rich text

2008-07-11 Thread Julien Jalon
On Fri, Jul 11, 2008 at 8:00 PM, Philip Dow <[EMAIL PROTECTED]> wrote: > > That's right, I realized after posting the message that I should have > boiled it down to the following: > > + (NSPrintOperation *)PDFOperationWithView:insideRect:toData:printInfo: > This operation produces a single page of

Re: delegation strategy

2008-07-11 Thread Wesley Smith
Hi Michael, Thanks for the suggestion. I think you're right. I'll give it a shot. best, wes On Thu, Jul 10, 2008 at 11:32 PM, Michael Ash <[EMAIL PROTECTED]> wrote: > On Wed, Jul 9, 2008 at 11:19 AM, Wesley Smith <[EMAIL PROTECTED]> wrote: >> Hi list, >> I'm trying to provide a particular window

any other type of value for the "fromValue" property of CAAnimation?

2008-07-11 Thread Cloud Strife
Hi everyone.After explore the Core Animation for a while, I found that the "fromValue" property of CAAnimation was only set to NSNumber in many samples and tutorials, although the Apple's document says it accepts the "id" value. I am wondering whether I could set this property to NSColor or CGCol

Creating MetaPackages using PackageMaker 3 on 10.5

2008-07-11 Thread Alexander Hartner
I would like to make a meta package containing a standard pkg file, some configuration files which go into the users home directory as well as the system folder. When I drag the pkg into Package Maker and install it, I end up getting a Content folder in the root of my system drive. It seems

Re: Completely cleaning the Launch Services Database & handler's

2008-07-11 Thread Jeff Johnson
Eric, This is not really a Cocoa question, but... I've had success in the past by moving the /Library/Caches/ com.apple.LaunchServices csstore files to the trash and rebooting. -Jeff On Jul 11, 2008, at 2:13 PM, Eric Gorr wrote: So, occasionally, I need to clean out my Launch Services Data

Re: looking for some help

2008-07-11 Thread Jason Stephenson
Gary Robertson wrote: I'm very new to programming the mac & looking for some help also #1 I want to make the " about my app " window larger I cant seem to figure out where to do this I'm fairly new myself, and can't really help you with #2, though I.S. gave you a good pointer in another mess

Re: Storing structured data in file - any easy way?

2008-07-11 Thread Jules Colding
Hi Jens, On 10/07/2008, at 22.50, Jens Alfke wrote: On 10 Jul '08, at 11:29 AM, Jules Colding wrote: Assume that I want to store the set {"HI", "HELLO"}. At one point I want to be able to use "HI" as key and get "HELLO". At another point I want to use "HELLO" as key and get "HI". There

Re: Receive notifications about frontmost application change

2008-07-11 Thread Elan Feingold
Hey, I'd love to see that code if you wouldn't mind sharing. Many thanks! On Thu, Jul 10, at 7:39 PM, Александр Даровских wrote: I've managed to use carbon events to receive those notifications. It does not require any special privileges and takes just a couple of lines of code to implement

Search NSString for a word and get a boolean value

2008-07-11 Thread Moritz Siller
Hello! I am an absolute newbie to Cocoa and I am trying to teach myself a little bit. I already have had a whole bunch of problems with my little applications I write, but have been able to solve them using the documentation or the Cocoa Builder Archive. But now I have a problem I am not a

Re: Search NSString for a word and get a boolean value

2008-07-11 Thread Mike Abdullah
You want the -rangeOfString: family of methods. On 11 Jul 2008, at 22:12, Moritz Siller wrote: Hello! I am an absolute newbie to Cocoa and I am trying to teach myself a little bit. I already have had a whole bunch of problems with my little applications I write, but have been able to solve

Re: any other type of value for the "fromValue" property of CAAnimation?

2008-07-11 Thread David Duncan
On Jul 11, 2008, at 5:38 AM, Cloud Strife wrote: I am wondering whether I could set this property to NSColor or CGColor inorder to change the layer color dynamically. For example, If I want to change a Green layer to a red one from time to time, could anyone give me a guidance? CGColor

Re: KVO notifications and threads

2008-07-11 Thread Ben Trumbull
At 1:10 PM -0700 7/11/08, [EMAIL PROTECTED] wrote: So having mutiple CPUs and cores doesnt buy us much more than bragging rights, at least as far as KVO and UI goes. oh well. I like Clark Cox's suggestion for wrapping the set methods in a category that forces the actual set to occur on the MainT

Re: NSSpeechSynthesizer lifetime and garbage collected (GC) applications

2008-07-11 Thread Sean McBride
On 7/11/08 10:36 AM, Clark Cox said: >> I'm guessing this is because the speechSynthesizer is collected before >> it finishes speaking. Is this 'correct behaviour' or a bug? Needless >> to say, the docs say nothing about special considerations for garbage >> collection. My speechSynthesizer has

Re: garbage collection and NSConnection

2008-07-11 Thread Sean McBride
On 7/7/08 11:25 PM, Hamish Allan said: >On Mon, Jul 7, 2008 at 6:33 PM, Sean McBride <[EMAIL PROTECTED]> wrote: > >> There's always the lower-level: >> >>objc_collect (OBJC_EXHAUSTIVE_COLLECTION | >>OBJC_WAIT_UNTIL_DONE); > >If this were called from the main thread, would it guarantee

XCode 3.1 quits each time after launch

2008-07-11 Thread Stefan
Hi, each time I launch the current XCode 3.1 release, it quits either a second later or when I click in the welcome screen. Console reports only this 12.07.08 00:22:57 Xcode[1744] Xcode(1744,0xa082dfa0) malloc: *** error for object 0xa650a5c: pointer being freed was not allocated 12.07.08

PDFDocument Subclass and Undo Manager Redux

2008-07-11 Thread Kevin Ross
Hello cocoa-devs! I'm not sure if I'm heading in the right direction here or if I'm running off into the brush... I have a PDFDocument subclass that has it's own undoManager. This is so it can perform transformations upon itself and undo/redo. The trouble is when I try to integrate it in

Re: NSSpeechSynthesizer lifetime and garbage collected (GC) applications

2008-07-11 Thread Clark Cox
On Fri, Jul 11, 2008 at 3:08 PM, Sean McBride <[EMAIL PROTECTED]> wrote: > On 7/11/08 10:36 AM, Clark Cox said: > >>> I'm guessing this is because the speechSynthesizer is collected before >>> it finishes speaking. Is this 'correct behaviour' or a bug? Needless >>> to say, the docs say nothing ab

Re: NSSpeechSynthesizer lifetime and garbage collected (GC) applications

2008-07-11 Thread Quincey Morris
On Jul 11, 2008, at 15:08, Sean McBride wrote: Meaning you agree with me that it shouldn't be my job to keep a strong reference until its finished speaking? Whose job was it to keep a reference count on it under non-GC conditions? You weren't doing it in the code you posted, apparently. I

Re: XCode 3.1 quits each time after launch

2008-07-11 Thread Guy Umbright
I have seen this twice. Once I had to reinstall, the other time, it stopped after a reboot. Wish I had something more definitive for you... Guy On Jul 11, 2008, at 5:25 PM, Stefan wrote: Hi, each time I launch the current XCode 3.1 release, it quits either a second later or when I clic

Re: Learning How to Program in Objective-C

2008-07-11 Thread Adriano Sica
From the thread starter Hello to everyone on this list. Whao, You are all amazing, fine people. You have all made my day even though I was ready for the worse if there were no chances at this. I will return the favor in the near future. I'd like to thank each and every single one for the resp

Re: Search NSString for a word and get a boolean value

2008-07-11 Thread John Bishop
Moritz Siller <[EMAIL PROTECTED]> said: For the first occurrence: BOOL found = ([myString rangeOfString:@"*** FLOP ***"].location != NSNotFound); which you could have easily found in the "FInding Characters and Substrings" section of the NSString Class Reference documentation. Happy coding.

Re: NSSpeechSynthesizer lifetime and garbage collected (GC) applications

2008-07-11 Thread Peter Ammon
Hi Sean, On Jul 11, 2008, at 7:20 AM, Sean McBride wrote: Hi all, The following works just fine in non-GC apps when called in an IBAction method: [] I'm guessing this is because the speechSynthesizer is collected before it finishes speaking. Good guess! Is this 'correct behaviour' o

Objective-C default initialization

2008-07-11 Thread Greg
I've noticed that objects get initialized to nil if you don't set them, is this guaranteed in objective-c? I've been trying to find documentation from Apple on this but have been unable. In other words, if you have a simple class like this: @interface MyClass : NSObject { id obj;

Re: Objective-C default initialization

2008-07-11 Thread Ryan Brown
In other words, if you have a simple class like this: @interface MyClass : NSObject { id obj; } @end Then when -init is called is 'obj' *guaranteed*, always, in all versions of OS X, to be nil? Yes: http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Tasks/AllocIn

Re: Storing structured data in file - any easy way?

2008-07-11 Thread Ben Trumbull
At 12:39 AM -0700 7/11/08, [EMAIL PROTECTED] wrote: > Out of curiosity, what do you find not simple about doing the above using Core Data? It is easy enough to create the data model using xcode, but how that connects to actual code is harder to see. Maybe I'm just overwhelmed... I've had

Re: Objective-C default initialization

2008-07-11 Thread Greg
Thank you kindly. :-) On Jul 11, 2008, at 8:18 PM, Ryan Brown wrote: Yes: http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Tasks/AllocInitObjects.html#/ /apple_ref/doc/uid/2048-1003201 Although it happens on alloc/allocWithZone/etc, not init. Ryan _

Re: XCode 3.1 quits each time after launch

2008-07-11 Thread Scott Anguish
failing Guy's solution, try the xcode-users list. On Jul 11, 2008, at 7:13 PM, Guy Umbright wrote: I have seen this twice. Once I had to reinstall, the other time, it stopped after a reboot. Wish I had something more definitive for you... ___

Re: Objective-C default initialization

2008-07-11 Thread Sherm Pendley
On Fri, Jul 11, 2008 at 8:10 PM, Greg <[EMAIL PROTECTED]> wrote: > I've noticed that objects get initialized to nil if you don't set them, is > this guaranteed in objective-c? > > I've been trying to find documentation from Apple on this but have been > unable. > > In other words, if you have a sim

Re: XCode 3.1 quits each time after launch

2008-07-11 Thread Stefan
Last reply here: I did some instrumented runs of XCode and deleted some Quicktime components and cleared ~/Library/Caches/ Now, XCode starts as expected. Remains to see, if the OS X starts ;-) Am 12.07.2008 um 00:25 schrieb Stefan: Hi, each time I launch the current XCode 3.1 rel

Protocol-conforming object does not include retain?

2008-07-11 Thread Steve Weller
I have a protocol and an object that conforms to that protocol referenced by an ivar: @protocol FKPointArraySourcing -(NSInteger)fooMethod; @end @interface FKObject : NSObject { id mGrid; } If I attempt to retain the ivar like this: [mGrid retain]; then I get a warning that "-retain w

Re: Protocol-conforming object does not include retain?

2008-07-11 Thread Bill Bumgarner
On Jul 11, 2008, at 7:39 PM, Steve Weller wrote: Why is this addition needed? I don't see it used in other code. It's as though the compiler believes that conformance to a protocol implies that it exclusively provides those methods, which is not the idea of protocol conformance at all. Tha

TableView partial bindings

2008-07-11 Thread Ashley Perrien
I have a three column table where the third column is a calculation (actually a constructed string) and the first two and simple number values. It would be nice if I could bind the first two to an ArrayController and the third just handle manually. Possible? I tried setting the table seemed

Re: Protocol-conforming object does not include retain?

2008-07-11 Thread Markus Spoettl
On Jul 11, 2008, at 7:59 PM, Bill Bumgarner wrote: id mGrid; ... you would be indicating to the compiler that mGrid might potentially respond to any method ever seen. I'm either misunderstand what you're saying or something is wrong with my compiler because this: id bar; [bar fo

Problem with undo in a secondary nib file

2008-07-11 Thread Vishnumoorthi bhat
Hello list, I have an application with two nib files. I have one text view each in both the nibs. The problem is, I can undo in the text view in the Mainmenu.nib but can't undo in the text view in the second nib. What I'm missing here? Any help would be greatly appreciated. Thanks in advance, V

  1   2   >