Question: Why is the code editor a canvas?

I would like to know why the code editor is a canvas. Why can’t it be a text area like all other IDEs?

Thanks,
Shane.

All other IDEs are text areas? Generally a text area is an OS widget and is very limited. Most advanced code editors I believe are a canvas type control, that I am aware of.

Oh, thanks. I was under the impression that they were. The creators of other IDEs never specifically state that their code editors are canvases, so…

I would like to see a more advanced code editor for Xojo though.

Take a peek at https://code.google.com/p/custom-editfield/

I actually mean the code editor in Xojo itself. Thanks for the link though, looks like a neat plugin.

Ah! Yeah, me too. Outside of Xojo, I use a much more powerful editor, Vim :slight_smile: So many times I wish I had the power of Vim in Xojo…

[quote=82113:@Shane Gibbs]I would like to know why the code editor is a canvas. Why can’t it be a text area like all other IDEs?

Thanks,
Shane.[/quote]

And I’ll be a TEXTAREA is more related to a CANVAS type control than you think (and this applies to Xojo as well as ANY other similar editor you will find… except those more closely related to a TERMINAL screen)

The simple answer is that the Xojo IDE code editor does a fair amount of drawing that is difficult (impossible?) to do in a standard TextArea control. Don’t get me wrong, it might be possible to get Windows TextArea to do that, but it might be impossible for the Mac or Linux, or any combination of the 3 platforms. It was probably easier to make their own then to bend the native controls of all 3 platforms to their will.

…because writing good code is an art ;-p

[quote=82113:@Shane Gibbs]I would like to know why the code editor is a canvas. Why can’t it be a text area like all other IDEs?
[/quote]
All the custom drawing around it and custom handling for hit spots (code folding) etc

Emacs :stuck_out_tongue:
You’d be surprised about what keyboard commands already work

[quote=82113:@Shane Gibbs]I would like to know why the code editor is a canvas. Why can’t it be a text area like all other IDEs?
[/quote]

File a feature request.

I’d like to know why this matters ?

[quote=82294:@Norman Palardy]Emacs :stuck_out_tongue:
You’d be surprised about what keyboard commands already work[/quote]

I’m a long time Emacs user as well, always wind up bouncing between the two. Do tell, what advanced functionality in Emacs does Xojo have?

Well if the shortcut works in TextEdit we should handle it as well
That doesn’t mean there’s lots of macro recording or anything but keyboard short cuts should be there

[quote=82314:@Norman Palardy]Well if the shortcut works in TextEdit we should handle it as well
That doesn’t mean there’s lots of macro recording or anything but keyboard short cuts should be there[/quote]

Oh TextEdit? I thought you meant Emacs. For example, M-X (goto line number), M-C-f (goto previous bracket), C-x b (switch buffers … maybe tabs in Xojo?), M-z (one of my favorites, zap to character), etc…

TextEdit also supports lots of emacs short cuts :stuck_out_tongue:

Most of this comes for free from the text input system on OS X so I’m trying to find the OS X std reference for what they are since we didn’t add any over whats there by default

But its always a pain in the ■■■■ to find this list

Is there a list of shortcuts available in the Xojo editor somewhere?

Thanks and thanks to all for explaining![quote=82308:@Norman Palardy]I’d like to know why this matters ?[/quote]

Because I naturally assumed other IDEs were text areas, or at least they felt like that.

I would like to know too.

The only one I know of is: http://documentation.xojo.com/index.php/Keyboard_Shortcuts but that is hardly extensive, especially if Xojo supports a lot of the Emacs shortcuts.

I just did a spot-check here and a bunch of these work. “Meta” is the option key unless it requires a simple letter, in which case it’s option-control-.

For example, option-delete, option-forward delete = deletes a word. Control-a, control-e = go to front, end of line.

I’ll never remember these, but neat.