Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] how to manage an MBS enumerated list option by another

Hello Wieant,
First thanks for your response.

In fact I m trying to enable & disable the 2 combo Boxes
According to another combo box selection as I have explained
And all of those components are on the same page.
I tried also to manage them with checkboxes by getting the 
Boolean values of those later so I tried to implement
Like the way you mentioned to me, but it works 
Only at the first time(when I open the property page).

So, it seems like there is no listener to check the selection or
the changed status of the manager combo box(same for check boxes).

Thanks a lot for help


-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of cdt-dev-request@xxxxxxxxxxx
Sent: Wednesday, November 29, 2006 6:01 PM
To: cdt-dev@xxxxxxxxxxx
Subject: cdt-dev Digest, Vol 21, Issue 48


If I understand the excerpt correctly the manager combo sets some
flags which are somehow passed to the applicability calculators of the
other combo boxes. It is not entirely clear to me how you pass them,
but a problem might be that the manager combo applicability calculator
is only called when the page containing it is actually selected by the
user, so if the other (managed) combos are on another page which is
selected before the manager page is selected flags may not have been
set correctly.

Another approach might be just to check the value of the manager combo
from the applicability calculators of the managed combos, something like:

++++++++++ 1st combo box (manager)
  no applicability calculator required
  (unless its state also depends on another option ofcourse)

++++++++++ 2 & 3 nd combo boxes (manageD)

public boolean isOptionEnabled(IBuildObject configuration,
			IHoldsOptions holder, IOption option) {
    if ( option == managedCombo2 )
        return managerCombo1.getValue() == combo2;
    else if ( option == managedCombo3 )
        return managerCombo1.getValue() == combo3;
}

Regards,
  Wieant

********************************



Back to the top