On Tuesday, August 16, 2016 at 12:19:13 PM UTC-5, Dave MacFarlane wrote: > > What do you mean "no actual text editors"? By my count of the > importers that GoDoc knows about 3 out of 8 of the projects that are > using it are text editor apps. > > - Dave >
Go to exp/shiny/examples/textedit. go run main.go Try to edit. Nothing happens. Click - no caret appears. Type, nothing happens. Try to select text, nothing happens. Look at the list of GoDoc projects: go-vu: not clear what this is, but it looks like a GUI implementation of its own, resting on top of Cocoa, mobile, or Shiny, but https://github.com/achille-roussel/go-vu/blob/master/text.go looks like his custom implementation of a text edit. view-fits: image viewer for specific file type. de: programmer's text editor - uses the Shiny screen as an image window, renders text and line numbers into that on its own, does not use any Shiny widgets (hardly surprising - this is a VI style mode-based editor, so a traditional text edit would hardly be a viable basis). See https://github.com/driusan/de/blob/master/kbmap/insertmode.go for basic implementation of text editing T: T text editor. https://github.com/eaburns/T/blob/master/ui/textbox.go - this is his own textbox implementation - presumably because Shiny does not have a usable one yet. hplot: histogram and function plotter. linedrawer: draws steps from 1-dimensional cellular automata goapple2: apple II emulator, using Shiny as a framebuffer/eventloop, basically. Again, not using built-in text widgets, doing its own rendering and text handling. graphics/cmd/edit: popping up a couple of levels, to graphics, here is a line from their readme: "editor provides a graphical, editable text area widget." Again, their own implementation of a text editor widget. So, again, not one of these programs uses the Shiny text widget. "sigint.ca/graphics/editor" looks like an interesting implementation that I may try to use, as it appears on the face of it to have been designed as a drop-in usable widget with minimal dependency contamination. But my basic point stands - the exp/shiny implementation lacks the basic widgets to implement the average desktop application, particularly of the data entry variety, but is suitable as a backing framebuffer/eventloop. Expanding your dependencies may gain you a text editor widget, but you would still be on your own for implementing buttons, radio-buttons, drop-down/lookup/choosers, list selectors, tree controls, grid controls. Unless it is your *goal* in the first place to write such a set of widgets, then currently you are probably better off implementing back-end logic in Go and front-end interfaces in something else, or looking into alternative more feature-complete GUI packages for Go. The text widget itself was only added to Shiny on June 12, and there is still a comment in the file that reads "// TODO: cursors + editing (not just viewing) text, key + mouse events, // scrolling, load/save, clipboard." so I don't think I am making any claims the developers would not acquiesce to. Surely this will change over time, and the implementations above are evidence enough that Shiny is a viable platform on which to build complex widgets. I am not at all meaning to disparage the project, just trying to offer a bit of my own experience. Howard -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.