Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mohai

Pages: [1] 2
1
InForm-based programs / Re: Text Fetch with InForm v1.0
« on: March 09, 2022, 01:36:37 pm »
Hello,

Interesting application.
I did not know of direntry library. It looks very useful to do a file explorer.
I wish I had known of it before doing a dialog box (https://qb64forum.alephc.xyz/index.php?topic=4689.0).
I will have a look at it.

By the way, you maybe already know it. Try to add a "./" or a ".\" before the library filename. It worked for me.

        Declare CustomType Library ".\direntry"

2
InForm-based programs / Re: Simple Open-Save dialog box
« on: February 25, 2022, 02:23:59 pm »
If you already tried version 1, please have a look at version 2.
There are more features and improvements.

https://qb64forum.alephc.xyz/index.php?topic=4689.0

3
InForm-based programs / Re: Custom Open/Save dialog box
« on: February 25, 2022, 02:21:59 pm »
(Sorry. Double post) :P

4
InForm-based programs / Custom Open/Save dialog box
« on: February 25, 2022, 02:20:04 pm »
Hello,
Following the simple dialog box version 1 (https://qb64forum.alephc.xyz/index.php?topic=4490.msg139196#msg139196), I just created a customizable dialog box (version 2).

Some improvements are done, such as double click emulation, drive letters, custom font, custom window titles, improved error control ...

In the attached package, you will find the source code, forms, example code, readme files with instructions on how it works and how to use with your own programs, font file, compiled examples for Windows 64 and Linux (32 bits).

This version is designed as a stand-alone program. Feel free to modify as you need, or even convert it to an embedded frame in your project.

5
InForm Discussion / Re: Bug in shell parameters with backslash
« on: February 24, 2022, 06:23:12 am »
Without further testing I'd say this is a bad side effect regarding the fact, that our BASIC programs are first translated into C++ before they are actually compiled into a EXE.

Now look at your example shell "myprogram "+chr$(34)+"C:\"+chr$(34) ...

There you've the sequence \", which is a C++ escape/masking sequence for the quote char. What C++ does here is to replace the \" with a single ", and bang, the \ is gone.

Solution:
Avoid the combination \", or try a double backslash in those situations \\", hence one \ will go away by C++ its replacement but the other one remains as you want.

Yes, double backslash works too.

In my opinion, this is a bug, as text in a command line should not be processed in any way.

I am sorry I am always complaining about bugs. I do not want to become a "Bug Hunter" or whatever XD
I appreciate the hard work behind QB64.

I will post soon a new application I hope will be useful for you all.

6
InForm Discussion / Bug in shell parameters with backslash
« on: February 23, 2022, 02:02:12 pm »
Hello,

I think I found a bug when parsing parameters to a SHELL command.
As far as I know, it only happens under Inform programs, not no regular console programs.

If you call a program using the SHELL function and add some parameters, it is advisable to do it in quotes, as spaces will separate different parameters.
If you parse a path as a parameter (enclosed in quotes), sometimes it happens that the backslash is lost and the called program does not receive it, so the rest of parameters come distorted.

I do not know if this is related to some C++ text processing, such as the "\something" for control characters ("\n" for new line, etc).

Example:
    shell "myprogram "+chr$(34)+"C:\"+chr$(34)

I attached an example to show how it works and a simple workaround to drive it.
If you add a space after the "\", the problem does not happen.

I am using the last version of both QB64 (2.0.2) and InForm 1.3

7
Thank you.

I the mean time, I did a quick fix. Please check the attached example.
It is a variable that stores the selected item number in the list.
The variable MUST be placed as closest as it can to the "case" entry for the list control. If not, the ValueChanged sub will repeat, so this variable will revert to the old value.
I also included a checkbox to enable/disable the fix and a button to select item 1 in the lists, so you can see the difference between both procedures.


8
Hi all,

first of all, thank you to Felippe and all the developers for the great work with QB64 and InForm.

I think I found some bugs in list controls in InForm.

The event __UI_ValueChanged is triggered twice (maybe more) when an element in the list is chosen.
I mean, if you click on an element in a list (or dropdown list) or change the selected text with the cursor keys,
this event is supposed to be triggered only once, as list value is only changed once, but actually it does not.
The SUB is triggered two or more times.
Also, if any variable is changed after first run of the sub, its value is lost when it runs for the second time.

You can see in the attached program.

I am thinking of several solutions, but this bug is weird.


regards

9
InForm Discussion / Re: Any way to change built-in font ?
« on: December 27, 2021, 02:25:35 pm »
In the form designer, if you click the label that says "Font:" to the left of the font list, the list will turn into a text field where you can manually enter a font file name.
Thank you for the answers.

It works but, some care must be taken:

 - The font file must be in the same folder as UiEditor.exe (or must be installed in Windows system), so Inform will find it at edit time.
 - The font file must be in the same folder as the .EXE from your project. If not, default VGA font will be used instead.




10
InForm Discussion / Any way to change built-in font ?
« on: December 24, 2021, 07:47:27 am »
Hello all,

Is there any way to change built-in font or change to a distributable one?
I mean, if I change the font in a form or some controls, I can only choose between buitl-in VGA font or the fonts installed in my Windows but, in different OS or different Windows versions, that font could not be available. So, labels and other texts will show different or even will show cut.

So, Is there any way to change or tweak InForm to include a different font into the EXE file, or to use an external font, such as NotoMono-Regular.ttf, even if it is not installed in your system?

11
InForm-based programs / Simple Open-Save dialog box
« on: December 16, 2021, 01:42:45 pm »
Hello,

I am bored of the old-style "files" command and then ask for a filename in my programs. It is not handy anymore.
So, I created a simple dialog box to choose a file to open or save.
I know there is a way to show this kind of dialog box in Windows but, it will not work in Linux or Mac OS.

I tried to keep it simple and fast.
Double click is not supported in this version, but I want to do an improved version with more features.

There are some instructions included in the package.

Use it or modify as you want.

Cheers !
 

12
QB64 Discussion / Re: Which Linux distribution to run QB64?
« on: December 12, 2021, 12:41:38 pm »
Hello,
I tried Bionic Puppy.
I was not able to run QB64 on it. Too much missing packages did not installed, I am afraid.
As I said before, as I am quite a noob in Linux environments so, I do not mean QB 64 cannot run in Puppy Linux. I mean I was not able to have it running.
Zorin is not 100% stable in my computer too.
I think 1 GB RAM is too short to run QB64 or Inform, as they tend to crash from time to time.

13
QB64 Discussion / Re: Which Linux distribution to run QB64?
« on: December 03, 2021, 11:18:29 am »
@mohai: Have you been able to get QB64 running yet in Q4OS?  Hope you can and start enjoying QB64.   I ended up replacing Q4OS with Zorin OS 15 Lite.  Using QB64 under Q4OS would result in COPY/PASTE not working system wide for me, and freeze my PC for about 10 secs.  It only happens when QB64 was running.  When it closed, things would go back to normal. Had some other issues too in Q4OS, so I tried a bunch of other distros - settled on Zorin lite.  I doubt Zorin would run on your laptop, but there are some lightweight 32-bit linux distros out there you could try.  By the way, just for info purposes, you can skip ReactOS (not linux), although it can run many windows programs it didn't' run any QB64 version I threw at it (on the current ReactOS).  Good luck...

- Dav

Thank you Dav.

My laptop is  running Zorin OS 15 Lite now.
It is not the fastest computer, nor the fastest OS, but it is enough to run QB64 (32bit) on it.
QB64 editor seemed to crash at the beginning, but now it looks stable. I wonder if it is a bug in the Linux 32 bit version ?
Informs seems to work too.
I was able to load some programs, compile and execute them.

Currently, I am working in some "dialog box" routines to open and save files, and I wanted to test in Linux environments.
I already have it working on Windows, but I need to adapt some routines to Linux.
My program has some Inform forms, so I needed a graphical desktop too.

Cheers !
Ivan

14
QB64 Discussion / Re: Which Linux distribution to run QB64?
« on: November 29, 2021, 01:30:50 pm »
@mohai - Centrino CPU's are still being manufactured and used today (latest iteration is a 2016 model).

So I need more specifics about the processor. Check with this Wiki and let me know: https://en.wikipedia.org/wiki/Centrino

Also, are you running the Plasma or Trinity desktop? Only the Trinity comes in a 32-bit OS.

Q4OS is a Debian-based Linux, so it should show some compatibility with Ubuntu and Linux Mint (both based on the Debian kernel).

I haven't looked at the install closely for Linux, but I bet there isn't a 32-bit version of QB64 available. @luke or @FellippeHeitor can answer that quicker than I.

Since I do not have a 32-bit processor, I can't really duplicate the issue you are having. I have created a Live Q4OS USB stick so I can test it later today/tomorrow, to see if I have the same issues you and @Dav are having.

The processor is a Pentium-M running at 1.73 Mhz. The computer is a laptop.
I am running Trinity desktop. Did not try different desktops, by the way.

15
QB64 Discussion / Re: Which Linux distribution to run QB64?
« on: November 29, 2021, 01:27:46 pm »
I wonder then, because Q4OS isn't recognized by the lnx_setup.sh script, does it see it as a Debian distro, or unidentified, which then none of the supporting libraries are installed?

Well, that is no the case for me.
I was able to (almost) install QB64 using the included script.
I installed Q4OS 4.7 and it is detected as a Debian Linux.
The only issue I had is the C++ error when compiling the executable for QB64.

Earlier, I tried Xubuntu with the same setup and was able to completely install QB64 but, when trying to open  a file, the IDE just closed.
I was able to copy/paste some text into it and compile some small programs, but IDE kept malfunctioning.
Inform was not opening also.

Pages: [1] 2