[Developers] RE: How to get this callback to trigger

Robin Gary rjgary.gte at gte.net
Wed Nov 28 17:23:03 CET 2007


Ahh, I think I understand.. the selectionChg notifier is called if the
selectable list in the group box is changed via the filter. Is there a
selectiondone.notify type of method available for the ioobjselgrp class? 
R

  _____  

From: Robin Gary [mailto:rjgary.gte at gte.net] 
Sent: Wednesday, November 28, 2007 10:07 AM
To: 'developers at opendtect.org'
Cc: 'Tracy Stark'
Subject: How to get this callback to trigger



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/cca500ae/attachment.html>


More information about the Developers mailing list