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

on-created actor was never documented #210

Open
hiiamboris opened this issue Jan 22, 2020 · 7 comments
Open

on-created actor was never documented #210

hiiamboris opened this issue Jan 22, 2020 · 7 comments

Comments

@hiiamboris
Copy link
Contributor

https://doc.red-lang.org/en/view.html

There's a mention of on-create (with single face argument). But not a word about on-created and that it also accepts a single argument only.

@9214
Copy link
Contributor

9214 commented Jan 22, 2020

Per old discussion with @dockimbel:

on-create is supposed to be triggered before the widget creation (but after the face creation). I vaguely remember on-created that we wanted to rename it maybe to on-show, so that's why we didn't make it official yet.

@hiiamboris
Copy link
Contributor Author

on-show name would imply on every show though ;)

@greggirwin
Copy link
Contributor

On-create seems more accurate, and we can document it with a note that the name is still under consideration.

@9214
Copy link
Contributor

9214 commented Jan 22, 2020

@greggirwin except that on-create is already taken.

on-create and on-created both are triggered on face creation, but the former comes before OS-make-view call, which allocates low-level resources and establishes a two-way binding between face and widget, while the latter comes after the call.

@greggirwin
Copy link
Contributor

I meant that on-create is better than on-show. The current names are fine, because otherwise we start down the path of on-pre-create/on-post-create, which isn't definitively better. Though it does make the names more obviously different.

@9214
Copy link
Contributor

9214 commented Jan 22, 2020

@greggirwin on-show is an alternative proposal for on-created, not for on-create. That's why it hasn't been documented.

@greggirwin
Copy link
Contributor

Thanks for catching that. Let's see if I can get it right this time. On-created seems fine, as I agree with Boris that on-show implies it will happen on every showing of the face.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants