![]() For example, once you get the current IDE issue you're having (how to hook up a button) fixed, you'll immediately run into an API issue - you may need to use NSString to do something with some text, and you're not familiar with NSString or how to reference the documentation. You will have a multitude of problems with each of the above areas. the Windows APIs, whatever those are called). whatever you're using now) ĪPI (Cocoa vs. To clarify, there are several sources of differences: The mountain is there not because the new Apple way is WORSE, the mountain is there because the new Apple way is DIFFERENT.Īs several other posters have noted, it's those differences that cause the problem. To the original poster, you have a huge mountain to climb. Be prepared for many false starts until things click into place. My best advice would be to get used to Objective-C, play with a trivial app just to get the concepts down, then think of an app you'd like to write and go for it. Also, NSString is insanely powerful (initWithContentsOfURL:, for example), even if it takes a while to get used to things like instead of a straightforward '='. The first time you do anything with CoreData I guarantee you'll have a grin on your face. Do anything non-trivial in Cocoa/Xcode and the logic behind it all rapidly becomes clear. You're still free to do nasty things like mix model and controller code (and sometimes that's right), but the separation of the View from the rest of the application is pretty baked-in.Īlthough my Cocoa/Xcode skills are still pretty weak, I can hand-on-heart say that my Cocoa projects just feel cleaner than my VS stuff. The Model-View-Controller pattern is pretty intrinsic to OS X and Cocoa, and XCode's approach really pushes this. Heck, there's loads of sample code that shows exactly that.īut XCode/Cocoa has some expectations and some rules. It'll let you put data access code in button-press events. It'll let you tie your logic directly to the UI. ![]() It will not guide the structure of your program, nor will it do anything to prevent you writing with every anti-pattern under the sun. VS will let you stick all your logic, objects, etc. Undeniably XCode/Cocoa asks more of the developer than VS. NET class hierarchy), but that'll come with time. I'm nowhere near as competent in ObjC/Cocoa as I am C#/VB/.Net Framework (hell, I can almost recite the. So having stuck at it, I can really say it's worth it. The problem's not with them - it's with me.". Xcode/Cocoa/Objective-C must be good if that's what it can produce. My thinking was: "Look at these great apps using great abilities of OS X. Quite a while back, I wanted to start Mac development so fired up Xcode.īut I was absolutely determined to figure this stuff out. I went through the exact same experience as the original poster (albeit back with Xcode 2 or thereabouts!). How do I attach code to the Click event? And does anyone know of any "Xcode 4 for Visual Studio users" documentation? I've found many articles on how to make certain parts of Xcode function more like VS, but I'm really after something more "beginner friendly" before I get into trying to customise it. I'm obviously missing something simple here. I get a little "+" in the circle when I hover over it, but clicking it does nothing. Right-clicking opens a black menu and one of the options is "performClick", is that what I want? It doesn't seem to do anything I've clicked, right-clicked, double-clicked. In Visual Studio I'd just double-click the button (which would open the Click handler), but in Xcode that's only for changing the text. I've used the Cocoa Application template and have dropped a Button onto the window, but I can't figure out how to attach code to it. I've tried to get started by myself but I've hit a wall, and can't help but think that I'm overlooking something simple. Lots of the beginner stuff is outdated (I've heard that earlier versions of Xcode are completely different), and most of what I've found for Xcode 4 expects you to already know your way around version 3. However, I'm having great trouble with finding documentation. I've been developing for Windows for years, using Visual Studio since its first release, and now I'm trying to make a simple Mac app in Xcode 4.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |