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

World: r3wp

[!REBOL3 GUI]

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].
Pekr
14-Feb-2011
[6000x3]
I just wonder where/how you define those boundary/value checks, etc.? 
But OK, I can wait for implementation ....
I am going to suggest the rename of do-style and do-face. Those names 
have absolulty no sense. DO-ACTION, DO-REACTION would be better one 
imo ...
You can dismiss the tickets ...
Rebolek
14-Feb-2011
[6003x2]
You must define map! with code for each field (two map!s actually, 
for get- and for set-). Unknown fields are ignored. This way you 
can also very easily get overview of what's possible to set(get) 
in particular face.
...rename do-style and do-face. Those names have absolulty no sense
 - Yes, I agree that those names aren't very good.
Pekr
14-Feb-2011
[6005x2]
Rebolek - will it not complicate a bit design/syntax of style? so 
instead of facets [size: 10x10 color: blue  text: "test"] we will 
see maps? Or will it be hidden in some lower level?
Because - i have objections with the options block. One might think, 
that it directly maps to facets, but it is not the case. It seems 
to use similar mechanism you are suggesting now for fields. Or am 
I wrong?
Rebolek
14-Feb-2011
[6007]
No, you're not wrong, it's similar to options. But it won't change 
style design, nothing's going to happen to facets block. This is 
just preffered interface  for accessing already existing faces.
Pekr
14-Feb-2011
[6008x2]
I am about to write CC ticket for 'options. There is naming discrepancy 
here, as well as I think, that those things could be made declarative, 
and move inside the style definitions. Ditto for materials ...
Hopefully you will be able to understand, what I have in mind. I 
decided to put my ideas into CC, if I feel it that way, because that 
way it is at least recorded, even if dismissed.
Rebolek
14-Feb-2011
[6010x2]
Options not mapping directly to facets - internal representation 
of data may differ from user preffered format.
CC ticket is always good way.
Pekr
14-Feb-2011
[6012x4]
OK, so my weak brain just dictated to create four tickets, related 
mostly to architecture of the GUI :-)
I will not submit particular style problems, as what I can hear most 
of the time is - it is not yet adapted. But it depends, maybe for 
clarity it would be good to have any findings in there too ...
OK, so I added bunch of tickets, which record some of my worries. 
There are also two fixes to 'doc style. While I know it is going 
to be replaced, but if it does not happen soon, it might still be 
worth to patch them.
I spent a bunch of hours in the code, and thinking about the architecture, 
so hopefully you don't dismiss them in 10 seconds :-)
Ladislav
14-Feb-2011
[6016x8]
There was very long discussion, towards if we should allow to change 
the size of the button to allow any size being set

 - did you really mean it? One can easily make sure, that the init-size 
 of the button is set as specified. The fact, that the result of the 
 resizing is different demonstrates, that the result of resizing depends 
 on other attributes as well.
So, nobody forbids you to set the INIT-SIZE as you see fit.
It is demonstrable, that frequently, it can be useful to have INIT-SIZE 
outside of the MIN-SIZE to MAX-SIZE range.
That being the case, it is necessary for the three dimensions to 
be independent, in that it has to be allowed to set the INIT-SIZE 
outside of the range, i.e. set all three dimensions independently.
current behaviour allows inlined set of init-set, which has no effect 
though, and hence causes user confusion 

 - that is not true again, since the user can examine the INIT-SIZE 
 attribute, he can easily find out, that it has been set as specified. 
 What was not set (and not specified) is just the MIN-SIZE and MAX-SIZE 
 values.
So, the default values (examinable) are used.
- allow max-size override. If user requests 400x400 button, which 
exceeds max size in x and y axis, set new max-size to that value. 
The argument that that might not be eventual max-size user might 
imagine does not hold any water. 

 - as said, MAX-SIZE shall be independent from INIT-SIZE. What I do 
 want to preserve is the independency between INIT-SIZE and MAX-SIZE, 
 since that *is* needed in reasonable cases.
To not be misunderstood:

- everybody is allowed to set INIT-SIZE howewer he likes
- everybody is allowed to set MAX-SIZE however he likes

- nobody is allowed to ask me to be more clever than him and to "correct" 
(read: "mess up") the MAX-SIZE for no reason, in fact
Pekr
17-Feb-2011
[6024]

There was very long discussion, towards if we should allow to change 
the size of the button to allow any size being set" - did you really 
mean it? One can easily make sure, that the init-size of the button 
is set as specified." - Yes, I meant it, because IIRC there were 
opinions, trying to suggest here, that it should not be allowed at 
all :-)


All stuff you write - I know. It is just that I might not necessarily 
agree with the outcome. I am trying to think form user's point of 
view. I wonder to what points you would agree, and to what not:


- Let's assume I set button in bounds (between what min-size/max-size 
allows): I tried various scenarios, and I almost never got button 
of requested size. The reason is in how resizing system works. In 
fact, when inspecting various sizes - init-size, min-size, max-size, 
those don't contain actual button size. Actual size is in face/gob/size. 
Button gets different size due to resizing system cell alignment 
imo. From the resizing system point of view, it is correct behaviour, 
but from the user's perspective, it is questionable, if the result 
is OK?


- In regards to above point, I really wonder, if buttons should be 
resizable at all. I said - resizable, not settable. I wonder, if 
I would like buttons to be of consistent size. I might try with face/resizes?: 
false, if that would make the trick.


- Then, in regards to above - I might think of init-size setting 
the requested button size


- Maybe (and I am not sure about that one), we could allow some debug 
info - "out of bounds", if my init-size value does not fit in between 
the min-size, max-size, as style author defined it. I have heard 
that guys are working on some field accessor functions - those might 
be able to print some debug info to console, at least when in interactive 
mode.


Othere than that - this one is a minor issue for me, I e.g. care 
more about architecture, and so far I can see materials having real 
low benefit, for how complicated it turns out ...