Skip to main content
Inspiring
February 24, 2010
Question

How to trap Selection change

  • February 24, 2010
  • 1 reply
  • 721 views

Hi All,

I need to observer selection change. How do i go about it. In basicpersistinterface the kBPISelectionObserverImpl is bound with the panel. Similarly I want to call a method on selection change and not update some UI, so where do i need to put my ActiveSelectionObserver.

It can  be just displaying an alert of selection change, but how do we trap it.

Please contribute your valuable suggestions.

Thanks in advance.

Jasmine Shaikh

This topic has been closed for replies.

1 reply

Legend
February 24, 2010

You can aggregate your observer to any easily accessed boss that's permanently around. For example kSessionBoss already has 15 observers, kAppBoss has 7 observers. You would use a private IID, though. Invoke AutoAttach from a StartupShutdown service.

Given that, you're probably wrong architecture-wise by watching the selection without UI involved. There are plenty other notifications, besides there are also different mechanisms to watch the selection from closer on (e.g. SelectionExt). Can you give more details on your intent?

Dirk

Known Participant
June 28, 2010

Dear Dirk Becker,

I am using WListBoxComposite sample.

I want when text selection change, invoke my function. i know i should use selection observer but it is not working. can you please help me step by step to what i should to do to see where i am wrong?

thanks

-ali