03-03-2017, 07:16 AM
(03-03-2017, 12:23 AM)oort Wrote: "Surely it's not a expect value to be returned to the main event handler."oort, sorry for making things confuse to you.
Not sure what you are saying. Still just a hacker...
Here is the part of the code that is supposed to create two geometry windows, in case it helps???
I could look better the problem and the code. The return value in 'command' isn't the problem in this case. By checking this code fragment from the original coder I saw that he already took care of that, so you probably didn't touched that:
Code:
+command_1({window,geom_viewer_stereo}, St) ->
+ new_viewer_stereo(St),
+ keep;
Ok, back to your problem...
(03-03-2017, 12:23 AM)oort Wrote: Yes, I think {wings,geom_title,[{geom,2}]} is supposed to define a new geometry window id number that is one higher than any existing windows.Yes, you are right.
I think new_viewer is supposed to create a geometry window.
Let's read the message from the top of the stack of the error dump:
bad return value:
{'EXIT', {undef,
[{wings,geom_title,[{geom,2}]},
{wpc_stereoscopic,new_viewer,6},
the function new_viewer/6 into wpc_stereoscopic module tried to call the function geom_title into wings module with the parameter [{geom,2}] (list of one parameter), but this function is undefined.
I took a look at the source and the function is really in wings.erl module, but it isn't exported. That is why it's crashing.
what you can do is to copy it to your plugin source:
Quote:geom_title(geom) ->
?__(1,"Geometry");
geom_title({geom,N}) ->
?__(2,"Geometry #") ++ integer_to_list(N).
and in the function new_viewer you remove the module name prefixing the function call (that actually is wings).