Re: [Open Babel] how to access getAlias() in perl

2011-03-24 Thread Noel O'Boyle
I'm not sure what's gong on. Can you file a bug report with an example molecule and Perl code? - Noel On 22 March 2011 15:11, Igor Filippov [Contr] wrote: > Noel, > > Thank you. I'm getting the following error though: > > TypeError in method 'toSetData', argument 1 of type > 'OpenBabel::OBGeneri

Re: [Open Babel] how to access getAlias() in perl

2011-03-22 Thread Igor Filippov [Contr]
Noel, Thank you. I'm getting the following error though: TypeError in method 'toSetData', argument 1 of type 'OpenBabel::OBGenericData *' Does it mean that the argument should not be an object returned by GetData()? What should it be then? Best regards, Igor On Tue, 2011-03-22 at 05:26 -0400,

Re: [Open Babel] how to access getAlias() in perl

2011-03-22 Thread Noel O'Boyle
You need to cast it to the specific subclass first. Try calling $newad = toSetData($ad) and then if ($newad && $newad->GetAlias() eq "Xx") - Noel On 21 March 2011 15:06, Igor Filippov [Contr] wrote: > Dear Colleagues, > > I need to implement in Perl a procedure which is C++ looks like the > foll

[Open Babel] how to access getAlias() in perl

2011-03-21 Thread Igor Filippov [Contr]
Dear Colleagues, I need to implement in Perl a procedure which is C++ looks like the following: AliasData *ad; ad = (AliasData *) a->GetData(OBGenericDataType::SetData); if (ad != NULL && ad->GetAlias() == "Xx") This is what I have at the moment and it does not work unfortunately: