Search found 766 matches
- Friday 13th May 2022 2:57am
- Forum: Beginners
- Topic: switch to previous instance
- Replies: 4
- Views: 247
Re: switch to previous instance
i have a routine for this sort of thing using DBus, i call it single instance. when app is run it creates a DBus interface and sets the DBus.Unique property. if app is run again it cannot create the DBus interface so it knows to send the args/command to the first instance via DBus message and exit. ...
- Tuesday 15th February 2022 10:42am
- Forum: Beginners
- Topic: Explicit type conversion
- Replies: 8
- Views: 1330
Re: Explicit type conversion
I may have over-complicated that and thought maybe this is all you need... Dim my As AbstractLoader my = MyTestA() PS. that coding style implies MyTestA is a Function that returns an instance of AbstractLoader (so it MUST end in parenthesis() if it returns something) Public Sub MyTestA() As Abstract...
- Tuesday 15th February 2022 10:34am
- Forum: Beginners
- Topic: Explicit type conversion
- Replies: 8
- Views: 1330
Re: Explicit type conversion
PS. You can also assign a variable pointer of the required type to an Object Ie.. Public Sub ObjectExample(obj As Object) Select Object.Type(obj) Case "Window" Dim w As Window = obj ' make a Window variable and assign obj to it w.Resize(400,400) ' Now w. has the window properties/methods in the form...
- Tuesday 15th February 2022 10:27am
- Forum: Beginners
- Topic: Explicit type conversion
- Replies: 8
- Views: 1330
Re: Explicit type conversion
Yes Object is the best type to use as it can be anything. You can use Object.Propertyname for any object type but the property name must exists. Object.Type() can be used to determine the variable type Here is a Function i made for when loading my apps settings. I use it to set the values of my form...
- Monday 14th February 2022 8:26pm
- Forum: General
- Topic: Where are the icons?
- Replies: 5
- Views: 964
- Sunday 13th February 2022 6:00pm
- Forum: General
- Topic: Where are the icons?
- Replies: 5
- Views: 964
Re: Where are the icons?
$HOME/.local/share/icons/Gambas
I'm not too sure if that's all to be fair
have a gander at gb.form.stock source
all folders in my /.local/share/icons/ dir are from gambas
I'm not too sure if that's all to be fair
have a gander at gb.form.stock source
all folders in my /.local/share/icons/ dir are from gambas
- Sunday 13th February 2022 12:10pm
- Forum: Beginners
- Topic: Lambda, anonymous functions, assign function to variable, etc.
- Replies: 4
- Views: 845
Re: Lambda, anonymous functions, assign function to variable, etc.
Is it possible to assign a function to a variable or pass a function to another function? Or is creating a separate class for each function the only way to do it like old Java? Also there is using the 3 dots and Param.class if it's a variadic expression you want. See http://gambaswiki.org/wiki/lang...
- Sunday 13th February 2022 11:33am
- Forum: Beginners
- Topic: Lambda, anonymous functions, assign function to variable, etc.
- Replies: 4
- Views: 845
Re: Lambda, anonymous functions, assign function to variable, etc.
Is it possible to assign a function to a variable or pass a function to another function? Or is creating a separate class for each function the only way to do it like old Java? You could also use a Property in any class then reading the property is actually a function. Property MyPropertyName As Va...
- Saturday 12th February 2022 7:08pm
- Forum: Beginners
- Topic: Lambda, anonymous functions, assign function to variable, etc.
- Replies: 4
- Views: 845
Re: Lambda, anonymous functions, assign function to variable, etc.
Is it possible to assign a function to a variable or pass a function to another function? Or is creating a separate class for each function the only way to do it like old Java? Possibly find what you are looking for with Object.Call() http://gambaswiki.org/wiki/comp/gb/object/call Then you can pass...
- Saturday 12th February 2022 12:28pm
- Forum: Beginners
- Topic: Catch events on several forms
- Replies: 7
- Views: 1194
Re: Catch events on several forms
Sorry i was a little low on time yesterday but had more time today, I have edited your posted project to use Observer.class Notes.. Using Object.Attach will "Detach" the object from where it is attached to and has to be re-attached, Observer will intercept and only not trigger the original handler i...