Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[Dltk-dev] Re: Re: Extending and increasing visibility for members of AbstractScriptInterpreterDialog

Hi again Alex,

Regarding the EvironmentVariablesBrock, you are right, it could be made like that. But as I wrote in the initial e-mail:

This CANNOT be performed in the extended MyAbstractScriptInterpreterDialog class because this should not be aware of the install types. Moreover Install types from the parent dialog class are not visible from the inheriting classes. But even if you increase the visibility of install types combo or provide accessor methods, I guess you don't like to see code like the following:

    @Override
    protected AbstractInterpreterEnvironmentVariablesBlock createEnvironmentVariablesBlock(AddScriptInterpreterDialog dialog) {
        if (Platform.getOS().equals(Platform.OS_WIN32))
            return null;
       
        String[] names = getInstallTypeNames();
        for(...) {
            if (names[i].equals("MyInstallType1")) {
                return null;
            } else if (names[i].equals("MyInstallType2")) {
                return new MyInterpreterEnvironmentVariablesBlock(this);
            }
        }
    }

I guess this is not the most elegant way to solve the problem. The InstallTypes are aware about variables and therefore they should be asked if they needsEnvironmentVariables()

Does this make sense?


What about the other stuff?

Regards,
Gabriel


--
MSc Gabriel Petrovay
MCSA, MCDBA, MCAD
Mobile: +41(0)787978034

Back to the top