| View previous topic :: View next topic |
| Author |
Message |
holografix
Joined: 17 Mar 2009 Posts: 4
|
Posted: Tue Mar 17, 2009 12:09 pm Post subject: Auto-complete question: public functions vs public static functions |
|
|
Hello,
First let me thank you for this great ide.
I'm using NB to code a Zend Framework based project and noticed that some methods don't appear in the auto-complete popup.
After digging and testing with Komodo Edit and a trial of ZendStudio I found out that funcions created as public static function xpto() {} don't show up; only public function xpto() {}.
Are there plans to fix this issue ?
I have NB 6.5 with latest updates, JDK update 11, Vista premium 32.
Thanks in advance.
holo |
|
| Back to top |
|
 |
radek matous Posted via mailing list.
|
Posted: Tue Mar 17, 2009 4:00 pm Post subject: Auto-complete question: public functions vs public static functions |
|
|
Hi,
works for me. At least this kind of testcases works for me:
class class_name {
static function static_hello() {
}
function hello() {
}
}
$cname = new class_name();//works CC
$cname->hello();
class_name::static_hello();//works also
Please, provide your testcase
Radek
holografix wrote:
| Quote: | Hello,
First let me thank you for this great ide.
I'm using NB to code a Zend Framework based project and noticed that some methods don't appear in the auto-complete popup.
After digging and testing with Komodo Edit and a trial of ZendStudio I found out that funcions created as public static function xpto() {} don't show up; only public function xpto() {}.
Are there plans to fix this issue ?
I have NB 6.5 with latest updates, JDK update 11, Vista premium 32.
Thanks in advance.
holo
|
|
|
| Back to top |
|
 |
holografix
Joined: 17 Mar 2009 Posts: 4
|
Posted: Tue Mar 17, 2009 5:20 pm Post subject: |
|
|
Hi
thank you for answering my question.
My testcase is a simple ZF application with one controller and a view that only prints 'Hello world'
As you can see in the image, when editing the indexcontroller, only five methods are displayed in the auto-complete popup. These five methods are public functions but the script from zf (Zend/Controller/Action/HelperBroker.php) has many more functions.
When editing a clone of the simple application with Komodo Edit the auto-complete shows public and public static methods.
Best regards,
holo |
|
| Back to top |
|
 |
wackmaniac
Joined: 17 Mar 2009 Posts: 2
|
Posted: Wed Mar 18, 2009 9:12 am Post subject: |
|
|
You do know that a static method is called with a double semicolon?
My working testcase:
| Code: | <?php
class Test {
public function public_function () {}
public static function public_static_function () {}
static function static_function () {}
}
$test = new Test ();
$test->public_function(); // auto-complete works
Test::public_static_function(); // auto-complete works
Test::static_function(); // auto-complete works
?> |
|
|
| Back to top |
|
 |
holografix
Joined: 17 Mar 2009 Posts: 4
|
Posted: Wed Mar 18, 2009 10:13 am Post subject: |
|
|
@wackmaniac
Hi
Thank you.
I know how to call a static method but that's not the problem. I would need to try $foo-> ... and $foo:: ... to see the available methods. I'm talking about Zend Framework, tons of scripts and not code written by me.
BTW, I used an example from ZF docs: $this->_helper-> [auto complete options] and Komodo Edit and Zend Studio shows every methods in the AC popup.
It would be great having NB working the same way.
Regards,
holo |
|
| Back to top |
|
 |
radek matous Posted via mailing list.
|
Posted: Wed Mar 18, 2009 10:36 am Post subject: Auto-complete question: public functions vs public static functions |
|
|
Hi,
we offer static methods just in static context after double semicolon.
On the other hand (not only) this your request is reason not to be so
strict. In other words we are going to fix it
Radek
holografix wrote:
| Quote: | Hi
thank you for answering my question.
My testcase is a simple ZF application with one controller and a view that only prints 'Hello world'
As you can see in the image, when editing the indexcontroller, only four methods are displayed in the auto-complete popup. These four methods are public functions but the script from zf (Zend/Controller/Action/HelperBroker.php)
[Image: http://img140.imageshack.us/img140/6452/nbautocomplete.th.jpg ] (http://img140.imageshack.us/my.php?image=nbautocomplete.jpg)
When editing a clone of the simple application with Komodo Edit the auto-complete shows public and public static methods.
[Image: http://img530.imageshack.us/img530/9484/komodoeditautocomplete.th.jpg ] (http://img530.imageshack.us/my.php?image=komodoeditautocomplete.jpg)
Best regards,
holo
|
|
|
| Back to top |
|
 |
holografix
Joined: 17 Mar 2009 Posts: 4
|
Posted: Wed Mar 18, 2009 11:14 am Post subject: |
|
|
Hi
Glad to hear good news from you. Thank you very much.
Regards
holo |
|
| Back to top |
|
 |
|