Gb.util is installed, but can't make it work

Ask about the individual Gambas components here.
Post Reply
tailkinker
Posts: 10
Joined: Tuesday 17th September 2024 11:06am

Gb.util is installed, but can't make it work

Post by tailkinker »

I am trying to use gb.util.csvfile to manage csv files.

When I use Dim nutrientsin as new gb.util.csvfile, the gb turns orange, but util never shows up in the menu of options to add.

I also tried dim nutrientsin as csvfile in the class section, before the public sub, and after. Csvfile turns orange, but then it comes up with unknown identifier error.

I ran search and found out the gb.util is installed. This is in a Chromebook, Debian Trixie, Gambas 3.20.

How do I get this to open, read, and write to one or more csv files.

Thx.
User avatar
BruceSteers
Posts: 2000
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Gb.util is installed, but can't make it work

Post by BruceSteers »

You have to now add the component to your project.

Goto project properties and select components.
there you should find the gb.util component to enable.
If at first you don't succeed , try doing something differently.
BruceS
tailkinker
Posts: 10
Joined: Tuesday 17th September 2024 11:06am

Re: Gb.util is installed, but can't make it work

Post by tailkinker »

Went to properties and found gb.util. It has a green circle next to it. To the left, I clicked both boxes, but still no joy. I also exited completely from Gambas and went back in.

Thx
User avatar
BruceSteers
Posts: 2000
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Gb.util is installed, but can't make it work

Post by BruceSteers »

unclick the second box , i don't know what it is (it looks like it disables it but does not remove it)

just select the 1 box to the left :)
If at first you don't succeed , try doing something differently.
BruceS
tailkinker
Posts: 10
Joined: Tuesday 17th September 2024 11:06am

Re: Gb.util is installed, but can't make it work

Post by tailkinker »

Still no joy.

Is there something else that needs to be installed? I only have gb.form, gb.gui, gb.image, and gb.util checked off.

Ps - there is one other error but I worked around it by opening the fmain form auto resize to false, I think. Before I did that, the from just opened as a kind of cursor thing I had to expand with the mouse.

The error is still there

Org.gsmbas. 1763:1763 gtk warning negative content width -6 (allocation 12, extent 9 x 9) while allocating gadget. Node entry owner gtkentry.

There are 2 other errors like that with different sizes.

Thx
tailkinker
Posts: 10
Joined: Tuesday 17th September 2024 11:06am

Re: Gb.util is installed, but can't make it work

Post by tailkinker »

Ermmm...

Ps all of a sudden it's working, but I have no clue why.

Usually I don't have these kinds of problems.

Thx for helping.
User avatar
cogier
Site Admin
Posts: 1181
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Gb.util is installed, but can't make it work

Post by cogier »

I am a great fan of CSV files. I just load the file into an array split by NewLine and later split the line as necessary.

Image

Here is a small example program
CSVExample-0.0.1.tar.gz
(7.41 KiB) Downloaded 229 times
tailkinker
Posts: 10
Joined: Tuesday 17th September 2024 11:06am

Re: Gb.util is installed, but can't make it work

Post by tailkinker »

Thx, I think for some parts of my program I might read into an array. Other parts it won't be feasible because of the number of lines. I'm working on a nutrient calculation program that stores batches of ingredients. There are thousands in the csv I am pulling the data from. Might still decide to dump that into a database.
Post Reply