World: r3wp
[View] discuss view related issues
older newer | first last |
Geomol 30-Nov-2005 [3395x2] | :-) You're dealing with objects. A face is an object. The WITH block assign values to the attributes within the object, or extend the object with new attributes. Just like: o1: make object! [a: 0] o2: make o1 [a: 1 b: 2] ; the attribute a gets the value 1, and a new attribute b is created and gets the value 2. Some data types in REBOL are references, when used in objects, some are not. (Remember that data types are grouped as scalars, series, etc.) |
If you wanna export some face attributes outside, you could do that with the action attribute (the action block following many styles in VID for example) or in the feel functions. a: false view layout [toggle [a: face/data]] This will change a according to the state of the toggle. | |
Henrik 30-Nov-2005 [3397] | that's also the solution I found... |
Geomol 30-Nov-2005 [3398] | Then you're not lost at all! It's not as complicated as quantum mechanics! ;-) |
Henrik 30-Nov-2005 [3399] | it _would_ have been nice to be able to do the other thing, but the code is almost as streamlined as I wanted it to be now. I guess I need to study more on datatypes... |
Geomol 30-Nov-2005 [3400] | The data types in REBOL are one major cornerstone and reason, why so much functionality can be written with such little code. (As I see it.) |
Pekr 1-Dec-2005 [3401x2] | Maybe new release is near :-) I just noticed there is few of nice bugfixes with comment like: Fixed in Core/SDK 2.6.2 and View 1.3.2 .... |
I mean - rambo entries ... | |
Graham 1-Dec-2005 [3403] | interesting ... maybe in time for Xmas ? |
Pekr 1-Dec-2005 [3404] | maybe :-) |
Henrik 5-Dec-2005 [3405] | I could really use a method for slowing down mouse events globally. I have a rather complex GUI with about 50 buttons, 2 listviews, fields and whatnot. If I accidentally click'n'drag above an empty area of the GUI, the interface stops responding for several seconds. I wonder how this could be done... |
Gabriele 5-Dec-2005 [3406] | event filtering, or romano's eat function. |
DideC 5-Dec-2005 [3407] | does not work anymore with new event handling of 1.3 |
Gabriele 6-Dec-2005 [3408] | shouldn't be hard to fix. |
DideC 6-Dec-2005 [3409x2] | Event is still a "drak area" for me ;-) |
drak=dark | |
Josh 13-Dec-2005 [3411x2] | I have a frustration about the View editor that I don't see in RAMBO. When no text is selected and one hit's ctrl-C, then ctrl-V it pasts the entire document wherever the caret is. I'm not sure if this is supposed to be a feature, but does anyone else find it annoying? |
I'm adding it to RAMBO though | |
Henrik 13-Dec-2005 [3413] | The editor code is available at http://www.rebol.com/view/editor.r. Shouldn't we try to fix this ourselves? The editor has so many bugs that should be relatively easy to fix. |
Josh 13-Dec-2005 [3414x4] | Sure, I will try to look at it when I get home |
This is not an issue of the editor, but of the way text is copied to the clipboard from (at least) an area | |
I will hunt around for a while, but I'm not sure where the clipboard code actually is. | |
It seems to be the behavior of text editable faces | |
Henrik 13-Dec-2005 [3418] | interesting.... meanwhile, I'm cooking up a replace requester for the editor. maybe I'll have something ready by the weekend. (a bit busy right now) |
Josh 14-Dec-2005 [3419] | The RAMBO ticket is outdated now. Can anyone point me in the right direction as to whether this is just part of VID or something deeper than that? |
Anton 14-Dec-2005 [3420x4] | The problem is here: probe get in ctx-text 'copy-text func [face][ if not copy-selected-text face [ hilight-all face copy-selected-text face ] ] |
And this fixes it: | |
>> use [body][body: second get in ctx-text 'copy-text remove remove body remove back tail body] == [] >> probe get in ctx-text 'copy-text func [face][copy-selected-text face] >> view layout [area "hello"] >> view layout [field "hello"] | |
I thought COPY-TEXT might be used by svv/vid-styles/field/access or area/access but it is not (thus, it looks safe). I think COPY-TEXT is trying to be too smart. I think probably that function should not exist. So it might be better to replace calls to COPY-TEXT with calls to COPY-SELECTED-TEXT, whose claimed functionality is more specific. | |
Josh 14-Dec-2005 [3424x3] | Thanks Anton, I'm poking around at all that |
I'm not totally sure what this note from vid.r means: copy-text: func [face] [ if not copy-selected-text [ ; copy all if none selected (!!! should be line) system/view/highlight-start: face/text system/view/highlight-end: tail face/text copy-selected-text ] ] | |
Or at least I disagree. I think the clipboard should be untouched if nothing is highlighted | |
Anton 14-Dec-2005 [3427x2] | Yeah. it sounds like the programmer didn't know a good user interface. |
It's like one of those little cool things: "it'd be cool if it could also do this ..." | |
Josh 14-Dec-2005 [3429] | heh, yeah. I agree with your solution, although it''s probably better to leave a shell of a function just to maintain backwards compatibility with scripts that perchance use copy-text |
Anton 14-Dec-2005 [3430x2] | Yes, less changes required. |
Scripts really shouldn't be using COPY-TEXT, at least not the "copy all" functionality. If that's what they wanted, they would more likely be accessing face/text directly or using access/get-face | |
Josh 14-Dec-2005 [3432] | It looks like the only thing on rebol.org that uses it is Volker's spell check style |
Anton 14-Dec-2005 [3433] | What does his code use it for, though ? I'd be surprised if he uses it for the "copy all" functionality. |
Volker 14-Dec-2005 [3434x2] | Its a patched clone of ctx-text, not my fault ;) |
; copy all if none selected (!!! should be line maybe it should not be "copy all", but "copy line with caret"? That would make sense, c-c c-v would double the current line. | |
Josh 14-Dec-2005 [3436x2] | Did a quick look through google, but only saw one thing. I have not looked at RebGUI, but I assume Ashley has written his own copy-text functionality. |
My preference would still be that it would not copy anything if nothing is selected. I don't know what sort of behavior people would naturally expect from a text editor | |
Henrik 14-Dec-2005 [3438] | I think the major annoyance is that it can't be undone.... |
Anton 14-Dec-2005 [3439] | Volker, aha not your fault ! Don't agree about copying the current line. It may look handy, but I still think if you want to copy the line, you should select the line first. Henrik, you mean undo as in the system clipboard should be able to go back to an older state ? Or just that, since the system clipboard currently has no history, copying all text overwrites the clipboard too easily ? |
Henrik 14-Dec-2005 [3440] | anton, I just meant a plain undo in the editor to avoid destroying your text file, by accidental pasting. |
Josh 14-Dec-2005 [3441] | I submitted a new ticket. What are some of the other annoyances / grievances people have with editor? or requested features? I would like to join Henrik in fixing some of them. |
Henrik 14-Dec-2005 [3442x2] | it might not be a bug in the editor, but try to load a large file, and select text with the mouse. you can't push the text scrolling down, if you go beyond the upper or lower window edge |
scrollling down or up | |
Anton 14-Dec-2005 [3444] | I think one of the French (Dide ?) made an AREA style with that functionality. |
older newer | first last |