hi;

On 2 October 2013 11:41, Alessandro Re <[email protected]> wrote:
> thanks for your suggestion about Rectangle, I missed that although I was
> keeping an eye about deprecated methods (d'oh!)
>
> May I suggest, if possible, to explicitly mark Rectangle as deprecated class
> *on its own page*?

it's weird, because the class is marked as deprecated:

https://git.gnome.org/browse/clutter/tree/clutter/deprecated/clutter-rectangle.c?h=clutter-1.16#n26

it used to be propagated to all symbols on that class. it probably has
to do with the fact that we're not using global pre-processor symbols,
and instead we're using compiler annotations.

I'll open a bug so that I don't forget to fix this before the next release.

> The incomplete tutorial - which I have to fix after this new discovery -
> should be available here: http://goo.gl/LkQUfy
>
> **Any comment is highly appreciated** (I believe you can comment directly on
> the document if you have a Google Account).

thanks! I'll have a look as soon as possible.

ciao,
 Emmanuele.

> On Wed, Oct 2, 2013 at 12:20 PM, Emmanuele Bassi <[email protected]> wrote:
>>
>> hi;
>>
>> On 2 October 2013 10:32, Alessandro Re <[email protected]> wrote:
>>
>> > Oh, and I am writing a tutorial as I go, so, if you want, I can submit
>> > it
>> > for a review.
>>
>> thanks, that would be very much appreciated.
>>
>> > I was experimenting with layout managers, and I tried to create a simple
>> > button in this way:
>> >
>> > 1. created an Actor()
>> > 2. created a Rectangle()
>> > 3. created a Text()
>> > 4. make Text and Rectangle child of Actor
>> > 5. set BinLayout() onto Actor.
>> >
>> > And this seems to work fine. Then I tried without the Actor, placing the
>> > Text directly on the Rectangle ( rect.add_child(text) ), using the
>> > BinLayout
>> > ( rect.set_layout_manager(BinLayout()) ), but without success: the Text
>> > seems to be vanished, I can not see it (also tried with the show()
>> > method).
>>
>> Clutter.Rectangle is a deprecated class, and should not be used in
>> newly written code. you can effectively replace it with a simple
>> Clutter.Actor with a background color, or (in case you need fancier
>> drawing features like borders or rounded corners) with a
>> Clutter.Canvas content.
>>
>> I would not use a deprecated class in a tutorial either.
>>
>> > Can someone please explain me why it is so?
>> > Maybe Rectangles are not made to have a layout manager?
>> > Should I use always a third Actor for this kind of tasks?
>>
>> the reason you don't see a child of a Clutter.Rectangle is that
>> Rectangle does not paint its children, for backward compatibility. you
>> can add children to it, but they will never be painted — unless you
>> subclass Clutter.Rectangle and override the `paint` virtual function.
>>
>> again, I strongly encourage you not to use deprecated functionality,
>> especially when creating documentation.
>>
>> I look forward to reading your tutorial!
>>
>> ciao,
>>  Emmanuele.
>>
>> --
>> W: http://www.emmanuelebassi.name
>> B: http://blogs.gnome.org/ebassi/
>
>



-- 
W: http://www.emmanuelebassi.name
B: http://blogs.gnome.org/ebassi/
_______________________________________________
clutter-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/clutter-list

Reply via email to