Re: [Vala] Access GTKText

2014-01-15 Thread Gilzad Hamuni
Perfect!
Thank you so much for the info and the helpful example file!
Interesting to learn that insert_with_tags(..) can receive many parameters of a 
TextTag in order to apply many properties (red, bold, fixed) at once.
 
Thanks once again for the great help.
 
Best,
 
gilzad
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Question about some wiki content

2014-01-15 Thread Steven Oliver
I'm looking at
https://wiki.gnome.org/Projects/Vala/ReferenceHandling

In the section titled Memory management for compact classes with reference
counting the custom up function, as expected, increments the reference
count. The custom down function though does not. I would think it should.

Should it? I'll update the wiki if I get confirmation.

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


Re: [Vala] Question about some wiki content

2014-01-15 Thread Luca Bruno

On 15/01/2014 17:50, Steven Oliver wrote:

I'm looking at
https://wiki.gnome.org/Projects/Vala/ReferenceHandling

In the section titled Memory management for compact classes with reference
counting the custom up function, as expected, increments the reference
count. The custom down function though does not. I would think it should.

It does decrease the ref_count.
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Question about some wiki content

2014-01-15 Thread Steven Oliver
The decrement inside the IF is permanent? Even if the IF statement
evaluates to false?

public void down () {
if (--ref_count == 0) {
delete (void*) this;
}
}

Steven N. Oliver


On Wed, Jan 15, 2014 at 12:28 PM, Luca Bruno lethalma...@gmail.com wrote:

 On 15/01/2014 17:50, Steven Oliver wrote:

 I'm looking at
 https://wiki.gnome.org/Projects/Vala/ReferenceHandling

 In the section titled Memory management for compact classes with
 reference
 counting the custom up function, as expected, increments the reference
 count. The custom down function though does not. I would think it
 should.

 It does decrease the ref_count.
 ___
 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] Question about some wiki content

2014-01-15 Thread Jonas Kulla
2014/1/15 Steven Oliver oliver.ste...@gmail.com

 The decrement inside the IF is permanent? Even if the IF statement
 evaluates to false?

 public void down () {
 if (--ref_count == 0) {
 delete (void*) this;
 }
 }

 Steven N. Oliver


Yes, this is basic C syntax:
http://en.wikipedia.org/wiki/Increment_and_decrement_operators
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list