Search found 21 matches

by AMUR-WOLF
Thursday 3rd March 2022 8:50am
Forum: General
Topic: Gambas and the framebuffer
Replies: 6
Views: 2703

Re: Gambas and the framebuffer

Sorry for being strange I am trying to work out the bet option for a Point of sale system (I need to lock it down so it can not be used as a normal PC) Do you develop POS on Gambas or POS is ready and run in framebuffer? You can configure X server to serve a single application. The situation is kno...
by AMUR-WOLF
Wednesday 2nd March 2022 10:06am
Forum: General
Topic: Gambas and the framebuffer
Replies: 6
Views: 2703

Re: Gambas and the framebuffer

AndyGable wrote: Tuesday 1st March 2022 8:32pm If I did use the above ones does it mean I can not use the IDE to design the look of the application?
I think you are the first Gambas user in the world who wants to develop applications for framebuffer. If a computer can't run X server, ncurses is a perfect solution for user interface.
by AMUR-WOLF
Friday 25th February 2022 10:13am
Forum: Beginners
Topic: Best practice for huge forms
Replies: 1
Views: 1450

Re: Best practice for huge forms

Share please a sample project with only one huge form made in builder and event handlers made via menu in builder. I will try to split it.
by AMUR-WOLF
Friday 25th February 2022 6:52am
Forum: Beginners
Topic: Abstract and protected methods
Replies: 7
Views: 3167

Re: Abstract and protected methods

In Java, hierarchies of classes caused problems while long distance code maintaining. So, design pattern "Strategy" was invented (story).

Probably you can achieve your aims via design pattern "Strategy":
pattern-strategy.zip
(14.89 KiB) Downloaded 178 times
by AMUR-WOLF
Friday 25th February 2022 6:17am
Forum: Beginners
Topic: Abstract and protected methods
Replies: 7
Views: 3167

Re: Abstract and protected methods

That is not the same. Here I can override the Method(), but if I call it from the declaring class, it won't execute method overridden by the subclass. You can see that within the attached example project. I have to define a lot of things as public (instead of protected) in the base class and also s...
by AMUR-WOLF
Thursday 24th February 2022 7:13pm
Forum: Beginners
Topic: loading text file into listbox with a filter (solved)
Replies: 5
Views: 2799

Re: loading text file into listbox with a filter

Hi pentilisea,
happy to help.
pentilisea wrote: Thursday 24th February 2022 6:54pm Loading only numbers (isInteger) has still space befor number, space after number
Use the "Trim$" function:
Filtered.Add(Trim$(OriginLine))
by AMUR-WOLF
Thursday 24th February 2022 5:31pm
Forum: Beginners
Topic: loading text file into listbox with a filter (solved)
Replies: 5
Views: 2799

Re: loading text file into listbox with a filter

Another approach would be to list only the numbers, only one number as one item/line. Try Dialog.Filter = ["*.txt", "Text Files", "*", "All Files"] If Dialog.OpenFile() Then Return Dim Originlines As String[] Originlines = Split(File.Load(Dialog.Path), "...
by AMUR-WOLF
Thursday 24th February 2022 4:54pm
Forum: Beginners
Topic: loading text file into listbox with a filter (solved)
Replies: 5
Views: 2799

Re: loading text file into listbox with a filter

pentilisea wrote: Thursday 24th February 2022 12:34pm Now I want to remove the first 12 lines/items and even as it seems simple to do I'm running into sytax errors.

Listbox1.Remove(ListBox1[0...11] ???
Try
Listbox1.Remove(0, 12)
by AMUR-WOLF
Thursday 24th February 2022 4:24pm
Forum: Beginners
Topic: Abstract and protected methods
Replies: 7
Views: 3167

Re: Abstract and protected methods

Are there such things like abstract methods or protected methods within Gambas? No. If you need abstract method, you can do this: Public Sub Method() Error.Raise("Not implemented method invocation!") End Methods are only private or public. Gambas, like its parent Visual Basic, is designed...
by AMUR-WOLF
Tuesday 22nd February 2022 9:47am
Forum: Beginners
Topic: Declare and initialize array of arrays
Replies: 2
Views: 1700

Re: Declare and initialize array of arrays

So I have two questions: - What is the idiomatic way of populating an array of arrays? - What is the idiomatic way of declaring a fixed size array of arrays? If you certainly know that you need 4 rows with 2 columns, you should create a two-dimensional array: Dim c As New Float[4, 2] c[0, 0] = 1.23...