[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.tools.pdt] Re: Code Assist not working for Informix functions
|
OK, it's a super FAQ.
$db = new mysqli($host, $username, $passwd, $dbname);
$db->
In this case, you must be able to get code assist.
However, for example,
function init() {
global $db;
...
$db = new mysqli($host, $username, $passwd, $dbname);
...
}
...
init();
$db->
In this case, you cannot get code assist because the scope is different.
$db in init() is typed as mysqli ($db has type of mysqli), but $db in
main() is not typed (type is unknown).
So you have to describe the type.
/* @var db mysqli */
$db->
btw,
This will be improved in the next version of PDT, maybe...
--
Sorry for my English.
I wouldn't like to explain all other variations.