World: r3wp
[!RebGUI] A lightweight alternative to VID
older newer | first last |
Pekr 25-Jun-2008 [7579] | Robert - there still has to be a leak in REBOL! Even if you try primitive hello world example, you start with 6MB of RAM, you do nothing, and after do-events it grows 3 - 4 MB, slowly, but constantly! |
Ashley 25-Jun-2008 [7580] | Out of interest, the memory figures on OS/X using rebface are: rebface 1.8Mb VID 3.2Mb after loading %view.r RebGUI 3.5Mb after loading %rebgui.r but these are for the respective defaults (VID apps often require additional patches/fixes and styles, RebGUI apps rarely use *all* the default widgets). I should also add that RebGUI (or indeed VID) have ever been fully profiled and optimized. |
Pekr 25-Jun-2008 [7581] | So the correct route is to build custom rebgui.r, including only widgets I am using? |
Graham 25-Jun-2008 [7582] | Is there a way we can "robustify" rebgui so that we trap all errors?? make object! [ code: 312 type: 'script id: 'cannot-use arg1: 'multiply arg2: 'decimal! arg3: none near: [freedom * face/data] where: 'wake-event ] |
btiffin 25-Jun-2008 [7583x2] | Yep; go: does [display ...] while [[error? err: try [go]] [alert mold err go] Along those lines... I haven't got the code in front of me |
[[ ]] should be [ ] ... umm, mental methane | |
Graham 25-Jun-2008 [7585x2] | Hmm.. I already trap the errors ... I would much prefer that they didn't happen! |
ie. they are trapped inside the rebgui code and dealt with there. | |
Graham 26-Jun-2008 [7587] | I've put a check in the engage event to see if face/data is none?, and if so, make it 0. In case someone like me has set it directly to none ... |
Graham 28-Jun-2008 [7588x2] | this is my new appointments display ... is there a way I can drag the buttons around? http://screencast.com/t/ou1MwDdS |
so I can move an appt from one slot to another | |
[unknown: 5] 28-Jun-2008 [7590] | Looks good Graham. |
Brock 28-Jun-2008 [7591] | Cyphre has a drag-panel style that allows drag and drop of various objects on a window. |
Graham 28-Jun-2008 [7592] | Does it work with Rebgui? |
Brock 29-Jun-2008 [7593] | I don't know. I just remember he had the style. Don't know how well it works as I've never used it, let alone with RebGUI |
Graham 30-Jun-2008 [7594] | I've got some custom panels that I have a resizing routine written for them. how do I trigger that to run when the main window resizes? |
shadwolf 7-Jul-2008 [7595] | graham i like your app it's very beautyfull ^^ |
Graham 7-Jul-2008 [7596] | Thanks shadwolf :) |
Pekr 7-Jul-2008 [7597] | Graham - nice interface - what widget is used for the scheduler displaying time slots? |
Graham 7-Jul-2008 [7598x3] | no widget .. it's all created on the fly |
Basically it's tab-panels, panels, and buttons assembled as needed. | |
And all the ideas were taken from the MS silverlight medical demo | |
Pekr 7-Jul-2008 [7601] | aha ... I like collapsing/expanding capability. ... |
Graham 7-Jul-2008 [7602x3] | It just regenerates the layout |
and then I use tab-panel/replace-tab [ new layout ] | |
the MS demo expands in-situ which would be nice to do ... but I recreate the whole thing | |
BrettH 17-Jul-2008 [7605x2] | Anybody out there using RebGUI ? I'm just starting to use REBOL and have delivered a small app using VID to a volunteer group who are collecting local history articles. And I'd like feedback on any gotchas with RebGUI vrs VID. Thanks |
Well ! There seems to be !! It took a very long time to display any messaged when I visited the group, so I though there wern't any :-) Cheers. | |
shadwolf 18-Jul-2008 [7607x3] | http://www.dobeash.com/rebgui.html-> docs etc... |
to get rebGUI you simply write those lines into a ".r" file or you go into the rebol/desktop in the REBOL/DEMOS folder | |
REBOL [Title: "RebGUI Demo"] do http://www.dobeash.com/RebGUI/get-rebgui.r do view-root/public/www.dobeash.com/RebGUI/tour.r | |
BrettH 18-Jul-2008 [7610x2] | I'm trying to do some 'field navigation' within a rebgui form and cannot figure out how to get teh filed cursor to 'goto field' |
label "Publication : " publication: field 100x8 font [ size: 18 color: black shadow: none ] on-unfocus [ uppercase publication/text ; I'd like to jump to "page" field here ] label "Date :" date: field 30x8 font [ size: 18 color: black shadow: none ] label "Page: " page: field 20x8 font [ size: 18 color: black shadow: none ] return | |
Graham 18-Jul-2008 [7612] | how about ... set-focus page true |
BrettH 19-Jul-2008 [7613] | I've tried that, all i get is a stack error: as soon as I press TAB to enter the on-focus , and the program aborts thus ** Internal Error: Stack overflow ** Where: unfocus ** Near: if all [face/type <> 'face get in face/action 'on-unfocus] [ unless face/action/on-unfocus face [return false] ] |
Graham 19-Jul-2008 [7614x2] | maybe it's because you're doing stuff which resets the focus back to the publication field? |
this works do %rebgui.r display "" [ label "Publication : " publication: field 100x8 font [ size: 18 color: black shadow: none ] on-unfocus [ uppercase publication/text ; I'd like to jump to "page" field here ] label "Date :" date: field 30x8 font [ size: 18 color: black shadow: none ] on-focus [ set-focus page false ] label "Page: " page: field 20x8 font [ size: 18 color: black shadow: none ] return ] do-events | |
BrettH 19-Jul-2008 [7616] | Mmm ! Your code sort of does the job, but your forcing the field Date to be skipped by it own on-focus trap which would skip Date always, what I'm trying to do is have Description control the next field to 'visit' depending on what ever test I code in the on-unfocus attached to Description field. for eg: ( pseudo code ) label "Publication : " publication: field 100x8 font [ size: 18 color: black shadow: none ] on-unfocus [ if desc-flag = 1 [ set-focus new-description ] [ set-focus old-description ] ] ==== Your observation of 'reseting' focus back to Description field is an interesting one which I had not considered. |
Graham 19-Jul-2008 [7617] | well, until Ashley tells us how to do it, you could hide a dummy field behind the date field to take the focus from the tab, and then make the decision from that. |
BrettH 19-Jul-2008 [7618] | Now thats a interesting idea - bit of a kluge tho. I'm a bit surprised that this 'obvious' programming need is causing a problem ! I can envisage many situations where a program needs to set the cursor focus upon any of the available fields displayed depending upon a fields content. |
Graham 19-Jul-2008 [7619] | I'm guessing it's a bug ... set-focus is triggering an on-focus event and so your code keeps triggering causing a stack overflow. |
BrettH 20-Jul-2008 [7620] | I think it might be the 'fact' that the on-unfocus never get to see its true/false return because my code wants to "go over there" before that happens, only Ashley can tell. |
Ashley 20-Jul-2008 [7621] | Correct ... the set-focus "eats" the return state. set-focus was intended more for use either within a display's do func or from outside the display. Tab order cannot be set programmatically, although it should be noted that tab order is the same as the widget specification order so you can at least sequence your widgets in the desired order. There is no easy way to conditionally skip widgets, although build#106 added the set-state func which lets you toggle a widget's info state. As for this being an "obvious" programming need, it depends on the type of GUIs you wish to write ... you are the first person in over two years to have hit this issue (or at least report it) ... although I'll freely admit that keyboard navigation is not RebGUI's strong point ;) |
Graham 20-Jul-2008 [7622] | well, I have had a similar problem. I have a drop-list with title in it followed by a radio-group with gender, followed by occupation. I want the user to skip the radio-group which is set based upon the droplist value. Eg. drop-list is "Mr." and so set the radio-group to "M" and then skip to occupation. |
BrettH 20-Jul-2008 [7623] | While tab ordering is a useful feature, in this case I'm trying to tab order by testing field content, I'm surprised that its considered a bit unusual :-) In my data entry program I want the user to be able to set the work flow somewhat. , ie: on mass data entry they should not have to tab over the row of function buttons I have arranged along the bottom of the form, but when they tab 'out' of the last data entry field, the program saves the data, clears the form, replaces some common data and then return to the first entry field -- all without using the mouse. Not true key board navigation but very pleasent for the user. The user uses teh mouse to get to the buttons. This I am currently doing using VID. Graham's usage is a very typical form interaction senario, one I was soon to try ! |
Graham 20-Jul-2008 [7624x4] | I'm going to have to try my own suggestion! |
what has to be done to make keyboard navigation stronger? | |
display "" [ edit-list data [ "Mr." "Mrs." "Dr." "Miss" ] return field ] do-events | |
click on anything BUT "Mrs." and the focus is gone somewhere .... dunno where! | |
Graham 21-Jul-2008 [7628] | and of course this is a major impediment to using the keyboard. So, for an edit/drop list you have to click twice - once to choose, and then once to regain the focus. |
older newer | first last |