NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Code Completion and Insight Bug?


Joined: 22 Mar 2004
Posts: 4
Reply with quote
Hey -

When working with PHPEd, if write a function like

Code:
function myFunction($param1, $param2) {

// do something
}



Then save as a file named myFunction.php. The code completion works fine for this user-defined function.

But when I update it to include new params, for example...

Code:
function myFunction($param1, $param2, $param3) {

// do something
}



And save again as myFunction.php. The code completion fails to detail the third parameter (i.e., $param3). This can be very confusing to a programmer or even a team of programmers who rely on PHPEd's ability to properly provide insight and code-completion. It forces you to look back at the source to confirm you are feeding the correct number of parameters.

I've tried refreshing the project and the file itself. Seems like a caching issue.

Anyone else experiencing this issue? And is it really even an issue?

_________________
Chris
View user's profileFind all posts by fastnsilverSend private messageMSN Messenger
Site Admin

Joined: 13 Jul 2003
Posts: 7901
Reply with quote
It's a problem of evaluation version only.
Commercial version (phped 3.3 hotfix1) works fine and updates code tree immediately after it is changed.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Uh-huh


Joined: 22 Mar 2004
Posts: 4
Reply with quote
Hmmm.... I'm running the commercial version of PHPEd 3.3 w/ Hotfix 1 applied, and I still observe the problem.

Anything you (or I) may have missed? Can I force an update?

_________________
Chris
View user's profileFind all posts by fastnsilverSend private messageMSN Messenger
Site Admin

Joined: 13 Jul 2003
Posts: 7901
Reply with quote
I'd highly appreciate if you tell me by email how to replicate the problem.
Please don't forget every and each aspects. All clicks, all settings for projects, currently opened files and so forth.

I know that this problem was discovered in originally released phped 3.3 and was (now I can't be sure Embarassed) fixed in hotfix1.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Specifics


Joined: 22 Mar 2004
Posts: 4
Reply with quote
I am running v3.3 Build 3338 w/ HF1. I have one workspace. Within the workspace I have one project. (I've found this prevents duplicate references to the same class or function def'n but with slightly different params).

SETTINGS
On the "Code Insight" Tab all check boxes are checked except for Initial View Expanded (Class Methods and Functions).

I'm not sure Editor Options play a role here.

Anyway...

I have a class library and some helper functions to help me emit HTML.

For example,

Code:

class clsParagraph extends clsTag {

    /**
     * Emit paragraph <p> tagset
     *
     * @param   string          $text           What appears between the tags
     * @param   string          $textfont       Optional: used when an explicit declaration of font text is desired
     * @param   string          $id             Optional: DOM reference id, possible use with JavaScript
     * @param   mixed           $attr           Array or semicolon separated string of attributes
     * @return  string
     */
   function clsParagraph($text="",$textFont="",$id="",$attr="") {
      //$retVal="align=justify";
        $retVal="";
      if (!empty($id)) $retVal.=";id=$id";
      $attr=$this->GetAttributes($attr,$retVal);
      $this->HookIt("p",$attr,"0");

        if (!empty($text) && !empty($textFont)) {
            $this->AddNode(fnFont($text,$textFont));
        } elseif (!empty($text)) {
            $this->AddNode(fnShowText($text,""));
        }
   }

}


I have at times modified the constructor of a sub-class to include a new parameter. When I do this, PHPEd does NOT necessarily pick up the change with insight. See my earlier remarks... very annoying, but not show-stopping. It just hinders a neophyte programmer making use of the new API from trusting PHPEd's code insight.

I'm thinking we have a caching issue. PHPEd must cache the changes somewhere. So, I would see the old parameter list as I am instantiating a new variable of type clsParagraph above.

This may also be duplicated just drafting then later augmenting helper functions of the

Code:


function myFunction ($var1, $var2, ... , $varN) {

}



variety.[/b]

_________________
Chris
View user's profileFind all posts by fastnsilverSend private messageMSN Messenger
Code Completion and Insight Bug?
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