[omniORB] Return Struct o None
Duncan Grisby
duncan at grisby.org
Wed Apr 1 13:40:05 BST 2009
On Thursday 26 March, Antonio Beamud Montero wrote:
> I've defined a struct, and a method that returns this struct type. The
> problem is when I try to return a null value instead this struct. For
> example:
As others have said, you can't return null where the IDL requires a
struct.
An approach that nobody has suggested yet is to use a valuetype. Unlike
structs, those can be null (represented as None in Python).
valuetype SInfo {
public wstring id;
public wstring address;
public wstring tlf;
};
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan at grisby.org --
-- http://www.grisby.org --
More information about the omniORB-list
mailing list