Re: [Vala] [ANNOUNCE] Vala 0.19.0 - Compiler for the GObject type system

2013-02-20 Thread Nor Jaidi Tuah
> Changes since 0.18.1
>  * Support scope = "async" attribute for parameters.

Async parameters? Is that for delegate parameters?
Any pointers to further explanation?

Nice day
Nor Jaidi Tuah




PRIVILEGED/CONFIDENTIAL information may be contained in this message. If you 
are neither the addressee (intended recipient) nor an authorised recipient of 
the addressee, and have received this message in error, please destroy this 
message (including attachments) and notify the sender immediately. STRICT 
PROHIBITION: This message, whether in part or in whole, should not be reviewed, 
retained, copied, reused, disclosed, distributed or used for any purpose 
whatsoever. Such unauthorised use may be unlawful and may contain material 
protected by the Official Secrets Act (Cap 153) of the Laws of Brunei 
Darussalam. DISCLAIMER: We/This Department/The Government of Brunei Darussalam, 
accept[s] no responsibility for loss or damage arising from the use of this 
message in any manner whatsoever. Our messages are checked for viruses but we 
do not accept liability for any viruses which may be transmitted in or with 
this message.
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] [ANNOUNCE] Vala 0.19.0 - Compiler for the GObject type system

2013-02-20 Thread Duke Normandin
On Wed, 20 Feb 2013 22:48:41 +0100
Jürg Billeter  wrote:

> We are pleased to announce version 0.19.0 of Vala, a compiler for
> the GObject type system.
> 
> Vala 0.19.0 is now available for download at:
>http://download.gnome.org/sources/vala/0.19/
> 


Is there a Win7 binary package available somewhere?


-- 
   ,,,
  (  °>  dukeofp...@ml1.net
  ( / )  Linux User since 1995
  >| |<

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] [ANNOUNCE] Vala 0.19.0 - Compiler for the GObject type system

2013-02-20 Thread Jürg Billeter
We are pleased to announce version 0.19.0 of Vala, a compiler for the
GObject type system.

Vala 0.19.0 is now available for download at:
   http://download.gnome.org/sources/vala/0.19/

Changes since 0.18.1
 * Support scope = "async" attribute for parameters.
 * Add --api-version option.
 * Add atspi-2 bindings.
 * Add gstreamer-rtsp-server-1.0 bindings.
 * Bug fixes and binding updates.

Vala is a programming language that aims to bring modern programming
language features to GNOME developers without imposing any additional
runtime requirements and without using a different ABI compared to
applications and libraries written in C.

valac, the Vala compiler, is a self-hosting compiler that translates
Vala source code into C source and header files. It uses the GObject
type system to create classes and interfaces declared in the Vala source
code.

More information about Vala is available at

http://www.vala-project.org/


The Vala Team

---
Daiki Ueno (2):
  libxklavier: Add new bindings
  atspi-2: Add new bindings

Dan Callaghan (2):
  libxml-2.0: add xmlSearchNs and xmlSearchNsByHref
  libxml-2.0: fix Xml.Dtd property cnames

David Ma (1):
  posix: add Flock struct

Evan Nemerson (43):
  glib-2.0: generic-related improvements to Tree
  gstreamer-0.10: add GIR namespace and version info
  vapigen: support GIRDIRS variable in Makefile.vapigen
  glib-2.0: add generic type arguments to PtrArray sort callbacks
  gtk+-2.0, gtk+-3.0: the parameter passed to Gtk.init can be null
  gtk+-2.0, gtk+-3.0: fix FileChooserButton.with_dialog argument type
  clutter-1.0: remove "out" from several caller-allocates parameters
  atk: fix Util.add_global_event_listener callback type
  gio-2.0: assorted minor fixes
  girwriter: write GArray and GPtrArray to GIRs as arrays.
  glib-2.0: set GLib.GenericArray GIR name to PtrArray.
  glib-2.0: make MainContext.ref_thread_default return value owned
  atk: update bindings to account for changes made in atk
  libxml-2.0:  fix Html.Doc.new_no_dtd cname
  gdk-3.0: do not implicitly pass array length to property_change
  clutter-1.0: avoid deprecation warning for BinLayout constructor
  clutter-1.0: undeprecate BinAlignment enum.
  glib-2.0: mark Thread.set_priority and Thread.foreach as deprecated
  clutter-1.0:  fix Color.get_static return value
  gdl-3.0: update to 3.7.3
  libxml-2.0: add some schema-related bindings
  x11: add Display.list_properties and XA_STRING
  x11: add has_destroy_function = false to WindowAttributes
  vapigen.m4: emit error if no GOBJECT_INTROSPECTION_* macro is called
  posix: add read_vectors and write_vectors
  x11: add VisualInfo bindings
  libxml-2.0: revert 5fcabbfa
  curses: make Curses.Color a struct with the correct cname
  glib-2.0: use g_fopen for FileStream.open
  Regenerate many GIR-based bindings
  girwriter: fix name of *Class structs for nested types in GIRs
  girparser: be a bit more forgiving about unexpected elements in a GIR
  glib-2.0: add missing C header for g_fopen
  x11: set Event GIR name to XEvent
  Remove libxklavier bindings.
  vte-2.90: remove some obsolete metadata
  girparser: add support for "floating" metadata argument
  girparser: warn instead of error on unrecognized metadata arguments
  glib-2.0: add StringBuilder.insert_len and overwrite* bindings
  glib-2.0: fix g_variant_new_fixed_array binding
  girparser: mark non-simpletype struct return values as nullable
  vapis: regenerate GIR-based bindings
  gtk+-3.0: make drag_begin event arg nullable

Jan Dvořák (1):
  linux: Make If* enums public

Jasper St. Pierre (1):
  valagirparser: Ignore the new instance-parameter tag

Jürg Billeter (8):
  Bump version suffix
  codegen: Do not call g_type_init when targeting GLib >= 2.36
  Fix source reference of switch sections
  gtk+-3.0: Fix gtk_css_provider_get_named binding
  gstreamer-1.0: Update to 1.0.2
  Add --api-version option
  gtk+-3.0: Update to 3.6.2
  Release 0.19.0

Luca Bruno (11):
  libgsf-1: No array length for Infile.child_by_aname.names
  Support scope = "async" on parameters.
  gio-2.0: Add throws to DBusProxy.new and .create_for_bus
  libgsf-1: Fix type_id to match the unusual libgsf convention
  gstreamer-0.10: Fix Element.request_pad
  codegen: Fix passing nullable structs to non-nullable parameters
  libgsf-1: Use uint8[] for InputMemory creation methods
  Document --api-version in the man page
  resolver: Accept children of DeleteStatement
  gstreamer-interfaces-0.10: Fix cheader_filename of StreamVolume
  posix: Add fchmod

Marcin Lewandowski (1):
  gstreamer-0.10: add some deprecation annotations

Martin Pitt (2):
  posix: Fix superfluous array length argument for realpath()
  posix: Add binding for major(), minor(),

Re: [Vala] Generics and .to_string()

2013-02-20 Thread Eric Gregory
On Wed, Feb 20, 2013 at 12:42 PM, Albert Hopkins wrote:

>
> I guess I could write the interface, but what I want to be able to do
> is, e.g., simply create a type by passing an int to the generic, then
> have the class be able to see if it's type (int in this example). has a
> to_string() method.
>

Unfortunately you're going to have to look for a different solution here;
GObject and Vala don't support Java-style reflection of methods.

 - Eric
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Generics and .to_string()

2013-02-20 Thread Albert Hopkins


On Wed, Feb 20, 2013, at 08:29 AM, JM wrote:
> 
> There is no such but you can write that interface:
> 
> For example:
> 
> public interface IStringable {
> public string get_string();
> }
> 

I guess I could write the interface, but what I want to be able to do
is, e.g., simply create a type by passing an int to the generic, then
have the class be able to see if it's type (int in this example). has a
to_string() method.  For example:

public interface IStringable {   
public abstract string to_string();  
}

  
public class StringableClass : IStringable, Object { 
public string to_string() {  
return "foo";
}
}

  
public class NotStringableClass : Object {   
}

  
public class Printer {
T obj;   

  
public Printer(T val) {  
obj = val;   
}

  
public void print() {
if (obj is IStringable) {
stdout.printf("%s\n", ((IStringable) obj).to_string());  
} else { 
stdout.printf("Not printable.\n");   
}
}
}

  
void main() {
var i = 10;  
var yes = new StringableClass(); 
var not = new NotStringableClass();  

  
var i_p = new Printer(i);   
var yes_p = new Printer(yes);   
var not_p = new Printer(not);

  
yes_p.print();   
not_p.print();
stdout.print("%s\n", i.to_string()); 
i_p.print(); 
}

valac compiles this fine, but when it gets to i_p.print() it segfaults.

What I want to be able to do is say "yes, I see that int has a
to_string() method" and call it.
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Generics and .to_string()

2013-02-20 Thread Eric Gregory
On Wed, Feb 20, 2013 at 4:51 AM, Albert Hopkins wrote:

> ((Object) property).to_string() tells me that GLib.Object has no
> to_string() (I thought it did, but may have confused it with C#'s
> object.
>

Have you looked at Valadoc.org?  The reference for (G)Object is here:
http://www.valadoc.org/#!api=gobject-2.0/GLib.Object

 - E
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Generics and .to_string()

2013-02-20 Thread JM

There is no such but you can write that interface:

For example:

public interface IStringable {
public string get_string();
}

...extendable as needed.
BestRegards


Am Mittwoch, den 20.02.2013, 07:51 -0500 schrieb Albert Hopkins:



___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Generics and .to_string()

2013-02-20 Thread Albert Hopkins
I would like to use a Generic class, so

class MyClass {
T property;
...
public void Print() {
stdout.printf(property.to_string())
}
}


The compiler fails with:

The name `to_string' does not exist in the context of `T'

And that does kinda make sense to me, the question is.. I guess in a
generic fashion:

How can I call a method on a Generic type?  For the above example, I've
tried casting:

((Object) property).to_string() tells me that GLib.Object has no
to_string() (I thought it did, but may have confused it with C#'s
object.

(string) property compiles but segfaults.

Is there an Interface for to_string() i can check for, e.g:

if (property is IStringable) ((IStringable) property).to_string()

Thanks,
-a
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list