IUP_FB_EDITOR (simple development environment)

User projects written in or related to FreeBASIC.
VANYA
Posts: 1410
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: IUP_FB_EDITOR (simple development environment)

Postby VANYA » Nov 14, 2017 8:52

Hi ALL!

Using IupRefresh a warning appears on Linux:

Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text().


So I tried to use:

IupRefreshChildren(TGlobalVariables->split)

I have a problem with updating the window no. Can anybody check if there are any problems? In order to try it is necessary:

In file tabs.bi string:

IupRefreshChildren(TGlobalVariables->tabs)

replace :

IupRefreshChildren(TGlobalVariables->split)
Kuan Hsu
Posts: 470
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: IUP_FB_EDITOR (simple development environment)

Postby Kuan Hsu » Nov 15, 2017 12:29

VANYA wrote:Hi ALL!

Using IupRefresh a warning appears on Linux:

Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text().


So I tried to use:

IupRefreshChildren(TGlobalVariables->split)

I have a problem with updating the window no. Can anybody check if there are any problems? In order to try it is necessary:

In file tabs.bi string:

IupRefreshChildren(TGlobalVariables->tabs)

replace :

IupRefreshChildren(TGlobalVariables->split)

I download iup_fb_editor64linux.zip from SF but couldn't run it and display:
(fbnp:7114): Gtk-ERROR **: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported
So I download the sources and re-build it everything are OK, my system is Linux mint 18.2, Cinnamon (64-bit), IUP 3.23 Installed

Then I test IupRefresh(TGlobalVariables->tabs) or IupRefreshChildren(TGlobalVariables->split) both are OK without warning message, TGlobalVariables->tabs is a son of TGlobalVariables->split ( another is TGlobalVariables->buildbox )...^^
VANYA
Posts: 1410
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: IUP_FB_EDITOR (simple development environment)

Postby VANYA » Nov 15, 2017 16:23

Hi Kuan Hsu!

Thank you for testing!

(fbnp:7114): Gtk-ERROR **: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported


I'm not a Linux expert, so I do not even know why this is happening. After all, I also have Linux mint 18.2, but everything works. Probably on Linux, however, it's always right to always compile from the source files, and the compiled modules seem to cause different problems for different reasons.
AGS
Posts: 1284
Joined: Sep 25, 2007 0:26
Location: the Netherlands

Re: IUP_FB_EDITOR (simple development environment)

Postby AGS » Nov 20, 2017 1:44

Downloaded your editor and found some issues with it (I am assuming the editor is far from complete but I figured I'd post a bug report anyway).

For starters I found a small typo in a menu.
Edit->Convert Simvols to
should read
Menu Edit -> Convert Symbols to
(changed Simvols to Symbols)

The typo actually is not the problem but the problem does have to do with changing the case of symbols.

Using Convert Symbols to enables the user to toggle/change the case of user defined symbols (case of keywords remains unchanged).

This seems to work fine on a function header. Example.
Step 1. Select the following text.

Code: Select all

Function do_something(Byval a As Integer, Byval d As Integer) As Integer


Step 2. Toggle case to upper.

Code: Select all

Function DO_SOMETHING(Byval A As Integer, Byval D As Integer) As Integer


If I copy the selected text from your editor and paste it into another editor (or into a browser or into ...) the case of every symbol has changed to
uppercase (not just the symbols). Which means the pasted text looks like this

Code: Select all

FUNCTION DO_SOMETHING(BYVAL A AS INTEGER, BYVAL D AS INTEGER) AS INTEGER


Using some other scintilla based editor changes in case work as expected (copy - paste works as expected: no unexpected changes in case).
So the problem seems to be with your editor and not so much with scintilla.

When changing the case of the following line (select line then Ctrl - U)

Code: Select all

#macro example(a,b,c)


I get the following result

Code: Select all

#MACRO EXAMPLE(A,B,C)


The case of macro should not have changed to UPPERCASE (macro is a freebasic keyword). I would have expect the output to be

Code: Select all

#macro EXAMPLE(A,B,C)


Same thing happens when using #define or any other preprocessor directive.

Aside: I am working on an iup example myself (iup is nice).
VANYA
Posts: 1410
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: IUP_FB_EDITOR (simple development environment)

Postby VANYA » Mar 01, 2020 14:26

Hi all!

Update project. New, from what I remember:

1) completion of keywords, types
2) Tips for functions
3) the side window with a list of functions
4) the opportunity to search in the procedure\function\property\constructor\destructor (before it was only possible in the whole file)
5) Go to the place of a variable declaration
6) show the variable type
7) plugins

A lot of bug fixes.

Autocomplete is made taking into account the scope of variables. Line breaks are recognized. Comments, including multi , recognized.
However, the parser is not trained to recognize strings separated by a colon (colon after text is discarded). Just parser is not aware of such a unit as the OPERATOR - END OPERATOR. Look in settings , there is auto-completion configurable.

More details about the editor functions in a folder: help
c-sanchez
Posts: 126
Joined: Dec 06, 2012 0:38

Re: IUP_FB_EDITOR (simple development environment)

Postby c-sanchez » Mar 01, 2020 16:17

Nice editor, just make smaller the tabs height please
Image
Image
nov79
Posts: 47
Joined: Feb 23, 2020 15:31

Re: IUP_FB_EDITOR (simple development environment)

Postby nov79 » Mar 01, 2020 18:30

I downloaded the Linux 64 bit version and tried to run it but nothing really launched. Then I tried to run it under a terminal and it said it can't load shared library:

./fbnp: error while loading shared libraries: libiup.so: cannot open shared object file: No such file or directory


The biggest downside of both your IDE and PoseidonFB is they require the user to install additional library. Kuan realized about it so he also provides an AppImage version. All of the required library are bundled in the AppImage so the user don't have to install anything himself and it's just work out of the box.

Why don't you ship the library with your software or at least provide instruction about how to install it?

IUP is not easily installed from the package manager. So we have to download it from it developer anyway.

Is there any license restriction from IUP prevented us from doing so?
nov79
Posts: 47
Joined: Feb 23, 2020 15:31

Re: IUP_FB_EDITOR (simple development environment)

Postby nov79 » Mar 01, 2020 18:31

c-sanchez wrote:Nice editor, just make smaller the tabs height please
Image
Image


I also think like you. Compared with the other part of the GUI it's a bit imbalance or... alien.
VANYA
Posts: 1410
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: IUP_FB_EDITOR (simple development environment)

Postby VANYA » Mar 02, 2020 3:16

c-sanchez wrote:Nice editor, just make smaller the tabs height please


This size in height is obtained due to the "close" buttons. These buttons I consider myself handy , so I put up with appearance.

nov79 wrote:Why don't you ship the library with your software or at least provide instruction about how to install it?


Well, here's a simplified guide:

The editor is based on GTK2. For a GTK3 to read this post. Why am I writing this? We look at the description to the IUP library on the download page:

Linux26g4_64: Ubuntu 10.04 (x64) / Kernel 2.6 / gcc 4.4 (GTK 2.20)
Linux32: Ubuntu 12.04 (x86) / Kernel 3.2 / gcc 4.6 (GTK 2.24)
Linux32_64: Ubuntu 12.04 (x64) / Kernel 3.2 / gcc 4.6 (GTK 2.24)
Linux35_64: Ubuntu 12.10 (x64) / Kernel 3.5 / gcc 4.7 (GTK 2.24)

Linux313_64: Ubuntu 14.04 (x64) / Kernel 3.13 / gcc 4.8 (GTK 3.10)
Linux319_64: Ubuntu 15.04 (x64) / Kernel 3.19 / gcc 4.9 (GTK 3.14)
Linux44_64: Ubuntu 16.04 (x64) / Kernel 4.4 / gcc 5.3 (GTK 3.18)
Linux415_64: Ubuntu 18.04 (x64) / Kernel 4.15 / gcc 7.3 (GTK 3.22)

I highlighted the descriptions that indicate the belonging to GTK2 (GTK 2.20, GTK 2.24 )
These archives are suitable for the editor!

Download the archive , like this: iup-3.27_Linux32_64_lib.tar.gz

In no case do not download the version of IUP 3.28 (it has errors associated with dialogs)

Unzip to any folder.

Next you need to copy the files *.so in the folder where you installed the shared library. On ubuntu , linux mint this is usually the folder /usr/lib , /usr/local/lib (you can easily find these folders , as they already have a huge number of files *.so). Also, you can create a folder and set the path to it (if you can) . Also , install the libIconv library (if not installed, although this is usually already installed in linux). Try to run the editor from the terminal. If your system will not found some libraries, install them (here I can't have that, describing to you the user manual).
Last edited by VANYA on Mar 02, 2020 5:56, edited 1 time in total.
nov79
Posts: 47
Joined: Feb 23, 2020 15:31

Re: IUP_FB_EDITOR (simple development environment)

Postby nov79 » Mar 02, 2020 4:23

Yes, iconv is installed by default. And we could put shared library in any directory we want and just have to add it to /etc/ld.so.conf.d/mydir.conf and run ldconfig as root:

https://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib

I'm running Debian 10 with kernel 4.19. I will test to see if it works on my system.
VANYA
Posts: 1410
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: IUP_FB_EDITOR (simple development environment)

Postby VANYA » Mar 02, 2020 5:22

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

For those who want to build editor using GTK3:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

1) Headers coming with the compiler for old version 3.15 . To compile with GTK3 they need to tweak it a little.

Now it looks like this (gtk2):

Code: Select all

.....
#ifdef __FB_WIN32__
   #inclib "gdi32"
   #inclib "user32"
   #inclib "comdlg32"
   #inclib "comctl32"
   #inclib "ole32"
   #inclib "advapi32"
   #inclib "shell32"
   #inclib "uuid"
#else
   #inclib "gtk-x11-2.0"
   #inclib "gdk-x11-2.0"
   #inclib "pangox-1.0"
   #inclib "gdk_pixbuf-2.0"
   #inclib "pango-1.0"
   #inclib "gobject-2.0"
   #inclib "gmodule-2.0"
   #inclib "glib-2.0"
#endif
....


For GTK3 should be something like this:

Code: Select all

.....
#ifdef __FB_WIN32__
   #inclib "gdi32"
   #inclib "user32"
   #inclib "comdlg32"
   #inclib "comctl32"
   #inclib "ole32"
   #inclib "advapi32"
   #inclib "shell32"
   #inclib "uuid"
#else
   '#inclib "gtk-x11-2.0"
   '#inclib "gdk-x11-2.0"
   '#inclib "pangox-1.0"
   #inclib "gtk-3"
   #inclib "gdk-3"
   #inclib "cairo"
   #inclib "pangocairo-1.0"
   #inclib "gdk_pixbuf-2.0"
   #inclib "pango-1.0"
   #inclib "gobject-2.0"
   #inclib "gmodule-2.0"
   #inclib "glib-2.0"
#endif
....


2) Edit file editor declarations.bi


Now it looks like this (gtk2):

Code: Select all

....
#Else

   #Include "crt/iconv.bi"
   
   #include "gtk/gtk.bi"
....


For GTK3 should be something like this:

Code: Select all

....
#Else

   #Include "crt/iconv.bi"
   
   #include "gtk/gtk3.bi"
....


3) for GTK3 you need to download these archives:

Linux313_64: Ubuntu 14.04 (x64) / Kernel 3.13 / gcc 4.8 (GTK 3.10)
Linux319_64: Ubuntu 15.04 (x64) / Kernel 3.19 / gcc 4.9 (GTK 3.14)
Linux44_64: Ubuntu 16.04 (x64) / Kernel 4.4 / gcc 5.3 (GTK 3.18)
Linux415_64: Ubuntu 18.04 (x64) / Kernel 4.15 / gcc 7.3 (GTK 3.22)

4) (option) you may have to adjust the source code editor to better display some elements of the GUI interface. GTK3 at some of the elements look a little differently than GTK2
nov79
Posts: 47
Joined: Feb 23, 2020 15:31

Re: IUP_FB_EDITOR (simple development environment)

Postby nov79 » Mar 02, 2020 5:47

IUP_FB_EDITOR runs fine on my system. But I noticed IUP install it library into /usr/lib64 and I don't want to mess my system's LD_CONFIG_PATH so I have to run sudo ldconfig /usr/lib64 before execute fbnp.

I tested the GTK2 version, though.
VANYA
Posts: 1410
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: IUP_FB_EDITOR (simple development environment)

Postby VANYA » Mar 02, 2020 5:58

nov79 wrote:IUP_FB_EDITOR runs fine on my system.


I'm glad you got it.
VANYA
Posts: 1410
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: IUP_FB_EDITOR (simple development environment)

Postby VANYA » Mar 03, 2020 9:11

Update:

fixes critical bugs
dodicat
Posts: 6723
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: IUP_FB_EDITOR (simple development environment)

Postby dodicat » Mar 03, 2020 11:15

Really neat ide VANYA.
Nice to get help up by putting the cursor on a keyword and pressing F1.
Not many ides manage this.
I am so ingrained in fbide, I use it all the time.
Quick runs I use mostly, I see that your build options do not apply to quick run.
Also, but not too important really, if I run this code in fbide:

Code: Select all

#lang "qb"
#include "fbgfx.bi"
 

The file fbgfx.bi file springs up in a new window.
Other ides I have tested do not bring up an offending include file.

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 9 guests