r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!RebGUI] A lightweight alternative to VID

Robert
24-Apr-2006
[3418x2]
tables: Is it possible to change the column layout of a table after 
it was layouted? I have a space where I display a table that changes 
it's layout depending on the context of the app. Sometimes it has 
2 than 5 columns and different column labels.
tab-panels: If I use nested tab-panels and add a pre-enter action 
for the nested tab, it's not executed for the first tab shown. As 
this tab is implicitly shown if the parent tab is clicked, the action 
doesn't seemed to be triggered.
Graham
24-Apr-2006
[3420]
Ashely didn't agree that this was okay.  I suggested it before.
Ashley
24-Apr-2006
[3421]
Not quite, it was logged as issue#21 ... its just never been high 
on my priority list to fix.
Graham
24-Apr-2006
[3422]
I thought "under consideration" was an euphemism for "don't agree" 
:)
Robert
25-Apr-2006
[3423]
Ok, going to look into it together with Cyphre.
Graham
27-Apr-2006
[3424]
If you're inside an area field with some text, and a slider showing, 
and if you position the slider to the bottom, and then click inside 
the area, the text scrolls back so you're not at the bottom anymore.
Anton
27-Apr-2006
[3425]
Probably the caret hasn't been updated to reflect the position where 
the scroller is.
Thør
27-Apr-2006
[3426x2]
.
Sorry about that... I just got dropped. :-(
Graham
27-Apr-2006
[3428]
Ok, submitted a ticket to the trac.
Anton
28-Apr-2006
[3429x3]
There's some funny business going on with key-scroll?. If move the 
caret using arrow keys sometimes the next click on the scrollbar 
doesn't work.
Graham, this patch to the area/pane (slider) action makes things 
better:

				action:	make function! [face /local pos new] [

     ;	don't alter scroll if the last function to touch it was edit-text!!!
					unless parent-face/key-scroll? [

      parent-face/para/scroll/y: negate parent-face/text-y - parent-face/size/y 
      + 3 * data

						if system/view/caret [
							system/view/caret: 
								offset-to-caret parent-face 
									new: min max 
									(pos: caret-to-offset parent-face system/view/caret)

         0x0 ; <-- should add height of one line of text, to keep caret fully 
         visible

         parent-face/size - (face/size * 1x0) ; <- should subtract height 
         of one line of text
						

       ;print [parent-face/size pos new parent-face/para/scroll/y index? 
       system/view/caret]
						]

						show parent-face
					]
					parent-face/key-scroll?: false
				]


It also needs this patch to work correctly, near the top of rebgui-widgets.r:


 ; Unfortunately, offset-to-caret returns end of the string when offset 
 is between two lines, 

 ; which is only possible when indent/y > 0. This ought to be submitted 
 to rambo as a rebol/view bug.
	; I would not use indent until it is fixed.

 ; offset-to-caret needs to work correctly to allow the new area widget 
 functionality of keeping
	; the caret visible when scrolling. -Anton


 ;default-para-wrap: make default-para [origin: 2x0 indent: 0x2 wrap?: 
 true]

 default-para-wrap: make default-para [origin: 2x0 indent: 0x0 wrap?: 
 true]
Key-scroll? issue I mentioned above there is apparently fixed by 
adding this line to area/feel/redraw:


     ;	don't alter data if the last function to touch it was slider!!!
					if all [face/pane/ratio < 1 face/key-scroll?] [

      var: either view*/caret [-3 + second caret-to-offset face view*/caret] 
      [0]

      face/pane/data: either zero? face/para/scroll/y [0] [(var + negate 
      face/para/scroll/y) / (face/text-y - sizes/font-height - 2)]
						face/key-scroll?: false ; <-- added this line -Anton
					]
Robert
28-Apr-2006
[3432]
Anton, did you made the changes to the TRAC repository as well?
Graham
28-Apr-2006
[3433x2]
Anton doesn't have an account.
Anton, I just tried your patches .. but the text still scrolls when 
I click into the area after scrolling downwards using the slider. 
:(
Ashley
28-Apr-2006
[3435]
Anton doesn't have an account

 ... I've been privately messaging everyone who makes code changes 
 here an account. If anyone else needs/wants one just holler.
Graham
28-Apr-2006
[3436x3]
I can't see that anyone is actually checking in any changes though 
:(
Robert and I are the only two people logging faults in the ticketing 
system.
Did you want to announce on the mailing list that the trac is open, 
and/or change your issues page to reflect this?
Ashley
28-Apr-2006
[3439x2]
Yes, I need to do a bit more to "sell" the whole collaborative dev 
idea; plus I think folks need a bit of hand-holding to use SVN. Perhaps 
a "5 easy steps to making a change" type guide?
I'll spend a bit of time today updating my site and the Wiki before 
we go public on the ML and RebolTalk.
Graham
28-Apr-2006
[3441]
PS: some questions for you on Reboltalk regarding rebdb
Ashley
30-Apr-2006
[3442]
RebGUI 0.4.2 is up. Grab it the usual way with:

	do http://www.dobeash.com/get-rebgui.r


You may want to delete view-root/public/www.dobeash.com/RebGUI first 
as a number of old files are now redundant.

This build is the latest snapshot of the repository and includes:


 - %rebgui.r is now a single monolithic (72Kb single line) script 
 (individual source files are in SVN)
	- Cyphre's drop-list change
	- Anton's quit [not] when only one pane remains
	- clear-text and show-text fixes
	- led widget fix (failed when encap'ed)
	- language file for Italian added
	- %tour.r Opera icons replaced with Tango Desktop equivalents


Also note that the RebGUI home page has moved to http://www.dobeash.com/RebGUI/
and that all active issues / tickets can now be found (and updated) 
at http://trac.geekisp.com/rebgui/report/1
Graham
30-Apr-2006
[3443x2]
wow, lots of work Ashley!  Thanks.
The area field is still showing the same problems I reported before. 
 If, in tour.r, you enter lots of text so that the slider shrinks, 
then reset the slider to the top, focus on another widget, return 
to the area widget, move the slider to the bottom and then click 
inside the area, the text moves to the top.
Anton
30-Apr-2006
[3445x2]
Yeah sorry guys, I spent almost an hour the other day just installing 
Tortoise for SVN, because my windows installer was too old.

A window popped open to suggest that  get a newer service pack. I 
got it going in the end by running automatic updates and updating 
just the windows installer. It worked in the end, without restarting 
the machine, but then I'd run out of time to actually submit anything.
(Ashley had sent me accout details, by the way.)
Robert
30-Apr-2006
[3447x6]
How can we now make a change to rebgui.r? Do you have published the 
build-script that creates rebgui.r?
I tried:
REBOL Preprocessor 2.0.0
Copyright 2002 REBOL Technologies

Input file? rebgui-ctx.r
Output file? rebgui.r
***ERROR (widgets/button.r): Cannot load file: button.r
** Press enter to quit...
Using Ladislav's INCLUDE I get: 
>>  include/link %rebgui-ctx.r %rebgui.r

** Access Error: Cannot open /D/Download/rebol/rebgui/widgets/widgets/anim.r
** Where: include-script
** Near: found: load/all found
if header
How about changing drop-list in that it opens the list even when 
the user clicks on the field and not only on the arrow?
How can I use the RebGUI LAYOUT function? I just need to get back 
the face that I can append to a PANE. I get the following error:

>> ctx-rebgui/layout material/gui
** Script Error: color needs a value
** Where: append-widget
** Near: color: any [attribute-color color] image: any
The last one seems to happen if COMMENT is used inside a spec block.
Graham
30-Apr-2006
[3453x2]
I don't think you can use comments inside vid blocks either.
to get the face created by the rebgui 'display function, I changed 
all the returns to say, "return view-face" in display.r
Ashley
30-Apr-2006
[3455x2]
Do you have published the build-script that creates rebgui.r?

REBOL []

;	combine source scripts
do/args %prerebol.r [%rebgui-ctx.r %tmp.r]
;	remove header
save/header %tmp.r load %tmp.r []
;	remove indentation
do/args %prerebol.r [%tmp.r %rebgui.r]
delete %tmp.r
;	remove newlines and surplus spaces
gui: trim/lines read %rebgui.r
;	compact block delimiters
replace/all gui "[ " "["
replace/all gui " ]" "]"
replace/all gui " [" "["
replace/all gui "] " "]"
;	compact expression delimiters
replace/all gui "( " "("
replace/all gui " )" ")"
;	final write
write %rebgui.r gui
to get the face created by the rebgui 'display function ...

The last line of the display function is:

	view-face

so it should already do this without change.
Graham
30-Apr-2006
[3457x3]
so, it does .. I must be using an older version.
Anton, unfortunately your patch to the action of the slider gives 
me this error:
* Script Error: max expected value1 argument of type: number pair 
char money date time tuple series
** Where: action
** Near: system/view/caret:
offset-to-caret parent-face
Anton
1-May-2006
[3460]
Hang on, I'm just about to publish what I have, which is working. 
 In Tortoise, do I use the Import... menu option or SVN Checkout 
?
Graham
1-May-2006
[3461x4]
Isn't it commit ?
Checkout is to grab a copy of the repository.
So, I think you just select the files you want to commit to the repository 
and commit them.
the SVN book can be downloaded from http://svnbook.red-bean.com/
Anton
1-May-2006
[3465x3]
Sorry, yes, that's ok, I just read some Tortoise help.
I need to "check out", then "commit" changes, and tell others to 
"update".
So just now I committed my changes.