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

World: r3wp

[View] discuss view related issues

Henrik
1-Jan-2006
[3683x3]
also by manual layout... I think it's actually easier to create the 
manual layout if you want to set a lot of parameters such as:

list-text 75 right bold font-size 17

which is standard LAYOUT dialect
then you can set all parameters of the list-text face
this is also how LIST in VID works
Graham
1-Jan-2006
[3686]
I'll have to read the wikibook again :)
Henrik
1-Jan-2006
[3687x2]
luckily I managed to write a section on LIST in the wikibook :-)
LIST is grossly underdocumented in the original VID docs... If I 
had found it sooner, I could have saved 3-4 weeks of work this summer 
:-(
Graham
1-Jan-2006
[3689x2]
I've got a new version (0.0.9) version of the chat client at http://www.compkarori.com/reb/

which incorporates Henrik's list ( not used yet though ), and Allen 
has added his link parser :)
http://www.compkarori.com/reb/pluginchat.rfor those not using IE.
Henrik
1-Jan-2006
[3691x2]
version 0.0.12 uploaded.

Changes:
      New: Documentation!

      New: WIDTHS block to let you determine the widths of the columns

    Docs are available in makedoc2 format at:
    http://www.hmkdesign.dk/rebol/list-view.txtand
    http://www.hmkdesign.dk/rebol/list-view.html


Note the new url for the source code for LIST-VIEW is http://www.hmkdesign.dk/rebol/list-view.r
In the coming versions, I will remove the original demo and rely 
more on the docs. I might provide an updated demo later when the 
list view is in a more reliable state.
JaimeVargas
1-Jan-2006
[3693x2]
Henrik it will be cool if you can make list view model independant.
What I mean by this is that list could request a model to give the 
data to display for the specific row. Instead of enforcing a particular 
model for the data representation.
Henrik
1-Jan-2006
[3695]
hmm... could you give an example? my brain is a bit fried right now 
:-)
JaimeVargas
1-Jan-2006
[3696x6]
Right now all *data model* is a block. But you may want to be able 
to access a file of bytes and some particular fields in that stream.
So, instead of forcing the conversion of the bytes stream in the 
block data model. The list view could interrogate the controller 
to extract the data from the base model.
So list-view will say to an intermediary function give me the first 
row of values. This intermediary function ask the conversion func 
aka the controller to extract and conver the data from the reall 
*data model*. The controller returns this to the list-view list-view 
displays the row of data.
So LIST-VIEW will use the MVC paradigm. (Model-View-Controler http://en.wikipedia.org/wiki/Model-view-controller)
This way LIST-VIEW is *data-model* independant. Programmer doesn't 
waste ram or cpu cycles converting all data to from *real data model* 
to LIST-VIEW expected *data model*. The programmer only need to write 
the controler part. Which is taylor for efficiency. You only need 
to extract the values that are visible by the LIST-VIEW at any given 
moment from the *real data model*.
The current list-view is quite nice. ;-)
Graham
1-Jan-2006
[3702]
are there any real life rebol widget examples doing this ?
JaimeVargas
1-Jan-2006
[3703x2]
Nope. One of my problems with VID and RebGUI is that the gfx are 
to tightly couple with the data representation. So a change in data 
representation implies a change in the gfx code.
It think it will be nicer if we could decouple the gfx widget code 
from data representation making it data model agnostic
Henrik
1-Jan-2006
[3705x2]
what it can do right now is append, change, remove and insert rows. 
so this would be kind of an ACQUIRE function that calls a controller 
function that returns a value that can be inserted into DATA with 
insert-row or append-row?
with the point being, that you call your data source and insert the 
data into the list using a single function
JaimeVargas
1-Jan-2006
[3707]
Yes. That sounds good. ACQUIRE.
Henrik
1-Jan-2006
[3708]
I'll take a look at it, maybe tomorrow. close to bedtime now :-)
Graham
1-Jan-2006
[3709x2]
Anyone point me to where Cyphre's pattern generator is ?
It was supposed to be in viewtop/view/tests ..
Anton
1-Jan-2006
[3711x4]
Henrik, just looking at your list-view, and noticed a little thing 
that can be optimized:
b: []  insert tail insert tail b 1 2
b ;== [1 2]
b: []  insert insert tail b 1 2
b ;== [1 2]
Also this:

 toggle "Single" 70 [li/select-mode: to-word face/text] of 'select-mode

 toggle "Row" true 70 [li/select-mode: to-word face/text] of 'select-mode

 toggle "Multi" 70 [li/select-mode: to-word face/text] of 'select-mode

 toggle "Multi-row" 70 [li/select-mode: to-word face/text] of 'select-mode

 toggle "Column" 70 [li/select-mode: to-word face/text] of 'select-mode
can be optimized to this:

 style my-toggle toggle 70 [li/select-mode: to-word face/text] of 
 'select-mode
	toggle "Single" 
	toggle "Row" true
	toggle "Multi"
	toggle "Multi-row"
	toggle "Column"
halving the amount of code in this case.
I see you are successfully basing on FACE. Just a point about placement 
of custom facets; I would put all the facets that already exist in 
face at the top, then follow with all your custom ones. That way, 
someone who reads your code can see which is which. Furthermore, 
if by some chance the FACE definition ever changes (adding or removing 
a facet), it will be easier to see where the fault lies. Eg:
	list-view: face with [
		size: 500x300
		edge: make edge [...]
		
		; my custom facets

  colors: [...]  ; <--- this is the same name and I suppose the same 
  concept as used in VID 
				; (but it's still custom from list-view's point of view)
		select-modes: [single multi row multi-row column]
		; etc...
	]
What I meant to say about the face definition changing - say for 
instance a COLORS facet was added to FACE. Then, you would be unintentionally 
overriding the View system's one and probably introducing bugs, because 
the View system would expect it to be used a particular way and might 
render the face incorrectly given the data you've put into it. It 
might also change that data when you expect it to remain, etc etc.
Volker
1-Jan-2006
[3715x2]
mvc - thats like supply in the real list works. So there are demos 
:)
Not "real", the inbuild one.
Henrik
2-Jan-2006
[3717]
anton:

First one: Alright. :-)

Second one: All that code will be thrown out and there will be a 
different demo later

Third one: You have a point. I'll look at the issue of sorting standard 
vs. custom facets.
Robert
2-Jan-2006
[3718x2]
Henrik, Cyphre once did a list-view for me. It has some really nice 
things in it. Take a look at http://www.robertmuench.de/projects/data-form
for some docs on it.
Let me know, if you want to take a look at the source code.
Henrik
2-Jan-2006
[3720]
thanks! I'll take a look at it.
[unknown: 9]
2-Jan-2006
[3721]
Cool stuff.
Pekr
2-Jan-2006
[3722x2]
yes, absolutly ... IIRC Robert suggested his form dialect to be accepted 
for VID, no?
it would be good if RebGui had similar schemas ...
Henrik
2-Jan-2006
[3724]
version 0.0.14 uploaded

Changes:
      Fix: Documentation updates
      Fix: Multiple lists accidentally shared the LIST-SIZE value
      New: Custom layout block can now have multiple rows
        at the cost of horizontal resizability
      New: Now using ROW-FACE to store the custom layout block
      New: If HDR-COLS is set to a single word in a block,
        it will take the width of the list view.
      Fix: Code size optimization of navigation functions

      Info: The version between 0.0.12 and 0.0.14 is mysteriously missing... 
      :-)


The demo has been changed a bit to test custom layouts and multiple 
lists.

http://www.hmkdesign.dk/rebol/list-view.r
http://www.hmkdesign.dk/rebol/list-view.html
Graham
2-Jan-2006
[3725]
possible to configure slider width as an option ?
Henrik
2-Jan-2006
[3726]
try list-view/scr/resize/x <value>
Graham
2-Jan-2006
[3727]
i'm using your list in my chatclient ...
Henrik
2-Jan-2006
[3728]
nice. :-) screenshot?
Graham
2-Jan-2006
[3729x3]
.. well, using version 0.0.11 :)
http://www.compkarori.com/reb/if you have IE and plugin.
or, http://www.compkarori.com/reb/pluginchat.rif using rebol.
Henrik
2-Jan-2006
[3732]
please note that now when using custom layout, it's not possible 
to have a horizontallly resizable list, because it's hard to determine 
how the elements should be resized without making the layout code 
complex (if no one has any suggestions, that is...)