Hi Alfred,
> Your c-code did not show an argument in the method ( if I remember
> correctly ), and then you'll certainly crash.
> long DummyFunc() {
> return 0;
> }
Not true. Because the code is not even run, before the crash occurs. Also, you
are still wrong. I'll explain how computers work. They put the arguments on the
stack. The function reads them off, and may return a result. However, if the
arguments are not read, no damage occurs. Not returning a result in the other
hand (unlike in RB), may cause a problem, because "garbage" data is returned
instead.
To prove my point, I changed the sample to fit your example.
> REALmethodDefinition AM_Ma_Methods[] = {
> { (REALproc) DummyFunc, 0, "Value(Key as Object, assigns Value as
> Object)" },
> };
>
> That ain't gonna work,
As a test it works. OK. I did the test. I made the example project downloadable.
See my point here:
http://elfdata.com/rb/assignsbug/using_assigns.png // shows the compile of
empty project = crash
http://elfdata.com/rb/assignsbug/not_using_assigns.png // shows compile of
empty project = OK
http://elfdata.com/rb/assignsbug/assigns_bug_demo.zip // plugin code to see
for yourself
My original test was perfect. It was you who did not understand something
flawless.
But I modified the project to make it easier to understand, so you do not need
to worry about knowing if an empty function with different params will match a
function in RB with params. Because the params now match. And the result is the
same.
Just compile, and put the dylib in your plugins folder. No need to make an rbx.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>