diff --git a/instat/dlgUnusedLevels.vb b/instat/dlgUnusedLevels.vb index 699475a599f..7f46d7c55e7 100644 --- a/instat/dlgUnusedLevels.vb +++ b/instat/dlgUnusedLevels.vb @@ -16,8 +16,9 @@ Imports instat.Translations Public Class dlgUnusedLevels - Public bFirstLoad As Boolean = True + Private bFirstLoad As Boolean = True Private bReset As Boolean = True + Private clsUnusedLevels As New RFunction Private Sub dlgUnusedLevels_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then @@ -31,25 +32,19 @@ Public Class dlgUnusedLevels bReset = False autoTranslate(Me) End Sub - Private Sub ReopenDialog() - End Sub Private Sub SetDefaults() - Dim clsDefaultFunction As New RFunction - + clsUnusedLevels = New RFunction ucrSelectorFactorColumn.Reset() - ' Set default RFunction as the base function - clsDefaultFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$drop_unused_factor_levels") - ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultFunction.Clone()) - + clsUnusedLevels.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$drop_unused_factor_levels") + ucrBase.clsRsyntax.SetBaseRFunction(clsUnusedLevels) End Sub Private Sub SetRCodeforControls(bReset As Boolean) SetRCode(Me, ucrBase.clsRsyntax.clsBaseFunction, bReset) End Sub - Private Sub InitialiseDialog() ucrBase.iHelpTopicID = 40 @@ -58,6 +53,7 @@ Public Class dlgUnusedLevels ucrReceiverFactorColumn.SetMeAsReceiver() ucrReceiverFactorColumn.SetIncludedDataTypes({"factor"}) ucrRemoveUnusedFactorLevels.SetReceiver(ucrReceiverFactorColumn) + ucrReceiverFactorColumn.SetParameter(New RParameter("col_name", 1)) ucrReceiverFactorColumn.SetParameterIsString()