FreeBasic IDE-poseidonFB(Update 2019.09.07)

User projects written in or related to FreeBASIC.
kcvinu
Posts: 179
Joined: Oct 07, 2015 16:44
Location: Keralam, India

Re: FreeBasic IDE-poseidonFB(Update 2018.03.24)

Postby kcvinu » Mar 26, 2018 10:58

@Kuan Hsu,
Hi, I've another feature request. Can you make the tooltip of function parameter list some more active ?. I mean;
When the tool tip appear the first parameter in tool tip should be highlighted with a slight color change. Which indicating the user as this is the current parameter that he/she is typing. And when the user finished typing the first parameter, he/she will start typing the second parameter. So After user pressing comma (",") the next parameter should be highlighted.

And whenever user types a comma(",") in between the parenthesis of a function, this tooltip will appear.
Is it possible ?. If so, it will be very effective and useful when we use libraries from other programmers.
Kuan Hsu
Posts: 433
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB(Update 2018.03.24)

Postby Kuan Hsu » Mar 26, 2018 12:49

St_W wrote:I don't know how your current implementation looks like, but for the search a tree data structure like https://en.wikipedia.org/wiki/Generalized_suffix_tree or https://en.wikipedia.org/wiki/Ternary_search_tree may help to improve lookup speed.

The other, and probably more important, point is to separate the parsing or lookup from the user input. Move those computation into a different thread that is independent from the UI thread. If the computation takes long the auto-completion list may not even show up before the user continues to type - in that case cancel the computation.

(1) The Parsed tree without sorting and all nodes need be checked, so........
(2) You are great!! I got the point and right now my tests seem to OK, let me do more tests and I'll commit later......
Kuan Hsu
Posts: 433
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB(Update 2018.03.24)

Postby Kuan Hsu » Mar 26, 2018 17:05

c-sanchez wrote:The "Find" buttons aren't translated, although.. if instead of use text for that, uses icons too? Although I'm not sure I think can looks good giving more free space even heh.

Translated issue will be fixed at next reversion.

c-sanchez wrote:Btw, In the new Find/Replace dialog is included a "Up or Down Arrow", what is their function? Indicate if must be find/replace next or previous? because if is that then two "Find buttons don't have much sense :P

It is for "Find/Replace" use.

c-sanchez wrote:Other small detail, the search/replace dialog is not showed while any document is opened/create, that is correct, but, if we have a document opened, open the find/replace dialog, now close the document. The search/replace dialog still open :P

It's for all documents, I will let it hide automatically when all documnets are close

kcvinu wrote:@Kuan Hsu,
Hi, I've another feature request. Can you make the tooltip of function parameter list some more active ?. I mean;
When the tool tip appear the first parameter in tool tip should be highlighted with a slight color change. Which indicating the user as this is the current parameter that he/she is typing. And when the user finished typing the first parameter, he/she will start typing the second parameter. So After user pressing comma (",") the next parameter should be highlighted.

And whenever user types a comma(",") in between the parenthesis of a function, this tooltip will appear.
Is it possible ?. If so, it will be very effective and useful when we use libraries from other programmers.

HaHa, finally somebody notice it!
Dear kcvinu, I'll look my code and try to modify, but at first, let me do more tests about multi-thread issue about speed up the autocomplete...
kcvinu
Posts: 179
Joined: Oct 07, 2015 16:44
Location: Keralam, India

Re: FreeBasic IDE-poseidonFB(Update 2018.03.24)

Postby kcvinu » Mar 26, 2018 21:10

@Kuan Hsu,
Take your own time. Now, I am making an object oriented GUI library for freebasic. 60% works finished. I am planning to integrate it to Poseidon IDE.
sancho3
Posts: 358
Joined: Sep 30, 2017 3:22

Re: FreeBasic IDE-poseidonFB(Update 2018.03.24)

Postby sancho3 » Mar 27, 2018 0:56

I am using rev379.

I cannot reproduce the crash I used to get with FLTK anymore.

The autocomplete overwrite works partially.
This code:

Code: Select all

Type test
   As Integer x
   Declare Sub priss
   Declare Sub prinv
End Type

dim As test t

' when i type
t.priss
' and I move the cursor back over the p and press qtrl-q and select prinv it overwrites the way I like.
t.prinv

' but when I move the cursor back to the . and press . it brings up the list and I select prinv and it inserts instead of overwrite.
t.prinv.priss
Kuan Hsu
Posts: 433
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB(Update 2018.03.29)

Postby Kuan Hsu » Mar 28, 2018 17:33

I've commited rev.381, It had added two options in "Options" -> "Preference" -> "Parser":
Image
(1) "ON" as sancho3's request, "OFF" for my personal habit...
(2) I took much time to try it, now it should increase the autocomplete speed, please try it, but if you find it is unstable, please tell me and maybe set "OFF" to use previous method

and
(3) Try to fix "Open File" crash bug, remove created GUI code from back thread
(4) Try to fix "Close File" crash bug, IupDestroy double times, the second make memory leak
........

Have a nice day~~
Last edited by Kuan Hsu on Mar 28, 2018 18:08, edited 1 time in total.
kcvinu
Posts: 179
Joined: Oct 07, 2015 16:44
Location: Keralam, India

Re: FreeBasic IDE-poseidonFB(Update 2018.03.29)

Postby kcvinu » Mar 28, 2018 18:00

Thanks for the update. Let me try. :)

Great changes. Speed increased a lot. No typing delays anymore. But Auto complete fails sometimes. No response while we pressing keys.
Kuan Hsu
Posts: 433
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB(Update 2018.03.29)

Postby Kuan Hsu » Mar 29, 2018 16:11

kcvinu wrote:Thanks for the update. Let me try. :)

Great changes. Speed increased a lot. No typing delays anymore. But Auto complete fails sometimes. No response while we pressing keys.

Please go to https://bitbucket.org/KuanHsu/poseidonfb/downloads/,then download the poseidonFB_rev3815.7z and extract to replace the poseidonFB.exe
Open "Preference" -> "Parser", change the "Display Dealy" and Apply/OK
Image
Actually, it's about back thread delay, my desktop set 0 is very OK, but my notebook need set to 150 seem OK( no complete list lost ), please try and tell me the result, TKS~
kcvinu
Posts: 179
Joined: Oct 07, 2015 16:44
Location: Keralam, India

Re: FreeBasic IDE-poseidonFB(Update 2018.03.29)

Postby kcvinu » Mar 29, 2018 17:44

Let Me check. I will inform you.
Edit - At a first look, everything seems to be perfect with the delay of zero.
kcvinu
Posts: 179
Joined: Oct 07, 2015 16:44
Location: Keralam, India

Re: FreeBasic IDE-poseidonFB(Update 2018.03.29)

Postby kcvinu » Mar 29, 2018 19:52

@Kuan Hsu,
I am writing a GUI library for windows applications. See this code. This code uses my library. I designed it to use with an IDE. I mean, user can select contriol names from a combo box in an IDE, then code will be automatically created in source file. Can you add this library to Poseidon ?

Code: Select all

'\\ This file contains backborn
#Include "WindowLib.bi"
 

'\\ Declare a sub for handling window messages. No need to use any parameters.
Declare Sub MyCallBack()

'\\ Tell windows to use our function instead of so called WndProc function.
SetCallBack(@MyCallBack)


'\\ Create New instance of Appclass, Since, i don't like this name, may be i wll change it in near future.
Dim Shared tApp As AppClass

'\\ Let us set our desired window properties like size, position, title etc.
With tApp
   .Caption = "My New Window"
   .Width = 400
   .Height = 300
   'There are lot of other properties you wish to set
End With

'\\ Enough is enough. Let us now create the form.
tApp.CreateForm

'\\ Now, we ar going to declare the controls
Dim Shared Btn1 As Button
Dim Shared Lbl1  As Label
Dim Shared TB1 As TextBox
 
'\\ Now, set up our control properties
 
'\\ First Button's Props
With Btn1
   .Xpos = 130
   .Ypos = 160
   .Caption = "My Button"
   .Width = 120
   .Height = 50
           
End With


'\\ Then Label's props
With Lbl1
   .Width = 80
   .Height = 40
   .Ypos = 100
   .Xpos = 40
   .Caption = "A New Label"   
End With

'\\ Now, textbox props
With TB1
   .Caption = "A Text Box"
   .Xpos = 130
   .Ypos = 95
   .Width = 180   
End With


'\\ Now, create the controls 

Lbl1.CreateLabel()
Btn1.CreateButton( )
TB1.CreateTextBox

'\\ Now show the window to user
tApp.ShowApp( )


'\\ This is our callback function. Every action happens here
Sub MyCallBack()
   
    Select Case cb_Message
      Case WM_CREATE
'         
         ? "created"
         
         
      Case WM_LBUTTONDOWN
      ' Here cb_WinHwnd is Callback func variable. It is the Main WIndow handle
         If cb_WinHwnd = tApp.Handle Then
            ? "Main WIndow Cicked"      
         
         End If
      
      
      Case WM_COMMAND
      
           ' cb_NotifCode is a Callback func variable. It is the notification code in WM_COMMAND.
         'You dont need wparam or lparam anymore.
         Select Case cb_NotifCode
         
            Case BN_CLICKED
            
            ' cb_CntlHwnd is also a callback func variable. It represents the control handle.
                    If cb_CntlHwnd = Btn1.Handle Then
                  ? "Clicked Btn1"
               End If
               
         End Select             
         Case WM_SIZE
         If  cb_WinHwnd = tApp.Handle Then ? "Window Sized"
            
   End Select
   
End Sub

' This mainloop is nbecessary for our application.
tApp.MainLoop()

End
 
sancho3
Posts: 358
Joined: Sep 30, 2017 3:22

Re: FreeBasic IDE-poseidonFB(Update 2018.03.29)

Postby sancho3 » Mar 30, 2018 6:23

Using version .379
A folding issue
The following code folds up entirely instead of just the function when you fold at the first line, Function TList.pop()....
Notice that the line Function = This.tail_node... has a fold icon when it shouldn't.

Code: Select all

Function TList.pop() As Any ptr
   ' this function deletes a node but like the delete function it does not delete the pdata pointer
   ' this function returns a reference to that data
   Function = This.tail_node->pdata
   Dim As TNode ptr node =  This.tail_node->prev_node
   node->next_node = NULL
   _log.post(__Function__ & " Delete TNode at " & This.tail_node)
   Delete This. tail_node
   This.tail_node = node
   This.item_count -= 1
end Function
'----------------------------
Sub TList.for_each(Byval call_back As Sub(Byval item As Any Ptr))
   Dim as TNode Ptr node = This.root_node
   While node <> NULL
      call_back(node->pdata)
      node = node->next_node
   Wend
End Sub

At version 379, words are still being capitolized inside quotes:

Code: Select all

? "this Is a New Print With If"


There is no auto-complete for the keyword Base. I'm not sure if this is doable but it would be good.
You have now changed the settings for 380+. I would like to keep my color setup. It takes a long time to reset everything. How should I handle this?
Dinosaur
Posts: 1311
Joined: Jul 24, 2005 1:13
Location: Hervey Bay
Contact:

Re: FreeBasic IDE-poseidonFB(Update 2018.03.29)

Postby Dinosaur » Mar 30, 2018 13:32

Hi All

sancho3 when you update to a later version of Poseidon only extract the executable.
Then it won't over write your Key words and colours.

To add "Base" goto Options/Preferences/Keywords/Keyword0 and either add the word in between others (if you want to keep the list alphabetical)
or just add it at the end (all lower case).
Note that I have put ALL Freebasic keywords in Keyword0 as I am using Keyword1,2 and 3 for my own key words.

I keep a copy of the settings folder in case you over write the settings.
Then just use an Editor to copy and paste into editorSettings.ini.

Regards

Edit: Kuan Hsu usually tells us when an update requires the settings files as well.
Kuan Hsu
Posts: 433
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: FreeBasic IDE-poseidonFB(Update 2018.03.29)

Postby Kuan Hsu » Mar 30, 2018 15:43

sancho3 wrote:You have now changed the settings for 380+. I would like to keep my color setup. It takes a long time to reset everything. How should I handle this?

Dinosaur wrote:I keep a copy of the settings folder in case you over write the settings.
Then just use an Editor to copy and paste into editorSettings.ini.

Regards

Edit: Kuan Hsu usually tells us when an update requires the settings files as well.

Thanks, Dinosaur...^^
The easiest way is as Dinosaur said, don't overwrite your editorSettings.ini ^^

sancho3 wrote:Using version .379
A folding issue
The following code folds up entirely instead of just the function when you fold at the first line, Function TList.pop()....
Notice that the line Function = This.tail_node... has a fold icon when it shouldn't.

At version 379, words are still being capitolized inside quotes:

(1) Please See: https://www.freebasic.net/forum/viewtopic.php?f=8&t=23935#p211383, the Install modified iup_scintilla: ( Linux ) section.
(2) That's because of check if in string of my code is call scintilla function: SCI_GETSTYLEAT, so we can notice that we type a single quotes before a line text of document in poseidonFB, the color of line text change to black, not SCE_B_STRING color, the scintilla tell us it's not in SCE_B_STRING yet

Code: Select all

"This is not SCE_B_STRING
"This is SCE_B_STRING"

YES, to modify it need change LexBasic.cxx and rebuild the iup_scintilla.dll / libiup_scintilla.so

kcvinu wrote:@Kuan Hsu,
I am writing a GUI library for windows applications. See this code. This code uses my library. I designed it to use with an IDE. I mean, user can select contriol names from a combo box in an IDE, then code will be automatically created in source file. Can you add this library to Poseidon ?

I think later we will get powerful GUI designer in PaulSquires's WinFBE, so I'm sorry that the GUI designer isn't my plan in poseidonFB, by the way, even in old poseidon at 2006(http://www.dsource.org/projects/poseidon) I had no plan about it...( It is very complicated and limited by my coding technology )^^
kcvinu
Posts: 179
Joined: Oct 07, 2015 16:44
Location: Keralam, India

Re: FreeBasic IDE-poseidonFB(Update 2018.03.29)

Postby kcvinu » Mar 30, 2018 15:56

@Kuan Hsu,
Its ok. As far as i know, Scintilla will allow us to use its COM object. I have practiced it years ago. It's quiet easy. We can send text to Scintilla editor component via WM_COPYDATA msg. If my experiments succeeded, i can make an add-on to poseidon for creating GUI. Anyway, i am on it.
kcvinu
Posts: 179
Joined: Oct 07, 2015 16:44
Location: Keralam, India

Re: FreeBasic IDE-poseidonFB(Update 2018.04.01)

Postby kcvinu » Apr 01, 2018 7:42

Hi,
Custom Tools window is not appearing conrrectly. See this image.
Image

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 1 guest