> But there is no GetName() method for the button object (or indeed any > Win32::GUI object). Slightly naughty, and I shouldn't be encouraging > this [1], but the object's name is stored in it's '-name' hash slot, so > you can replace: > print $self->GetName(), "\n"; > with > print $self->{-name}, "\n";
A handful of the attributes used to define the object seems available in this (unrecommended) manner. But is it possible to add attributes? Like for instance if I would like to store information about a widgets parent? I can not simply say $main->AddButton( -name => 'btOK', -parent => $main, ... Perl will not be complaining, but I can not retrieve the information later. And why do I want to do this? Maybe because I, very often, find myself thinking along the lines of DOM (Document Object Model), familiar to web developers. /Leif