[Kde-bindings] Solid::DeviceInterface::Type not handled in Ruby

Richard Dale rdale at foton.es
Tue Apr 14 14:58:28 UTC 2009


On Tuesday 14 April 2009 15:15:01 David Palacio wrote:
> irb(main):014:0> Solid::Device.listFromType
> Solid::DeviceInterface::NetworkInterface
> ArgumentError: Cannot handle 'const Solid::DeviceInterface::Type&' as
> argument of Solid::Device::listFromType
>         from (irb):14:in `method_missing'
>         from (irb):14
>         from :0
> irb(main):015:0> Solid::Device.all_devices.map do |d| d.isDeviceInterface
> Solid::DeviceInterface::NetworkInterface end
> ArgumentError: Cannot handle 'const Solid::DeviceInterface::Type&' as
> argument of Solid::Device::isDeviceInterface
>         from (irb):15:in `method_missing'
>         from (irb):15
>         from (irb):15:in `map'
>         from (irb):15
>         from :0
The problem is that references to enums aren't handled without special casing, 
only enums as values work. But I don't see why the enums in the Solid methods 
need to be references - it doesn't look as though they will be changed.

So this enum will need to be special cased with a custom marshaller - are 
there other enums that are references in the Solid api though?
-- Richard



More information about the Kde-bindings mailing list