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

World: r3wp

[!REBOL3 GUI]

Ladislav
4-May-2011
[7106]
Correction:

1)

    do-style face 'on-key arg

2)

    do-actor face 'on-key arg

3)?
Maxim
4-May-2011
[7107]
I definitely prefer 2.
Pekr
5-May-2011
[7108x2]
I already expressed my preference, hence 2)
IIRC,I even suggested to also rename DO-FACE to DO-REACTOR ....
Henrik
5-May-2011
[7110]
Another suggestion is to have them all end in *-FACE, so ACT-FACE, 
REACT-FACE. If you have another DO-* that works in a completely different 
domain, maybe that would be confusing.
Robert
8-May-2011
[7111]
We are going to re-factor the complete ACTOR & REACTOR stuff in R3-GUI. 
It will be streamlined, much simpler and more common in that it follows 
"best practices" from other GUI libs. The side effect is, that this 
is a bigger re-refactoring step and will take some time. Until done, 
we are not going to make a new release.
Pekr
8-May-2011
[7112]
Streamlined typically sounds like simpler, less capable. I hope it 
stays as flexible as possible?
Kaj
8-May-2011
[7113]
If you streamline well, in the REBOL way, things become more flexible 
and capable
Jerry
8-May-2011
[7114]
view [ AREA [ red "12" green "AB" blue "ab"] ]
Caret cannot move to "12" and "AB". A bug, I think.
Robert
8-May-2011
[7115]
It will much simpler and more cabable.
Ladislav
9-May-2011
[7116]
Pekr: "I hope it stays as flexible as possible?" - sorry to spoil 
your expectations, but our main goal is to make it dumb, incapable 
and more rigid than possible.
Henrik
9-May-2011
[7117]
:-)
Pekr
9-May-2011
[7118]
As status of RMA's GUI is more of a private effort targetting business 
level apps, I can imagine kind of simplification, which makes it 
"dumb, incappable and more rigid than possible", because it just 
fitst your limited business apps needs :-)
Robert
9-May-2011
[7119]
Yep, which are very limited and that's why people pay a lot for our 
stuff.
Pekr
9-May-2011
[7120]
Ppl pay lots of money for crap like SAP, because there is no other 
way around for them :-)
Ladislav
9-May-2011
[7121]
Pekr: "I can imagine..." - that is where we need your imagination, 
since we strived very hard, but the goal to make it more rigid than 
possible seems to be elluding us.
Kaj
9-May-2011
[7122]
Perhaps a summary of the proposed changes would clear the air?
Robert
10-May-2011
[7123x2]
The main problem at the moment is (and I hope I hit it correctly, 
otherwise Lad etc. will correct me) that it's not clear which ACTORs 
call which REACTORS. And if all REACTORS are executed or not. So, 
there is not logical relation between an ON-KEY event and an ON-KEY 
handler. Further, one sometimes need to first call the user-code 
event handler, than the style handler, or the other way, or in between.
So, we are thinking about making the handling of events much more 
clear.
Ladislav
10-May-2011
[7125x2]
In a simplified form:

- the DO-STYLE function will be renamed to DO-ACTOR

- both Henrik and Robert wanted to be able to influence the behaviour 
of actors from the Layout dialect,
- which was not possible yet,
- and was not compatible with the idea of reactors

- therefore, it looks like the best idea to introduce one new Layout 
dialect keyword (ATTACH),
- and allow to influence actors from the Layout dialect,
- making reactors unnecessary
- forgot about yet another Layout dialect keyword: OVERRULE
Kaj
10-May-2011
[7127]
Wasn't there an ATTACH already? Or was it implicit?
Pekr
10-May-2011
[7128x3]
There was ATTACH IIRC - it was used for scrollers mainly. In more 
abstract pov it might just call attached style's on-attach or on-set, 
I don't remember anymore. But - I also remember guys here said, that 
areas will not be done that way anyway (attaching just separate scroller 
style) ....
- making reactors unnecessary ...

 - understood, but doesn't it break Carl's idea of having most common 
 actions directly available in a layout, without any overhead? I mean 
 - reactions like DO, SUBMIT, BROWSE, CLOSE etc.?

Could syntax example be shown? E.g.

BUTTON "browse" BROWSE http://www.rebol.com

will become?

BUTTON "browse" ATTACH ????
Also - DO is an implicit REACTOR, but still one of reactors. So - 
what will happen to DO itself? Will we call it just another KEYWORD?
Robert
10-May-2011
[7131x2]
button "browse" on-click [browse http://rm-asset.com]
than you can use things like: on-hoover, etc. too
Pekr
11-May-2011
[7133]
well, so you are basically exposing low level actors to the dialect 
level. Initial idea was to have hidden actions inside the style level. 
What you propose might work, but how do I set an action? Can I somehow 
 "chain" actions?

button "browse" on-hoover [code here] on-click [code here]?


Also - does not it make dialect more complicated? You have to count 
on every possible action any style can have ....
Robert
11-May-2011
[7134x3]
chain: Yes, why not.
complicated: No, it get clearer. The current system is complicated 
if you want to do more than kid things. That was the same problem 
with VID. It was simple for non-value things but not flexible for 
enterprise things.
the problem with complexity is, you can't get rid of it. Only complicated 
things can be reduced.
Pekr
11-May-2011
[7137]
Well, VID was always declarative, and we know it was/is limited. 
From your proposal it still looks good to me, there just will be 
the need to be able to specify more then one action. I can even imagine:

button "browse" #"B" action [
    on-click [do something]
    on-hover [do something]
]


But for single actions, there would be one unnecessary block level 
probably. I am open to any proposals, and looking forward to final 
solution ....
Henrik
11-May-2011
[7138]
it won't be necessary with actions (I hope). you simply call actors 
directly. About chaining them, how does it make sense to chain an 
on-click and on-hover actor? They are separate actions. What you 
need is the ability to stack the action code for actors, so that 
if an actor is already defined for a style, then the new action code 
could be appended to the original code. I use a similar design in 
my private version of the VID Extension Kit, but am also forced to 
use the traditional actions as they are part of the standard face.
Pekr
11-May-2011
[7139]
stacking, chaining - whatever. We just need to be able to specify 
more than one action, that's all ...
Henrik
11-May-2011
[7140]
if you can't, then the GUI will be entirely useless. you couldn't 
even start it.
Pekr
11-May-2011
[7141]
What you are basically doing is some OOP aproach here. But adding 
the code to the end? Who decided that? There are three levels - replace 
action, pre-init, post-init. So what do we choose? In Visual Objects 
I had all three capabilities. Dunno if you would find that usefull 
though ....
Henrik
11-May-2011
[7142]
I'm not sure it will be implemented that way, but it is already a 
problem that we need to append actor code to a previous actor, when 
creating a new style, based on an older one. An example of this is 
a field with extra functionality to perform some kind of action on 
an attached face in the ON-KEY actor. This is possible now, but the 
method is obscure.
Ladislav
20-May-2011
[7143]
A terminology problem related to the ATTACH keyword. Every face should 
have an attribute listing the items attached to it, and an attribute 
listing the items to which it was attached. One (let's call it 'extra 
long') alternative might be ITEMS-ATTACHED-TO-THIS and ITEMS-TO-WHICH-THIS-IS-ATTACHED. 
To show you an example, let's have faces A and B, and suppose, that 
the user attached B to A. Then:

1) for A, the ITEMS-ATTACHED-TO-THIS list shall contain B
2) for B, the ITEMS-TO-WHICH-THIS-WAS-ATTACHED shall contain A


The problem is, that the above two attribute names probably aren't 
the best possible (or, are they?). Any "ideal" attribute names you 
prefer?
Pekr
20-May-2011
[7144x2]
Well, this is really a bit longish :-) Having fever, it is a bit 
difficult to think for me, but :-):

1) ATTACHED
2) ATTACHING

Hmm,not clear after few secs .... so:

1) ATTACHED-FROM
2) ATTACHING-TO

?
I am not sure it is correct english wise though ...
Sunanda
20-May-2011
[7146]
My understanding is that the purpose of ATTACH is to direct the flow 
of action events.....


....If face B is attached to face C, then face C also gets B's action 
events. And if B is attached to A, then B gets A's action events, 
prior to them flowing to C.


So, from a stream-of-events, perspective: A is UPSTREAM of B. While 
C is DOWNSTREAM of B.


Hence a suggestion,,,,,, ATTACHED-UPSTREAM and ATTACHED-DOWNSTREAM.
Pekr
20-May-2011
[7147x2]
there is also an alternative world to ATTACH - CONNECT?
Sunanda - nice suggestion ....
GrahamC
20-May-2011
[7149x2]
parent-faces child-faces
or similar
Sunanda
20-May-2011
[7151]
It is possible, I think, Graham that a face can be in more than one 
heirarchy; so PARENT and CHILD alone does not describe which hierarchy.

Other structures that may have child/parent faces: panels within 
panels; Z-axis visibility.
GrahamC
20-May-2011
[7152x2]
Ok, change that to parents-faces
These are like linked lists where elements might be in one than one 
list?
DideC
27-May-2011
[7154]
IS-ATTACHED / HAVE-ATTACH
Cyphre
8-Jun-2011
[7155]
It's time to decide about propagation of events using actors in R3GUI 
so we would like to know your opinion on that.

example:
Let's have face A and face B which is inside face A.

Currently, when you click mouse button on the face B and the face 
B has defined ON-CLICK actor the event is fired to that actor.

If the face B have no ON-CLICK actor the event is not catched anywhere.


We got a request to checnge this so there are few possible options 
we could use:


1. If face B doesn't have ON-CLICK actor defined then propagate the 
event up to its parent face (in our case face A) and up until any 
ON-CLICK is found. (If the face B have ON-CLICK defined then the 
actor is executed and propagation stops here.) In other words the 
event propagation stops in the closest found ON-CLICK actor during 
the 'bubbling' of the event upwards.


2. Propagate the event from face B thru its parent face (in our case 
face A) and up to the topmost(Window) face. The propagation/bubbling 
is done by default and can be stopped in any ON-CLICK actor on the 
way upwards by returning 'stop-event(or any other chosen) keyword. 
(this is simmilar to the model used in HTML)


3. (current behaviour) Don't propagate the event. Just execute the 
ON-CLICK actor in face B in case it is defined. Programmer have to 
manually add event propagation code to the actor if event bubbling 
is required.


4. Don't propagate the event by default. But introduce PROPAGATE/BUBBLE-ACTORS 
(or any other chosen word) option field that can be set for each 
face. The option could hold block of actor names that should propagate/bubble 
the events up.


Please, keep in mind that chosen behaviour affects not only actors 
that handle user input but also actors like ON-INIT, ON-MAKE and 
any other possible actors in general.


Please post either your favorite from the above options or even any 
other possible solution you think is better. Thanks for your help.