World: r3wp
[!RebGUI] A lightweight alternative to VID
older newer | first last |
Ashley 2-Oct-2006 [4809] | #include %ctx-rebgui.r or run create-distribution.r to produce rebgui.r and then #include %rebgui.r Note that %rebgui.r is also available at http://www.dobeash.com/download.html , but may not be the latest build. |
Ashley 7-Oct-2006 [4810] | Uploaded build#34 which closes the following tickets: 21,53,3,44,41,4,5 and fixes a few other problems: 1) Table dividers did not resize 2) Drop-list failed to display when items > available space and direction was 'downward 3) Replaced REBGUI-BUILD check with ctx-rebgui/build word 4) Added /caret-head and /caret-tail refinements to show-text (makes writing certain on-* type triggers easier) |
Graham 7-Oct-2006 [4811] | ticket 53 is still faulty when I just tested it now. |
Claude 7-Oct-2006 [4812] | very good thanks |
Graham 7-Oct-2006 [4813x3] | i don't know if I'm not used to these table dividers now extending down the whole table .. perhaps we could have an option to turn them off?? |
I grabbed the drop-list by itself ... and I get this error | |
** Script Error: caret-to-offset expected offset argument of type: any-string ** Where: edit-text ** Near: caret: caret-to-offset face view*/caret attempt | |
Graham 17-Oct-2006 [4816] | I find the table dividers now visually obtrusive .. is there a way to put them on a diet ? |
Ashley 17-Oct-2006 [4817] | I'm adding a 'no-dividers option to the table widget, and looking at ticket 53 and the drop-list error ... hopefully I'll get some time over the weekend to resolve these. |
Pekr 17-Oct-2006 [4818] | could text-list be fixed, in the same manner, as table was, that scrolling hilite by holding arrow-up (down), simply does not hide hilite "under the horizon"? :-) |
Louis 18-Oct-2006 [4819] | Why won't this line display: label "Project:" text (form project-name/text) 80x5 |
Anton 18-Oct-2006 [4820] | Is there an error message ? |
Louis 18-Oct-2006 [4821x4] | No, it just doesn't display anything. |
No, I was wrong about that. Just a few seconds.... | |
Well, there is no error message. But a long object is being displayed, with its text: field an empty string. | |
Here is the code segment: do show-cc: make function! [] [ display "CRITICAL CHAIN To-Do List Maker Version 1.0.0" [ ;banner "0:00:00" rate 1 effect [gradient 0x1 0.0.150 0.0.50] 115x24 ;feel [engage: func [face act evt] [face/text: copy to-string round (session-time + (difference now/precise time-start)) show face]] tab-panel #HW data [ "Projects" [ label "Project Name:" project-name: field 144x5 label "Priority:" priority: drop-list 30 #W "1" data ["1" "2" "3" "4" "5" "6" "7" "8" "9" "10"] 10x5 return label "Objectives:" label " Exchange Rate" exchange-rate: field 20x5 return area 200x50 return label "Deliverables:" return area 200x50 return button "Save" [show-text ex-status "Saved"] button "Add" [show-text ex-status "Edit"] return ] "Tasks" [ ;(print [form project-name/text]) ;label "Project:" display (form project-name/text) 80x5 ;[show-color ex-dr1op-list to word! face/text] label "Project:" t-project-name: text (form project-name/text) 80x5 ;ex-drop-list: box 20x20 black label "Task Name:" t-name: field 79x5 return label "Description:" return t-description: area 200x50 return label "Vender/Work Place:" t-vw-place: drop-list "Black" data ["Grand Hardware" "Mega Mall" "Pasar Lima"] 64x5 label "Resources Needed:" t-resource: drop-list data ["Bus to Manado" "Louis A. Turk" "Caleb Turk" "Samuel Turk" "Compaq SR1520NX"] 64x5 return label "Total Hours Required:" t-hours: drop-list data [0.2 0.4 0.6 0.8 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0] 14x5 label "Cost:" t-cost: field return return button "Save" ] | |
Graham 18-Oct-2006 [4825] | Works for me. |
Louis 18-Oct-2006 [4826x3] | Hummm, what could be causing it not to work for me? |
Sometimes when I enter text in the project-name field of the Projects tab and then click on the Tasks tab I get a "tell Microsoft about this" type error, but not always. | |
Usually, it just doesn't display anything. | |
Anton 19-Oct-2006 [4829] | What rebol version are you running ? Are you encapping ? What does the Microsoft error message say exactly ? Can you reproduce the error reliably ? Please post a copy of the code that can reproduce the error so we can try to track it down. |
Graham 19-Oct-2006 [4830x2] | maybe you have started the event loop |
haven't | |
Louis 19-Oct-2006 [4832x8] | Ok, here it is: rebol [ title: "CRITICAL CHAIN To-Do List Maker" owner: "Louis A. Turk" rebol: none ] either exists? %session-time.txt [ ;for digital timer session-time: to-time read %session-time.txt ][ session-time: 0:00:00.000 write %session-time.txt session-time ] time-start: now/precise do %rebgui.r ;WHAT IS rebgui-ctx.r and where do I get it????????????? unless value? 'ctx-rebgui [ either exists? %rebgui-ctx.r [do %rebgui-ctx.r] [do %rebgui.r] ] set-colors tab-size: 120x55 fonts: reduce [font-sans-serif font-fixed font-serif "verdana"] if exists? %project-list.txt [project-list: read %project-list.txt][write %project-list.txt [] project-list: []] do show-cc: make function! [] [ display "CRITICAL CHAIN To-Do List Maker Version 1.0.0" [ ;HOW CAN THE FOLLOWING TWO LINES BE CONVERTED TO WORK WITH RebGUI???????? ;banner "0:00:00" rate 1 effect [gradient 0x1 0.0.150 0.0.50] 115x24 ;feel [engage: func [face act evt] [face/text: copy to-string round (session-time + (difference now/precise time-start)) show face]] tab-panel #HW data [ "Projects" [ label "Project Name:" project-name: field 144x5 label "Priority:" priority: drop-list 30 #W "1" data ["1" "2" "3" "4" "5" "6" "7" "8" "9" "10"] 10x5 return label "Objectives:" label " Exchange Rate" exchange-rate: field 20x5 return area 200x50 return label "Deliverables:" return area 200x50 return button "Save" [show-text ex-status "Saved"] button "Add" [show-text ex-status "Edit"] return ] "Tasks" [ ;WHY DOES THE FOLLOWING LINE ALWAYS DISPLAY A BLANK STRING????????? label "Project:" t-project-name: text (either <> "" project-name/text [(form project-name/text)]["ERROR: Project NAME field is empty."]) 80x5 label "Task Name:" t-name: field 79x5 return label "Description:" return t-description: area 200x50 return label "Vender/Work Place:" t-vw-place: drop-list "Mega Mall" data ["Grand Hardware" "Mega Mall" "Pasar Lima"] 63x5 label "Resources Needed:" t-resource: drop-list "Louis A. Turk" data ["Bus to Manado" "Louis A. Turk" "Caleb Turk" "Samuel Turk" "Compaq SR1520NX"] 63x5 return label "Total Hours Required:" t-hours: drop-list data [0.2 0.4 0.6 0.8 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0] 14x5 label "Cost:" t-cost: field return return button "Save" [] ] "Venders/Work Places" [ label "Vender/Work Place Name:" vw-place: field 152x5 return label "Street Address:" vw-street: field 171x5 return label "City:" vw-city: field 103x5 label "State" vw-state: field 38x5 label "Zip:" vw-zip: field 23x5 return label "Phone 1:" vw-phone1: field 29x5 label "Phone 2:" vw-phone2: field 29x5 label "Fax:" vw-fax: field 29x5 label "Email:" vw-email: field 48x5 return label "Contacts: " vw-contacts: field 181 return label "Notes:" return vw-notes: area 200x50 return button "Save" [] ] "Resources" [ label "Name:" r-name: field 100x5 return label "Cost:" r-cost: field 30x5 label "per" r-label: drop-list data ["Hour" "Day" "Week" "Month" "Year"] return [] ] "Make Lists/Charts" [ ] "How To" [ ] "Help" [ ] ] ] ] ;end show-cc do-events |
My questions are in the code. Look for ??????????????? | |
I have another question also. I need a button that set a switch and display different text on the button to show how the switch is set. Does reb-gui have such a button? | |
Pardon all the obvious typos. set = sets, and display = displays | |
Anton, I'm running REBOL/View 1.3.2.3.1 5-Dec-2005 Core 2.6.3. I'm not encapping....yet. I do not know why I sometimes get the error message but usually not. | |
Now I do not seem to be getting the Microsoft error message at all, but I don't know what I changed to make a difference. | |
Unfortuanately, I have to leave to run some errands. It will probably be tomorrow tonight or tomorrow before I can get back. | |
tomorrow tonight = tonight | |
Anton 20-Oct-2006 [4840] | Well, from a bug-isolating point of view, it's not much use unless you can reproduce the bug at least in a semi-reliable way. |
Anton 21-Oct-2006 [4841x8] | 1) Convert the next two lines to rebgui ;banner "0:00:00" rate 1 effect [gradient 0x1 0.0.150 0.0.50] 115x24 ;feel [engage: func [face act evt] [face/text: copy to-string round (session-time + (difference now/precise time-start)) show face]] (Note; to-string makes a copy for you already, so no need to copy again. Actually, showing the face converts face/text to string for you automatically...) |
display "" [my-text: text 32x10 "0:00:00"] do bind [ font: svv/vid-styles/banner/font effect: [gradient 0x1 0.0.150 0.0.50] feel: make face/feel [ engage: func [face action event][ if action = 'time [ face/text: now/time ; <-- set the time as you wish show face ] ] ] rate: 1 show self ] my-text do-events | |
2) "Why does the following line always display a blank string ?" t-project-name: text (either <> "" project-name/text [(form project-name/text)]["ERROR: Project NAME field is empty."]) 80x5 It is unclear to me what you want here exactly. The code in the parens is only evaluated once, at layout time. But project-name/text hasn't been set to anything at this time (other than maybe a default empty string.) Do you want the t-project-name/text to dynamically reflect the status of the project-name field ? That is, to update as you type ? But let's test with some shorter code: | |
display "" [ project-name: field t-project-name: text (either <> "" project-name/text ["not empty"]["empty"]) ] do-events | |
The idea is to modify the field so whenever you type a key, the t-project-name is shown, and to modify the t-project-name REDRAW so it sets its own text depending on the status of the field's text. Let's look at them: probe project-name/feel probe t-project-name/feel | |
Let's modify the project-name key handler, appending the show. | |
project-name/feel: make project-name/feel [ use [body][ body: second :engage ; we get the engage function body block using SECOND append second third body [show t-project-name] ; <- add this snippet of code to it ] ] And let's modify the t-project-name REDRAW function (it has no feel so we make one from the default FACE feel): t-project-name/feel: make face/feel [ redraw: func [face action position][ if empty? face/text: project-name/text [face/text: "ERROR:"] ] ] Now all together: | |
display "" [ project-name: field t-project-name: text 50 (either <> "" project-name/text ["not empty"]["empty"]) ] project-name/feel: make project-name/feel [ use [body][ body: second :engage ; we get the engage function body block using SECOND append second third body [show t-project-name] ; <- add this snippet of code to it ] ] t-project-name/feel: make face/feel [ redraw: func [face action position][ if empty? face/text: project-name/text [face/text: "ERROR:"] ] ] do-events | |
Ashley 21-Oct-2006 [4849x2] | Uploaded build#36 which adds a no-divider option for table, corrects resizing problems with info areas, and adds viewed? func if not defined (i.e. script is being encapped with enface). |
Graham, ticket #53 is working under latest build and I could not reproduce drop-list problem. Also note the no-dividers option ;) | |
Louis 21-Oct-2006 [4851] | Anton, thanks! I just arrived back home. I'll try your code Monday and get back with you. |
Anton 21-Oct-2006 [4852] | Cool. :) |
Maarten 21-Oct-2006 [4853] | Is there a tree widget for RebGUI? I need to build something to browse the filesystem |
Jerry 21-Oct-2006 [4854] | Hello Maarten, I have a homemade tree view. It's not complete yet, but it works. I was planning to make it complete, but I stopped because I am waiting for REBOL 3 and VID+. Anyway, If you want to take a look at my homemade TreeView, send me an email [xy-:-cai-:-msa-:-hinet-:-net]. |
Ashley 21-Oct-2006 [4855] | Is there a tree widget ... no, but the request-dir function would be much better if there was one. |
Graham 21-Oct-2006 [4856x3] | Thanks Ashley .. I'll test it now. |
I get this with ticket #53 and the lastest table.r probe ["A"] [1] remove and probe again [none] [1] So, not working for me. Do I need something more than the table.r ? | |
but the no-dividers is working fine! | |
older newer | first last |