reading value from an Gtkentry() ?

From: Date: Tue, 07 Aug 2001 21:52:26 +0000
Subject: reading value from an Gtkentry() ?
Groups: php.gtk 
Request: Send a blank email to php-gtk+get-2587@lists.php.net to get a copy of this message
hi, i played around with php-gtk for a little while, i followed a few tutorials, read through source code and im now able to create containers, boxes, buttons, entry fields, new windows etc etc... but im totaly lost on 'business logic' side of things here. my question: for instance, how does one connect a button to an entry field so that the typed in text gets stored in a var after clicking the button? example code snippet of how i expected it to work: ------------------------------------------- // a var to store the result in $daText=""; // a happy entry field $anEntry = &new Gtkentry(); $anEntry->select_region(0,5); $aBox->pack_start($anEntry); $anEntry->show(); // a jolly button $aButton->&new Gtkbutton('OK'); $aButton->connect('clicked','dosomething($anEntry)'); // doesnt work! $aBox->pack_start($aButton); $aButton->show(); // this following function is also wrong but it might give you the // general idea of what im trying to accomplish function dosomething($entryObj){ $daText=$entryObj->getValue(); } ------------------------------------------- hope someone can help me out here since there isnt any nice documentation yet, that is, i havent found any yet. but i really like this gtk stuff allready!

« previous php.gtk (#2587) next »