The new Raspberry Pi B Model B+ is here - Pick one up in the store and check our detailed guide!

IDE on Mac Issue

by thealy on Sat Apr 02, 2011 11:03 am

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
thealy
 
Posts: 16
Joined: Sun Mar 20, 2011 9:50 am

Re: IDE on Mac Issue

by westfw on Sat Apr 02, 2011 4:17 pm

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
westfw
 
Posts: 1373
Joined: Fri Apr 27, 2007 12:01 pm
Location: SF Bay area

Re: IDE on Mac Issue

by thealy on Sat Apr 02, 2011 7:31 pm

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.
thealy
 
Posts: 16
Joined: Sun Mar 20, 2011 9:50 am

Re: IDE on Mac Issue

by thealy on Sat Apr 02, 2011 7:48 pm

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.
thealy
 
Posts: 16
Joined: Sun Mar 20, 2011 9:50 am

Re: IDE on Mac Issue

by westfw on Sat Apr 02, 2011 7:53 pm

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."
User avatar
westfw
 
Posts: 1373
Joined: Fri Apr 27, 2007 12:01 pm
Location: SF Bay area

Re: IDE on Mac Issue

by ptroxler on Thu Dec 06, 2012 7:06 am

Just had the same symptoms ... in Settings I had "use external editor" checked, unchecked it, can edit
ptroxler
 
Posts: 1
Joined: Thu Dec 06, 2012 5:48 am

Re: IDE on Mac Issue

by wasaiwarrior on Wed Jan 16, 2013 10:33 pm

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.
wasaiwarrior
 
Posts: 1
Joined: Wed Jan 16, 2013 10:31 pm