Hi there
I have just purchased and installed PureBasic Linux 64bit on the latest release of Ubuntu. I get this message below on launching PB from the terminal. PB does start and I am able to compile a simple demo program. The demo runs but once text scrolling occurs in the demo program window, the text is horizontally sliced in half. I am not sure if the error message has any connection with this problem. Not run any other demos as yet.
Error message:-
** (purebasic:4007): CRITICAL **: 10:38:22.631: clearlooks_style_draw_box_gap: assertion 'height >= -1' failed
Any help please. Thanks.
JR
Lubuntu. Terminal error message on running Purebasic
-
- New User
- Posts: 2
- Joined: Wed May 23, 2018 9:53 am
-
- New User
- Posts: 2
- Joined: Wed May 23, 2018 9:53 am
Re: Lubuntu. Terminal error message on running Purebasic
Some more info. PB seems to run most of the example code just fine in spite of the terminal error message. Problem code below.
Result on my installation. For example if I run the demo program and type the following:- 1 <enter> 2 <enter> 3 <enter> 4 <enter> 5 <enter>
All displays correctly until the "5" is entered. At this point scrolling occurs and the display shows 1, 2 and half of the character 3. It appears that the background is being painted in the lower part of the window and overwriting the rest of the text entered.
__________________________________________________
Code tags added
05.06.2018
RSBasic
Result on my installation. For example if I run the demo program and type the following:- 1 <enter> 2 <enter> 3 <enter> 4 <enter> 5 <enter>
All displays correctly until the "5" is entered. At this point scrolling occurs and the display shows 1, 2 and half of the character 3. It appears that the background is being painted in the lower part of the window and overwriting the rest of the text entered.
Code: Select all
; Demo2.pb
; Original code by "Blue Steel" 2010/09/01
; This code found at:- http://www.codingmonkeys.com/index.php?topic=2070.0
; Pruned to show problem under Lubuntu. All remaining comments and most code as original.
;Compiler Directives
EnableExplicit ; make sure all variables are explicitly defined before use
; Declare Procedures
Declare UPDATE_LIST_VIEW_GADGET() ; ; and reset the String Gadget back to defaults
;Setup vairables the window
Define Event.l ; Set to = WaitWindowEvent() later on in event loop
Define Title.s = "Demo"
Define WindowHeight.i = 200
Define WindowLength.i = 300
; Setup window type Flags
#FLAGS = #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered
; Setup global variables
Global Prompt.s = "Enter text here"
; Setup constants for Purebasic Libraries using enumerate
; starting at 0 in each block
Enumeration ; Windows
#WIN_MAIN
EndEnumeration
Enumeration ; Gadgets
#TEXT_INPUT
#STRING_INPUT
#LIST_INPUT
#BUTTON_INTERACT
EndEnumeration
Enumeration ; Menus
#MENU_MAIN
#RETURN_KEY ; Dummy menu item to process Enter key in string gadget
EndEnumeration
If OpenWindow(#WIN_MAIN, 0, 0, WindowLength, WindowHeight + MenuHeight(), Title, #FLAGS)
ListViewGadget(#LIST_INPUT, 10, 60, 280, 100)
StringGadget(#STRING_INPUT, 10, 30, 280, 20, Prompt)
; ADD some colour To the gadgets IN form $BBGGRR Or even using RGB(Red,Green,Blue)
SetGadgetColor(#LIST_INPUT, #PB_Gadget_BackColor, $A40000)
SetGadgetColor(#LIST_INPUT, #PB_Gadget_FrontColor, RGB(0, 255, 255))
SetGadgetColor(#STRING_INPUT, #PB_Gadget_BackColor, $004B85)
SetGadgetColor(#STRING_INPUT, #PB_Gadget_FrontColor, RGB(255, 255, 0))
; Set Active Gadget
SetActiveGadget(#STRING_INPUT)
; Start of main Program LOOP
Repeat
; Check if something has happened in the window
Event = WaitWindowEvent()
Select Event
; Check to see if any menu items have been accessed
Case #PB_Event_Menu
Select EventMenu()
Case #RETURN_KEY
; I used a procedure here so that I wouldn't have to double up my code
UPDATE_LIST_VIEW_GADGET()
EndSelect
; Check to see if any gadgets have been accessed
Case #PB_Event_Gadget
Select EventGadget()
Case #BUTTON_INTERACT
; I used a procedure here so that I wouldn't have to double up my code
UPDATE_LIST_VIEW_GADGET()
Case #STRING_INPUT
Select EventType()
Case #PB_EventType_Focus
; Keyboard Shortcuts are only linked to the Menu's so this ads shortcut to a dummy menu item
; Add Enter key shortcut only if the String Gadget is in focus
AddKeyboardShortcut(0,#PB_Shortcut_Return, #RETURN_KEY)
; If its not in focus then Remove the Enter key shortcut
Case #PB_EventType_LostFocus
RemoveKeyboardShortcut(0,#PB_Shortcut_Return)
EndSelect
EndSelect
EndSelect
Until Event = #PB_Event_CloseWindow
EndIf
End
Procedure UPDATE_LIST_VIEW_GADGET() ; and reset the String Gadget back to defaults
; copy the text in the string Gadget into the list gadget
AddGadgetItem(#LIST_INPUT, -1, GetGadgetText(#STRING_INPUT))
; Reset the Message displayed in the string gedget
SetGadgetText(#STRING_INPUT, Prompt)
; make sure that the string gadget has the focus again
SetActiveGadget(#STRING_INPUT)
EndProcedure
Code tags added
05.06.2018
RSBasic