Autocompletion in Xcode [duplicate] - objective-c

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
How can I make auto-complete display a list in Xcode
I'm just learning Objective-c and how to use Xcode, coming from a background of Python. In python, when using the interactive prompt, you can do something like this:
list = []
list.**tab**
pressing tab displays all the methods one can do on the list, like append things, et cetra.
I would like to know if there is a way to do something like this in Xcode, as it would save me a lot of time. Thanks.

You could hit the esc key and it'll show you list of methods. Also, typing will generally bring up some suggestions when Xcode believes there are matches.

The feature you're looking for is called code completion, and it's available in Xcode. When you start typing, Xcode will try to find the most likely completion and will display it in light colored text. Press tab to accept the offered text, or escape to get a list of other possible completions. You can of course customize the keys to your liking. Check the Xcode documentation for a complete description of how completion works.

Related

Changing a Universal Windows app to function as a game [duplicate]

This question already has an answer here:
Disable pointer mode for webview in Xbox UWP
(1 answer)
Closed 2 years ago.
I have a standard Universal Windows app that is actually a game in a WebView container (because HTML5) and I was wondering if there's any way to change something in the files of my project so that it's actually treated as a game (and likewise would be installed as such when deployed to Xbox One, Series X etc.) Obviously I want to get rid of the "change input mode" dialog as well or else I can't map the menu button for a pause function or anything else for which one would do so (and yes, that includes "Konami Code" implementations).
UPDATE 2020-09-16: This ended up being a duplicate question. Refer to the link in the information bar for what ultimately did the trick.
UPDATE 2020-10-21: I totally forgot to inform the mods of the duplication in prior discourse. This has now been addressed and the answer is noted above. I have also removed the link and description from the post to clean things up.
Two things since I opened this question which require my immediate request to close it to further discussion:
It turned out that the game type change is automatic once in the store, and
It also ended up being a duplicate question (for which the link is now in the information bar).

Best way to only get some functionality from TextEdit for NSTextViews

I'm new to objective-C and I'm not sure what's the best way to finish my current project. Basicaly, my project is a plugin for a medical software and it has as inputs 2 NSTextViews. I've tried to manually implement all the functionality of a text editor but some futures seem impossible for me to implement. My question is, what is the best way to get this functionality: TextEdit Funtionality for my NSTextViews ? Is there a better and/or easier way from doing every button and every action regarding text editing ?
Check the documentation for NSTextView, specifically the section "Using Text Formatting Controls".
The properties rulerVisible and usesInspectorBar will enable the functionality in your screenshot.

How to allow code to run only if a window with specific window title does not exist?

I have program that acts as a GUI frontend for a CLI program. I can set custom titles for the CMD windows that open (up to 4), but despite looking at other answers to similar questions, I can't piece together the code to check through the array for the specific window titles. Could someone help me out with an example?
EDIT: Including other questions.
how to get the window title of a process using vb.net
VB.NET Get Process list and kill process
Found a simple answer - you can use AppActivate() and checking the error numbers to check if the window title exists.

Is it possible to embed a terminal window within a cocoa xib/nib?

I looked at another questions (which i could only find one) which asked something similar more than few years ago, but none of the links mentioned seem to be relevant or work anymore.
Mac/Cocoa: Embed a terminal window in my app
I am wondering if it's possible without going to extremes to embed a terminal window displaying a tool such as top (an interactive command-line tool) in a tty output embedded within the gui of a cocoa app (os x). I tried some things with NSTask, but clearly that isn't the way to go.
I'm really looking for a starting place to go off... or if this type of thing is even within reason. thanks
You can use NMSSH lib and example they gave here. Basically they made interactive terminal view controller, so you can use it for your needs.

How do I navigate through a method call hierarchy in Xcode 4?

I come from Eclipse, I would like to know if there is a way in Xcode 4 to navigate through method calls like there.
I know I can jump to the definition of a method, but I want to know who is calling that method/function.
The only way I've found is doing a regular text search, but that's not very helpful.
Since Xcode 4.4 the feature to look up the immediate caller and/or callees of a method has been available. Unfortunately, there doesn't seem to be a handy hierarchy view as there is in Eclipse.
What's New in Xcode 4.4
Xcode can show the callers and callees of the current function or method. This function is accessed from the Show Related Items menu, or by using the Assistant editor and selecting Callers or Callees in the jump bar pop-up menu.
here is a visual how to find the caller(s). Look for the little image i've highlighted in pink.
Doing a search is indeed the only way to check where in the code certain messages are being sent. Xcode doesn't have such a functionality. Keep in mind that even if it had, it couldn't be perfect because messages can be composed and sent dynamically at runtime.