How to grab EditText from button clicked in old Objective-C Cocoa application? - objective-c

So I'm new to Apple and Objective-C development, I'm working with a very old version of Xcode (version 2.5) and OSX (version 10.4.11) to make a pretty simple GUI application in Cocoa Objective-C. I need to have text grabbed from an EditText when a button is clicked. I'm trying to find guides on how to use OSX, but I think the version is so far back that it doesn't apply to the guides that usually come up.

Related

Creating A Proper Carbon App With GUI On Modern OS X

I am working with multiple Mac projects that were written during the awkward time between OS 9 and OS X, so it is written in pure C using Carbon, no Cocoa, Objective-C, or really anything modern in sight. Some of the projects I have the .xcodeproj files for, but they are useless with modern XCode (the project files were created with XCode 1).
I've brought some of them into XCode projects under XCode 6 (the earliest version I have access to right now) using the Command Line Application preset and the 10.4 SDK restored. However, using this present doesn't actually build a proper .app, so the nibs never get included. I tried writing some non-nib Carbon apps (unrelated to the old code), and it seems like everything up to opening windows and drawing into them works, but the windows never updates, even all the Carbon Event handlers are in place. Clicking on buttons does nothing, I can't drag the windows around, and the app never even appears in the dock. It seems the entire app just stops after the call to RunApplicationEventLoop()
I tried putting some of the code into a project made with the Cocoa preset with all of the premade code stripped out, but that seems to have just made XCode angry. Is there any way to essentially get a replacement for the Carbon App present that was in old versions of XCode?

simulate Document in Xcode 6

There used to be a pretty nifty command in xcode 5 where you could simulate the document. I mean when you pressed this option, only the UI of the app got loaded and then you can just see how the autolayout is working.
I forgot where this is and I'd upgraded to Xcode 6.0. COuld anyone help me where this option is in xcode?
Yes, it is gone. There's no way to get it back.
However, you can instead preview .xib or storyboard files in assistant editor. This dose not open a new window, however, the storyboard file shows the UI preview by default.

Adding Monogame to the existing Xamarin project

A Xamarin newbie here. I have recently started developing a cross-platform mobile application using Xamarin with Visual Studio. There is now an idea to introduce an application framework to manage graphics and animations, such as Monogame. I've looked at the tutorials and it looks like that I had to start using Monogame from the beginning, as I couldn't find a way to use it with an existing project. So, I am wondering is there such a possibility at all?
How are you wishing to integrate it? It is possible to instantiate a Game class from a button touch or some other user input. From that you point on you are solely inside of MonoGame until the game is closed. The only issue i came across with this is removing the game and handing control back to the main application as this is not how MG was designed to be used.

xcode window creation

I'm very new to OSX programming and I've been trying out a few examples in various articles and I've been facing a problem ; at that point I decided to follow tutorials from "Cocoa Programming for MacOSX" and Im running into the same problem.
My project name is "Random" and when I click "Build and Run", it shows the status as "Random running". However I don't see the window that pops up. Why does this happen?
I had a look at this SO thread and unfortunately it does not help.
[EDIT]
"Random" is a Cocoa application for Mac.
[EDIT2]
I tried doing the same with a new cocoa application and the problem persists. Here is what I did. Create a new cocoa project named "blah". Click "Build and Run" - from what I am reading im supposed to see an empty window - however I dont see the same.
[EDIT3]
My Xcode version details :-
Xcode IDE: 1610.0
Xcode Core: 1608.0
ToolSupport: 1591.0
Generally you will have a window visible if you have it in the xib that is loaded with you main menu and it is marked to be visible at launch... This should be all set up if you chose the window based application, if you chose document based then you will get a window when you select new from the file menu

How to create a selection page in Cocoa Obj-C for Mac

I am creating an application for Mac using Xcode 4.2, and I wanted to create a page on startup somewhat like the ones in GarageBand and Microsoft Office. The user would be able to select an option (template) and then press 'Choose' to start working with that template. The following images depict the startup (option) screens of GarageBand and MSOffice:
Please note that both of these have an interesting way of selecting an option (template) to begin.
I would like to know what kind of UI Element or special class is being used for this. I do realize that a lot of custom artwork would go into this. Please also explain how these items are used like a radio button, not a normal button.
Those are almost certainly done with an NSCollectionView. NSCollectionView can be a little difficult to work with (in my limited experience) so I would start by looking at the docs:
Quick Start for Collection Views
NSCollectionView Class Reference
And then at some tutorials:
NSCollectionView Tutorial for Dummies (Xcode 3.1.3) (A little out of date but still helpful)
Adventures with NSCollectionView