Importing Code via clipboard

Just an idea @Zoyt triggered in my head…

It would be nice if “-- Tab:TABNAME”, typed into the editor, would erase that line, create a new empty tab named “TABNAME”, and place you in it.

That way, you could copy code in the browser, and paste it in Codea - and automatically create multiple tabs in a project. One of the giant problems I have with copy/paste is you have to swap back and forth N times for N tabs, and fill out their names by hand. Slow, and easy to make a mistake.

First of all, how did I trigger this idea in your brain? Second of all, I’ve had this idea before and was going to mention it, until I noticed when I was making this conversation that one of the coders did have the function importCodefromClipboard() and had an update that removed it because of apple’s request. But, with file IO and ability to read the clipboard (wich I really want), this will be possible. I don’t mean to pop your bubble, but I absolutely agree :slight_smile:

@Bortels we have had this same idea for quite a while now. I’ll be putting in a similar mechanism.

However it will only be triggered by pasting, not by typing. So you can paste large single streams of text into the editor.

@Zoyt, you mentioned it would be handy to be able to read from the clipboard. And I vaguely recalled them saying it was a no-go with Apple, but this functionality (or something similar) should pass muster.

We may have even talked about similar before - but I couldn’t recall, so I figured I’d bring it up, perhaps again.

Ah… Creating projects from the clipboard I would say is no good with apple… But just reading it? I don’t think so.

Reading from the clipboard was removed from iLuaBox in order to comply with Apple’s policy.

Why? Because they have file IO? What part of the app store subbmission guidlines are violated? That doesn’t make sense… Oh well.

Asking “why” at this point is probably wasting your time; Apple doesn’t give a why. And clearly, they don’t always do the same thing. And they change their minds.

Even as Apple fanboy, though I could understand their reasoning, I hate Apple’s policy regarding this no-code-download. It seems a bit contradictive to allow coding app but disallow code exchange at the same time. Oh, well… :frowning:

I honestly don’t think they thought it thru when they allowed coding apps, frankly, and that cat is out of the bag at this point.

@Bortels - Your not saying its a good thing they were allowed, but hinting it was bad. I’m EXTREAMLY glad :smiley:

From Apple’s standpoint, allowing end-users to write code was a bad decision, or at least they probably think it was, because now they can’t check all code to make sure it follows their rules.

I think Apple is wrong there - I think a vibrant self-hosted development community is vital to the long-term health and popularity of the platform. Maybe I’m wrong.

Well… If we can’t have Xcode for iPad, give us ability to make coding apps :slight_smile: