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

World: r3wp

[!RebGUI] A lightweight alternative to VID

shadwolf
29-Aug-2008
[7672x2]
ana  button call for anamonitor wich helps me to debugging and no 
my list-view don't works anymore with recent rebgi version (it was 
done with rebgui 0.36 ... )
debuging with anamonitor 2.0  is moreaccurate than  setting probe
Graham
2-Sep-2008
[7674x4]
w: has [][
	display "" [
		f: field
		do [ set-focus f ]
	]
]

display "test" [
	button "Focus Test" 20 [ w ] 
	return
	text-list 45x45 
	data ["W" ] [
		switch face/selected [
		"W" [ w ]
		]
	]
]
What's going on here?  If you use the button, the field f focuses 
okay.  Use the text-list, and the focus does not appear.
the equivalent VID code


w: does [
	view/new layout [
		f: field
		do [ focus f ]
	]
]

view center-face layout [
	button "Focus Test" 90 [ w ] 
	return
	text-list 100x30 
	data ["W" ] [
		switch face/text [
		"W" [ w ]
		]
	]
]

works as expected.  No focus issues.
Ashley, can this be fixed easily?
sqlab
2-Sep-2008
[7678]
I just used the tour.r on the latest rebgui.

There you can select a color for a button, but as soon as the mouse 
hovers over the button, the colors switches to the defaults.

Is this by intent or is there a way to keep the selected color(s) 
?
Graham
2-Sep-2008
[7679]
the latest tour.r is experimental.
sqlab
2-Sep-2008
[7680]
What is the last stable version?

I thought it is a problem with the  latest widgets and not with the 
tour.
Graham
2-Sep-2008
[7681x2]
colour scheme and things changed with the last version.  Try the 
one before.
my buttons don't change colour
sqlab
2-Sep-2008
[7683]
Ok, I tried version 111 and there the buttons keep their color.
Ashley
3-Sep-2008
[7684x2]
can this be fixed easily?
 ... I'll try and grab some time to look at it later tonight.
The culprit is the face-iterator function in %rebgui-widgets.r ... 
the engage function is doing a 'show *after* the on-click action 
is fired. I won't have access to my dev box until the weekend, but 
at first glance it looks like moving the show may be all that is 
required. Other widgets, such as button, typically have an engage 
function like:

	...

 upÊ Ê Ê Ê Ê Ê Ê Ê Ê Ê Ê [set-color face colors/theme-dark face/action/on-click 
 face]
	...


for this very reason (i.e. always perform the action last to avoid 
focus loss).
Graham
3-Sep-2008
[7686]
I'm not seeing this ... http://trac.geekisp.com/rebgui/browser/rebgui-widgets.r#L438
the show is before the action is called ?
Ashley
4-Sep-2008
[7687]
I think it's the show on line#298 that's the problem ... but I need 
to physically debug it to be sure.
Graham
4-Sep-2008
[7688]
I looked at that too .. and it didn't make any difference.
Louis
5-Sep-2008
[7689x2]
Does RebGUI have anything like roam.r or will roam.r work with RebGUI?
roam.r is Carl's object browser.


Specifically, what I want is to enter a record and see it listed 
in a window.  If I click on a record in that window, I want to see 
it back in the entry fields so I can edit it. Has anyone done this 
using RebGUI?
btiffin
5-Sep-2008
[7691]
Kinda ... maybe ... it might be a start; check out http://www.rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?script=rebdbgui.r


It's a sample I wrote for someone a long time ago.  It links the 
GUI fields to a RebDB database.  One way of doing it anyway.
Graham
6-Sep-2008
[7692]
Ashley were you able to confirm the cause of the focus issue?
Ashley
6-Sep-2008
[7693]
Still debugging it ...
Graham
6-Sep-2008
[7694]
Thanks.
Graham
7-Sep-2008
[7695]
I presume it's the same issue trying to prefill some fields from 
a table selection and then set the focus to one of those fields.
Ashley
7-Sep-2008
[7696]
Found it, and fixed in build #114. Basic rule in RebGUI is to fire 
actions on 'up and 'alt-up (to ensure they occur after unfocus) ... 
face-iterator was firing actions on 'down and 'alt-down. A nasty 
bug that's been there for a long time (and explains why I had trouble 
getting some requestors working in the past!).
Graham
7-Sep-2008
[7697x2]
just the face-iterator then?
Hope this fixes a lot of focus issues I've had then!  ;)
Ashley
7-Sep-2008
[7699]
Yes and yes ;)
Graham
7-Sep-2008
[7700x2]
I wondered why you were using the down keys and not the up.
Wow .. it all works now!
Ashley
7-Sep-2008
[7702]
Excellent. Any other major bugs/show-stoppers while I'm still in 
debug mode?
Graham
7-Sep-2008
[7703x2]
Let me see.
Excellent ... the drop-list focus is also fixed
Louis
7-Sep-2008
[7705x2]
Brian, Thanks to you I've made some good progress. I still have some 
questions, but I'm too tired to ask them right now.
Ashley, RebGUI is really a great toolkit. Many thanks for making 
it freely available.
Graham
7-Sep-2008
[7707]
>> display "" [ text-list data [ "test" ] [ print "click" ][print 
"alt click" ] [print "dbl click" ]] do-events

looks like double click no longer works now.
Ashley
8-Sep-2008
[7708]
Fixed in build#115 - face-iterator only.
btiffin
8-Sep-2008
[7709]
Louis; Glad and Yep ... Go Ashley Go!    and now joins in RebDB? 
  What more can ya ask for.  Woohoo.
Pekr
8-Sep-2008
[7710]
Joins in RebDB? That is why Ashley brought us cool SQLite driver. 
SQLite is RebDB 2.0 :-)
Louis
8-Sep-2008
[7711x4]
Why is this line:


current-projects: table (tab-size + 80x35) #HW options ["Priority" 
right .03 "ProjectName" left .2 "ExchangeRate" left .2 "Objectives" 
left .3 "Deliverables" left .0] data (SQL "select * from projects")

causing this error message:

 User Error: Table has an invalid data block
** Near: make error! error
>> 


There is data in the database. The SQLite Database Browser can read 
and display the data.
This works:

>> SQL "select * from projects"                  

== ["1" "Critical Links" "9000" "Better project management." "Critical 
Links, Critical Time" "2" "Funda" "" "To get control of our ...
>> 

and this works:


current-projects: table (tab-size + 80x35) #HW options ["Priority" 
right .03 "ProjectName" left .2 "ExchangeRate" left .2 "Objectives" 
left .3 "Deliverables" left .0] data (1 2 3 4 5)

But the line in my post above doesn't work.
What I want to do is populate the gui table with all the data in 
the SQLite projects table.
Is there an easy way to do that?
Robert
8-Sep-2008
[7715]
Louis, you need to do an: insert clear data-of-table your-data
Graham
8-Sep-2008
[7716x2]
try data [ ( ... ) ]
and I presume you have compose/deep
double click is fixed for me .. thanks
Louis
9-Sep-2008
[7718x2]
Robert and Graham, thanks, but I'm still not able to get this to 
work. Here is the data in the database (2 records):

>> probe (SQL "select * from projects")

["1" "Critical Links" "9000" "Better project management." {Critical 
Links project management software, Critical Time time management 
software.} "2" "RebDar" "9000" {Automatic full-metal backup to multiple 
hard drives.} "One REBOL script."]

Why am I getting:

** User Error: Table has an invalid data block
** Near: make error! error
>> 

What is wrong with the data block?
What I mean is, why is this line:


current-projects: table (tab-size + 80x35) options ["Priority" right 
.03 "ProjectName" left .2 "ExchangeRate" left .2 "Objectives" left 
.3 "Deliverables" left .0] data [(SQL "select * from projects")]


resulting in an "invalid data block" error when the data block seems 
(to me) to be perfectly fine? Surely I am missing something that 
is probably very obvious to some of you.
sqlab
9-Sep-2008
[7720]
Did you see, that your statement gets the data ?
Try to insert a probe before SQL!!
Graham
9-Sep-2008
[7721]
your options block defines 5 columns but youre only supplying one 
column.