• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CI and Netbeans IDE 7.1.1

#1
[eluser]htheus[/eluser]
Hi all

I am using netbeans IDE for codeing. I managed to get autocomplete working by adding the properties on the top of the the controller and model classes

/**
* @property CI_DB_active_record $db
* @property CI_DB_forge $dbforge
* @property CI_Controller $controller
* @property CI_Email $email
* @property CI_Encrypt $encrypt
* @property CI_Lang $lang Language Class
* @property CI_Loader $load Loads views and files
* @property CI_Log $log Logging Class
* @property CI_Model $model CodeIgniter Model Class
* @property CI_Security $security Security Class, xss, csrf, etc...

etc.. etc ..
*/

I still got a autocompletation problem within the following code:

public function getEntry($_id) {
$data = array();
$options = array('id' => $_id);
$Q = $this->db->get_where($this->table_name, $options, $limit);
if ($Q->num_rows() > 0) {
$data = $Q->row_array();
}
$Q->free_result();
return $data;
}

If i type "$Q->" .. autocomplete should "propose me" f.ex. result_array() or free_result()

Anyone had the same issue and could already reslove it?

Thx for your answer
Greetings forom ZH

Han


#2
[eluser]htheus[/eluser]
Hmm found a workaround (but i think there is a better solution for it)

adding (phpDoc)

* @property CI_DB_result $query


and instead of

$Q = $this->db->get_where($this->table_name, $options, $limit);

i use

$this->query = $this->db->get_where($this->table_name, $options, $limit);

so the autocompletation works fine ...


#3
[eluser]CroNiX[/eluser]
See this thread: http://ellislab.com/forums/viewthread/176280/

#4
[eluser]htheus[/eluser]
Cool thx.

"Updated my CI_Controller Class :-)

and it works well!


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.