FreeBasic IDE-poseidonFB(Update 2024.03.03)
Re: FreeBasic IDE-poseidonFB(Update 2017.06.10)
Hi @Kuan i'm glad know you have an nice day with your family.
Until now i see something weird on Preferences window.
Open Preference and check Font part from Editor tab, press ok, make this again and again...
The 'default' text gain one 'o' each time you open and close preference window. although with English this is only one 'o' with other languages have other and another, or at least i notice this with spanish.
But well, A picture is worth a thousand words hehe
https://s6.postimg.org/y1sjd212p/poooos ... 001000.gif
Another bug occurs if you change language to English using English.lng file
And finally, if possible improve a bit the font texts view. i think can be better. By example, is not too much space for font size numbers only?
https://s6.postimg.org/3znyeizn5/poseido_FB_mod05.gif
With this the translations have more space on this section and looks better imho.
Regards.
Until now i see something weird on Preferences window.
Open Preference and check Font part from Editor tab, press ok, make this again and again...
The 'default' text gain one 'o' each time you open and close preference window. although with English this is only one 'o' with other languages have other and another, or at least i notice this with spanish.
But well, A picture is worth a thousand words hehe
https://s6.postimg.org/y1sjd212p/poooos ... 001000.gif
Another bug occurs if you change language to English using English.lng file
And finally, if possible improve a bit the font texts view. i think can be better. By example, is not too much space for font size numbers only?
https://s6.postimg.org/3znyeizn5/poseido_FB_mod05.gif
With this the translations have more space on this section and looks better imho.
Regards.
Re: FreeBasic IDE-poseidonFB(Update 2017.06.10)
1. The problem is about D string and C char*, I will fix back to Taiwan
2. Edit English.lng, Modify sc_gotoprocedure to sc_procedure
3. I'll check the layout
Still rain, rain, rain........
2. Edit English.lng, Modify sc_gotoprocedure to sc_procedure
3. I'll check the layout
Still rain, rain, rain........
-
- Posts: 4310
- Joined: Jan 02, 2017 0:34
- Location: UK
- Contact:
Re: FreeBasic IDE-poseidonFB(Update 2017.06.16)
@Kuan Hsu
Hi
I joined the FreeBASIC community at the beginning of this year. I have tried FBEdit, FBIDE and WinFB and have issues with all of them. PoseidonFB addresses each and every one of them.
Excellent piece of work. Well done.
Thank you very much.
Hi
I joined the FreeBASIC community at the beginning of this year. I have tried FBEdit, FBIDE and WinFB and have issues with all of them. PoseidonFB addresses each and every one of them.
Excellent piece of work. Well done.
Thank you very much.
Re: FreeBasic IDE-poseidonFB(Update 2017.06.16)
@Kuan Hsu:
Is it possible to have the manual work with a relative path? Currently, if I use "../Help/index00.html" it cannot find the the manual. I have to put the full path, like this: "E:\FB\Help\index00.html".
I have my dev environment on a removable drive so I like to use relative paths as often as possible. It is not a deal breaker, but would be nice to have.
Is it possible to have the manual work with a relative path? Currently, if I use "../Help/index00.html" it cannot find the the manual. I have to put the full path, like this: "E:\FB\Help\index00.html".
I have my dev environment on a removable drive so I like to use relative paths as often as possible. It is not a deal breaker, but would be nice to have.
Re: FreeBasic IDE-poseidonFB(Update 2017.06.16)
Oh i'm forget to ask for that feature, support to use Windows environment variables on poseidonFB, can be nice to setup things like the compiler path something like "%programfiles%/freebasic/fbc.exe", etc
Re: FreeBasic IDE-poseidonFB(Update 2017.06.16)
You're welcome^^deltarho[1859] wrote:@Kuan Hsu
Hi
I joined the FreeBASIC community at the beginning of this year. I have tried FBEdit, FBIDE and WinFB and have issues with all of them. PoseidonFB addresses each and every one of them.
Excellent piece of work. Well done.
Thank you very much.
If you find any bugs during using poseidonFB, please report to me, thanks~
Re: FreeBasic IDE-poseidonFB(Update 2017.06.16)
I added some code at rev0.270, the current work dir is under poseisonFB's path, then please test the relative path.Imortis wrote:@Kuan Hsu:
Is it possible to have the manual work with a relative path? Currently, if I use "../Help/index00.html" it cannot find the the manual. I have to put the full path, like this: "E:\FB\Help\index00.html".
I have my dev environment on a removable drive so I like to use relative paths as often as possible. It is not a deal breaker, but would be nice to have.
Last edited by Kuan Hsu on Jun 17, 2017 15:27, edited 2 times in total.
Re: FreeBasic IDE-poseidonFB(Update 2017.06.16)
Windows only, please test rev0.270~~c-sanchez wrote:Oh i'm forget to ask for that feature, support to use Windows environment variables on poseidonFB, can be nice to setup things like the compiler path something like "%programfiles%/freebasic/fbc.exe", etc
Re: FreeBasic IDE-poseidonFB(Update 2017.06.19)
@Kuan Hsu:
The relative path work perfect. Thanks very much!
Now for another issue and one suggestion:
Code folding does not seem to work well all the time. I have a file with functions that do not fold properly:
Some functions fold properly, others do not.
For the suggestion:
If you have the declaration for a function in the same file as the function body, both will be listed in the "Outline" pane. It would be nice if it would list it only once (using the body display so you get the variables inside the function listed), unless the declaration is different from the body's parameter list. Not required, but it would be nice. The above code also shows this happening.
The relative path work perfect. Thanks very much!
Now for another issue and one suggestion:
Code folding does not seem to work well all the time. I have a file with functions that do not fold properly:
Code: Select all
#LibPath "./lib"
#Include Once "datatypes.bas"
#Include Once "../inc/sqlite3.bi"
''''''''''''''''''''''''''''''''''''''''''''
' Shared Data Arrays
' - All temp storage in memory for Records
''''''''''''''''''''''''''''''''''''''''''''
Dim Shared errMsg As ZString Ptr
Dim Shared Birds() As BirdInfo
Dim Shared Breeds() As BreedInfo
Dim Shared Feathers() As FeatherInfo
Dim Shared Sexes() As SexInfo
Dim Shared Colors() As ColorInfo
Dim Shared Status() As StatusInfo
''''''''''''''''''''''''''''''''''''''''''''
' Database Helper Functions
' - Get, Add, or Edit records in DB
''''''''''''''''''''''''''''''''''''''''''''
Declare Function GetBirds(db As String, where As String = "") As Long
Declare Function GetBirdsCallBack Cdecl (ByVal NotUsed As Any Ptr, ByVal argc As Integer, ByVal argv As ZString Ptr Ptr, ByVal colName As ZString Ptr Ptr) As Integer
Declare Function GetBreeds(db As String, where As String = "") As Long
Declare Function GetBreedsCallBack Cdecl (ByVal NotUsed As Any Ptr, ByVal argc As Integer, ByVal argv As ZString Ptr Ptr, ByVal colName As ZString Ptr Ptr) As Integer
Declare Function GetFeathers(db As String, where As String = "") As Long
Declare Function GetFeathersCallBack Cdecl (ByVal NotUsed As Any Ptr, ByVal argc As Integer, ByVal argv As ZString Ptr Ptr, ByVal colName As ZString Ptr Ptr) As Integer
Declare Function GetSexes(db As String, where As String = "") As Long
Declare Function GetSexesCallBack Cdecl (ByVal NotUsed As Any Ptr, ByVal argc As Integer, ByVal argv As ZString Ptr Ptr, ByVal colName As ZString Ptr Ptr) As Integer
Declare Function GetColors(db As String, where As String = "") As Long
Declare Function GetColorsCallBack Cdecl (ByVal NotUsed As Any Ptr, ByVal argc As Integer, ByVal argv As ZString Ptr Ptr, ByVal colName As ZString Ptr Ptr) As Integer
Declare Function GetStatus(db As String, where As String = "") As Long
Declare Function GetStatusCallBack Cdecl (ByVal NotUsed As Any Ptr, ByVal argc As Integer, ByVal argv As ZString Ptr Ptr, ByVal colName As ZString Ptr Ptr) As Integer
Declare Function AddBird(db As String, tmpBird As BirdInfo) As Long
Declare Function AddBreed(db As String, tmpBreed As BreedInfo) As Long
Declare Function AddFeather(db As String, tmpFeather As FeatherInfo) As Long
Declare Function AddColor(db As String, tmpColor As ColorInfo) As Long
Declare Function AddStatus(db As String, tmpStatus As StatusInfo) As Long
Declare Function EditBird(db As String, tmpBird As BirdInfo) As Long
Declare Function EditBreed(db As String, tmpBreed As BreedInfo) As Long
Declare Function EditFeather(db As String, tmpFeather As FeatherInfo) As Long
Declare Function EditColor(db As String, tmpColor As ColorInfo) As Long
Declare Function EditStatus(db As String, tmpStatus As StatusInfo) As Long
Function GetBirds(db As String, where As String = "") As Long
Dim As sqlite3 Ptr tmpDB
Dim As String database_name, query
query = "Select rowid, birdName, sireID, damID, layDate, hatchDate, breedID, featherID, band, sexID, colorID, statusID, notes from Birds"
If where <> "" Then
query &= " where " & where & ";"
Else
query &= ";"
End If
Erase Birds
If sqlite3_open(db, @tmpDB ) Then
sqlite3_close(tmpDB)
Return 1 'Can't open database
End If
If sqlite3_exec(tmpDB, query, @GetBirdsCallBack, 0, @errMsg) <> SQLITE_OK Then
Return 2 ' Query Failed
sqlite3_close(tmpDB)
End If
sqlite3_close(tmpDB)
Return 0
End Function
Function GetBirdsCallBack Cdecl (ByVal NotUsed As Any Ptr, ByVal argc As Integer, ByVal argv As ZString Ptr Ptr, ByVal colName As ZString Ptr Ptr) As Integer
Dim As Integer i, size = UBound(Birds)
Dim As String text
If size = -1 Then
ReDim Birds(0)
size = 0
Else
ReDim Preserve Birds(size + 1)
size += 1
End If
For i = 0 To argc - 1
text = "NULL"
If( argv[i] <> 0 ) Then
If *argv[i] <> 0 Then
text = *argv[i]
End If
End If
Select Case *colName[i]
Case "rowid"
Birds(size).rowid = Val(text)
Case "birdName"
Birds(size).birdName = text
Case "sireID"
Birds(size).sireID = Val(text)
Case "damID"
Birds(size).damID = Val(text)
Case "layDate"
Birds(size).layDate = text
Case "hatchDate"
Birds(size).hatchdate = text
Case "breedID"
Birds(size).breedID = Val(text)
Case "featherID"
Birds(size).featherID = Val(text)
Case "band"
Birds(size).bandNo = text
Case "sexID"
Birds(size).sexID = Val(text)
Case "colorID"
Birds(size).colorID = Val(text)
Case "statusID"
Birds(size).statusID = Val(text)
Case "notes"
Birds(size).notes = text
End Select
Next i
Return 0
End Function
Function GetBreeds(db As String, where As String = "") As Long
Dim As sqlite3 Ptr tmpDB
Dim As String database_name, query
query = "Select rowid, orderNum, breedName from Breeds"
If where <> "" Then
query &= " where " & where & ";"
Else
query &= ";"
EndIf
Erase Breeds
If sqlite3_open(db, @tmpDB ) Then
sqlite3_close(tmpDB)
Return 1 'Can't open database
End If
If sqlite3_exec(tmpDB, query, @GetBreedsCallBack, 0, @errMsg) <> SQLITE_OK Then
Return 2 ' Query Failed
sqlite3_close(tmpDB)
End If
sqlite3_close(tmpDB)
Return 0
End Function
Function GetBreedsCallBack Cdecl (ByVal NotUsed As Any Ptr, ByVal argc As Integer, ByVal argv As ZString Ptr Ptr, ByVal colName As ZString Ptr Ptr) As Integer
Dim As Integer i, size = UBound(Breeds)
Dim As String text
If size = -1 Then
ReDim Breeds(0)
size = 0
Else
ReDim Preserve Breeds(size + 1)
size += 1
End If
For i = 0 To argc - 1
text = "NULL"
If( argv[i] <> 0 ) Then
If *argv[i] <> 0 Then
text = *argv[i]
End If
End If
Select Case *colName[i]
Case "rowid"
Breeds(size).rowid = Val(text)
Case "orderNum"
Breeds(size).order = Val(text)
Case "breedName"
Breeds(size).breedName = text
End Select
Next
Return 0
End Function
Function GetFeathers(db As String, where As String = "") As Long
Dim As sqlite3 Ptr tmpDB
Dim As String database_name, query
query = "Select rowid, orderNum, featherName from Feathers"
If where <> "" Then
query &= " where " & where & ";"
Else
query &= ";"
End If
Erase Feathers
If sqlite3_open(db, @tmpDB ) Then
sqlite3_close(tmpDB)
Return 1 'Can't open database
End If
If sqlite3_exec(tmpDB, query, @GetFeathersCallBack, 0, @errMsg) <> SQLITE_OK Then
Return 2 ' Query Failed
sqlite3_close(tmpDB)
End If
sqlite3_close(tmpDB)
Return 0
End Function
Function GetFeathersCallBack Cdecl (ByVal NotUsed As Any Ptr, ByVal argc As Integer, ByVal argv As ZString Ptr Ptr, ByVal colName As ZString Ptr Ptr) As Integer
Dim As Integer i, size = UBound(Feathers)
Dim As String text
If size = -1 Then
ReDim Feathers(0)
size = 0
Else
ReDim Preserve Feathers(size + 1)
size += 1
End If
For i = 0 To argc - 1
text = "NULL"
If( argv[i] <> 0 ) Then
If *argv[i] <> 0 Then
text = *argv[i]
End If
End If
Select Case *colName[i]
Case "rowid"
Feathers(size).rowid = Val(text)
Case "orderNum"
Feathers(size).order = Val(text)
Case "featherName"
Feathers(size).featherName = text
End Select
Next
Return 0
End Function
Function GetSexes(db As String, where As String = "") As Long
Dim As sqlite3 Ptr tmpDB
Dim As String database_name, query
query = "Select rowid, orderNum, sexName from Sexes"
If where <> "" Then
query &= " where " & where & ";"
Else
query &= ";"
EndIf
Erase Sexes
If sqlite3_open(db, @tmpDB ) Then
sqlite3_close(tmpDB)
Return 1 'Can't open database
End If
If sqlite3_exec(tmpDB, query, @GetSexesCallBack, 0, @errMsg) <> SQLITE_OK Then
Return 2 ' Query Failed
sqlite3_close(tmpDB)
End If
sqlite3_close(tmpDB)
Return 0
End Function
Function GetSexesCallBack Cdecl (ByVal NotUsed As Any Ptr, ByVal argc As Integer, ByVal argv As ZString Ptr Ptr, ByVal colName As ZString Ptr Ptr) As Integer
Dim As Integer i, size = UBound(Sexes)
Dim As String text
If size = -1 Then
ReDim Sexes(0)
size = 0
Else
ReDim Preserve Sexes(size + 1)
size += 1
EndIf
For i = 0 To argc - 1
text = "NULL"
If( argv[i] <> 0 ) Then
If *argv[i] <> 0 Then
text = *argv[i]
End If
End If
Select Case *colName[i]
Case "rowid"
Sexes(size).rowID = Val(text)
Case "orderNum"
Sexes(size).order = Val(text)
Case "sexName"
Sexes(size).sexName = text
End Select
Next
Return 0
End Function
Function GetColors(db As String, where As String = "") As Long
Dim As sqlite3 Ptr tmpDB
Dim As String database_name, query
query = "Select rowid, orderNum, colorName from Colors"
If where <> "" Then
query &= " where " & where & ";"
Else
query &= ";"
EndIf
Erase Colors
If sqlite3_open(db, @tmpDB ) Then
sqlite3_close(tmpDB)
Return 1 'Can't open database
End If
If sqlite3_exec(tmpDB, query, @GetColorsCallBack, 0, @errMsg) <> SQLITE_OK Then
Return 2 ' Query Failed
sqlite3_close(tmpDB)
End If
sqlite3_close(tmpDB)
Return 0
End Function
Function GetColorsCallBack Cdecl (ByVal NotUsed As Any Ptr, ByVal argc As Integer, ByVal argv As ZString Ptr Ptr, ByVal colName As ZString Ptr Ptr) As Integer
Dim As Integer i, size = UBound(Colors)
Dim As String text
If size = -1 Then
ReDim Colors(0)
size = 0
Else
ReDim Preserve Colors(size + 1)
size += 1
EndIf
For i = 0 To argc - 1
text = "NULL"
If( argv[i] <> 0 ) Then
If *argv[i] <> 0 Then
text = *argv[i]
End If
End If
Select Case *colName[i]
Case "rowid"
Colors(size).rowid = Val(text)
Case "orderNum"
Colors(size).order = Val(text)
Case "colorName"
Colors(size).colorName = text
End Select
Next
Return 0
End Function
Function GetStatus(db As String, where As String = "") As Long
Dim As sqlite3 Ptr tmpDB
Dim As String database_name, query
query = "Select rowid, orderNum, statusName from Status"
If where <> "" Then
query &= " where " & where & ";"
Else
query &= ";"
End If
Erase Status
If sqlite3_open(db, @tmpDB ) Then
sqlite3_close(tmpDB)
Return 1 'Can't open database
End If
If sqlite3_exec(tmpDB, query, @GetStatusCallBack, 0, @errMsg) <> SQLITE_OK Then
Return 2 ' Query Failed
sqlite3_close(tmpDB)
End If
sqlite3_close(tmpDB)
Return 0
End Function
Function GetStatusCallBack Cdecl (ByVal NotUsed As Any Ptr, ByVal argc As Integer, ByVal argv As ZString Ptr Ptr, ByVal colName As ZString Ptr Ptr) As Integer
Dim As Integer i, size = UBound(Status)
Dim As String text
If size = -1 Then
ReDim Status(0)
size = 0
Else
ReDim Preserve Status(size + 1)
size += 1
EndIf
For i = 0 To argc - 1
text = "NULL"
If( argv[i] <> 0 ) Then
If *argv[i] <> 0 Then
text = *argv[i]
End If
End If
Select Case *colName[i]
Case "rowid"
Status(size).rowid = Val(text)
Case "orderNum"
Status(size).order = Val(text)
Case "statusName"
Status(size).statusName = text
End Select
Next
Return 0
End Function
Function AddBird(db As String, tmpBird As BirdInfo) As Long
Dim As sqlite3 Ptr tmpDB
dim As ZString Ptr errMsg
dim As String query
query = !"Insert into Birds values(\"" &_
tmpBird.birdName & !"\", \"" &_
tmpBird.sireID & !"\", \"" &_
tmpBird.damID & !"\", \"" &_
tmpBird.laydate & !"\", \"" &_
tmpBird.hatchdate & !"\", \"" &_
tmpBird.breedID & !"\", \"" &_
tmpBird.featherID & !"\", \"" &_
tmpBird.bandNo & !"\", \"" &_
tmpBird.sexID & !"\", \"" &_
tmpBird.colorID & !"\", \"" &_
tmpBird.statusID & !"\", \"" &_
tmpBird.notes & !"\");"
If sqlite3_open(db, @tmpDB ) Then
sqlite3_close(tmpDB)
Return 1 'Can't open database
End If
If sqlite3_exec(tmpDB, query, 0, 0, @errMsg) <> SQLITE_OK Then
sqlite3_close(tmpDB)
Return 3 'Cant add Record
End If
sqlite3_close(tmpDB)
Return 0
End Function
Function AddBreed(db As String, tmpBreed As BreedInfo) As Long
Dim As sqlite3 Ptr tmpDB
dim As ZString Ptr errMsg
dim As String query
query = !"Insert into Breeds values(\"" &_
tmpBreed.order & !"\", \"" &_
tmpBreed.breedName & !"\");"
If sqlite3_open(db, @tmpDB ) Then
sqlite3_close(tmpDB)
Return 1 'Can't open database
End If
If sqlite3_exec(tmpDB, query, 0, 0, @errMsg) <> SQLITE_OK Then
sqlite3_close(tmpDB)
Return 3 'Cant add Record
End If
sqlite3_close(tmpDB)
Return 0
End Function
Function AddFeather(db As String, tmpFeather As FeatherInfo) As Long
Dim As sqlite3 Ptr tmpDB
dim As ZString Ptr errMsg
dim As String query
query = !"Insert into Feathers values(\"" &_
tmpFeather.order & !"\", \"" &_
tmpFeather.featherName & !"\");"
If sqlite3_open(db, @tmpDB ) Then
sqlite3_close(tmpDB)
Return 1 'Can't open database
End If
If sqlite3_exec(tmpDB, query, 0, 0, @errMsg) <> SQLITE_OK Then
sqlite3_close(tmpDB)
Return 3 'Cant add Record
End If
sqlite3_close(tmpDB)
Return 0
End Function
Function AddColor(db As String, tmpColor As ColorInfo) As Long
Dim As sqlite3 Ptr tmpDB
dim As ZString Ptr errMsg
dim As String query
query = !"Insert into Colors values(\"" &_
tmpColor.order & !"\", \"" &_
tmpColor.colorName & !"\");"
If sqlite3_open(db, @tmpDB ) Then
sqlite3_close(tmpDB)
Return 1 'Can't open database
End If
If sqlite3_exec(tmpDB, query, 0, 0, @errMsg) <> SQLITE_OK Then
sqlite3_close(tmpDB)
Return 3 'Cant add Record
End If
sqlite3_close(tmpDB)
Return 0
End Function
Function AddStatus(db As String, tmpStatus As StatusInfo) As Long
Dim As sqlite3 Ptr tmpDB
dim As ZString Ptr errMsg
dim As String query
query = !"Insert into Status values(\"" &_
tmpStatus.order & !"\", \"" &_
tmpStatus.statusName & !"\");"
If sqlite3_open(db, @tmpDB ) Then
sqlite3_close(tmpDB)
Return 1 'Can't open database
End If
If sqlite3_exec(tmpDB, query, 0, 0, @errMsg) <> SQLITE_OK Then
sqlite3_close(tmpDB)
Return 3 'Cant add Record
End If
sqlite3_close(tmpDB)
Return 0
End Function
Function EditBird(db As String, tmpBird As BirdInfo) As Long
Dim As sqlite3 Ptr tmpDB
dim As ZString Ptr errMsg
dim As String query
query = !"Update Birds set " &_
!"birdName = \"" & tmpBird.birdName & !"\", " &_
!"sireID = \"" & tmpBird.sireID & !"\", " &_
!"damID = \"" & tmpBird.damID & !"\", " &_
!"layDate = \"" & tmpBird.laydate & !"\", " &_
!"hatchDate = \"" & tmpBird.hatchdate & !"\", " &_
!"breedID = \"" & tmpBird.breedID & !"\", " &_
!"featherID = \"" & tmpBird.featherID & !"\", " &_
!"band = \"" & tmpBird.bandNo & !"\", " &_
!"sexID = \"" & tmpBird.sexID & !"\", " &_
!"colorID = \"" & tmpBird.colorID & !"\", " &_
!"statusID = \"" & tmpBird.statusID & !"\", " &_
!"notes = \"" & tmpBird.notes & !"\" " &_
!"where rowid = \"" & tmpBird.rowID & !"\";"
If sqlite3_open(db, @tmpDB ) Then
sqlite3_close(tmpDB)
Return 1 'Can't open database
End If
If sqlite3_exec(tmpDB, query, 0, 0, @errMsg) <> SQLITE_OK Then
sqlite3_close(tmpDB)
Return 3 'Cant add Record
End If
sqlite3_close(tmpDB)
Return 0
End Function
Function EditBreed(db As String, tmpBreed As BreedInfo) As Long
Dim As sqlite3 Ptr tmpDB
dim As ZString Ptr errMsg
dim As String query
query = !"Update Breeds set " &_
!"orderNum = \"" & tmpBreed.order & !"\", " &_
!"breedName = \"" & tmpBreed.breedName & !"\"" &_
!"where rowid = \"" & tmpBreed.rowID & !"\";"
If sqlite3_open(db, @tmpDB ) Then
sqlite3_close(tmpDB)
Return 1 'Can't open database
End If
If sqlite3_exec(tmpDB, query, 0, 0, @errMsg) <> SQLITE_OK Then
sqlite3_close(tmpDB)
Return 3 'Cant add Record
End If
sqlite3_close(tmpDB)
Return 0
End Function
Function EditFeather(db As String, tmpFeather As FeatherInfo) As Long
Dim As sqlite3 Ptr tmpDB
dim As ZString Ptr errMsg
dim As String query
query = !"Update Feathers set " &_
!"orderNum = \"" & tmpFeather.order & !"\", " &_
!"featherName = \"" & tmpFeather.featherName & !"\"" &_
!"where rowid = \"" & tmpFeather.rowID & !"\";"
If sqlite3_open(db, @tmpDB ) Then
sqlite3_close(tmpDB)
Return 1 'Can't open database
End If
If sqlite3_exec(tmpDB, query, 0, 0, @errMsg) <> SQLITE_OK Then
sqlite3_close(tmpDB)
Return 3 'Cant add Record
End If
sqlite3_close(tmpDB)
Return 0
End Function
Function EditColor(db As String, tmpColor As ColorInfo) As Long
Dim As sqlite3 Ptr tmpDB
dim As ZString Ptr errMsg
dim As String query
query = !"Update Colors set " &_
!"orderNum = \"" & tmpColor.order & !"\", " &_
!"colorName = \"" & tmpColor.colorName & !"\"" &_
!"where rowid = \"" & tmpColor.rowID & !"\";"
If sqlite3_open(db, @tmpDB ) Then
sqlite3_close(tmpDB)
Return 1 'Can't open database
End If
If sqlite3_exec(tmpDB, query, 0, 0, @errMsg) <> SQLITE_OK Then
sqlite3_close(tmpDB)
Return 3 'Cant add Record
End If
sqlite3_close(tmpDB)
Return 0
End Function
Function EditStatus(db As String, tmpStatus As StatusInfo) As Long
Dim As sqlite3 Ptr tmpDB
dim As ZString Ptr errMsg
dim As String query
query = !"Update Status set " &_
!"orderNum = \"" & tmpStatus.order & !"\", " &_
!"statusName = \"" & tmpStatus.statusName & !"\"" &_
!"where rowid = \"" & tmpStatus.rowID & !"\";"
If sqlite3_open(db, @tmpDB ) Then
sqlite3_close(tmpDB)
Return 1 'Can't open database
End If
If sqlite3_exec(tmpDB, query, 0, 0, @errMsg) <> SQLITE_OK Then
sqlite3_close(tmpDB)
Return 3 'Cant add Record
End If
sqlite3_close(tmpDB)
Return 0
End Function
For the suggestion:
If you have the declaration for a function in the same file as the function body, both will be listed in the "Outline" pane. It would be nice if it would list it only once (using the body display so you get the variables inside the function listed), unless the declaration is different from the body's parameter list. Not required, but it would be nice. The above code also shows this happening.
Re: FreeBasic IDE-poseidonFB(Update 2017.06.19)
In my test, every functions can fold properly.....??Imortis wrote:Some functions fold properly, others do not.
Your code make me find a bug about scanner, you can see line number of function "AddBreed" should be #476(double-click the outline item), but poseidonFB rev.272 show #464, I've found where the bug is, I'll fix at next release, thanks~~
Hmm......, but if declarations and function body are at separate files(bi and bas)?Imortis wrote:For the suggestion:
If you have the declaration for a function in the same file as the function body, both will be listed in the "Outline" pane. It would be nice if it would list it only once (using the body display so you get the variables inside the function listed), unless the declaration is different from the body's parameter list. Not required, but it would be nice. The above code also shows this happening.
I'll make "Goto Deifition"and "Goto Member Proceduce" more convenient at next release, they will support pure declarations and function body(Not in type/class object)
Re: FreeBasic IDE-poseidonFB(Update 2017.06.19)
umm weird, here is not working the environment variables, at least not with %programfiles%
My fbc.exe path is:
C:/Archivos de programa/FreeBASIC/fbc.exe - Works
but not with this environment variable:
%programfiles%/FreeBASIC/fbc.exe
Windows XP SP3
My fbc.exe path is:
C:/Archivos de programa/FreeBASIC/fbc.exe - Works
but not with this environment variable:
%programfiles%/FreeBASIC/fbc.exe
Windows XP SP3
Re: FreeBasic IDE-poseidonFB(Update 2017.06.19)
Here is what I see.Kuan Hsu wrote:In my test, every functions can fold properly.....??
Unfolded:
Folded:
Re: FreeBasic IDE-poseidonFB(Update 2017.06.19)
But.....Imortis wrote:Here is what I see.Kuan Hsu wrote:In my test, every functions can fold properly.....??
Re: FreeBasic IDE-poseidonFB(Update 2017.06.19)
Please retry rev0.273, thanks~~c-sanchez wrote:umm weird, here is not working the environment variables, at least not with %programfiles%
My fbc.exe path is:
C:/Archivos de programa/FreeBASIC/fbc.exe - Works
but not with this environment variable:
%programfiles%/FreeBASIC/fbc.exe
Windows XP SP3
Re: FreeBasic IDE-poseidonFB(Update 2017.06.19)
Ah ha! If I copy the code from the forum, I see the same thing you do. From the original file I get the issue.Kuan Hsu wrote:But.....Imortis wrote:Here is what I see.Kuan Hsu wrote:In my test, every functions can fold properly.....??
Here is the actual file. Hopefully this will point out the issue.