World: r3wp
[View] discuss view related issues
older newer | first last |
Jerry 23-Jan-2007 [6639] | We have a software product. The version one used .NET, which made our software 10 MB in size. The version two uses C/C++ and some third party GUI components, it's 6 MB. but that's still too large for us. Few days ago, my boss asked me whether I could redesign the GUI part of our software using REBOL. and I said ... maybe, if I could make my REBOL code call GetGlyphOutline successfully. Our product needs Chinese character support. |
Rebolek 23-Jan-2007 [6640] | Pekr: Actually, REBOL's runtime is about same size on different operating systems (OSs?). dotNET is for Windows only. OK, there's MONO for Linux but I've never tried it. So dotNET may be some blablablamarketingchitchatblablabla but what si more useful in real life? |
Pekr 23-Jan-2007 [6641] | Rebol :-) |
Rebolek 23-Jan-2007 [6642x2] | well, there you go :) |
Jerry: I just hope R3 will have better localization support. Lot of my work is localization to east-asian languages and REBOL is already helping me with localization to European languages. I hope for Unicode support and other enhancements to R3. | |
Jerry 23-Jan-2007 [6644] | If REBOL/view supported native codepage, my life could be much easier. |
Rebolek 23-Jan-2007 [6645] | oh, yes. can't say more |
Jerry 23-Jan-2007 [6646] | Many religions and cultures believe that if we pray hard enough, and if there are many of us, our dream could come true. "please support local codepage, please support local codepage ... " |
Rebolek 23-Jan-2007 [6647] | I'm not sure if this does not belong to chitchat ;) |
Ingo 24-Jan-2007 [6648] | Pekr ... I may be wrong here, but doesn' t .Net call Windows libs, too? |
Janeks 24-Jan-2007 [6649] | Hi! How to keep selection after show for text-list? F.ex. code changes text-list data, for selected row, than after show a-text-list, selection of selected row disapears. |
Janeks 25-Jan-2007 [6650] | O'k found myself - selection is in face/picked and they should be equal of elements in face/data: F.ex: face/data: [ "peas" "apples" ] face/picked: [ "apples"] the above statement shows selection in face after "show face" face/picked: [ "apple" ] the above statement do not show any selected row after "show face" |
Henrik 2-Feb-2007 [6651] | I've noticed that the 'resize event automatically causes a SHOW, as far as I can see. This seems to me is a little silly, since there is no chance to resize your GUI before this SHOW and you need to show the GUI twice, slowing down the display process by a factor of 2. Is there a way to resize the GUI before 'resize does the SHOW or disable the SHOW on 'resize event? |
Gabriele 2-Feb-2007 [6652] | maybe feel/redraw ? |
Anton 2-Feb-2007 [6653x9] | Henrik, that doesn't sound right to me. What's the code in question ? |
Actually, I think you are right: | |
view/new/options window: layout [box: box] 'resize window/feel: make window/feel [detect: func [face event][if event/type = 'resize [box/color: red] event]] do-events | |
The box color is only revealed to be red on the second resize. So it looks to me like the SHOW happens *before* the detect function is passed the 'resize event. | |
Let's try Gabriele's suggestion: | |
view/new/options window: layout [box: box] 'resize window/feel: make window/feel [ detect: func [face event][if event/type = 'resize [print "detect 'resize" box/color: red] event] redraw: func [face action position][print "redraw" if face/size <> face/old-size [print "changed size" box/color: blue]] ] do-events | |
This is printed: redraw changed size detect 'resize | |
Wow! What a revelation. It looks like REDRAW is called first, then SHOW, then DETECT is called. | |
Thanks for asking that question, Henrik ! I've been blithely using DETECT all this time and not noticing that it was doing a SHOW first. I'll try using REDRAW instead of DETECT from now on and see how it performs. | |
Maxim 2-Feb-2007 [6662x4] | yes, that is one of the things I had to work out in GLayout too... :-) |
anton, but when you resize the window with mouse and by changing the size of the window face, I think the order might actually change. | |
I remember having a hell of time trying to resize the window properly without it causing a cascade of resize/show events... | |
(where talking a few years ago so my memory is rusty) | |
Anton 3-Feb-2007 [6666x8] | Ok, here's an issue that's just come up for me: |
view layout [field [print "validate 1"] field [print "validate 2"]] | |
If you type in a field, then press TAB it prints "validate" - Good. if you type in a field, then press SHIFT-TAB, it does not. - Bad. <---- | |
This behaviour is specified in the EDIT-TEXT function in CTX-TEXT, in the TAB-CHAR handler. I seem to recall someone actually asking for this behaviour. I think they wanted a way to "reverse out" of a field without validating it. This seems wrong to me. I would have thought Shift-TAB would be just like TAB, except going in the opposite direction. I want to always validate when leaving the field. It would be better if undo was implemented for the field. When all the changes are undone, then the face/dirty? field should be reset and the face/action can avoid validating unnecessarily. The ESCAPE key could be used to undo all changes (and so avoid validating) before the user TABs or SHIFT-TABs out of there. | |
ie. I don't want to leave a field with unvalidated data in it. I have a decimal-field, which is just a field whose action just cleans the face/text and ensures that it can be converted to a decimal. | |
If the user can just SHIFT-TAB after making changes to the field then the validation in the action block is skipped and the field is left showing invalid data. | |
The line in the TAB-CHAR handler in EDIT-TEXT which is causing all the trouble is this one: if not event/shift [action face face/data] This line is gonna get the knife, if I have anything to do with it. | |
So I might make a RAMBO bug report on that. Anyone have any comments before I do ? | |
Gabriele 3-Feb-2007 [6674x2] | this is a difficult issue. personally, i prefer tab and shift-tab to not do any validation, while enter does. it's not always a good idea to not let users go away from a field just because it is invalid. |
however, since this depends on the application etc., i think the best solution is to call the action on enter, and just call face/refocus on tab / shift-tab. then you can make refocus do the same as the action, or not. | |
Pekr 3-Feb-2007 [6676] | Gabriele - will there be anything improved in regards to keyboard and R3? Key-up event, ctrl tab, multiple keys pressed? |
Gabriele 3-Feb-2007 [6677] | there are no details on this currently. but, this part should be in the open source part, so as long as people can manage to let it work consistently across platforms, i'm sure it can be done. |
Henrik 3-Feb-2007 [6678] | Anton, gabriele, thanks alot for those tips! Maxim also told me that the feel must be set every time you view the window. |
Gabriele 3-Feb-2007 [6679x3] | yes, view can change win/feel |
i think that the latest versions don't, but there may still be cases where that happens. | |
to be safe, you can view/new, change feel, then do-events. | |
Anton 3-Feb-2007 [6682x3] | Gabriele, I see your point: The user might want to enter some data in a field, but part way through think of something else and leave the field to attend to it, then return to the original field to complete the data entry. Finally the enter key will do the face action which can validate the field. |
I think your solution using REFOCUS is a good one. | |
Henrik, welcome. Just look in source of VIEW to see how it sets the window feel. Gabriele is right, nowadays it shouldn't cause much trouble. | |
Pekr 3-Feb-2007 [6685] | Are we still going with 'feel like it exists today, even for R3? |
Henrik 3-Feb-2007 [6686] | I hope it will allow more granular events. |
Pekr 3-Feb-2007 [6687x2] | I hope too. I don't like mega monstrose 'feel. It does not scale well. On one hand, you can code everything from one place, on the other hand, it is more handy for "style authors", than end-users ... |
Ah, but maybe by "more granular" you meant receiving events more often? | |
older newer | first last |