Page 2 of 2
Re: SQLite Database Viewer
Posted: Wed Aug 07, 2019 11:56 am
by doctorized
Hi,
Nice code too. I wrote a simple code for an app of mine where the only thing that I want is to run the command as is. I only added a small chech for DROP and DELETE where the user confirms that he wants to run DROP/DELETE command.
Re: SQLite Database Viewer
Posted: Thu Aug 08, 2019 4:53 pm
by collectordave
I have now added the sql query builder and tester module, fixed the lack of row title changes when scrolling and a couple of other little bugs.
I have provided a zip file for the code now as it is getting a bit big to post.
The zip file includes the GridEX module used as well.
The zip is here:-
https://www.dropbox.com/s/u81u7uzzo9wiq ... t.zip?dl=0
Regards
CD
Re: SQLite Database Viewer
Posted: Mon Oct 14, 2019 7:57 am
by mchael
Trying to compile on a MAC and get an error with the GridExModule. Any assistance or direction on fixing this most appreciated, thanks
[17:53:18] Waiting for executable to start...
[17:53:19] Executable type: MacOSX - x64 (64bit, Unicode)
[17:53:19] Executable started.
[17:53:19] [ERROR] GridExModule.pbi (Line: 3512)
[17:53:19] [ERROR] LoadFont(): invalid value specified for parameter 'Flags'.
Line
Code: Select all
309: FontID = LoadFont(#PB_Any, Name, Size, Flags)
Procedure:
Code: Select all
Procedure AddFont(GID.i, Font$)
Define.i FontID, Size, Flags
Define.s Name
If FindMapElement(Grid(), Str(GID))
;If FindMapElement(LoadedFonts(), Font$)
; ProcedureReturn LoadedFonts()
;Else
Name = StringField(Font$, 1, "|")
Size = Val(StringField(Font$, 2, "|"))
Flags = Val(StringField(Font$, 3, "|"))
FontID = LoadFont(#PB_Any, Name, Size, Flags)
If FontID
;LoadedFonts(Font$) = FontID
Grid()\Font(Font$) = FontID
ProcedureReturn FontID
EndIf
;EndIf
EndIf
ProcedureReturn #False
EndProcedure
Re: SQLite Database Viewer
Posted: Mon Oct 14, 2019 1:25 pm
by Marc56us
Trying to compile on a MAC and get an error with the GridExModule. Any assistance or direction on fixing this most appreciated, thanks...
[17:53:19] [ERROR] LoadFont(): invalid value specified for parameter 'Flags'.
Code: Select all
FontID = LoadFont(#PB_Any, Name, Size, Flags)
Flags (optional) A combination of the following constants:
#PB_Font_Bold : The font will be bold
#PB_Font_Italic : The font will be italic
#PB_Font_Underline : The font will be underlined (Windows only)
#PB_Font_StrikeOut : The font will be strikeout (Windows only)
#PB_Font_HighQuality: The font will be in high-quality mode (slower) (Windows only)
https://www.purebasic.com/documentation ... dfont.html
I don't know how to underline text on Mac ?
For the rest, Flag is optional, so something like that could be fine.
Code: Select all
If Flags = #PB_Font_Bold Or Flags = #PB_Font_Italic
FontID = LoadFont(#PB_Any, Name, Size, Flags)
Else
FontID = LoadFont(#PB_Any, Name, Size)
EndIf

Re: SQLite Database Viewer
Posted: Tue Oct 15, 2019 6:23 am
by mchael
thanks for the instruction - it helped and I understand PB's constants better. I simply deleted flags and got it working after trying #PB_Font_Bold. It compiled and ran no problems.