[Developers] How to get this callback to trigger

Robin Gary rjgary.gte at gte.net
Wed Nov 28 17:07:06 CET 2007


Greetings,
  I'm not too sure how the selectionChg.notify is actually physically
triggered.
Below are my code snippets for the selection group I've defined. When I
select the
horizons from the selection box using the mouse, they highlight as expected.
How does the UI know that something has been done? I never seem to trigger
the change callbacker. Am I using this correctly? 

Thank you for any guidance.
Robin Gary


....snippet from the UI constructor
PtrMan<CtxtIOObj> ctio = mMkCtxtIOObj( EMHorizon );
ioobjselgrp_ = new uiIOObjSelGrp( this, *ctio, "Select horizons", true );

ioobjselgrp_->selectionChg.notify(mCB(this, uiSRIHorizons2AgeVol,
inpHorizonSel));
...

...callback routine....
void            uiSRIHorizons2AgeVol::inpHorizonSel( CallBacker* cb )
{
   std::cerr    << "Inside uiSRIHorizons2AgeVol::inpHorizonSel " <<
std::endl;

   //Validate the Input horizons
   if ( !ioobjselgrp_->processInput() )
                        uiMSG().error( "Invalid objects selected" );

   //Check that there is more than one horizon selected
   if ( ioobjselgrp_->nrSel() < 2 )
                        uiMSG().error( "Please seclect at least two
horizons" );


}
  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opendtect.org/pipermail/developers/attachments/20071128/62010de2/attachment.html>


More information about the Developers mailing list