Questions tagged [invocation]
187 questions
127
votes
3 answers
Why are certain function calls termed "illegal invocations" in JavaScript?
For example, if I do this:
var q = document.querySelectorAll;
q('body');
I get an "Illegal invocation" error in Chrome. I can't think of any reason why this is necessary. For one, it's not the case with all native code functions. In fact I can…

user1152187
- 1,307
- 2
- 8
- 4
54
votes
3 answers
Which overload will get selected for null in Java?
If I write this line in Java:
JOptionPane.showInputDialog(null, "Write something");
Which method will be called?
showInputDialog(Component parent, Object message)
showInputDialog(Object message, Object initialSelectionValue)
I can test it. But in…

Martijn Courteaux
- 67,591
- 47
- 198
- 287
41
votes
2 answers
Uncaught TypeError: Illegal invocation in JavaScript
I'm creating a lambda function that executes a second function with a concrete params. This code works in Firefox but not in Chrome, its inspector shows a weird error, Uncaught TypeError: Illegal invocation. What's wrong with my code?
var make =…

fcortes
- 1,338
- 3
- 11
- 26
35
votes
5 answers
The invocation context (this) of the forEach function call
I was wondering what the 'this' value (or invocation context) is of the forEach callback function. This code doesn't seem to work:
var jow = [5, 10, 45, 67];
jow.forEach(function(v, i, a){
this[i] = v + 1;
});
alert(jow);
Thx for explaining…

kevinius
- 4,232
- 7
- 48
- 79
31
votes
9 answers
Looking for a convenient way to call Java from C++
It seems most documentation or helper libraries relating to JNI (Java Native Interface) are concerned with calling native code from Java. This seems to be the main use of it, even though it is capable of more.
I want to mostly work in the opposite…

Daniel Earwicker
- 114,894
- 38
- 205
- 284
16
votes
6 answers
iOS xcode 5 crashlytics error - Shell Script Invocation Error - ./Crashlytics.framework/run: Permission denied
I have Crashlytics Framework added to my project, with a script.
Run script:
Shell: /bin/sh
Script: ./Crashlytics.framework/run KEY_HERE
When I try to run the project, I get the following error:
Shell Script Invocation Error -…

B-Man
- 2,209
- 3
- 22
- 35
15
votes
2 answers
How do I find out if a particular delegate has already been assigned to an event?
I have a command button on a winform. So, if I have something like:
myButton.Click += MyHandler1;
myButton.Click += MyHandler2;
myButton.Click += MyHandler3;
How can I tell if any particular MyHandler has already been added to the Click event so it…

IAmAN00B
- 1,913
- 6
- 27
- 38
15
votes
1 answer
getUserMedia() in JavaScript normalizes across browsers. Illegal Invocation
When I try to do the following:
var getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia;
// now I try to invoke it with some parameters:
getUserMedia(...) // not working!
It throws an error "Illegal…

user3599803
- 6,435
- 17
- 69
- 130
11
votes
2 answers
Why can't I apply ToUpper() to an OwnerNode?
This works:
Output "Cluster Group: ""$($Group.Name)"", Current Owner: $($Group.OwnerNode), Current State: $($Group.State)"
This does not work:
Output "Cluster Group: ""$($Group.Name)"", Current Owner: $($Group.OwnerNode.ToUpper()), Current State:…

tkrn
- 596
- 1
- 3
- 17
10
votes
3 answers
Trying to add X-Amz-Invocation-Type:Event to existing API Gateway POST method
First, the basic question - is there a straightforward way to add the HTTP header X-Amz-Invocation-Type:'Event' to an existing API Gateway POST method with Integration Type Lambda Function so that I can easily launch an asynchronous Lambda from my…

DonMorton
- 393
- 2
- 11
9
votes
4 answers
call method at runtime
I am wondering if it is possible to load a .net DLL at runtime, view the methods available and execute one at runtime.
If this is possible could you point me in the right direction

fishhead
- 5,829
- 7
- 32
- 43
8
votes
1 answer
why the syntax `&name arg1 arg2 ...` can't be used to call a Perl subroutine?
for a Perl subroutine, if passing 0 argument, I can use 4 forms to call it. But if passing 1 or more arguments, there is one form that I can't use, please see below:
sub name
{
print "hello\n";
}
# 4 forms to…

password636
- 981
- 1
- 7
- 18
7
votes
1 answer
Calling a Scheme function using its name from a list
Is it possible to call a Scheme function using only the function name that is available say as a string in a list?
Example
(define (somefunc x y)
(+ (* 2 (expt x 2)) (* 3 y) 1))
(define func-names (list "somefunc"))
And then call the somefunc…

commsoftinc
- 71
- 1
- 3
6
votes
1 answer
Use JAR file in c++/c
Possible Duplicate:
How to access the Java method in a C++ application
I need to use JAR file in c++ program. i.e. from c++ i need to call java function, for example,
In java there is a function who accept 2 integer and return addition of…

sachin
- 1,015
- 4
- 11
- 24
6
votes
2 answers
How do I start jupyter notebook from command-line to run in my current directory, without editing config files or passing hard paths?
Juypter notebook currently has a limitation: Starting terminal in current directory
How do I do this from command-line (no Anaconda or other GUI), without the following unacceptable hacky approaches? (and in particular where the notebook directory…

smci
- 32,567
- 20
- 113
- 146