Built-in editor

Discuss ideas for new features with other users. To submit feature requests to Smith Micro, please visit support.smithmicro.com

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
AcouSvnt
Posts: 190
Joined: Wed Aug 04, 2004 4:14 am
Location: Rochester, NY
Contact:

Built-in editor

Post by AcouSvnt »

It would probably be convenient to have a built-in script editor that automatically defaulted to Lua syntax coloring; pull down the Window menu and select "editor", and the editor itself could have an "add to script menu" button or menu option. It could probably be based on one of dozens of existing open source editors with only slight modifications.

Not a necessity, but would be nice to have the editor integrated/linked to moho so that updating scripts could be a one-click thing. Keep in mind we'll probably have to go through our fair share of the debugging cycle.
-Keith
User avatar
AcouSvnt
Posts: 190
Joined: Wed Aug 04, 2004 4:14 am
Location: Rochester, NY
Contact:

Post by AcouSvnt »

Hey, for that matter, it could have a "run" button. The user shouldn't even need to save first; just let the script be run as it appears in the editor window.
-Keith
myles
Posts: 821
Joined: Sat Aug 21, 2004 3:32 am
Location: Australia, Victoria, Morwell
Contact:

Post by myles »

Ugh. Sorry Keith, I disagree with you on this one.

I can see it now - Lost Marble spending 70 percent of their time on editor feature requests (based on the text editor support forums I have known).
Case in point: not 5 minutes after you'd posted your original request, you already had an editor feature request. :lol:
I know if it didn't have the features (and keyboard shortcuts) of one of my favorite text editors, I'd be peeved (what, no code folding - how can anyone work without code folding? :evil: :wink: :lol: ).

Personally, I'd rather they spent their time on animation features. :wink:

Script writers can use their favorite text editor with all their favorite features and syntax highlighting controls, rather than spending time complaining that the Moho Lua editor doesn't function the same way as their favorite text editor. :roll:

Moho 5 reloads scripts (including detecting new ones) with Ctrl+F5, so you already have an "add to script menu" function, and you can have Moho and your text editor open at the same time.

Heck, it shouldn't require much effort to write a Lua script to start up your favorite editor, as either a menu script or a tool button.
Here's a quickie menu script that opens up one of my favorite text editors, SciTE, under Windows 2000 or XP:

Code: Select all

-- **************************************************
-- Provide Moho with the name of this script object
-- **************************************************

ScriptName = "MS_Edit"

-- **************************************************
-- General information about this script
-- **************************************************


MS_Edit = {}

function MS_Edit:Name()
	return "Start SciTE"
end

function MS_Edit:Version()
	return "1.0"
end

function MS_Edit:Description()
	return "Start SciTE"
end

function MS_Edit:Creator()
	return "Myles Strous"
end

function MS_Edit:UILabel()
	return("Start SciTE")
end

-- **************************************************
-- The guts of this script
-- **************************************************

function MS_Edit:Run()
	os.execute("start c:\\software\\wscite\\SciTE.exe")
end
Modify to suit. :)

As for a run button, just save, go to Moho, Ctrl+F5, and run the script within Moho (if this seems like too much effort, use a system-wide macro program to make it a one-key operation).

Running it within Moho also ensures you have the correct points selected, the vector layer active, or whatever other conditions the script assumes.

Well, anyway, that's my opinion, worth what you paid for it. :lol:

Regards, Myles.
User avatar
AcouSvnt
Posts: 190
Joined: Wed Aug 04, 2004 4:14 am
Location: Rochester, NY
Contact:

Post by AcouSvnt »

Oh yeah??? Well ...... YOUR MOTHER!!!!! :evil:

Seriously, though, I'm glad you put some real thought into your response. I wasn't going to push hard for the idea, since, like I said, it wouldn't be a necessity. I was just thinking in terms of ways to shorten the bug fixing/experimenting cycle.

One point of yours which I will disagree with, though: I don't think LM would be bombarded with text editor feature requests, because those who would actually be using such a thing are 1.) in the minority, and 2.) more likely to feel compassion for other programmers like LM. :)
-Keith
myles
Posts: 821
Joined: Sat Aug 21, 2004 3:32 am
Location: Australia, Victoria, Morwell
Contact:

Post by myles »

Hey Keith,

I'll meet you half-way :wink: - I agree with your point 1), but not your point 2) - never let compassion get in the way of a feature request :lol:

Unlike Moho itself, I fear many script writers will have an existing text editor to compare it with, and to generate feature requests for anything that doesn't match. :shock:

However, I'm continuously surprised by what Lost Marble manages to pack into Moho, so maybe they'll take this on board too, and give us a new favorite editor. :)
If Lost Marble runs out of animation feature ideas :wink: , I'm happy to join you in requesting this. I like it as an idea, I just think it's a low priority.

Regards, Myles.
User avatar
kdiddy13
Posts: 381
Joined: Tue Aug 03, 2004 10:26 pm
Location: New Zealand
Contact:

Post by kdiddy13 »

It could be a very simple script editor. Like Maya (I know, I know, but hey it's a cool program). It's script window is as simple as the text editor that comes with windows (Notepad). No frills. You type or paste in your script and run it. Nice for simple one time scripts or testing ideas.

One other thing it has is a constant print out of any scripts that the program is running and their related commands. It's a great way to learn how to do something when the documentation isn't all there (or you just can't decipher it's search engine...was that create sphere or ball?).

Not sure if it's at all possible. Just throwing it out there.
________
Ford Erika Platform Specifications
Post Reply