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
5-Dec-2005
[2605]
focus would look for a face/focus function while unfocus would look 
for a face/unfocus function. So the code might look like:

	...
	field unfocus-action [do-validation face/text]


the validation, if it failed, might shift focus back into the field 
the user tried to leave. Something like that I guess.
Graham
5-Dec-2005
[2606x2]
Would there be a way so that the default action is triggered by an 
unfocus event ?
Rather than having to specify 'unfocus-action ...
shadwolf
5-Dec-2005
[2608x9]
okay i see the edge bug now when i merge the listview code in the 
regui-wiget.r file ^^
it's seems like i have to insert edge: default-edge in all my dyn 
rebfaces ....
rebface is supose to yet include it and be an empty box lol
how i understand this bug ashley RebGUI widget compositor expect 
to find a edge field in this object and as it doesn't it crash
i'm adding edge:	default-edge on all rebfaces this  doesn't work 
neither  ...
odd problem i don't see a solution ...
maybe that have somthing to do with the way  widget is updated
i use event show to restart the rendering and display then the changed 
content  (colum-countainer ) this all auto table rebuild when script 
simply call show listview-widget
ffrom his application code
Ashley
5-Dec-2005
[2617]
Given that it worked stand-alone, my guess is that one of the make's 
was referring to "something" in the global context (face, feel, pane, 
etc) which enabled it to work. Regardless, it's a very obscure error.
shadwolf
6-Dec-2005
[2618]
in this case the  error would be i can find this world or something 
like that...
Robert
6-Dec-2005
[2619x3]
events: IMO a very, very important thing to add to RebGUI. Think 
about your apps. I always need this feature and most frameworks etc. 
don't support it well. The problem is, that if you have to add it 
yourself, the code becomes hughe and complicated for maintenance.

Adding a focus / unfocus action sounds like a good way to do it.
A way to set default focus / unfocus action would help keeping the 
code clean. With this I could change the default action on the fly 
and all new widgets would than use the new version. Makes building 
up forms a lot simpler.
Anyway, so how to solve my problem at the moment? I'm stucked without 
a solution to this.
Graham
6-Dec-2005
[2622]
I suspect that Ashley will release once he has tested against the 
new sdk
Ashley
6-Dec-2005
[2623]
While I'm waiting on listview52 I'll see if I can slip some prototype 
focus / unfous trigger code and bubble-menu in for you Robert. ;)
Graham
6-Dec-2005
[2624]
After reverse, pad pads to the right and not the left as expected 
...( by me that is ! )
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
[2650x5]
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