[Developers] (no subject)
Helene Huck
helene.huck at dgbes.com
Tue Nov 4 10:08:17 CET 2008
Hi Azer,
If you cannot save your attribute in an attribute set, it means that
there is something going wrong with the declaration / initialization of
the new attribute. I guess then that you cannot even display and test it
on any element of the tree which is different from what Robin Gary
described (it was only blocking with the batch processing in his case).
Let's thus verify a few things:
Imagine your plugin is called MyAttributes and contains the definition
of 2 attributes called MyAttrib1 and MyAttrib2 ;
in the MyAttributes directory, let's have a look at the file
myattributespi.cc; in there you should have a function looking like:
extern "C" const char* InitMyAttributesPlugin( int, char** )
{
Attrib::MyAttrib1::initClass();
Attrib::MyAttrib2::initClass();
return 0; // All OK - no error messages
}
if you have chosen the type of the plugin it should look like that:
extern "C" int GetMyAttributesPluginType()
{
return PI_AUTO_INIT_EARLY;
}
I want here to draw your attention on the fact that the functions names
*must match perfectly* with the directory name, including the
upper/lower case
if this is all ok we can now have a look at the implementation of the
attributes themselves:
in myattrib1.cc you should see somewhere:
1- a call to the macro 'mAttrDefCreateInstance(MyAttrib1)' ; this macro
is used to avoid you having to implement yourself the function
CreateInstance which creates a new object MyAttrib1 and references it
properly.
2- your function initClass() should ressemble this:
void MyAttrib1::initClass()
{
mAttrStartInitClass
IntParam* param = new IntParam( paramStr() );
desc->addParam( param );
desc->addInput( InputSpec("Input data",true) );
desc->setNrOutputs( Seis::UnknowData, 5 );
mAttrEndInitClass
}
of course with relevant parameters, inputs and outputs info...
And very last thing, just to be sure: if you go to Utilities ->
Plugins... please verify if the MyAttributes base plugin and the
MyAttribute User Interface plugin are both loaded, base should always be
loaded before UI.
best regards,
Helene
Азер Мусаев wrote:
> Hi to all developers of OpendTect!
>
> First I want excuse for my bad English.
>
> I'm run into such problem like Robin Gary (mail at Thu Feb 14 04:56:27 CET 2008). I can't save my attributes in attribute set. And I can't submit my attributes to [Create Seismic Output] with same message "Cannot find factory-entry for...". I reviewed and fullfiled all that Bert Bril advised but no result. Particularly I added my plugin to odmain.base.alo and process_attrib.base.alo files. There are not any messages in log file or console during autoloading (plugin working normally). What's wrong?
>
> Thanks in advance
>
> Musaev Azer
> GISSARNEFTGAZ
> (Uzbekistan)
>
>
> _______________________________________________
> Developers mailing list
> Developers at opendtect.org
> http://lists.opendtect.org/mailman/listinfo/developers
>
>
--
--
! Please mind the new email address and website !
-- Helene Huck
-- Geophysical software engineer
-- dGB Earth Sciences B.V.
-- Nijverheidstraat 11-2, 7511 JM Enschede, The Netherlands
-- mailto: helene.huck at dgbes.com, http://www.dgbes.com
-- Tel: +31 53 4315155 , Fax: +31 53 4315104
More information about the Developers
mailing list