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

World: r3wp

[!RebGUI] A lightweight alternative to VID

Ashley
31-May-2006
[3820]
First cut attempt at set- functions to replace various show- functions:

set-attribute: make function! [
	face [object!] "Window dialog face"
	attribute [word!] "Attribute to set"
	value [any-type!]
	/no-show "Don't show"
	/focus
] [
	face/:attribute: case [
		string? value		[
			face/line-list: none

   all [face/type = 'area face/para face/para/scroll: 0x0 face/pane/data: 
   0]
			form value
		]
		series? value		[copy value]
		attribute = 'color	[either word? value [get value] [value]]
		true				[value]
	]
	unless no-show [
		either focus [ctx-rebgui/edit/focus face] [show face]
	]
]

set-attributes: make function! [
	face [object!] "Window dialog face"
	attributes [block!] "Block of attribute/value pairs to set"
	/no-show "Don't show"
] [
	foreach [attribute value] attributes [
		set-attribute/no-show face attribute value
	]
	any [no-show show face]
]

Used like this:

	display "" [
		b: box
		button "A" [set-attribute b 'color red]
		button "B" [set-attributes b [color blue effect arrow]]
		button "Clear" [set-attributes b [color none effect none]]
	]
Robert
2-Jun-2006
[3821]
Just to inform you, we are going to publish all our RebGUI changes 
today. Those will fixe and enhance quite a lot of things. Further 
a new widget "drop-tree" will be published as well.
Pekr
2-Jun-2006
[3822]
nice and cool. So the table widget is the last stopper ....
Graham
2-Jun-2006
[3823]
Robert, are  you going to update tour.r with your changes?
\
Ashley
2-Jun-2006
[3824]
And the WidgetList Wiki too please. ;)
Robert
3-Jun-2006
[3825x4]
tour: not yet planned.

wiki: Yes, that should be done as we have enhanced existing widgets 
as well.
tour: Not in my focus but others can do it.
wiki: Yep, how to edit wiki pages? Didn't find any way to switch 
to edit mode.
Without doc update, no repository update.
Graham
3-Jun-2006
[3829]
Ashely needs to give you access to the wiki
Ashley
3-Jun-2006
[3830]
How to edit Wiki pages?

 If you have source access you automatically have Wiki edit access. 
 Follow these steps:

	1) http://trac.geekisp.com/rebgui
	2) login
	3) Click WidgetList
	4) Scroll to end of page and click "Edit this page"
	5) Make changes then click "Submit changes"
Robert
4-Jun-2006
[3831]
I have source access but I don't see the "Edit this page" link. The 
last I see is "Download in other formats:"
Ashley
4-Jun-2006
[3832]
Hmm, I just logged on as "robert" and I see four buttons above that 
link titled:

	Edit this page
	Attach file
	Delete this version
	Delete page

What OS / Browser are you using?
Robert
5-Jun-2006
[3833x2]
XP with Opera.
I'll try IE.
Graham
6-Jun-2006
[3835]
How does the 'multi option work with tables?

I get an error if I write "table options multi [ ... ] data []"
Ashley
6-Jun-2006
[3836]
options expects a block, so "options [multi]" should work fine.
Pekr
6-Jun-2006
[3837]
were new widgets plus fixes already uploaded? I can't seem them on 
my hd, when I download via get-rebgui ....
Graham
6-Jun-2006
[3838]
you need to check them out using svn
Pekr
6-Jun-2006
[3839]
ah,never used that tool before ... so get-rebgui will not download 
them?
Anton
6-Jun-2006
[3840]
Not yet.
Pekr
6-Jun-2006
[3841x3]
then I have to ask, if such project, being dependant upon other external 
tools, gives you so much advantage from the maintanance pov, that 
it is worth it? :-)
hmm, probably so, makes it independent from Ashley's maintanance 
....
ok, so I'll wait till the changes are brought to official distro 
...
Volker
6-Jun-2006
[3844x3]
it helps with merging. if i change something in rebgui and somebody 
else to, we want to merge that, not throwing somebodies work away. 
svn helps there.
if you dont want to work on rebgui itself, use get-rebgui. thats 
the stable one.
but not so cutting edge.
Pekr
6-Jun-2006
[3847]
ok, thanks .... how long do you think it will last till some testing 
stuff is being made an official version?
Volker
6-Jun-2006
[3848]
Ask Ashley :)
Robert
6-Jun-2006
[3849]
From my side not yet. First need to get editor access to the widget 
list.
Ashley
6-Jun-2006
[3850x2]
I just tried logging in as robert from XP using FF, works without 
a problem (Opera didn't seem to work correctly). Make sure that after 
clicking the "Login" link and entering your username and password 
that the red "Login" link changes to black text reading "logged in 
as robert". All Wiki pages are then editable.
how long do you think it will last till some testing stuff is being 
made an official version?

 Once SVN changes are in and working I let it sit for a week or two 
 before taking another snapshot for get-rebgui.r.
Graham
9-Jun-2006
[3852x2]
There are some unexpected behaviours with the area editor when using 
overstrike mode.  If you overtype on a line where there is a cr, 
it follows the carriage return when I was expecting it to keep on 
the same line.  Also, if you hit return inside a line, it produces 
a character
square character rather than moving to the next line.  It correctly 
moves to the next line if at the end of a line of text.
Ashley
9-Jun-2006
[3854]
Identified and fixed first problem (CR deleted in OVR mode) ... see 
SVN rev#19. Couldn't reproduce second problem, does it occur under 
%tour.r?
Graham
9-Jun-2006
[3855x5]
Let me try ...
Nope .. it doesnt.
try this though.  Put the caret at the beginning of the text in the 
area field.  change to overwrite mode, and hold down the return key.
Everything changes at the bottom of the screen.
ie. when the caret reaches the bottom line.
Ashley
9-Jun-2006
[3860]
That's a weird one (and it's not specific to OVR mode). I'll see 
if I can work out what's causing it. Odd that no-one else caught 
that yet! ;)
Volker
9-Jun-2006
[3861x7]
line-list related?
No. seems redraw tries to be smart. if i probe before showits ok, 
after broken.
The bug must be in area.r in the slider-action. weird stuff. the 
area-slider is before the area, so the slider is shown when the area 
is shown. and in case of this last return its action is called. and 
there the caret is changed. Maybe all this resize-automatics in 'redraw 
is a bit to magic? Should that bemoved into  explicit calls?
somehow the keep-caret-in-visible-area magic is broken. take tour, 
enter a lot of lines with content. more then fit in window. scroll 
down, set caret and scroll up. when the caret scrolls out of range, 
it moves automatically up. keeps also position in line. but not if 
char is at start of line, then it jumps to second char.
system/view/caret: offset-to-caret parent-face min max 

       (caret-to-offset parent-face system/view/caret) ; get the current 
       position of the caret

       (0x0 + sizes/font-height) ; minimum, plus height of one line of text, 
       to keep caret fully visible

       (parent-face/size - (face/size * 1x0) - sizes/font-height) ; maximum, 
       subtract height of one line of text
looks weird. look at the sizes/font-height. That is an integer!, 
not a pair. so it is added to x too.
;This works (needs more testing)
						system/view/caret: offset-to-caret parent-face min max 

       (caret-to-offset parent-face system/view/caret) ; get the current 
       position of the caret

       (sizes/font-height * 0x1 ) ; minimum, plus height of one line of 
       text, to keep caret fully visible

       (parent-face/size - (face/size * 1x0) - (0x1 * sizes/font-height)) 
       ; maximum, subtract height of one line of text
Ashley
9-Jun-2006
[3868]
That, plus a check for caret tail in edit.r, seems to have fixed 
it. Any remaining problems with rev#20 now Graham?
Graham
10-Jun-2006
[3869]
I haven't tested yet .. will let you know :)