From fd56026109d7ab41814d833b557992d1187d5cc5 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 30 Jan 2011 14:39:55 +0000 Subject: [PATCH] 2011-01-30 15:36 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * src/rtl/listbox.prg ! LISTBOX(): Fixed RTE (and 5.3 incompatibility) when non-logical/non-NIL type is passed as 5th parameter. This makes the ListBox() example included in 5.3 NG behave exactly the same in Harbour as in C5.3. (Yes, the example passes wrong parameter, plus it has a compiler stopping typo, and it still RTEs even after the fix, so better find some better example.) --- harbour/ChangeLog | 10 ++++++++++ harbour/src/rtl/listbox.prg | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 122748f336..98481455dc 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,16 @@ The license applies to all entries newer than 2009-04-28. */ +2011-01-30 15:36 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * src/rtl/listbox.prg + ! LISTBOX(): Fixed RTE (and 5.3 incompatibility) when + non-logical/non-NIL type is passed as 5th parameter. + This makes the ListBox() example included in 5.3 NG behave + exactly the same in Harbour as in C5.3. (Yes, the + example passes wrong parameter, plus it has a compiler + stopping typo, and it still RTEs even after the fix, + so better find some better example.) + 2011-01-30 00:27 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * src/rtl/listbox.prg ! Fixed casing in some words in license gone wrong in a very diff --git a/harbour/src/rtl/listbox.prg b/harbour/src/rtl/listbox.prg index 04e291962b..31bb25a7a9 100644 --- a/harbour/src/rtl/listbox.prg +++ b/harbour/src/rtl/listbox.prg @@ -1064,7 +1064,9 @@ METHOD New( nTop, nLeft, nBottom, nRight, lDropDown ) RETURN NIL ENDIF - DEFAULT lDropDown TO .F. + IF !ISLOGICAL( lDropDown ) + lDropDown := .F. + ENDIF ::nBottom := nBottom ::nRight := nRight