IDE on Mac Issue

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
thealy
 
Posts: 39
Joined: Sun Mar 20, 2011 10:50 am

IDE on Mac Issue

Post by thealy »

New here - please excuse my noob question as I try to work through tge "Getting Started" book examples.

I have installed the IDE on a MacBook Pro; it talks to my shiny new Uno, downloads the provided examples. However when I try to create my own, or edit some variable, I can't edit the text area. I suspect file permissions so opened everything up for read,write, execute.

If I open and edit the sketch file in an external editor, save, then use the "open" on the IDE, it reads the file fine, runs verify fine, downloads to board and runs. But I still cannot edit the text within the IDE. I can live this way but suspect I have made some simple install mistake.

Any suggestions appreciated.
-Terry

User avatar
westfw
 
Posts: 2008
Joined: Fri Apr 27, 2007 1:01 pm

Re: IDE on Mac Issue

Post by westfw »

The example sketches are part of the Arduino install hierarchy , and are thus (correctly) read-only.
When I modify one and try to save it, I get a pop-up "Sketch is read-only", followed by a normal "save-as" dialog that defaults to the Documents/Arduino folder that it would like you to use. (I have Arduino 0022 and MacOSX 10.5.8) It might get confused if you manage to get the default pointed at a directory that is also unwritable...

Can you save your modified sketch using "Save as" ?

What if you create a sketch using "new" ?

User avatar
thealy
 
Posts: 39
Joined: Sun Mar 20, 2011 10:50 am

Re: IDE on Mac Issue

Post by thealy »

Thanks for your reply. I'm running 10.6.6 on the Mac, 0022 on Arduino.
If I try 'new', I can't type in the text area. When I open the .pde file I created with another editor, it's as if it is read-only, but it is not. It loads it ok, but I can't edit it there at all.

I will try on Win XP tomorrow if I can. I wonder if the Arduino app is open source...I'd love to run it in a debugger and see what is going on.

User avatar
thealy
 
Posts: 39
Joined: Sun Mar 20, 2011 10:50 am

Re: IDE on Mac Issue

Post by thealy »

More weirdness....

So I edit (in external editor) the file to follow the book example I'm learning, a minor addition to the sketch. I save the file - update time confirms this.

In the Arduino IDE, which has been running on the side, I select "Open" and point to this (same) file. I appears to read, but the file is the old version, not the update. So I exit Arduino, restart, and select the same file. Now it sees the "new" version, which it can verify and download successfully. I still can't make any edits in the Arduino text area. Bizarre.

User avatar
westfw
 
Posts: 2008
Joined: Fri Apr 27, 2007 1:01 pm

Re: IDE on Mac Issue

Post by westfw »

I wonder if the Arduino app is open source.
Yes, it is. http://code.google.com/p/arduino/ Currently builds using "ant", so I'm not too sure about debugability. Some of the old versions built with XCode, but apparently Apple has been less than aggressive with their Java support for XCode.

I'm having trouble imagining what's wrong, though. There are a lot of Arduino Mac users.
I can't duplicate the behavior even from the "Guest Account."

ptroxler
 
Posts: 1
Joined: Thu Dec 06, 2012 6:48 am

Re: IDE on Mac Issue

Post by ptroxler »

Just had the same symptoms ... in Settings I had "use external editor" checked, unchecked it, can edit

wasaiwarrior
 
Posts: 1
Joined: Wed Jan 16, 2013 11:31 pm

Re: IDE on Mac Issue

Post by wasaiwarrior »

I think I know what's going on. What happens is if you check "external editor", the Arduino software assumes that you are using external other software to edit the code. It therefore invalidates the ability to edit code from within to prevent inconsistencies between the two different editors: arduino's editor and whatever-else-like-textedit. So just make sure the "external editor" is unchecked if you want to use the built-in editor.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”