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
26-Jun-2006
[4085]
Take a look at the source. I think it's a flag and if you than do 
a /redraw it should be sorted.
Graham
26-Jun-2006
[4086]
Ok.
Henrik
26-Jun-2006
[4087]
I had a very quick glance at RebGUI widgets. Would it be possible/easier 
to implement LIST-VIEW as a widget?
Graham
26-Jun-2006
[4088]
You're welcome to try ...
Anton
26-Jun-2006
[4089]
Henrik, I suggest first convert your list-view from being based on 
BOX to being based on FACE. Then it's slightly less work to port 
to rebgui.
Henrik
26-Jun-2006
[4090]
alrighty then
Anton
26-Jun-2006
[4091x2]
also, I don't think it's any easier to create a list style using 
VID or REBGUI - the same basic issues are there, but porting to rebgui 
is fairly straightforward. Just keep the rebgui source handy as you 
will need to dip into it a few times.
http://home.wilddsl.net.au/anton/rebol/rebgui/differences-from-VID.txt
Robert
26-Jun-2006
[4093]
Henrik, looking forward to see your first version of the list-view 
widget.
Henrik
26-Jun-2006
[4094]
please don't hold your breath :-) I've barely played with the RebGUI 
demo
Robert
26-Jun-2006
[4095]
That's the soft way of community pressure ;-)) I'm quite sure it's 
not that hard to get into RebGUI development.
Pekr
26-Jun-2006
[4096]
Is tree-view planned Robert?
Robert
26-Jun-2006
[4097]
It's mostly done (90%) as there is a complete tree in the drop-tree 
widget. We just didn't extract the code into a stand-alone widget 
as I don't need it at the moment. Feel free to go for it.
Thør
26-Jun-2006
[4098]
.
Ingo
26-Jun-2006
[4099x2]
Ashley ...

[me] "is there a reason, that display opens the windows, but does 
not start do-events?" [ashley] ... we can't assume the "first" window 
automatically needs to start the event loop. Perhaps the display 
is being assigned to a word and cached for later use? Or the display 
is done early in the script for lots of subsequent initialization 
and *then* needs to fire up the event loop.

Right, that's it! 


As I see it, there are 3 distinct actions: layout, display, handle 
the events.


With view I can do the layout independently from display and event-handling. 
With rebgui I can't, because display does the layout _and_ display, 
and then I'm stuck with a dysfunctional window. So I can't do a layout 
to assign it to a subpane somewhere, it's instantly displayed as 
it's own window.
Is it possible to get the window size?
 ... display [button do [ws: face/size]]


this always returns 100x100, I guess it is run before the actual 
window size is really computed.

>> display "test" [text "hi" do [s: face/size f: face]]
>> s
== 100x100
>> f/size
== 48x52
Graham
26-Jun-2006
[4101]
display was supposed to return a layout and not display as an refinement. 
 It does not.  But it can be changed to do this.
Gordon
26-Jun-2006
[4102x2]
why do the RebGUI examples quit right away?
Ex:
Rebol []
do %rebgui.r

display/close "Example" [
    text "Closing the window will change its title."
] [show-title face "Closing ..." wait 1]
I have to add a 'halt' in order to see any of the examples but then 
the examples don't work!
Henrik
26-Jun-2006
[4104x2]
gordon, because you need to add do-events at the end
(for some reason I'm unaware of at this time)
Gordon
26-Jun-2006
[4106x2]
Thanks.  I'll give it a try
Yep.  That worked.  Thanks again.
Pekr
27-Jun-2006
[4108]
how do you usually aproach encapping your app using RebGUI?
Graham
27-Jun-2006
[4109]
just encap
Pekr
27-Jun-2006
[4110]
I know - but if you want to have all in one exe file as a result? 
You have to somehow "include" your code, no? 'do is not enough, is 
it? (as it would expect it being placed in external .r file ...
Graham
27-Jun-2006
[4111x2]
not understanding ...
tour.r is an example of script that can be encapped
Pekr
27-Jun-2006
[4113x2]
will look in tour.r .... but normally, when I use rebol and encap 
something, if you have "do %rebgui.r", then that file is not being 
encapped, the app expects it it on your hd ...
I could use prebol, using include, but then I have to adapt my scripts 
all the time with single change, as rebol itself will not understand 
preprocessor instructions ... belongs to SDK probably ...
Henrik
27-Jun-2006
[4115]
pekr, I built my own "compiler" for such things and use make files 
to build projects like this. I'd imagine that would be simple to 
do?
Pekr
27-Jun-2006
[4116]
yes, probably the way to go, or maybe I should look for Ladislav's 
include.r script ....
Gordon
27-Jun-2006
[4117]
I'm having trouble running the list-view.r demo.  The error message 
that comes up is:
list-view has no value
  where: layout  Near: list-view 100x80 data [[...

I've checked and found the list-view widget in rebgui-widgets.r so 
I added that to my test program as follows:

do %../rebgui-widgets.r

and I get the following error message:

Error: colors has no value  near: color: colors/edge


this latest error is happening during the execution of the "do rebgui-widgets.r" 
as the statement following this  is not being reached.

All other demos seem to work okay.
Ashley
27-Jun-2006
[4118x2]
Pekr, the SDK trick we use in RebGUI is to have the following lines 
in your script:

	#include %rebgui.r
	unless value? 'ctx-rebgui [do %rebgui.r]


These appeared in earlier versions of %tour.r but were [inadvertently] 
removed. I'll add them back in.
Gordon, the demo directory and scripts (bubble-menu, list-view & 
triggers) were part of earlier releases. The directory was removed 
when the source was migrated to SVN, and all non-stable widgets (including 
list-view, bubble-menu and a few others) were removed. There is no 
need to "do %rebgui-widgets.r" as this is included directly in the 
new merged %rebgui.r script (and invoked from %rebgui-ctx.r if you 
run from the SVN source direct). LIST-VIEW is an important widget 
which we are hoping Henrik will be able to port to RebGUI from the 
excellent work he has done on this already.
Graham
28-Jun-2006
[4120x2]
I'm trying my way of creating templates, but have come across a problem 
with the check-group.  This takes, none, true and false as values, 
these are in the global context.  If I define more local words with 
the same names as these, how I can set them to the values in the 
global context?
eg:  ... /local true ][ true: value-as-defined-in-global context 
... ]
Anton
28-Jun-2006
[4122x2]
context [true: system/words/true]
func [/local true] compose [true: (true)]
Graham
28-Jun-2006
[4124x2]
thanks.
give that a go
Volker
28-Jun-2006
[4126x3]
there are also #[none], #[true], #[false]
which are directly processe by load, giving the values, not the words.
but looks ugly.
Pekr
28-Jun-2006
[4129]
are Robert's/Cyphre's changes already checked against official archive?
Graham
28-Jun-2006
[4130x2]
Is this a rebgui error ?  There is an error in your template: make 
object! [
    code: 400
    type: 'math
    id: 'zero-divide
    arg1: none
    arg2: none
    arg3: none
    near: [visible / total]
    where: 'view
]
i'm not dividing by total anywhere, so perhaps it's part of the rebgui 
display function?
Volker
28-Jun-2006
[4132x2]
visible sounds like resizing.
maybe some face has a 0-size?
Graham
28-Jun-2006
[4134]
let me check