World: r3wp
[!REBOL3 GUI]
older newer | first last |
shadwolf 20-Oct-2010 [4043x3] | to each of those tools there is a auto generated form that you will feel to set up your function arguments |
and then you have the boxes with are "user function" you put tools in them and you related them one to another to make them cooperate | |
that's basically what i have in mind | |
Maxim 20-Oct-2010 [4046] | this is known as a "process" in elixir... scripts which build up nodes and link them up in a specific way. tools are processes which have a persisten interface (cli or graphical) |
shadwolf 20-Oct-2010 [4047x2] | ok . It's interresting talk but it's been really late i need to go to bed ;) |
have a good and smooth progression then maxim | |
Maxim 20-Oct-2010 [4049x3] | in many ways elixir models the semantics of nature better than all this pseudo desktop and CS ideology. |
yeah... there's still a long ahead of me... though I'm now running instead of crawling towards it. | |
long *road* | |
shadwolf 20-Oct-2010 [4052] | yeah but i'm a drunken idiot so most of it is too polished for my grasp ;) |
Henrik 25-Oct-2010 [4053] | now discussing undo/redo management. There is a small spec available here: http://rebol.net/wiki/R3_GUI_Specs#Undo.2FRedo_Management any input is welcome. |
Maxim 25-Oct-2010 [4054x2] | undo-redo must not be window based but application-wide. it will be almost useless otherwise. |
though it could have different undo/redo threads which are selected. | |
Henrik 25-Oct-2010 [4056] | undo-threads, that was the thought, but perhaps coupling it to per window is wrong, if you have multi-window actions occuring. |
Maxim 25-Oct-2010 [4057] | forcing a 1:1 undo thread to window relationship breaks up quickly when you consider that some windows operate on many threads and some threads will require many windows . |
Henrik 25-Oct-2010 [4058] | ok, then we would need a different method for coupling an undo context rather than in the face. |
Maxim 25-Oct-2010 [4059] | best is to have a simple block with named threads... and you force people to supply the thread name when using any of the undo/redo functionality. also, undo/redo is best done when its not directly part of the gui. though its nice when the undo engine is able to speak to the gui directly. the gui must not be the "brain" of the undo.. |
Henrik 25-Oct-2010 [4060] | then perhaps this could be done: undoer: make-undoer view [panel [...bunch of fields...] options [undo: 'undoer]] |
Maxim 25-Oct-2010 [4061] | having written a few, I recommend making it an external api which is fully "gui enabled" this way, undo events can automatically call face accessors, and you can put the undo stuff in the logic rather than the gui. many times, the logic might generate a few undo, or none, based on things which the gui can't properly be aware. |
Henrik 25-Oct-2010 [4062] | although that specifically implies that you actively need to do some specific work to activate undo. I don't like that. |
Maxim 25-Oct-2010 [4063] | undo/redo is a pretty complex thing and unless you've got a non-destructive dataset, its almost imposible to make it a generic tool that is actually stable. |
Henrik 25-Oct-2010 [4064x2] | yes, the idea is also that it can be entirely decoupled from the GUI, so if you don't want it or want to use a different way to undo, that should be possible. the task for undo as I see it is to read actions and allow playing them back by taking control of the GUI. |
non-destructive datasets: this also implies that the undo engine really stores all temporary data. it could be an issue with larger data sets, unless it's possible to compress them into changes. | |
Maxim 25-Oct-2010 [4066x5] | take the case of a system where the undo crosses the lifespan of a window (or a few) how do you undo that? re-open a new window which isn't connected to anything? it basically has to be built with undo actions at the center. each action has to be able to handle any gui issues gracefully... the gui itself cannot manage that unless its an uber simple gui. |
might even be that the gui which manages the effect cannot be re-opened... ex photoshop. and yes the data has to be stored somehow... another thing the undo "actions" are able to manage better/ | |
they might know how to store things in diff mode, but only it can know based on current state, when its remembering. | |
also, there is a tricky thing to redoing in that its often more like a complement than an inverse of an undo... especially when storing diff data. | |
so the undo data and the redo-data aren't necessarily the same :-( my best system was using dataflow nodes. but it requires a dataflow dataset. | |
Kaj 25-Oct-2010 [4071] | I'm pleased with this discussion. Undo journaling is sorely lacking from many systems |
Gregg 25-Oct-2010 [4072] | The standard design pattern applied to undo/redo is the Command pattern, which implies that everything you want to undo or redo is a command that knows what it means to perform an action and apply its inverse, and the target of the action. |
Maxim 26-Oct-2010 [4073x2] | yep... what I call actions above. |
also most undo/redo tie-in commands with macros and/or actual gui buttons and menus... sort of like the internal API for the lower-level stuff. each of these commands/actions puts itself on the undo stack and usually has a counter command... add-text/remove-text, edit-record/restore-record, etc. | |
shadwolf 26-Oct-2010 [4075x11] | only edit face needs the undo/redo stuff ... and mostly Area where you can input large text for text field it doesn't matter and could bring a security breach ... If you ca recall the previous password and user entrered in a login window for example. |
efficient undo/redo have to be face based. The need for other face to access it is irrelevant as it's a temporary buffer and that this buffer main fonction is to keep tracks of the changes. Wider you keep the tracks heavier is the syttème. If that systeme could be arguments passed to configure and tune it that would be top. | |
where undo/redo starts to be challenging is when you don't deal with pure texte anymore but that you have to deal with formated text. | |
with only keeping full tracks for the "actions" into an Area type face the undo/redo statcks could be on big documents really heavy in memory. | |
some kind of binary labelling for action is then needed to keep memory use to the minimum. You have to keep record fo the postion elements within the text too... | |
another optimisation is that when you create a document you will obviously do alot of insert action so the idea is to regroupe the insert actions betwin insert space For example: insert "a", insert "b"', insert "c"; insert " " -> trigger of the sorting algorithm insert "abc" [line1-:-0] (this optimisation can be seen in OpenOffice 3.2) Would be better if instead of registery the action done by the user you register the mirror action to be apply to reverse it then you have delete "a", delete "b", delete "c"; delete " " -> trigger concatenation algorythm delete "abc"@line1:0, delete "space"@line1:3 (position here is set as line number followed by the caracters to pass in the line before reaching the character can speed up rendering if you are able to use remove index stuff in my opinion) | |
anyway good luck in this hudge task you could write a book only on the undo/redo functionnality ;). | |
there is so many to say about undo/redo functionnality that it can be the subject of a book of it's own easyly.... (sorry previous sentence wasn't pretty understandable) | |
undo/redo works as a LIFO pile. | |
you have to keep the deletions active in you record lets say the user does: insert "a", insert "b", insert "e", backspace "e", insert "c" then the concataining algorythm have to merge insert "a" and insert "b" into insert "ab", but need to keep record of the actions insert "e", backspace "e", insert "c" in order to unpile it properly. | |
otherwhile you loose information or better say course of actions. | |
Gregg 26-Oct-2010 [4086] | You could write a lot about it for sure, but it's worth looking at for the general case beyond simple char-by-char text edits. Consider fwd/back navigation and breadcrumb trails. The trick is to leverage the generality and use it to make things easier, rather than making more complex. |
Henrik 26-Oct-2010 [4087] | it's potentially a rat's nest to stick our fingers into, but from a simple developer's starting point, it should work without doing anything to the style or the layout. that's where I think the design should start. |
Gregg 26-Oct-2010 [4088x3] | Yes. The style needs to interface to the engine without user intervention. |
Style writers are the people doing the work for the rest of us. | |
And the engine should make it easy for style writiers. :-) | |
Henrik 27-Oct-2010 [4091] | New r3-gui.r3 available at: http://94.145.78.91/files/r3/gui/r3-gui.r3 No changes to other components. |
Maxim 27-Oct-2010 [4092] | thx. |
older newer | first last |