I am attempting to call a function inside an object. But the function doesn't exist inside all objects that are run through the function. PIKE throws a runtime error of "Attempt to call the NULL-value". Is there any way to override this and have PIKE return a 0 instead. Or are there any other means of checking to see if the function exists inside the passed object? The function exists in more than one different object so I am not sure function_object() will work in this instance since it exists in more than one object. Any ideas?
--------------------------------- Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
mixed call_foo(object o) { return functionp(o->foo) && o->foo(); }
/ Jonas Walldén
Previous text:
2004-01-19 23:31: Subject: NULL value
I am attempting to call a function inside an object. But the function doesn't exist inside all objects that are run through the function. PIKE throws a runtime error of "Attempt to call the NULL-value". Is there any way to override this and have PIKE return a 0 instead. Or are there any other means of checking to see if the function exists inside the passed object? The function exists in more than one different object so I am not sure function_object() will work in this instance since it exists in more than one object. Any ideas?
Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
/ Brevbäraren
This is common: if (obj->fun) obj->fun();
/ Mirar
Previous text:
2004-01-19 23:31: Subject: NULL value
I am attempting to call a function inside an object. But the function doesn't exist inside all objects that are run through the function. PIKE throws a runtime error of "Attempt to call the NULL-value". Is there any way to override this and have PIKE return a 0 instead. Or are there any other means of checking to see if the function exists inside the passed object? The function exists in more than one different object so I am not sure function_object() will work in this instance since it exists in more than one object. Any ideas?
Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
/ Brevbäraren
pike-devel@lists.lysator.liu.se