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

World: r3wp

[!REBOL3 GUI]

Rebolek
14-Feb-2011
[5950]
DO-FACE ... "Evaluates the reactors (result actions) for a specific 
face.". So no, it's not a relict, it does just what it says.
Henrik
14-Feb-2011
[5951]
Scroller attachment is actually a bad method as attachment code is 
rather complicated and error prone, hence it has been removed. Scroller 
will likely only be used where it makes sense. Better to use SLIDER 
later for demoing things like this.
Rebolek
14-Feb-2011
[5952]
Yes Henrik, but manual attachment using ATTACH reactor should be 
allowed.
Pekr
14-Feb-2011
[5953]
You still don't understand - I am not interested in ideological reasons 
of why someone thinks something should not be allowed. Because - 
next person will think, that it should be allowed :-) I don't need 
to use scroller, I would be fine with slider. But - does it make 
any difference? Attaching something the way it was designed was not 
imo all that bad idea. Please don't remove features for no apparent 
reasons :-)
Henrik
14-Feb-2011
[5954x2]
ah, yes, ok.
Pekr, the reasons for why things should or should not be allowed 
is not for ideological reasons, but results of many hours wasted 
on trying to make such attachment code work and failed.
Pekr
14-Feb-2011
[5956]
Henrik - I thought that it nicely worked in carl's demo? As for me, 
I never found any practical reason of why to attach scroller to progress 
bar :-), but I might like "general" way of attaching things, to "cause 
an update". I mean - when you e.g. change one value in a field, some 
resulting non-editable field gets updated. But that might not be 
role of 'attach anyway ...
Rebolek
14-Feb-2011
[5957]
ATTACH is useful, it's just auto-attaching that isn't that great 
idea. If ATTACH doesn't work, it's a bug and will be fixed.
Henrik
14-Feb-2011
[5958]
Ultimately a scroller and an item to scroll has many subtleties that 
you don't notice at first, such as step size, whether you want smooth 
or non-smooth scrolling, and the structure of the item to scroll, 
and whether you want separate behaviors for vertical and horizontal 
scrolling. Then there is also placement of the scroller. Do you want 
the scroller to automatically "sense" what direction it has to scroll 
in?


All this means that the scroller should treat each such case as a 
special case and you can't ask a style developer to meddle with attachment 
code inside the scroller style to deal with this issue. It's better 
and simpler to have a "dumb" scroller that will do your bidding for 
your style.


It "works" in Carl's demo, because he only has 1 or 2 cases to work 
with, but it doesn't really work that well. He never implemented 
tables, image-pans, icon lists, chat lists, maps, browser windows, 
etc.
Pekr
14-Feb-2011
[5959x2]
Rebolek - I don't know if it works. I might work. The "trouble" is, 
that scroller itself displays itself with 100% knob size. So there 
is nothing to scroll :-) How do I cause the scroller to have smaller 
initial knob size?
nothing to scroll
 = nowhere to scroll
Rebolek
14-Feb-2011
[5961]
Ah, I see. Then use this:


view [prog: progress sbar: scroller options [delta: 10%] attach 'prog] 
; DELTA will set knob size.
Henrik
14-Feb-2011
[5962]
Does SLIDER not work?
Rebolek
14-Feb-2011
[5963x2]
Yes
(yes, it does work)
Henrik
14-Feb-2011
[5965]
Then it would be a much better idea for Pekr to use SLIDER.
Rebolek
14-Feb-2011
[5966]
Yes, replacing SCROLLER with SLIDER works well and is better in this 
case.
Pekr
14-Feb-2011
[5967x2]
Rebolek - then there might be a difference to init knob size. I know 
it should be recalculated to the amount of data, but maybe by default 
it could be the minimal size, instead of 100%?
Usually when you work with IDEs, you are able to choose scroller, 
and the know size is at the minimal position, not at the maximal 
one, imo ...
Rebolek
14-Feb-2011
[5969]
Yes, that may be changed. OTOH, scroller's main  purpose is to scroll 
an inner area, while you want to set value, which is slider's purpose.
Pekr
14-Feb-2011
[5970]
Slider is just scroller without arrows, no? :-)
Henrik
14-Feb-2011
[5971]
Nope, slider is a value adjustment tool. It doesn't need knob size 
management.
Pekr
14-Feb-2011
[5972x2]
Ah, visually different. IIRC we had used "scroller without arrows" 
for such purposes in the past?
I'll change the demo then ....
Henrik
14-Feb-2011
[5974]
We did, because VID provided such features in its usual extremely 
bare-bones style. :-)
Pekr
14-Feb-2011
[5975x2]
What is the situation with compound styles? When you e.g. design 
scroller - is it a mixture of two styles? Slider (in old gui sense) 
+ arrows? I mean - if we have arrow style, and you will use the arrow 
in some compound style, then when you change/restyle arrow, will 
it change also inside of compound style?
Or are arrows "hardcoded" in scroller style?
Rebolek
14-Feb-2011
[5977]
SCROLLER is not compound style and arrows are "hardcoded".
Pekr
14-Feb-2011
[5978]
So what is an example of "compound" style? E.g. table?
Henrik
14-Feb-2011
[5979]
text area + scroller
Rebolek
14-Feb-2011
[5980]
Can SCROLLER be compound style? - Yes, it can.
Pekr
14-Feb-2011
[5981x2]
Rebolek - your above example of setting the delta to 10% does not 
work. It displays something, but the know is 100% sized anyway ...
I can confirm from demo:

radio "Delta 50%"  set 'sbar 'delta 50% ; does not work
button "Set 50%"   set 'sbar 50% ; does work
Rebolek
14-Feb-2011
[5983]
Pekr, maybe it requires some fixes that weren't released yet.
Pekr
14-Feb-2011
[5984]
What is the 'state object? I can see there is knob-size set to 100%. 
What is the purpose of this slot? I thought that parameters are stored 
in facets?
Rebolek
14-Feb-2011
[5985x2]
Well, the STATE object is for internal parameters that shouldn't 
be changed by user... We got rid of FACED already, as it was only 
causing confusion and wasn't solving anything. STATE will probably 
stay, but various words may be rearranged and moved between STATE 
and FACETS.

My secret plan is that SET(GET)-FACET should one day probably work 
as SET(GET)-FACE/FIELD but currently there's only one style that 
supports fields, so this will take time.
I think the original idea was that user should always use SET(GET)-FACET 
for accessing values and should pretend that FACE/STATE/... is impossible 
to do, so STATE would stay internal and inaccessible.
Pekr
14-Feb-2011
[5987x3]
For better understanding of material system. I can see code like 
this:

		material: 'scroller

		area-color: 200.233.245
		edge-color: 0.0.0.128
		arrow-color: black

		area-fill: 
		over-fill: sky
		down-fill: coal 

And late in the on-make, this:

			; Prepare materials
			make-material face get-facet face 'material
			set-material face 'up 

Questions:


1) why are those  facets being set? Is it just that you need to give 
them some initial value? Is my understanding correct, that during 
on-make, those values are being overriden? Most probably not, because 
materials field hold up/down/over values.


2) is material system sufficient, if it holds only gradients? It 
should imo hold all values, which might influence the design of the 
widget. And hence even bare-bones colors. The question also is, if 
draw-blocks shold not be part of the material system too, because 
my impression is, that so far, it does very little to be any usefull, 
and the difficulcy to understand the whole concept might not be worth 
the effort.


3) There is an architecture discrepancy - materials do use central 
storage (kind like old VID kept 'feel actions block together - nice 
idea, but really not any usefull, and VID2 design mistake imo), while 
draw blocks are contained per style definition. I think it might 
be wise to think about moving materials: [up [] down [] over[] ] 
slots to the style definition itself
Rebolek - I hope you know what you are talking about :-) FACED was 
usefull - it was local instance copy of the value, not the shared 
one. FACETS then kept the values shared. RMA changed the design, 
so that FACETS are now instance local, which of course might lead 
to the increased memory consumption (that would have to be proven 
though). RMA introduced INTERN slot for holding instance local values, 
but from what I saw, that is not used that much yet ...
What I really start to miss is high level design docs. I simply don't 
necessarily agree to some of architecture design decisions. I know 
that last thing you want to do is to create docs, but I am starting 
to think I'll produce some CC tickets for that ...
Rebolek
14-Feb-2011
[5990]
I have yet to see a single case where FACED is useful to change my 
mind about that decission.
Pekr
14-Feb-2011
[5991x2]
FACED is not usefull anymore, as you reversed the design. Once gain 
- Carl's gui: FACED = instance local, FACETS = shared. RMA's GUI 
- FACETS = instance local, FACED = dismissed, INTERN =  instance 
local. So if you question usefullness of FACED, then you are also 
imo questioning usefullness of INTERN. I must miss something then, 
or you did not understand, what was FACED supposed to do in Carl's 
GUI?
My secret plan is that SET(GET)-FACET should one day probably work 
as SET(GET)-FACE/FIELD but currently there's only one style that 
supports fields, so this will take time.
 - Sadly I have no idea what you are talking about here. 

GET-FACET FACE 'SIZE
vs
GET-FACE 'SIZE????
Rebolek
14-Feb-2011
[5993x2]
FIELDS are probably not part of the latest public release. Currently, 
[set-facet face 'size 10x10] is basically the same as [face/facets/size: 
10x10]. With fields you can have some code that will check the value 
for right datatype, boundaries, etc.
Carl's gui: FACED = instance local, FACETS = shared.

 - I know, but what is it good for? In the end everything will end 
 in face's facets anyway. Neither me nor Cyphre saw a single reason 
 to leave it, if you have some user case, then please, enlighten us, 
 because for us, FACED is only problem-maker.
Pekr
14-Feb-2011
[5995x2]
So why have you introduced INTERN? INTERN is the replacement for 
FACED :-)
As for fields - what you are trying to say is, that just recently 
set-facet uses only direct assignment method, and what you want to 
achieve is set/get accessors, doing more stuff? What would be the 
usage syntax?
Rebolek
14-Feb-2011
[5997]
Intern was meant for style-specific functions. It may get removed, 
if it's not used.
Pekr
14-Feb-2011
[5998]
So you still see there is not much place for fields, which could 
be e.g. shared for all buttons?
Rebolek
14-Feb-2011
[5999]
what you want to achieve is set/get accessors

 - exactly. Current syntax is (for compatibility) [set-face/field 
 face value field-name].