OS X - how to write to a file associated as a Unix executable

Mark Waddingham mark at livecode.com
Tue Mar 1 02:54:45 EST 2016


On 2016-03-01 02:06, Glen Bojsza wrote:
> What I am trying to do is within a LC application
> 
> 1. put field "mytest" into URL "binfile:~/race"
> 
> This creates a file called race in the ~/ directory.
> 
> The problem is that when you do a chmod +rw race the file is still
> recognized as textedit file and NOT a UNIX executable.
> 
> When you look at a file created with LC and chmod  verses a file 
> created
> with textmate and chmod you can see the differences in the finder or 
> get
> info on both files and see the difference.

Try doing:

set the fileType to "????????"

or

set the fileType to empty

Before saving the file from LC.

The default setting is "ttxtTEXT". I believe, these days, that Mac first 
looks at the file extension and then falls back to the filetype. As the 
engine is explicitly setting the fileType of saved files (by default) to 
text, the OS will pick up any files without extensions as text files.

Warmest Regards,

Mark.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps




More information about the use-livecode mailing list