Re: [Vala] Printfing an object



Hello Donn,

2013/11/17 Donn <donn ingle gmail com>

Plus, how could I get that printf "%p" address (e.g "0x7fff70ffbb98") into
a string variable?


"%p".printf(your_object)

btw, you don't need & when dealing with instances of classes, and if your
classes inherit from GLib.Object, you can use your_object.get_type().name()
(I'm writing this from memory, there may be an error) to get the type name.

HTH,
Abderrahim


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