[gnome-devel-docs] vala tutorials: remove reference to [CCode (instance_pos = -1)]



commit e43a4de39d71ec25f07d2b5b3fac7842cae27a16
Author: Tiffany Antopolski <tiffany antopolski gmail com>
Date:   Tue Feb 21 19:54:30 2012 +0100

    vala tutorials: remove reference to [CCode (instance_pos = -1)]
    
    This has been removed in the development version, so keeping docs
    upto date.

 platform-demos/C/guitar-tuner.vala.page |    5 ++---
 platform-demos/C/image-viewer.vala.page |    2 --
 2 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/platform-demos/C/guitar-tuner.vala.page b/platform-demos/C/guitar-tuner.vala.page
index f229f6b..00e975a 100644
--- a/platform-demos/C/guitar-tuner.vala.page
+++ b/platform-demos/C/guitar-tuner.vala.page
@@ -198,14 +198,13 @@ private void play_sound(double frequency)
   <p>To do this, in the user interface file (guitar_tuner.ui) select one of the buttons by clicking on it, then open <file>guitar_tuner.vala</file> (by clicking on the tab in the center). Switch to the <gui>Signals</gui> tab on the right, which you used to set the signal name. Now take the row where you set the
 <gui>clicked</gui> signal and drag and drop it into to the source file at the beginning of the class. The following code will be added to your source file:</p>
 <code mime="text/x-valasrc"><![CDATA[
-[CCode (instance_pos=-1)]
 public void on_button_clicked (Gtk.Button sender) {
 
 }]]></code>
 
  <note><p>You can also just type the code at the beginning of the class instead of using the drag and drop.</p></note>
-  <p>This signal handler has only one argument: the <link href="http://valadoc.org/gtk+-3.0/Gtk.Widget.html";><code>Gtk.Widget</code></link> that called the function (in our case, always a <link href="http://valadoc.org/gtk+-3.0/Gtk.Button.html";><code>Gtk.Button</code></link>). The additonal <code>[CCode (instance_pos=-1)]</code> tells the compiler that this is a signal handler
-that needs special treating while linking in order to be found at runtime.</p>
+  <p>This signal handler has only one argument: the <link href="http://valadoc.org/gtk+-3.0/Gtk.Widget.html";><code>Gtk.Widget</code></link> that called the function (in our case, always a <link href="http://valadoc.org/gtk+-3.0/Gtk.Button.html";><code>Gtk.Button</code></link>).
+</p>
 </section>
 
 
diff --git a/platform-demos/C/image-viewer.vala.page b/platform-demos/C/image-viewer.vala.page
index e9db46d..a03d75c 100644
--- a/platform-demos/C/image-viewer.vala.page
+++ b/platform-demos/C/image-viewer.vala.page
@@ -82,7 +82,6 @@ public class Main : Object
 		window.destroy.connect(on_destroy);
 	}
 
-	[CCode (instance_pos = -1)]
 	public void on_destroy (Widget window)
 	{
 		Gtk.main_quit();
@@ -205,7 +204,6 @@ public Main () {
 button we mentioned before.
   Add this code after the constructor:</p>
   <code mime="text/x-valasrc"><![CDATA[
-[CCode (instance_pos = -1)]
 public void on_open_image (Button self) {
 	var filter = new FileFilter ();
 	var dialog = new FileChooserDialog ("Open image",



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]