Re: [Vala] C# developer, newbie question

2018-12-19 Thread Andy Lees via vala-list
I believe it's because the string produced in your first assignment to
strState is the C transformed enum value which concatenates the type and
value with an "_".  It does this to map the nested name space of Vala enums
into the flat C name space.  You would need to remove the type + "_" from
the returned string to create the associated enum value.

On Wed, Dec 19, 2018 at 10:28 PM Wolfgang Mauer 
wrote:

> Hi all,
> i try to put a enum to string and back, with no success.
>
> var strState = get_window().get_state().to_string(); <--
> "GDK_WINDOW_STATE_FOCUSED"
>
> and back dont work
>
> EnumClass enumc = (EnumClass)typeof(Gdk.WindowState).class_ref ();
> var state = (Gdk.WindowState)enumc.get_value_by_name(strState).value;
>
> What im doing wrong?
>
> Thanks for help
>
> Wolfgang
>
>
> ___
> vala-list mailing list
> vala-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/vala-list
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Newbie need help

2018-09-30 Thread Andy Lees via vala-list
I find Anjuta to be usable, good for setting up projects and ok for
debugging (you have to have some understanding of the Gobject structure to
use it though, and "this." is "self->"). Anjuta ctags understands Vala, so
go to declaration works, etc. Symbol completion is pretty good, and
generally understands the context of the completion.

Mostly however, I use Sublime Text with the Vala package installed (Vala
and Vala-TMBundle - not sure if the second helps, but I've had it installed
from way back).  Install the ctags package and make sure to set up ctags to
use anjuta-ctags.  Here are my ctags settings:
{
  "debug": true,
  "autocomplete": true,
  "opts" : ["-V", "--languages=Vala", "--exclude='Make*'",
"--exclude='Optimized/*'", "--exclude='Debug/*'"],
  "command": "/usr/bin/anjuta-tags"
}

Mostly I set up projects using Anjuta, and then use autogen.sh with
suitable CTAGS options to regenerate the project, "make" to make it and gdb
for debugging.  In gdb ^X^A and ^XA are very useful keystrokes for going in
to/out of visual mode. My gdb settings are:

set print pretty on
set confirm off
set height 0
set width 0
set history save on

def cl
  if $argc == 0
tbreak +1
continue
  else
tb $arg0
continue
  end
end

def jb
  if $argc == 1
tbreak $arg0
jump $arg0
  end
end

def fatalc
  set environment G_DEBUG = fatal-criticals
end

I have found Vala/glib and associated libraries to be a highly productive
development tool, better than C++ in general despite a few peculiarities.
It has simpler semantics more suitable for my typical work.  It does take a
bit of getting used to, but I hope you'll find it worthwhile.

Good Luck!

On Mon, Oct 1, 2018 at 8:13 AM Wolfgang Mauer 
wrote:

> Well, for beginner's like me, I think auto-completion is very important and
> a "must"
>
> Wolfgang
>
> -Ursprüngliche Nachricht-
> Von: Vivien Kraus 
> Gesendet: Montag, 1. Oktober 2018 00:03
> An: Wolfgang Mauer 
> Cc: vala-list@gnome.org
> Betreff: Re: [Vala] Newbie need help
>
>
> Wolfgang Mauer writes:
>
> Hello,
>
> > Hi all,
> > I'm a C# developer (MS/MONO) and like to try vala.
> > I'm wondering there is not a really useful IDE?!
> >
> > Current i use Monodevelop/VS2017 to develop C# programs and debug my
> > application.
> > This is very comfortable for writing and debugging.
> >
> > I tried glade-builder and anjuta, but both are not really usable.
> >
> > Does that mean that vala-dvelopers must use command-line tools? (Back
> > to the 80's ;-))
>
> I like to use a text editor, but if you want an IDE then it seems that
> GNOME
> builder is the way to go: https://wiki.gnome.org/Apps/Builder
>
> Vivien
> >
> > Please give me a hand if there are some useful IDE's.
> >
> > /
> > Wolfgang
> >
> > ___
> > vala-list mailing list
> > vala-list@gnome.org
> > https://mail.gnome.org/mailman/listinfo/vala-list
>
>
> ___
> vala-list mailing list
> vala-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/vala-list
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list