From: James L. <dr...@le...> - 2003-09-26 04:48:10
|
OK. I define a GnomePrintContext class with the following in Init_gnome_print_context: G_DEF_CLASS(GNOME_TYPE_PRINT_CONTEXT, "Context", mGnomePrint); From another gnomeprint function I am returned a GnomePrintContext and to pass it back to ruby from C I do: VALUE gpcontext_to_value(GnomePrintContext *context) { VALUE new_obj; new_obj = GOBJ2RVAL(context); return new_obj; } But when I test the VALUE like this: assert(job.context.instance_of?(Gnome::Print::Context), "context not a context (#{job.context.class})") it fails with the message: 1) Failure!!! test_new(TC_Job) [./src/test/test_job.rb:31]: context not a context (#<Class:0x400a128c>) So how do I make the VALUE returned from the gpcontext_to_value function look like a Gnome::Print::Context on the ruby side? Thanks Jim -- @James LewisMoss <dr...@le...> | Blessed Be! @ http://www.lewismoss.org/~dres | Linux is kewl! @"Argue for your limitations and sure enough, they're yours." Bach |