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
6-Dec-2005
[2625]
How's this for focus / unfocus trigger logic?

1. Add two user-definable action handlers to ctx-rebgui

	app-focus-action: func [face] [true]
	app-unfocus-action: func [face] [true]

2.Modify the ctx-rebgui/edit focus and unfocus functions:

	unfocus: has [face][
		if face: view*/focal-face [
			unless face/unfocus-action face [return false]
		] 
	...

	focus: func [
		"Focuses key events on a specific face."
		face [object!]
	][
		unless unfocus [return]
		if face/show? [
			unless face/focus-action face [return false]
	...

3. Extend the standard rebface definition

4. Add the following to the layout function:


 focus-action: either attribute-focus-action [make function! [face 
 /local var] attribute-focus-action] [:app-focus-action]

 unfocus-action: either attribute-unfocus-action [make function! [face 
 /local var] attribute-unfocus-action] [:app-unfocus-action]

which would then let us write code like:


 ctx-rebgui/app-focus-action: func [face] [face/text: form random 
 1000]

	display "" [
		field
		field focus [face/text: form now/time/precise]
		field
	]


The logic is simple: "Execute the default focus / unfocus functions 
(which in turn default to true) *unless* a focus / unfocus function 
has been provided for the face. When a focus / unfocus event is called 
execute the assigned handler function *first* and only proceed if 
it returns true."

Does this meet the design requirement?
Chris
7-Dec-2005
[2626]
ctx-rebgui/app-focus-action: func [face] [face/text: form random 
1000]
; would this line change every face that receives focus?
Ashley
7-Dec-2005
[2627]
Yes ... unless overridden by a local definition (e.g. field focus 
[true]])
Brett
7-Dec-2005
[2628]
Hi. Just looking through rebgui. A question and a comment. (1) In 
the readme.txt file there is a reference to Opera icons but no reference 
to the licensing of those icons. Where can I find the icon licensing 
information please?

(2) I like the table widget with it's sortable columns. But at first 
had problems with trying to sort in the reverse direction because 
I was targetting the sort indicator triangle which does not do anything.
Graham
7-Dec-2005
[2629]
the latter point has been noted in the problems list
Ashley
7-Dec-2005
[2630x2]
1) These are provided as samples only (for %tour.r) and given that 
I could not find any reference to the licensing of them I added that 
note instead. If anyone has a source of good, free program icons 
then let me know and I'll get rid of the Opera ones.

2) Issue#44 at http://www.dobeash.com/it/rebgui/issues.html
Latest build available at: http://www.dobeash.com/files/RebGUI-038.zip

Issue log: http://www.dobeash.com/it/rebgui/issues.html


*** Unzip this file into your existing RebGUI 0.3.0 distribution. 
Requires View 1.3.1 (1.3.2 preferred) ***


This is mainly a bug-fix release with a new prototype event trigger 
system (see %"Demo - actions.r") and a very early proof of concept 
bubble-menu (see %"Demo - bubble-menu.r").


I'm particularly keen to see whether the event trigger system is 
flexible enough to remove [or reduce] the need for a dedicated (and 
hard to design / implement) one-size-fits-all "field validation" 
system as discussed previously. The bubble-menu demo shows how transparency 
and event detection within a non-square area *could* be done. The 
implementation is not perfect (or anywhere near usable) so I'm open 
to alternate design suggestions! ;)
Anton
7-Dec-2005
[2632x5]
The close event of DISPLAY's default view-face/feel/detect assumes, 
after   face/alt-action face   has been done, that there is still 
a face in system/view/screen-face/pane.

This is a problem when I wanted the window close button to return 
me to the console, like so:
display/close "" [box 10x10][unview] do-events
** Script Error: Out of range or past end
** Where: switch
** Near: if face = first system/view/screen-face/pane
(Perhaps I am going about that the wrong way ?)
Anyway, I might advise to replace FIRST with PICK.
eg.  it becomes:    if face = pick system/view/screen-face/pane 1
shadwolf
7-Dec-2005
[2637]
congratulation ashley very funnew  things ^^
Pekr
7-Dec-2005
[2638]
- still - pop-up system non system friendly (not Rebgui issue, but 
rebol one's)

- I have some difficulcy with leds - If you would not provide me 
with text help, I would very hardly know, what those state means 
- I am not sure such style has place in standard pack ... or just 
- let it transparent for 'not-selected selection, green for 'on selection, 
red for 'off selection ...

- table - still you are able to scroll hilited row "under" the table 
style border - it should know it is at last displayed element and 
start scrolling, scrollers should reflect that. If there is no internal 
track of hilited row/cell, then it is not true grid system (I hope 
not)

- bug with text-list multi selection - there seem to be bug in math 
... press shift, hold it, hilite e.g. 6 rows. Still hold it, press 
some two rows below, it let's hilited only first two rows ...
Graham
7-Dec-2005
[2639]
Ashley, there's still a problem with area fields.  If you start typing 
in the area field in tour.r at the top of the field, when you reach 
the end of the line, and the word wraps, the cursor drops to the 
end of the area field taking you away from the line you are typing.
Volker
7-Dec-2005
[2640]
Once try to fix that: http://polly.rebol.it/test/test/rebgui/.
Pekr
7-Dec-2005
[2641]
and demo for field validation does not work at all ...
Graham
7-Dec-2005
[2642x2]
ie. Issue 48 is still open.
what do you mean "at all" ?
Pekr
7-Dec-2005
[2644x3]
too many bugs at first try to bother to test it further ...
type exit to leave the field

 - you type exit, Exit, try enter, tab, nothing happens ... then you 
 try to delete what you wrote and somehow you can no longer see, what 
 you type ...
but that is something you should note playing with the demo for 10 
secs ;-)
Graham
7-Dec-2005
[2647x2]
exit allows you to defocus from that field
otherwise u can't leave that field
Ashley
7-Dec-2005
[2649]
too many bugs at first try to bother to test it further


1) I have clearly indicated this is prototype functionality - constructive 
feedback on the design direction is most welcome

2) The only bug you have indicated is in the on-unfocus action of 
the last field - presumably you have verified that app-level on-focus 
and on-unfocus works (the 3 fields in the group-box) and that on-focus 
(the random number field) also works


LED's - these were originally coloured Red, Green and empty but a 
few people pointed out that these colors are not color-blind friendly. 
One option is to revert to the original color scheme but have the 
LEDs also change shape (red octogon, green circle, etc).


Area - functionality has been improved, not fixed. I'll reopen 48 
(not tested adequately) ... but the whole edit / feel thing needs 
a minor overhaul prior to 0.4.0 (some of the problems relate to View 
itself and these need to be isolated and RAMBO'ed).
shadwolf
7-Dec-2005
[2650x16]
complete version 0.38 can be grabed here http://shafwolf.free.fr/RebGUI-038-shad.zip
i put listview v 0.52 external in it and requestdir form DideC ^^
Ashley the problem with stoboscopic effect (blinking) when colors 
are both ligth one is the eye retina persistence ususlly  ppl use 
same color  in dark/light  like dark green  = off  light green = 
 on  ( and this is more friendly with  our over used eyes !!
can be medium grey = off and  what ever colo = on
ashley  my ten seconds solution for edge  problem with listview integration 
to rebgui rebgui-wigets.r file
keep the same code and simply  copy paste is after the context  ... 
( SORRY THAT DOESNT WORK ... i just try it  ...)
edge is said as invlaid path .... so thise  means  a  /edge is not 
good  and looking to rebgui widget code we found that  /edge is related 
to color/egde so i think the problem come from a prebuilded widget 
 onloading  this one have a problem or color/edge reference maybe 
try to dig this out please ashley...
hum i think  i found a track ...  in my code i over ride   colors 
internally to listview
i'm the best lol
that was the problem ashley  ^^
damn i  love late night debugging  your brain is so lazy that you 
 can keep a track of an idea
rebol says it from begining  edge is not a good path  why  ?  /edge 
doesn"t exist ? where does it supose to exist ?  -> colors ...  yea 
colors/edge that match with what  rebol says  !!!  do i have colors 
 set  as a block of value in my  code  ?  yes  to able ppl to choose 
modify  the background colors ...
of the table text content  ...
renaming colors internal to   listview  to colrs ^^
i merged it to  rebGUI 038 ^ ___ ^ -----> grab  it from http://shafwolf.free.fr/RebGUI-038-shad.zip
See DEmo listView  ^^
Izkata
7-Dec-2005
[2666x2]
Is that all of the files, old with the new merged?
And it gives me a cannot-find-server anyway   >.<
shadwolf
7-Dec-2005
[2668x3]
arg
http://shadwolf.free.fr/RebGUI-038-shad.zip
http://shadwolf.free.fr/RebGUI-038-shad.zip

REBGUI 0.38 Shadwolf version !!!


- FULL  retail files no need to merge them back  with previous REBUI 
version
- Didec-requestdir mini app 
- Listview as base object  
- Demo-listview.r shows how to use the listview widget.
Izkata
7-Dec-2005
[2671]
lol nice... I plan on trying RebGUI for my next little project, but 
never downloaded it before...
shadwolf
7-Dec-2005
[2672]
yea rebgui is very very neat  it's growing in size but it's still 
pretty  cool  widget library . I recommand it to you as simple as 
Vid but mutch more sophisticated  ^^
Volker
7-Dec-2005
[2673x2]
field on-focus [system/view/caret: face/text true] on-unfocus [face/text 
= "Exit"]
fixes the exit-field-bug in action-demo