Xcode user input: only first character shows up when inputting - xcode

When I am programming in Xcode (in C), and I am using the debugging console (brought forth with Cmd-R) to view the program and its output, and give it input, when I am entering input only the first character that I want to input shows up on the console. All the rest are invisible and non-selectable to me. Say I want to enter "20": all that shows up is "2". It still behaves as though I had entered all those characters (in the previous example, 20), so technically this bug (?) doesn't interfere with the actual software, but it's still annoying not to see all of the keystrokes that I had inputted previously. I just updated Xcode a day or two ago and installed Command Line Tools as well (though I doubt the latter is relevant). I believe the version number is 4.3 or so. Is anyone else having the same problem, and has anyone found a fix? Yes, I've tried restarting it.

I have the same problem.
It looks like it's a XCode 4.5 bug:
https://discussions.apple.com/message/19701332?tstart=0#19701332?tstart=0
So, you can wait or install a previous version.

Related

Tab instead of 4 spaces on visual studio code : Mac OS

I know that sound like a stupid question, and we can find many answer on google.
However, i've been trying for one hour and it still not working.
The question is prety simple, i'm coding on visual studio code on Mac OS.
And i want to instert tab when i press tab, and not 4 spaces.
It it supposes to be very simple :
Go on "code"->"preferences"->"users stting"
And add :
// Insert spaces when pressing Tab.
"editor.insertSpaces": false
Into : settings.json
However i have no clue why, but this is not working.
(I've save it, close visual, reboot mac, still not working)
Does anyone has any clues to help me?
Thanks a lot.
(I've save it, close visual, reboot mac, still not working)
--> One thing is missing - did you try it with a completely new file? ;)
I just tried it, had the same issue and almost thought it is a bug, but it seems to be expected behavior as there is another setting editor.detectIndentation which is true by default.
If the indentation is detected then the detected value takes precedence over your defined setting. At first this seemed odd as others also reported in a GitHub issue. But the analogy with CR/CRLF in this issue makes sense.
So as a quick fix you could set editor.detectIndentation to false or convert your existing indentation to tabs so that the next time you open the file the proper detection is done.

Xcode & Playground not displaying results window

I am fairly new to programming, so I admit I have a lot to learn. In earlier versions of Xcode and Playground, I used to see the results as I typed a program. For example when typing
var str = "Hello, playground" on the far right (results window) I would see: Hello, playground. I also had typed up part of a program with a function and if I entered values for variables, it would calculate the result in the result window (on the right). At some point in typing program, it stopped showing this.
I was hoping that someone would be able to assist me in figuring out what happened. I am thinking that with trying to learn the new Mac (I have always used a PC in the past) that I may have pressed some buttons somewhere that I should not have....OR the newest updates took away the function somehow? Here is what I have done:
-closed the application and restarted
-restarted the computer
-tried checking setting, but I am not too sure what to look for...
-called for support but they don't seem too sure either..
-installed the newest version available of Xcode (Xcode 7 beta) and rebooted
Does anyone have any suggestions?
Thanks
I think this might be broken in 7B4, it is for me. I can see a thread on devforums for this, but when I clicked the link, it redirected me to a create-account page and would not let me in. When I tried to search for it from my account, I did not see it in the list.
See the thread shown in this (admittedly transient) search:
https://www.google.com/search?q=xcode+playground+not+showing+results&ie=utf-8&oe=utf-8
Particularly, this result:
Playground not displaying output | Apple Developer Forums
https://forums.developer.apple.com/thread/3672 Jun 9, 2015 - This
checks to see if the playground is operational. If it does not echo to
the results sidebar, try quitting and restarting Xcode. If you're
still not ...

Pressing <ALT>+<ARROW_KEYS> in Visual Studio editor writes single ASCII character

I am using VS2013 as my IDE and ever since I installed it acts very oddly when pressing ALT and any of the ARROW keys. I use ALT+LEFT and ALT+RIGHT to navigate backward/forward which works in principal but once VS completes the jump it writes out a single character.
This is before the jump:
This is after the jump/after pressing ALT+LEFT:
Those are the characters that are being written:
ALT+UP: ◘
ALT+RIGHT: ♠
ALT+DOWN: ☻
ALT+LEFT: ♦
I am using VS2013 at work as well all the time and I have never seen this before. I know that pressing ALT+NUMPAD_KEYS produces ASCII characters but why is that happening for my arrow keys and only in VS? Apparently ALT+UP for me is the same as pressing ALT+6 (http://www.irongeek.com/alt-numpad-ascii-key-combos-and-chart.html). I actually swapped out my keyboard to see if its got anything to do with that. No joy.
Any ideas?
Update 1:
Looks like this fellow has a similar issue but with Eclipse on Windows:
https://superuser.com/questions/668394/turn-off-alt-numeric-keypad-ascii-symbol-insertion
Sadly no answers to his post.
Update 2/Solution:
As per the comment of 'Hans Passant' I found a solution. See below for details.
I have found the cause thanks to Hans Passant.
I did a diagnostic boot and discovered the issue even then still persisted. I then went on to kill all remaining processes until I struck gold:
With this process gone ALT+ARROW_KEYS don't trigger ASCII symbol insertion anymore. I ended up doing two things in total to get rid of this process:
Reinstalled .NET Framework 4.5.1
Renamed/Removed this file: C:\Windows\Microsoft.NET\Framework\v2.0.50727\RegSvcs.exe
On booting into Windows there are neither errors pertaining to that particular executable nor have I noticed any other malfunctions. Just to be sure, I ran a couple of virus/malware removal tools. They all came up with no threats.

Swift code completion isn't working

I installed Xcode 6.0 beta and downloaded the iOS8 library Documentation.
but when i create a Swift project, try to typing code
func aa(){
let format = NSDateFormatter()
var pageData = format.
}
I find Xcode can't dot any property and function. Am I missing any step?
The problem is sloved, typing a whitespace can aid code completion
It's append when you change the hardware type and you choose less than iphone5.
Choose Iphone 6 for example in the list at the right of the stop button and the code completion for 'format' will appear.
I met the same problem and solve it by removing the non-ASCII char in comment (in my problem, it's a chinese char "年" automatically generated in comment by xcode).
btw. "typing a whitespace can aid code completion" doesn't work for me
It’s a bug, your code works on my system (OS X 10.9). Note that when typing code, I sometimes see the code completion crash for two seconds and come back.
When trying a first project named "swift", code completion crashed in a infinite loop… beta bugs… I just had to name it something else to test the language.
You know, I've experienced something similar with Objective C projects in Xcode 6 Beta 1. It seems Apple have changed the default behaviour a bit:
In Xcode 5.x code would always automatically complete as you type, but in this early beta try pressing ESCAPE - that will bring up the list you're looking for. Works for me. Some code auto completes as you type (both in Swift and Objective C), but at times only ESCAPE will bring up what we're looking for.
I'm nor sure if this is expected behaviour or a bug (I'm guessing the latter).
I must admit that your code works fine on my system without this trick. Just make sure you have code completion setup under Xcode - Preferences - Text Editing:

TextMate: Comment-line shortcut does not work anymore (Cmd-/ or Cmd-Shift-7 on my swiss layout)

I experience a quite strange behavior in TextMate since some time.
I had troubles to use the keyboard shortcut for commenting a line (which is Cmd-/ or on my swiss layout it is CMD+SHIFT+7 where SHIFT+7 results in a /) a few times already since I switched to Lion 2 months ago (before I never had any problems). I then used to restart TextMate and it worked again.
But now, restart doesn't solve the problem. So I went into the Bundle Editor and tried to reset the shortcut, and there I can set it to anything I like, but not to Cmd-/! Nothing happens when I want to record the shortcut and press CMD+SHIFT+7`, the input field stays blank!
I have some bundles installed since my switch to Lion (Cucumber, RSpec, RubyAMP, Ruby Debug, Shoulda), so maybe one of those makes troubles?? Or does the fact that I even don't seem to be able to send CMD+SHIFT+7 in the Bundle Editor imply that the Shortcut is blocked from somewhere else "outside" of TextMate?
How should I debug this? Thanks for help.
Turns out it was Skitch that was running and occupied Cmd-Shift-7.

Resources