[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] Refreshing UI when using IManagedOptionValueHandler
|
>> Instead of using IOptionApplicability.isOptionUsedInCommandLine like
>> James suggested you can also use IOptionApplicability.isOptionEnabled.
>> That way, given the above example, you can have otherflag1 and
>> otherflag2 enabled only if O3 is selected, that means the user can
>> still check/uncheck them, but only if O3 is selected. Dito for the enum
>> flags, in case O3 is selected only flag2/flag3 are shown so the user
>> can still select both of them.
> I can dynamicly enable/disabled options now with implementing those
> functions, but the UI with the new values of an enum still didnt get
> updated...
Patrick,
Just checked it, but it appears I was mistaken about using
'IOptionApplicability' to disable enum values. Besides using the
'applicabilityCalculator' attribute you will also have to specify the
'valueHandler' attribute for the given enumerated option. Here you
need to specify a class that implements 'IManagedOptionValueHandler'
containing a method 'isEnumValueAppropriate()'. Whenever an option
in the same property page is changed this method is called for each
enum value allowing you to disable it (that is, not to show up in the
enum list).
Regards,
Wieant