Re: [Vala] Problem with notifications



On Wed, 2008-06-04 at 13:24 +0200, Juerg Billeter wrote:
On Wed, June 4, 2008 13:12, Maciej Piechotka wrote:
I have a read-only property. However in some cases it is changed within
the class (by _property). How to send notification about it?
To call notify I have to get ParamSpec which I can receive by
find_property
to which I need to access ObjectClass I don't know how to access.

I'd recommend you to only change the property directly, then, and declare
the property as follows:

    [Notify]
    public int foo { get; private set; }

Juerg


1. I've tried it and I've seen that the property is declared as rw in C
source.
2. I've change this value in the code several times (2 in ifs and 1 in
while). However I'd like to notify only once.

Regards

Attachment: signature.asc
Description: This is a digitally signed message part



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