Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VID actors creation doesn't merge in predefined actors from style #3392

Closed
gurzgri opened this issue May 18, 2018 · 0 comments
Closed

VID actors creation doesn't merge in predefined actors from style #3392

gurzgri opened this issue May 18, 2018 · 0 comments
Assignees
Labels
status.built A change in codebase has been done to address the ticket. status.tested The change in code has been manually tested and verified to fix the issue. type.review Ticket describes a possible improvement.

Comments

@gurzgri
Copy link

gurzgri commented May 18, 2018

Expected behavior

VID face actors creation code should merge actors declared per face with actors predefined in the style of which the face is derived from.
This problem isn't restricted to the ON-TIME actor used in the example code below but happens to all actors declared for a style.

Actual behavior

VID face actors creation code only creates explicit actors and/or default actor, but doesn't merge in actors already defined for the style the face is generated from.

Steps to reproduce the problem

  1. Run the following code:
layout [
    style clock: base rate 0:00:01 on-time [probe 'on-time]
    a-clock: clock
    b-clock: clock [probe 'on-down]
]
? a-clock/actors
? b-clock/actors 
  1. See how the output
A-CLOCK/ACTORS is an object! with the following words and values:
     on-time  function!     [face [object!] event [event! none!]]
B-CLOCK/ACTORS is an object! with the following words and values:
     on-down  function!     [face [object!] event [event! none!]]
]

shows how B-CLOCK has been created without merging in ON-TIME actor from its style because of the explicit ON-DOWN actor.

  1. Check how A-CLOCK declared without explicit actors keeps the ON-TIME actor.

Red and platform version

RED: [ branch: "master" tag: #v0.6.3 ahead: 712 date: 16-May-2018/9:52:18 commit: #1fd3e99c516a900d562ad9a7744e0c74b5e2613d ]
PLATFORM: [ name: "Windows 10" OS: 'Windows arch: 'x86-64 version: 10.0.0 build: 16299 ]
greggirwin added a commit to greggirwin/red-code that referenced this issue Nov 24, 2018
endo64 referenced this issue Jan 3, 2019
…n the instance.

Use-case example:

    view [
        style but: base
            on-down [face/color: face/color / 2 do-actor face event 'click]
            on-up   [face/color: face/color * 2]

        but red on-click [print "hi"]
    ]
@dockimbel dockimbel self-assigned this Jan 3, 2019
@dockimbel dockimbel added status.built A change in codebase has been done to address the ticket. status.tested The change in code has been manually tested and verified to fix the issue. type.review Ticket describes a possible improvement. labels Jan 3, 2019
@dockimbel dockimbel added this to the 0.6.5 milestone Jan 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status.built A change in codebase has been done to address the ticket. status.tested The change in code has been manually tested and verified to fix the issue. type.review Ticket describes a possible improvement.
Projects
None yet
Development

No branches or pull requests

2 participants