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

World: r3wp

[View] discuss view related issues

Robert
31-Dec-2005
[3626]
filtering: how about doing it in real-time, while typing.
Pekr
31-Dec-2005
[3627x2]
real-time filtering - in old days I remember it was Allen, who introduced 
such field style ...
Henrik - as for the focus - do you try to focus/hilite particular 
cell, or just a row?
Henrik
31-Dec-2005
[3629x7]
Robert: I will look at right click unsorting.


Realtime filtering is really up to the field that provides the string 
and updates the list, not the list itself (more flexible that way). 
I've done it before, where realtime performance could be achieved 
with more than 30000 entries in the list, so it's not a problem to 
do.
pekr: I've tried focusing a single cell, and I can get key and mousewheel 
feedback, but selecting is ruined by it.
robert, BTW tri-state sorting can be turned off with the TRI-STATE-SORT 
variable. then it only switches between ascending and descending.
(but it's broken in 0.0.7!)
sorry for the wait... Version 0.0.8 uploaded

Changes:

      New: Functions to select next, previous, next page, previous page, 
      first and last. Uses FOLLOW.

      New: FOLLOW. Automatically follows the selected entry so it's always 
      in view. Requires FOLLOW? set to TRUE

      New: SCROLL-HERE. Scrolls automatically to the selected entry.
      Fix: Filter result was lost after resize.
      Fix: Sorting was lost after resize.
      Fix: Sorting indication is now persistent after resize.
      Fix: Dual state sorting was accidentally broken.
      New: Initial sorting can now be set before first view
      New: Right-click on header unsorts the list

Demo can be found at http://hmkdesign.dk/rebol/list-view3.r
forgot an entry:


New: can return a row as a block or an object from the selected row, 
using GET-ROW-HERE.
Version 0.0.9 uploaded

Changes:

      New: GET-BLOCK retrieved the selected data as a block. Only works 
      with shift for now under multi and multi-row.

      New: Using the shift key, you can select multiple cells in multi 
      and multi-row mode.

      New: Five different select modes now: Single, multi, row, multi-row 
      and column.

      Fix: SCROLL-HERE only works with select modes 'single and 'row

      Fix: FOLLOW didn't work when selecting a row and then sorting


The different select modes might be interesting for a future spreadsheet 
face.
Graham
1-Jan-2006
[3636]
Are the header names hard coded into the list-view ?
Henrik
1-Jan-2006
[3637]
they can be changed with the HDR-COLS variable
Graham
1-Jan-2006
[3638]
how does your list cope with an empty list ?
Henrik
1-Jan-2006
[3639]
I don't know yet, but I plan to just let it draw empty cells. It 
should do the same if you filter for something not in the list
Graham
1-Jan-2006
[3640]
what's the syntax for creating a two column empty list ?
Henrik
1-Jan-2006
[3641x3]
you'd use (for now):

view layout [list-view with [in-cols: [a b]]]
The list uses some standard values that are not correct right now, 
but I'll move those values into the correct place soon. If you for 
example set HDR-COLS to [], the header won't be shown.


The idea is that you have IN-COLS, which is based on the data you 
have in DATA. It's just a block of any words to tell each column 
apart. Then you will have OUT-COLS, which are the columns shown in 
the list view. The ordering of OUT-COLS determines the order that 
the columns are displayed in. HDR-COLS is for now a separate block, 
but it will be combined with OUT-COLS later. This ordering mechanism 
doesn't work yet, but it'll come in very soon.

Example of intended functionality:


in-cols: [person-id age sex height weight name address city country 
phone]
out-cols: [name age city]

Then you could reorder:

out-cols: [age city name]


And after using UPDATE, the list would update on the fly. DATA is 
not manipulated at all.
0.0.10 uploaded.

Changes:

      Fix: Optimized updating when moving from filtered to unfiltered view

      Fix: Accidentally didn't filter on the original DATA, when doing 
      multiple filterings
      Fix: Better detection of when FLT-STRING has been changed
      Fix: SCROLL-HERE can handle empty lists now
      Fix: Crashed if DATA was empty

      Fix: Selecting rows that are empty, no longer causes a script crash

      Removed: Ctrl-key functionality, because it's too complex to handle 
      with the different modes right now

      Fix: GET-BLOCK caused error if Ctrl-key was used to select cells.
      New: Data manipulation functions:
        INSERT-ROW, INSERT-ROW-HERE, CHANGE-ROW, CHANGE-ROW-HERE,
        REMOVE-ROW, REMOVE-ROW-HERE, APPEND-ROW
        These only work in select-mode 'row
Graham
1-Jan-2006
[3644]
I tried this

list-view with [in-cols: [user time] data: []]

which doesn't work.
Henrik
1-Jan-2006
[3645]
doesn't work how?
Graham
1-Jan-2006
[3646x2]
the existing hardware columns appear and not the new named ones, 
and they are added to the existing ones.
the existing hardcoded columns still appear.  Then a large gray box, 
and then the scoller.
Henrik
1-Jan-2006
[3648x3]
hmm.. that's because the layout is still hardcoded. you'll need to 
define a new layout in LIST-VIEW/LST/SUBFACE for now
I think I'll work on that now
the layout is for one row and it must be horizontal. you should also 
use the LIST-TEXT widget.

example:

layout/tight [across space 0 list-text 100 list-text 50]


but.. when I get this done right, it shouldn't be necessary to define 
the layout
Graham
1-Jan-2006
[3651]
I guess I'd better wait as that didn't work either.
Henrik
1-Jan-2006
[3652x6]
uploaded 0.0.11

Changes:

      New: Header can now be defined from the words in OUT-COLS or IN-COLS

      New: No longer need to manually create the subface for the list
      Fix: DATA was not properly initialized

      Fix: List was updated twice during all manipulation functions added 
      in 0.0.10

      New: Added /no-show refinement to FLT-LIST to speed up certain updates 
      that require setting the selected row before showing
oops... the example code has been commented out, but the example 
line at the bottom should be fairly easy to figure out :-)
hm... still a bug when initializing the header... hang on
there... new 0.0.11 uploaded
seems to work now
I should start working on the docs now, so people can test it out 
a bit...
Graham
1-Jan-2006
[3658]
How to set the column sizes ?
Henrik
1-Jan-2006
[3659x3]
by making a layout manually :-) seriously I need to make that a bit 
easier...
MAIN-COL sets the column that should be resizable
I could make a block of widths, but somehow it'll get less than managable 
when OUT-COLS will start to get dynamic. I'm not sure yet how to 
do it easily, so all columns simply have a standard width of 100 
pixels.
Graham
1-Jan-2006
[3662x3]
repeat i length? out-cols [
          insert tail lo [list-text 100]
        ]
except the first column is 4x the size of the second column.
u must resize it somewhere.
Henrik
1-Jan-2006
[3665]
it does, because MAIN-COL is normally set to the first column
Graham
1-Jan-2006
[3666]
how about using a block of widths first off ? Then optimise later 
on.
Henrik
1-Jan-2006
[3667]
and it automatically expands it to the total width of the list
Graham
1-Jan-2006
[3668]
and the width of the list is determined by what ?
Henrik
1-Jan-2006
[3669x3]
SIZE
you could: view layout [list-view 600x200]
I'll give it a go with a width block... hopefully it won't come back 
and take revenge later :-)
Graham
1-Jan-2006
[3672x2]
try using a height of 350
the last row is higher then the others
Henrik
1-Jan-2006
[3674x2]
BTW, I'm trying to make it blend in as good as I can with the rest 
of VID by using the same keywords and functions.
no, the bottom portion happens to be in the same color as the last 
row, which isn't entirely at the bottom. that was an easy/quick fix 
at lists that don't add up height wise.