Search found 195 matches

by bill-lancaster
Monday 3rd April 2023 3:27pm
Forum: General
Topic: Problem with installing gambas3
Replies: 7
Views: 1089

Problem with installing gambas3

I found that my gambas3 ide was behaving strangely, couldn't view console, keyboard hanging up etc. Decided to reinstall with:- sudo apt update, then sudo apt-get install gambas3 but get these messages:- bill@bill-Vostro-3470:~$ sudo apt-get install gambas3 [sudo] password for bill: Reading package ...
by bill-lancaster
Monday 29th August 2022 6:38am
Forum: General
Topic: Raise event in custom component
Replies: 7
Views: 1279

Re: Raise event in custom component

Thanks Bruce,
Putting the raise event in _Ready() doesn't work.
I've been running the event from the parent form but was trying to skip this step.
In the _new() sub, the table is filled with data and the first line is selected. At the moment gridview_Arrange() works fine.
Thanks again
by bill-lancaster
Sunday 28th August 2022 4:46pm
Forum: General
Topic: Raise event in custom component
Replies: 7
Views: 1279

Re: Raise event in custom component

Thanks cogier, GridView1_Arrange() does the job.
'Raise ChangeCat' in _new() doesn't work.
Thanks again
by bill-lancaster
Sunday 28th August 2022 2:43pm
Forum: General
Topic: Raise event in custom component
Replies: 7
Views: 1279

Re: Raise event in custom component

Thanks Bruce,
This control draws 2 gridviews , a buttonbox etc all inside a Frame (hFrame) on the parent form so hFrame doesn't have a _Open or _Show event.
Have just tried hFrame_Activate() and hFrame_GotFocus() but these events aren't triggered.
Hope this makes sense.
by bill-lancaster
Sunday 28th August 2022 11:22am
Forum: General
Topic: Raise event in custom component
Replies: 7
Views: 1279

Raise event in custom component

I have a custom component containing a gridview which is populated and the first row selected in the _new() procedure.

Clicking on a row in the gridview raises an event ('ChangeCat' in my project).

How to raise this event as soon as the control is loaded (i.e. with no further user action)?
by bill-lancaster
Sunday 21st August 2022 7:09am
Forum: General
Topic: Music controls
Replies: 7
Views: 1316

Re: Music controls

I've just seen mps-youtube (and others) on the command line which I think could be run from EXEC[].
Just a thought!
by bill-lancaster
Tuesday 12th July 2022 1:29pm
Forum: General
Topic: Maximum value in an array
Replies: 6
Views: 1499

Re: Maximum value in an array

No problem Bruce, it was a useful discussion I'm just surprised its not a buit-in function e.g. MyArray.MaxValue.
Anyway thanks again.
by bill-lancaster
Tuesday 12th July 2022 10:10am
Forum: General
Topic: Maximum value in an array
Replies: 6
Views: 1499

Re: Maximum value in an array

Of course! I spotted my mistake earlier and found that this works:- fTemp = MyArrayOfNumbers.Copy(0, MyArrayOfNumbers.Max) fTemp.Sort() Print fTemp[0];; fTemp[fTemp.Max] But your solution using MinVal = MyArrayOfNumbers[0] works fine and as you say, iteration is quicker than .Copy. Thanks for your h...
by bill-lancaster
Tuesday 12th July 2022 9:06am
Forum: General
Topic: Maximum value in an array
Replies: 6
Views: 1499

Re: Maximum value in an array

Thanks Bruce, That's a nice idea but MinVal is always zero! Also, copying the array of values into a temporary array then sorting it strangely sorts the original array. Dim MyArrayOfNumbers As Integer[] = [99, 91, 93, 92, 95, 90, 95, 100, 90, 90, 99] Dim fTemp As Integer[] fTemp = MyArrayOfNumbers f...
by bill-lancaster
Monday 11th July 2022 8:26am
Forum: General
Topic: Maximum value in an array
Replies: 6
Views: 1499

Maximum value in an array

What is the best way to determine the max or min value in array?
At the moment I'm copying the array to a temporary array, sorting it then using array.max