From: jglueck@... (=?ISO-8859-1?Q?Bernhard_Gl=FCck?=) Date: 2001-09-24T08:33:22+09:00 Subject: [ruby-talk:21613] C++ / Ruby questions again Hi there again.. Slowly I am progressing to getting ruby to integrate perfectly into my game engine, thanks to all the valueable help from this forum.. I think i will compile a FAQ for using C++ with Ruby to make those easy questions more clear to other new developers ( I never found any docs on the subject ) However I have two questions again.. I want to call an object method from C++ in a ruby class... This works fine with rb_funcall2 .... I always test with rb_respond_to if the given objects supports the method (aka message ) however now i want to pass a parameter to every method i call .... this works great too, but when the parameter count of the method and the caller do not match i get a crash.... Now my only help would be a method or other way like rb_respond_to to check wether a method needs a parameter and if yes how many.. so that i only call it when it has the appropriate paramter count.. Is there a way to do this ? Second, i askes about how to catch all ruby exceptions.. I think i did not state clearly what i wanted, i already used rb_eval_string_protect for code evaluation.. so no crashes happened.. but If e.g a ruby program throws a string exception i want to present that string to the user of my program... so is there a way to intercept exceptions check if they have a presentable data type and display it ? without interupting program flow ? Maybe with a callback function ? And something a little bit offtopic... since ruby prints out its debug messages to the stdout does anybody know how to reroute this output to a GDI window ? (Win32) i know how to reroute it to a file,but i want to give the user a nice environemt where they can edit and debug code....i think rubywin does that but how ? FILE * rerouting to GDI window ... ? Thanks in advance Bernhard Gl�ck