Re: C API vs PHP API, e.g. gtk_tree_selection_get_selection

From: Date: Tue, 24 May 2005 16:11:48 +0000
Subject: Re: C API vs PHP API, e.g. gtk_tree_selection_get_selection
References: 1 2 3 4  Groups: php.gtk.dev 
Request: Send a blank email to php-gtk-dev+get-1327@lists.php.net to get a copy of this message
Scott Mattocks wrote:
Markus Fischer wrote:
list($oModel, $oIter) = $tree->get_selection()->get_selected(); if ($oIter) { }
I would like to preface this with "I have no idea what I am talking about." That being said, what about an exception? If you are really trying to get the iter and it isn't initialized, I would think not having th iter would be an exception case. Therefore, I would expect to catch an exception. But I have never used this method/function in C or PHP so I may not understand the context properly.
It's valid that the selection returns no iter -> because nothing is selecting. I wouldn't do catch that .. this doesn't sound like an "exceptional" state to me. - Markus

« previous php.gtk.dev (#1327) next »