[cable] Problem with static method

Brad King brad.king at kitware.com
Thu Apr 17 09:38:37 EDT 2003


> I wrap it with Cable via the CMake ITK_WRAP_TCL command (which by the
> way could be renamed CABLE_WRAP_TCL).

There are historical reasons for the name.  Now that CMake supports loaded
commands, Cable will eventually come with a CABLE_WRAP_TCL loaded command.

> I have a bunch of other classes and they work great with the Tcl
> wrappers, but I am running into problems with these two methods.
>
> The test gives:
>
> % set lod [cisClassRegister SetLoD 10]
> No method matches void::SetLoD(int)
> Candidates are:
>    static short cisClassRegister::SetLoD(short)
>    static bool cisClassRegister::SetLoD(const
> std::basic_string<char,std::char_traits<char>,std::allocator<char> >&,
> short)
>
> Do I have a problem because these methods are static or because there is
> no implicit cast from int to short.  The reasons why I am confused are:
>
> Why does it display "No method matches void::SetLoD(int)" with "void" as
> the class name?
>
> Also, it looks for a SetLoD(int), not SetLoD(short).  If I try to use
> the method with std::string, the interpreter looks for a method with
> (char*, int).

Hmm... I'm unable to duplicate your problem with

class Foo
{
public:
  static bool SetLoD(const std::string&, short);
  static bool SetLoD(short);
};

After wrapping Foo and std::string with cable, I'm able to call either
method.

What version of Cable are you using?  There are no supported releases.
If you're not using the latest CVS version, please upgrade and try again.

If you're already using the latest version, please send the smallest
example Cable config file you can create that duplicates the problem.

Thanks,
-Brad




More information about the cable mailing list