-1

I am very new to apple computing, have my first iMac a few months. I am now learning basic code writing. I had found a useful link on you site that turns on view history and displays a graph of the output, just some dots on the screen. In that post it said to go to editor tab and select result display mode to enable value history, all options are grayed out.

Here is my code and version information.

Note I am using Playground, set up as OS X

import Cocoa

for x in ["1","2","3","4"] {

    print(x)

}

System Imac OS = OS X Version 10.11.5

Xcode Version 7.3.1 (7D1014)

Swift 2.2

Thanks All Harry Nash

Idan
  • 5,405
  • 7
  • 35
  • 52

1 Answers1

0

First, notice that you are using array of strings. Therefore, you cannot create a graph.

For the rest of your question, on the right side of the screen you can find the eye button and a circle next to it. Click on the circle. This will open a box under the print(x) statement. Right click on the box and select Value History from the menu.

Below an example of almost same code, but with integers example

import Cocoa

for x in [1, 2, 3, 4] {
  x
}
Idan
  • 5,405
  • 7
  • 35
  • 52
  • I tried the change you mentioned, infant copied it. Following your instructions clicking on the circle I do see value history and select it – hnash01 Jun 28 '16 at 12:14
  • I then right on the new box and select value history, but there is no option for graph. So I only get a display of numbers 1 2 3 4 going down in a column. So now my search is getting the graph mode. Can you point me closer to a final correction? – hnash01 Jun 28 '16 at 12:17
  • Note that you don't *have to* add an assignation to another variable to see the graph, you can just state `x` on a new line and it will be captured. :) https://www.evernote.com/l/AOxrpOCkuB5B2os2yEv-o9_rMi_rghp1fM8 – Eric Aya Jun 28 '16 at 12:50
  • Right you are @EricD. Modified. – Idan Jun 28 '16 at 12:57