From 35833e8647d15f3ba3f3f69cf426667ce7b2854c Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Tue, 26 Feb 2019 16:31:16 +0100 Subject: [PATCH] Fix stupid errors --- app/DD_PM_WINDREAM/ClassWindream_allgemein.vb | 6 +++--- app/DD_PM_WINDREAM/frmValidator.vb | 8 ++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/DD_PM_WINDREAM/ClassWindream_allgemein.vb b/app/DD_PM_WINDREAM/ClassWindream_allgemein.vb index 403ad2d..3361564 100644 --- a/app/DD_PM_WINDREAM/ClassWindream_allgemein.vb +++ b/app/DD_PM_WINDREAM/ClassWindream_allgemein.vb @@ -230,10 +230,10 @@ Public Class ClassWindream_allgemein Public Function NormalizePath(Path As String) Dim oNormalizedPath As String - If Path.StartsWith("\") Then - oNormalizedPath = Path.Substring(1) - ElseIf Path.StartsWith("\\windream") Then + If Path.StartsWith("\\windream") Then oNormalizedPath = Path.Replace("\\windream\objects\", "") + ElseIf Path.StartsWith("\") Then + oNormalizedPath = Path.Substring(1) Else Return Path End If diff --git a/app/DD_PM_WINDREAM/frmValidator.vb b/app/DD_PM_WINDREAM/frmValidator.vb index 410a91f..b25e385 100644 --- a/app/DD_PM_WINDREAM/frmValidator.vb +++ b/app/DD_PM_WINDREAM/frmValidator.vb @@ -2119,6 +2119,7 @@ Public Class frmValidator End If Case "System.Windows.Forms.CheckBox" + If LogErrorsOnly = False Then ClassLogger.Add(" >> Loading checkbox.", False) oControlType = "CheckBox" If oWMIndexName = "" Then MsgBox("Achtung fehlerhafte Konfiguration:" & vbNewLine & "Für das Control " & oControl.Name & " wurde KEIN INDEX hinterlegt!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical) @@ -2144,18 +2145,20 @@ Public Class frmValidator End If - + If LogErrorsOnly = False Then ClassLogger.Add(" >> Loading Index value from Windream.", False) Dim wertWD If oWMIndexName.StartsWith("[%VKT") And PROFIL_VEKTORINDEX <> "" Then wertWD = ReturnVektor_IndexValue(oWMIndexName) Else wertWD = aktivesDokument.GetVariableValue(oWMIndexName) End If - _CURRENT_INDEX_ARRAY(oCount, 1) = wertWD.ToString + If LogErrorsOnly = False Then ClassLogger.Add(" >> Index value loaded: " & wertWD, False) + If wertWD Is Nothing Then ClassLogger.Add(">> Zurückgegebener Wert des Wertes für Checkbox mit Indexname '" & oIndexName & "' ist nothing. Check defaultvalue", False) chk.Checked = False Else + _CURRENT_INDEX_ARRAY(oCount, 1) = wertWD.ToString If wertWD.ToString = "" Then ClassLogger.Add(">> Versuch, default Value zu laden", False) If oDefaultValue <> String.Empty Then @@ -2293,6 +2296,7 @@ Public Class frmValidator ClassLogger.Add(">> Unvorhergesehener Fehler bei FillIndexValues: " & ex.Message, True) ClassLogger.Add(">> Controltype: " & oControlType, False) ClassLogger.Add(">> Indexname windream: " & oIndexName, False) + ClassLogger.Add(">> Stacktrace: " & ex.StackTrace, False) End Try