Hi:
> ```
> static bool is_empty(string str) {
> return str[0] == '\0' || str == null;
> }
> ```
>
> However, running my code, I get the following message repeatedly in my
> terminal: ** (main.exe:2288): CRITICAL **: is_empty: assertion 'str !=
> NULL' failed
>
> What am I doing wrong?
You
On 16/01/2017 17:50, Al Thomas wrote:
> - Original Message -
>> From: Alexandre Oliveira
>> Sent: Monday, 16 January 2017, 19:27
>> Subject: Re: [Vala] How to check if string is empty
>
>> I tried this in my method, even replacing 'string' for 'string?', but I
>>
- Original Message -
> From: Alexandre Oliveira
> Sent: Monday, 16 January 2017, 19:27
> Subject: Re: [Vala] How to check if string is empty
> I tried this in my method, even replacing 'string' for 'string?', but I
> still get the same message in my terminal.
>
Le lundi 16 janvier 2017 à 17:27 -0200, Alexandre Oliveira a écrit :
> I tried this in my method, even replacing 'string' for 'string?', but
> I
> still get the same message in my terminal.
>
> What is your suggestion to suppress these messages?
The following snippet works perfectly fine:
Hi Alexandre,
In Vala you can simply just check for str != "", this is enough.
Regards,
Dmitry
16.01.2017, 21:28, "Alexandre Oliveira" :
> I tried this in my method, even replacing 'string' for 'string?', but I
> still get the same message in my terminal.
>
> What is your
I tried this in my method, even replacing 'string' for 'string?', but I
still get the same message in my terminal.
What is your suggestion to suppress these messages?
On 16/01/2017 17:23, Guillaume Poirier-Morency wrote:
> You should test for nullity before addressing the string.
>
> return
Hello!
I've just heard about Vala and I've been messing around with it these
past days.
However, I came across a problem. I need to check if some strings aren't
empty, and I realized there's no method in Vala that's equivalent to
C#'s `string.IsNullOrEmpty(string)`.
I tried setting up a static
Hi all:
Just a note to comment that there is a branch in Autovala with support
for Meson. I will wait for, at least, one positive comment in github
before merging it in master, just in case.
If you want to try it, just download the "meson" branch from
Thanks, sometimes I get stuck in the most elementary (but I'm still
learning)
El 16/01/17 a las 13:02, Al Thomas escribió:
> - Original Message -
>
>> From: "webie...@gmail.com"
>> Sent: Monday, 16 January 2017, 11:35
>> Subject: [Vala] Stop Gtk.Spinner?
>> how can I
- Original Message -
> From: "webie...@gmail.com"
> Sent: Monday, 16 January 2017, 11:35
> Subject: [Vala] Stop Gtk.Spinner?
> how can I stop this widget in Genie when I press a key?
You've not fully understood the concept of scope.
In your constructor, the line:
how can I stop this widget in Genie when I press a key?
// compila con valac --pkg gtk+-3.0 nombre_archivo.gs
uses Gtk
init
Gtk.init (ref args)
var test = new TestVentana ()
test.show_all ()
Gtk.main ()
class TestVentana: Window
spinner: Gtk.Spinner
init
11 matches
Mail list logo