The Ages Old __MyCompanyName__ Question
OK, I am fairly new to Xcode and Cocoa programming and I want to change the __MyCompanyName__ template macro definition. So, I google this question, find answers, and try it out. It did not work. So, is there something different in today's Xcode that means the procedure for changing __MyCompanyName__ is different. I think the most recent entry I found (with a date) was 2005 or so. The procedure I tried was to set ORGANIZATIONNAME in the PBXCustomTemplateMacroDefinitions key of the Xcode plist. First, I could not find it by looking at the plist. So, I tried the defaults command from the shell and this seemed to work but no change in behavior on Xcode in spite of cycling Xcode and trying a number of other things. So, How do you change __MyCompanyName__? Thanks, phil phys...@mac.com ___ 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/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
NSLog ??
Why can't I find any reference page for NSLog? I believe I have searched all over all documentation that I have and the closest match is NSLogicalTest. I even tried a search using Spotlight on my entire system. I was able to find a usage of NSLog in a program but no documentation hits. Help needed for snowed in beginning Cocoa programmer. -phil- ___ 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/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Neophyte Question: Connecting to nib objects
I am new to Cocoa and I am wondering how to do something that should be simple and obvious. Given that I have an object defined in the nib (aka xib), for example, an object that responds to a given view, what is the correct way for my running application (if it is in some other state, not responding to an action) to obtain a pointer to that object. Maybe a second question is "Do I ever need to do this?". This question came about because I was experimenting with a sample program I am using to learn Cocoa and I wanted to change the state of the class that is defined in the nib. I did not know how to get a pointer to that object. It seems that it is serialized (un-archived?) when the nib is loaded. Thanks, phil phys...@mac.com ___ 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/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Opinion on managed memory and garbage collection
Being relatively new to Cocoa and Objective-C, what is the consensus on using the new version 2.0 managed memory features (garbage collection). If you were writing a new Cocoa application from scratch, would garbage collection be the preferred method over the reference counting (retain/release) method. Having spent years in Java I would prefer a GC'd approach but I have also seen the great improvement of GC in Java over the years. Therefore, I am also curious on how the new Objective- C design for GC compares. The applications I have in mind are mostly graphic (Quartz 2D) oriented and likely also some OpenGL work. Thanks for your opinions and comments. phil ___ 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/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Opinion on managed memory and garbage collection
Wagnar, Thanks for the comments. I agree that experience in using retain/ release is good to have, especially with iPhone. Although I have no plans for an iPhone app right now, I certainly would not rule it out. I did do a kind of hello world using the iPhone simulator though -- maybe I can market that through iTunes, ;-). However, I have written a number of simple Cocoa applications using retain/release just to build up my experience level but this question on GC is motivated by a more serious effort and starting from scratch. Having been a programmer for over 40 years with 20 years in C++, having to do my own memory management is certainly not a new thing for me. Though, I must admit, I do prefer GC languages and I much prefer Java over C++. phil On Jun 22, 2009, at 8:14 AM, WT wrote: On Jun 22, 2009, at 4:58 PM, Phil Hystad wrote: Being relatively new to Cocoa and Objective-C, what is the consensus on using the new version 2.0 managed memory features (garbage collection). If you were writing a new Cocoa application from scratch, would garbage collection be the preferred method over the reference counting (retain/release) method. Having spent years in Java I would prefer a GC'd approach but I have also seen the great improvement of GC in Java over the years. Therefore, I am also curious on how the new Objective-C design for GC compares. The applications I have in mind are mostly graphic (Quartz 2D) oriented and likely also some OpenGL work. Thanks for your opinions and comments. phil Hi Phil, I've also lived in java-land for a long time, so I understand where you're coming from. I've since come to think that spending some time coding without gc has the great advantage that it forced me to be more attentive and careful in my coding practice. Ultimately, of course, it would be nice not to have to worry about memory management at such fine-grained level, but the lessons I learned by coding without the gc safety net will be with me when that day comes. Also, if you're programming for the iPhone OS, you have no choice at the time being because the iPhone OS does not support gc. Wagner ___ 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/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Interface Builder Questions...
I am new to Interface Builder and I am still trying to figure out some subtle details of how things work. And, my frustration level is growing because although I have access to a very rich set of documentation, a number of questions I have pondered are not answered. Some of these may be rather silly but remember I am very new to Cocoa and Interface Builder. (1) The default Cocoa Application created by Xcode creates a simple application with a single window and a default menu (among other things I presume). This window has a content view which I am assuming is an instance of NSView but I actually can't find out if that is true. Therefore, are there any inspectors that tell me the actual class used for a particular view. The class identity part of the Inspector for the content view suggests has a drop down that allows me to choose various classes but there must be a specific class that is used already. How do I find this? (2) I am trying to understand how the window sizing features of the view inspector relate to the window itself. As best as I can tell, none of the actual window sizing features for the content view are usable as they do not really seem to do anything. Is this true? Is it possibly the case that the content view, being bound to the window frame, is sized automatically based on the window size? (3) Again, on the window sizing inspector, if I resize the window using the resize thingy in the lower right hand corner, I can see the updated pixel size in the inspector, but only after I stop resizing. If I want to resize to a particular dimension, say 300 x 225 (or, whatever), it is a try this, check, try that check, and so on. Is there a way to enable the size values of height and width to resize dynamically as I change the window size? I have looked all over the documentation and tried a lot of things but nothing seems to make the behavior different. (4) And, finally, on the window sizing inspector, in the part called "autosizing" when I click on the content view (remember, it is empty, just as created by Xcode), there is an animated image that expands and contracts in size and I have absolutely no idea why it is animated or what it means. Any help? Thanks, InterfaceBuilder newbie phil ___ 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/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Interface Builder Questions...
(3) Again, on the window sizing inspector, if I resize the window using the resize thingy in the lower right hand corner, I can see the updated pixel size in the inspector, but only after I stop resizing. If I want to resize to a particular dimension, say 300 x 225 (or, whatever), it is a try this, check, try that check, and so on. Is there a way to enable the size values of height and width to resize dynamically as I change the window size? I have looked all over the documentation and tried a lot of things but nothing seems to make the behavior different. Don't think so. File a radar: http://bugreport.apple.com You can also enter the values directly in the text fields. Good suggestion. Note though, that if you already know the dimension you want to use, it's probably easier to set it using the numeric input fields in the inspector directly. Also note that if you hold down the Command key while resizing in IB it will resize smoothly, and not snap to guides. This often makes pixel resizing / alignment a lot easier. So, are you telling me that everyone else can see dynamic changes to these height and width pixel values but I can't? I would submit that it is a little early to submit a bug report -- certainly there must be something I am not doing right. Yes, I know that I can enter them in manually but I am more interested in trying to figure out if anything is broken with my IB or not. Maybe I am seeing normal behavior. But, if this is normal, it sure seems to be very awkward which does not seem like IB or Xcode. phil ___ 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/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
File system file renaming question...
This question is not specifically about Cocoa programming but I hope that some Mac OS X experts out there can give me an answer. I sent an attached photo to my daughter so that she could print it out using Costco print services. I sent it at high resolution, the photo image was 1.6 MB. It seems that Mac mail changed the resolution to a more web friendly size of about 64 K with much reduced resolution. So, I thought that a way to get around this was to change the file type (extension) of the image file to something other then .jpg such as .dat (and, I tried .zz, .q, and null). However, the file was still recognized and interpreted as a jpeg file and treated in the same manner by mail (and, also by the finder that displayed the image). So, it looks like Mac OS X is interpreting the file based on contents and not based on file extension. This seems to be a very wrong thing to do in my opinion. Does anyone know of a way to turn this off or is this considered a "feature" for some ease-of-use aspect of OS X?___ 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/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
NSString and Regular Expressions
I was sort of suspecting that regular expression matches would be supported by NSString yet I find no message interface for supporting regular expressions. So, is the only capability for handling regular expressions in Objective-C the Posix Regex library? phil phys...@mac.com ___ 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/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com