[resolved] Code completion - an ongoing problem in PhpED. |
Site Admin
|
you may want to add prototypes the same way as it's done for PDO, SPL and DOM: http://forum.nusphere.com/code-completion-for-php-spl-dom-pdo-and-dom-t1733.html
|
||||||||||||
_________________ The PHP IDE team |
Veteran
|
Just have to ad.
Correct this is frustrating, and I hope that it will be improved in a future version of PHPed The problem is not that it is fixable by including prototypes, because as I have written in the other post, it does not work great with those imported files. On one line it works, the next it does not, or it gets "confused" and identifies the object as a different object. PHP4 is announced dead by the end of this year, and PHP5 will be what people are beginning to use. I am used to develop in an object oriented fashion, so I really need improved code completion when it comes to those standard classes. I mean, this is actually something that your zhitty competitor is capable of. And it does it well, but then it does not do any other thing well. |
||||||||||||
|
Site Admin
|
It does its best and works rather good with those prototypes imported. If php was a strict language with all types and variables defined, code completion would work much better. Say I have the code below, would you youself with all your experience tell me what class type is in the variable $a:
It's clear that if $a was defined, we would know its type easily. This poor approach is referred to as 'php dynamic language'. |
||||||||||||||||
_________________ The PHP IDE team |
Veteran
|
Hey I would prefer strict variable declaration too. I have never understood why people prefers the loose type declaration. It makes it more fail safe to have a strict language. But all I can say is that it works well in another editor. And because PHPed is THE editor for PHP development, I am expecting it to work in that too. |
||||||||||||||||||
|
Site Admin
|
may I ask you to name the other editor? I'll give it a try and possibly come with solution and/or will promise to improve PhpED
|
||||||||||||
_________________ The PHP IDE team |
Veteran
|
No problem, it is the total wast of money editor "Zend Studio"
Switch to PHP5 in the preferences, and start writing code that use PDO or any other SPL class. And as soon as you hit -> you will see that it works without problems. |
||||||||||||
|
Site Admin
|
I just tried and no, it did not work.
Check youself with code below:
|
||||||||||||||
_________________ The PHP IDE team |
Veteran
|
Well it is not just a matter of that single instance.
Have a look at these simple examples that dont work in PHPed but works in Z. Have a look at these simple examples, and see that each time it fails in PHPed, but works in Z. And YES SPL and PDO are included because it can finde the DirectoryIterator and PDO class, but it can't see the methods on the object declared. It is very unstable in PHPed, sometimes it works, sometimes it dont. I can understand why complex situations like the foreach will not work, but simple declarations and use should work every time. |
||||||||||||
|
Site Admin
|
The samples you submitted work just fine in PhpED:
If it does not work for you, please check for three possible reasons below: -code contains unrecoverable syntax errors on the lines above the cursor location where code completion is invoked. -SPL.php (PDO.php) is not included in the project and path to it is not included into the Code Insight Includes list -IDE is still parsing your project and has not finished. Check Code Explorer to see if DirectoryIterator class is listed there. If not you have to wait or have to refresh Code Explorer. If nevertheless you get any problems with code completion and none of the reasons above are in effect, please submit your code sample or send me your project and I'll check and either explain why it won't work, or suggest a workaround or will fix the problem Until that there are no problems with Code Completion in PhpED. |
||||||||||||
Last edited by dmitri on Mon Sep 24, 2007 10:42 am; edited 1 time in total _________________ The PHP IDE team |
Veteran
|
The reboot did not fix the problem.
I refreshed the project tree, it did not help. I then wrote the code that was in the include file, which is where $db is defined, and now the $st-> codecompletion worked. Note that code completion worked for line 23 but not for line 25, when the include file in line 6 was used, but after I wrote the code in line 7 then code completion worked for line 25 as well. See the images below, after going back to including the line in line 6, then code completion works for line 23 But it does not work in line 25 with the include file And again the code in the include file is added here fore reference.
|
||||||||||||||
|
Site Admin
|
I just got a message from our QA team. They managed to replicate the prob. with the following two files in the project:
It will be fixed soon. But there is nothing unstable My appologies |
||||||||||||||||
_________________ The PHP IDE team |
[resolved] Code completion - an ongoing problem in PhpED. |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by