Suggestion for code editor

Could there be an option to have the code editor viewable in a separate window with tabs?

I really don’t like the current system for viewing it in the preview window. A full screen separate window would be fantastic.

Keep up the good work Jay :wink: [import]uid: 6981 topic_id: 6182 reply_id: 306182[/import]

Well, the Preview pane is just a preview – and allows you to peek at source, audio, and graphics.

If you double-click a source file it will open in a separate code window – although that is about to change.

My intention was to use a tabbed interface for the code editors but I ran into a technical problem and ended up shipping with the current version – separate windows open for each file.

However, the version I have running on my system now has the tabs working and so v2.1 will change from multiple windows to a tabbed interface.

Actually, at this point you can choose the tabbed interface or separate windows – but I’m not sure if that will make it into the final 2.1 build. Having to double up on different ways to handle things might get messy in the future. But I do hate to make people switch to a tabbed interface if they really hate that, so…

Jay
[import]uid: 9440 topic_id: 6182 reply_id: 21344[/import]

Jay, the issue is the size of the window. If the tabbed editor is inside the preview window then that will be a small editor. Comments? [import]uid: 11904 topic_id: 6182 reply_id: 21445[/import]

@ksan that’s a good point. Here’s a quick video with my thoughts on the matter:

http://screencast.com/t/ADUTnhsPhi

Jay
[import]uid: 9440 topic_id: 6182 reply_id: 21559[/import]

Tabbed entry is cool but I would rather have the screen real estate than ‘cool’. I use the preview section as small as possible to keep most of my assets visible for easy interaction. If I need to keep changing the preview section size I can see myself going to back to external editor which means all the hard work you’ve put in goes to waste at least for me…

How about making the whole lower preview section snap in snap out enabled? Could be the best of both worlds but I’m sure its harder for you. Thanks for considering. [import]uid: 11904 topic_id: 6182 reply_id: 21577[/import]

Snappable sounds cool. And hard to implement. :slight_smile: What I may do is make it a preference – if you use the internal editor you can choose tabbed interface or separate windows. While I don’t like the idea of duplicating functions it’s already working that way (because I don’t like tearing old things out until new things are done) so I may stick with that for now.

Thanks for the suggestion.

Jay [import]uid: 9440 topic_id: 6182 reply_id: 21655[/import]

Preference is a good option. Quite frankly the way it is currently work real well for me although originally I was rooting for the tabs. Please keep the current mode for as long as you can. I agree in the long run its best for you and us that you don’t maintain 2 iterations of the same functionality.

Thanks for all your hard work [import]uid: 11904 topic_id: 6182 reply_id: 21665[/import]

Code folding would be nice, be able to edit in the Preview and add tabs for file you are working on. [import]uid: 34126 topic_id: 6182 reply_id: 21892[/import]

I’ll look at code folding – I think I can add that fairly easily.

As far as editing in Preview goes, I don’t think so because what happens if you make changes and the click another asset? I guess it could ask if you want to save, but that seems weird to me.

I will admit that the Preview pane seems a little weird as it is especially when opening source in tabs – because now there are some panes that can be edited and one that can’t be. Feels a little off but I’m not sure how to tweak it at this point.

I will keep poking at things, though.

Jay
[import]uid: 9440 topic_id: 6182 reply_id: 21893[/import]

Sort of code editor feature, Git Hub integration. Be able to sync with github repo, pull and push etc.
Also another thing before I forget, a search field so you can search for a piece of code within the project, library, other projects or sample code. [import]uid: 34126 topic_id: 6182 reply_id: 22065[/import]

“a search field so you can search for a piece of code within the project, library, other projects or sample code.”

+1 ! Excellent idea! [import]uid: 11904 topic_id: 6182 reply_id: 22066[/import]

Yeah, CPM-wide search is high on my list of wants, too. Just need to figure out how “in depth” it should go.

Since only the asset names and locations are in the database, searching those is a no-brainer. But searching inside the assets themselves is a different matter since I’d have to load each file into memory to do that.

For example, I have 484 source files in CPM right now so a search wouldn’t be instantaneous – but maybe it wold be fast enough. I’ll have to give it a shot and see what happens.

I could also add to the database and actually save a copy of each file as it’s added/edited and then doing a search would only require a SQL query and no disk access.

I’l poke at it and see what happens.

Jay

PS - I’ll look at Github support, but I’ve never used it so that feature would probably be a way down the road. [import]uid: 9440 topic_id: 6182 reply_id: 22069[/import]

I have another request, in the prefs when you specify the file to add to the Library I would want to be able to add a folder and monitor that for changes. So for instance, if I just added my “Library” folder then if I add another file to that folder the CPM adds the new .lua files so I don’t have to import them. Sort of a ROOT folder for my Library.

One way would be if the CPM check for changes in the Library folder on startup and add them then.

CPM is awesome, a little pricy but for this kind of support I’d say it’s worth it. [import]uid: 34126 topic_id: 6182 reply_id: 22092[/import]

Yeah, a monitored folder for library files might be really handy. I’ll put that on my to-do list. (Okay, it’s kind of a “wish list” so not everything on that list makes it, but this is a good one. :slight_smile:

Thanks.

Jay
[import]uid: 9440 topic_id: 6182 reply_id: 22098[/import]

Extending the library folder idea… Can we consider having a capabiity for CPM to update existing projects that use an asset in a library which is being updated? So if I use Particle Candy for example and I check in the new version I typically need to go back to my project and delete the old version as an asset and add the new version. Gets tedious after a while. This could also be a low priority long term thing. [import]uid: 11904 topic_id: 6182 reply_id: 22107[/import]

If you create a project called Corona Libs (or something) and throw all your lib files in there, then you can grab them from there and put them as “dynamic assets” in every other project where they’re needed.

Then when you get an updated file, just plop it over the old one on your drive – you shouldn’t have to mess with anything in CPM at all. When CPM launches the Simulator it grabs each file so it will always get the latest version.

That took me longer to explain than I expected, so if I confused you let me know and I’ll clarify. :slight_smile:

Jay [import]uid: 9440 topic_id: 6182 reply_id: 22110[/import]

The collapsable sections (as you described in the video) would be the most ideal solution in my book [import]uid: 6981 topic_id: 6182 reply_id: 22135[/import]

Jay, can you share the code for the level app you you demoed in the Bubble Ball video?

I figured it’s no point re-inventing the wheel when you’ve already done it??

Thanks Jay [import]uid: 34126 topic_id: 6182 reply_id: 22214[/import]

Go check out my Game Dev Nation site, specifically…

http://gamedevnation.com/video/graphic-layout-tool/

There’s a link to the project code right under the video.

Jay
[import]uid: 9440 topic_id: 6182 reply_id: 22218[/import]

How about a button on the project browser that minimizes/expands it, a button on the file browser that shrinks it to 3 lines/expands it to default and the ability to save a view preference for how much screen to split by default between the file browser and the code preview.

And while I’m throwing out my poo/suggestions to see what sticks on the wall; I’d love to see integration with Git. Github is fine but I’d rather have the ability to check-in to git on my own pc/mac. Right click a file in the file browser then context menu gives me an option to check that file in and asks for revision note for that file. Checkouts/roll backs would be great also but if you only did check-ins that would be a great feature since most of the work done with version control is check-ins and check-in comments. Toss in an indicator next to each file (or possible color the file name text) that tells you if it’s been updated since last checked in :slight_smile: [import]uid: 5178 topic_id: 6182 reply_id: 22463[/import]