objectcreates a copy of a spec block on creation, so original block with a linked reaction cannot be accessed anymore, not even with
body-of obj2, as it returns a copy too.
>> obj1: make reactor! [a: 1 b: 2] == make object! [ a: 1 b: 2 ] >> obj2: object block: react/later [sum: obj1/a + obj1/b] == make object! [ sum: 3 ] >> obj1/a: 100 == 100 >> obj2 == make object! [ sum: 102 ] >> react/unlink block obj1 == [sum: obj1/a + obj1/b] >> obj1/a: 1'000 == 1000 >> obj2 == make object! [ sum: 102 ]
wiki is there to collect material, with which documentation can then be filled, in a systematic, organized manner.
That's nice. Someone fluent in English and the Red can transform wikis into "good" docs (grammar, is it easy/confusing to read etc). On other hands wikis can be created without fear.
@9214 if your fields have on-change handler, and if fields and sliders react to each other, then the following scenario occurs: you enter something in a field, it changes value of a slider, which in turn triggers an update in field, which either triggers slider again or remains silent because the actual data hasn't changed. Justs my after-midnight, uneducated guess.
field relations are only one-way - only from slider to
field. I was thinking about this so I'll keep this in mind.
Thank you. I will look at this.
I have found first problem with sliders.
on-change event triggers on any mouse/keyboard up/down:
i: 0 view [slider focus on-change [print face/data print (i: i + 1)]]
Can I set it somehow to detect only actual changes (
face/data changed or something like this)? There is
all-over to get all events. Maybe there is an equivalent to
If not I guess my only choice is to check last values to actual values. If they are not equal - trigger the change.
on-change, which triggers events as you drag, but then you don't want
on-upeither, which triggers only one event when user finally changed value.
-eputs script source code into executable and interprets, then how it works with
#system? Shouldn't it give
*** Internal Error: contains Red/System code which requires compilationerror?
are not nearly as easy to reason about IMO, or for casual users to understand.
Can we put relations on a graph? The Racket have been doing this with function dependency (I cannot find screenshot).