NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
code completion within functions


Joined: 07 Apr 2004
Posts: 34
Reply with quote
Hi,

I have set-up a class and in the class are obviously functions.

These function link to other classes and load them in accordingly.

However the code completion does not seem to work when I am within the function, within the class.

I am sure it was working before I upgraded, I am using 3.3.1 (3354)

here is the code I am using

Code:
<?php
if ( !class_exists( "security" ) ) include( "../business_class/security.inc" ) ;
if ( !class_exists( "user" ) ) include( "../data/user.inc" ) ;

class update_profile{

    var $pvars = null;
    var $gvars = null;

    function update_profile( $pvars = null, $gvars = null ){

        $this->pvars = $pvars;
        $this->gvars = $gvars;

    }

    function update_user(){

        $user = new user();
        $security = new security();

        $user->set_id( $gvars["userid"] );
        $user->retrivedb();

        $user->


which uses this class

Code:
class user extends dbaccess {
   function user () {
      $this->classname = "user";
      $this->tablename = "user";
      $this->dbinstance = "stadatabase";
      $this->database = new $this->dbinstance;
      $this->fldarray = array('rID','cID','first_name','last_name','type','title','department','report_to','mobile','telephone','fax','email','date_created','lastupdated','status','username','password','job_title');
   }
   function get_id () {
      return $this->id;
   }
   function set_id($x) {
      $this->id= $x;
   }
   function set_rID ($x) {
      $this->rID = $x;
   }
   function get_rID () {
      return $this->rID;
   }
   function set_cID ($x) {
      $this->cID = $x;
   }
   function get_cID () {
      return $this->cID;
   }
   function set_first_name ($x) {
      $this->first_name = $x;
   }
   function get_first_name () {
      return $this->first_name;
   }
   function set_last_name ($x) {
      $this->last_name = $x;
   }
   function get_last_name () {
      return $this->last_name;
   }
   function set_type ($x) {
      $this->type = $x;
   }
   function get_type () {
      return $this->type;
   }
   function set_title ($x) {
      $this->title = $x;
   }
   function get_title () {
      return $this->title;
   }
   function set_department ($x) {
      $this->department = $x;
   }
   function get_department () {
      return $this->department;
   }
   function set_report_to ($x) {
      $this->report_to = $x;
   }
   function get_report_to () {
      return $this->report_to;
   }
   function set_mobile ($x) {
      $this->mobile = $x;
   }
   function get_mobile () {
      return $this->mobile;
   }
   function set_telephone ($x) {
      $this->telephone = $x;
   }
   function get_telephone () {
      return $this->telephone;
   }
   function set_fax ($x) {
      $this->fax = $x;
   }
   function get_fax () {
      return $this->fax;
   }
   function set_email ($x) {
      $this->email = $x;
   }
   function get_email () {
      return $this->email;
   }
   function set_date_created ($x) {
      $this->date_created = $x;
   }
   function get_date_created () {
      return $this->date_created;
   }
   function set_lastupdated ($x) {
      $this->lastupdated = $x;
   }
   function get_lastupdated () {
      return $this->lastupdated;
   }
   function set_status ($x) {
      $this->status = $x;
   }
   function get_status () {
      return $this->status;
   }
   function set_username ($x) {
      $this->username = $x;
   }
   function get_username () {
      return $this->username;
   }
   function set_password ($x) {
      $this->password = $x;
   }
   function get_password () {
      return $this->password;
   }

    function set_job_title ($x) {
      $this->job_title = $x;
   }
   function get_job_title () {
      return $this->job_title;
   }
   
   function get_userIDByName($x) {

      $sql = "select id,";
      for ($i=0;$i<count($this->fldarray);$i++) {
               
         $sql .= sprintf(" %s,",$this->fldarray[$i]);

      }
      $sql = preg_replace("/\,$/","",$sql);
      $sql .= " from " . $this->tablename . " where 1=1 and username = '" . $x ."'";
      //print "SQL ID " . $sql;
      $this->sqlstatement($sql);

   }
   
   
   function get_optionList($selected=null, $cID, $sort=null) {
      
      $this->set_profile( " and cid = '" . $cID . "' " . $sort);
      $this->collection($result);
       
      foreach ($result AS $r) {
         #print "selected is ".$selected.",and result value is " . $r->get_indexID().":";
         $value = ($r->get_id() == $selected) ? "selected" : "";      
         $return .= "<option value=\"".$r->get_id()."\" $value>" . $r->get_last_name() . ", " . $r->get_first_name() . ": " . $r->get_job_title() . "</option>\n";
      }
       
          return $return;
   }
   

}


Thanks in advance

Barry
View user's profileFind all posts by neoblast007Send private messageMSN Messenger
Site Admin

Joined: 13 Jul 2003
Posts: 7901
Reply with quote
It's been fixed in build 3356. Please redownload package.
3354 is a temporary buld and was available on the site for few hours. I wonder how you got it Smile and when Smile
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 07 Apr 2004
Posts: 34
Reply with quote
No Problem.

I will download it. I must have just been too eager to download before.

Thanks

Barry
View user's profileFind all posts by neoblast007Send private messageMSN Messenger


Joined: 06 Oct 2003
Posts: 13
Reply with quote
wondering if this is also a potential bug in code completion. i'm using 3.3.1 build 3356.

partial variable names won't get the code-insight window if you're typing inside the parentheses of an object method. for instance:
Code:

$str = "String";
$myObj = new SomeClass();
$myObj->someMethod($st
//                    ^cursor position here


apologies if this has already been reported a bunch of times
View user's profileFind all posts by nebySend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7901
Reply with quote
thanks for the report!
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 7901
Reply with quote
Hopefully it's fixed in current beta version. See the screenshot below. Isn't it what you expected ?



Please let me know if you get any further problem with code completion.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 06 Oct 2003
Posts: 13
Reply with quote
yeah that's exactly. thanks that will be nice to have fixed!
View user's profileFind all posts by nebySend private message
code completion within functions
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic