Autocompletion from double included/required scripts

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;
Post Reply
BigManda
Posts: 4
Joined: Thu Apr 25, 2013 2:05 pm

Autocompletion from double included/required scripts

Post by BigManda »

Hello,

i'm very interested in the WeBuilder/RapidPHP Software and are currently trying it out.

Except the Autocompletion everything seems to look fine. Here i got the following problem:

If i require or include several scripts in a row, the autocompletion (in my case for PHP) don't work for all files that are included/required from the first file, in which i wan't to use the autocompletion.

In my case i got a index.php, which requires a reference file. This reference file sets the current path und requires my config file, which required my necceseary classes.

It Looks like this:

src
--cls
----sample.class.php
--cfg
----config.php (requires sample.class.php)

Pub
--index.php (requires root_dir)

root_dir (reference_file, requires config.php)


Now i testet this in a more simple way too and tried this out:
index.php (requires test.php)
test.php (contains first class, requires sample.php)
sample.php (contains secound class)

The autocompletion for the first class is working, but not for the secound class.

Is this a known bug or is there a solution?

EDIT: This Bug(?) appears on Windows 7 and Windows 8, Rapid PHP 2014 and WeBuilder 2014.
User avatar
Aivars
Blumentals Software Developer
Posts: 2462
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Autocompletion from double included/required scripts

Post by Aivars »

If you're using something more than a simple script then you should create a project (Project -> New Project) and then you can specify Library Paths in Project Properties to use all folders (even if they are located elsewhere) that contain files with functions and classes that should appear in autocomplete for this project.
Blumentals Software Programmer
BigManda
Posts: 4
Joined: Thu Apr 25, 2013 2:05 pm

Re: Autocompletion from double included/required scripts

Post by BigManda »

I use the library path as temporary solution, but I'd like to see only the classes/methods/functions/variables I use in my file/project.

In other IDE Software (like Komodo, Eclipse etc) it's working.. so i'm unsure if this is a bug or a non-existent feature.. I guessed first.. that's why I post it in this section :)
In Addition autocompletion won't work if there is a viariable or a constant in my require/include command. Debugging working fine, but autocompletion quits :P
User avatar
Aivars
Blumentals Software Developer
Posts: 2462
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Autocompletion from double included/required scripts

Post by Aivars »

That is by design - the PHP code is not being evaluated to determine values of constants. It's much easier in statically typed languages with clearly defined imports, but in PHP case with includes in middle of the code by file path things are problematic so I recommend using library paths.
Blumentals Software Programmer
Post Reply