World: r3wp
[View] discuss view related issues
older newer | first last |
Jerry 19-Jan-2007 [6616] | Not much. It just parses the English sentence inputed by the user, makes a REBOL block, and draws the REBOL block as a syntax tree. That's all. I am thinking about using it to "help" people translate documents or something. I might combine it with an REBOL Chinese Editor that I developing. Check it out here http://city.udn.com/v1/blog/photo/photo.jsp?uid=JerryTsai&f_PHOTO_ID=472052 |
Maxim 19-Jan-2007 [6617] | so you decided to show off your stuff finaly :-) |
Jerry 19-Jan-2007 [6618] | Maxim, yes. It took me a lot of nerve to show them, because they're just semifinished. |
Maxim 19-Jan-2007 [6619] | but they are both very impressive. when looking at your font output, we don't even realise that all of that is draw shapes! you've coded your own font engine.. its a pretty cool result. They look like high-quality system fonts to me! |
Jerry 19-Jan-2007 [6620] | Thanks, Maxim. |
Anton 19-Jan-2007 [6621] | Both look very good, Jerry. |
Janeks 20-Jan-2007 [6622] | Is it possible to catch program close event - when windows shut down and do something (save data)? The same appies when somebody closes all program windows or terminate process from task manager. |
PeterWood 20-Jan-2007 [6623] | Does this help http://www.rebolforces.com/view-faq.html#sect3.3. |
Janeks 20-Jan-2007 [6624] | It help for window face, but what if there is no windows(faces) open at closing time. F.ex. application at that moment is witout opened windows and there is only taskbar icon. |
Anton 21-Jan-2007 [6625] | maybe the system:// port will receive a windows message.. not sure. |
Cyphre 21-Jan-2007 [6626] | Very nice, Jerry! |
Jerry 21-Jan-2007 [6627] | Thanks, Anton and Cyphre. I am still improving it. : ) |
Jerry 22-Jan-2007 [6628] | REBOL[] font-C: make face/font [style: [ bold ] size: 64] draw-block: [ ] for i 0 9 1 [ append draw-block compose/deep [ pen (to-tuple reduce [ 255 to-integer (255 / 10.0 * (i + 1)) to-integer (255 / 10.0 * (i + 1)) to-integer 255 - (255 / 10.0 * (i + 1)) ] ) line-width (10 - i) line-join round font font-c text 30x0 vectorial "REBOL BAR" ] ] view/title layout [ box black 450x200 effect [ draw draw-block ] ] "NEON" |
Maxim 22-Jan-2007 [6629] | hehe... do we have new demo contender here? |
Jerry 22-Jan-2007 [6630x2] | just for fun : ) |
The Truth is that... I did the same "Neon" program in C# too. Guess what? REBOL version is much faster than C# (.NET). | |
Anton 22-Jan-2007 [6632] | nice |
Rebolek 23-Jan-2007 [6633] | Jerry that's really nice! BTW. how big is C# version? :) |
Jerry 23-Jan-2007 [6634] | Rebolek, C# version is about 100 lines of source code. |
Rebolek 23-Jan-2007 [6635] | Jerry thanks, I though that. On one hand, there's 600kB REBOL/View with 20 lines of source code, on the other hand, there's ~100 lines C# source code on 20+MB dotNET...but that's the power of marketing :) Anyway, very nice demo. |
Jerry 23-Jan-2007 [6636] | Well. the .NET 3.0 Runtime is 49 MB, not 20+MB. .NET 2.0 is 23MB though. |
Rebolek 23-Jan-2007 [6637] | Oh. I didn't know there's NET 3.0. I just need 2.0 for work and that's enough for me ;) Anyway, REBOL's result is much more interesting with .NET 3.0 than with .NET 2.0 :o)) |
Pekr 23-Jan-2007 [6638] | The question is, if we can compare. Isn't NET self contained runtime environment? Rebol calls to OS, so can we say, that Rebol has only 1MB? |
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) | |
older newer | first last |