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

How to get the caller object? #3

Open
miicha opened this issue Apr 27, 2016 · 1 comment
Open

How to get the caller object? #3

miicha opened this issue Apr 27, 2016 · 1 comment

Comments

@miicha
Copy link

miicha commented Apr 27, 2016

Is it somehow possible to access the caller object (especially attributes or parent attributes) within e.g. the onKeypadOpen: function () {

@orionstudt
Copy link

orionstudt commented Mar 20, 2018

This is almost 2 years old but for good measure:

It looks like the event context of onKeypadOpen is the numpad itself, rather than the target object. Nothing else is passed into the onKeypadOpen trigger.

However, onKeypadOpen is triggered from within the nmpd.open(target, initialValue) function so you can modify the nmpd.trigger('numpad.open'); line to nmpd.trigger('numpad.open', target); if you would like your initial target to be accessible.

You would access that within your onKeypadOpen like so:

onKeypadOpen: function (event, target) {
    // do something with target
}

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

2 participants