NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Prado Autocomplete


Joined: 20 Jun 2006
Posts: 5
Reply with quote
I use Prado from exclusively and would love to have autocomplete for my template pages.

Because you can create your own controls, having a way to add or update the autocomplete list would be the most useful solution.

I looked for a way to do this and can't find one...
View user's profileFind all posts by blarggstarSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8350
Reply with quote
Could you please provide an example of code with description of what you'd expect from the code completion?
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 20 Jun 2006
Posts: 5
Reply with quote
Sure...

I am referring to the files ending in .page

The templates are built using a component syntax, which is placed in a .page file:


[home.page]
<com:TLabel ID="label1" />
<com:TButton Text="Click Me" onClick="buttonClick" />


The php code that drives actions is in a php file:
[home.php]
class home extends TPage {
public function buttonClick($sender,$param) {
$this->label1->Text = $sender->Text;
}

}

Can I do this allready with Code insight includes? I tried it but not sure how this works...
Perhaps this is a support question instead of a feature request.
View user's profileFind all posts by blarggstarSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8350
Reply with quote
if you mean autocompletion for php code, there is nothing really new.
Well, let me explain in details Smile

class home extends TPage

it means that all home class properties and methods derived from TPage class will be seen by code insight if you provide TPage sources or prototypes. Under "provide" I mean you need them in the same project or listed in the Code Insight Includes (list of directories in the project properties). What's a prototype? Just take a look at spl.php distributed with php. It contains prototyped interfaces of all classes provided by SPL (standard php library) which is hard-coded into the php binary.

if TPage is acessible (either by its sources or prototypes), you can get completion for $this and for variables that contain instance of TPage or classes derived from TPage.
Regarding label1 property, it has to be typehinted (see FAQ forum on what type hint means) or there should be a clear statement that assigns an instance of a known class to it.
In this case you'll get completion for $this->lable1->
The same way you can get completion for $sender if this sender is typehinted or assigned with instance of a known class somewhere.

Did I make it clear what code completion expects?
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 20 Jun 2006
Posts: 5
Reply with quote
First off, thank you for your time and paitence here as I try to explain what I am talking about. I love PHPed and appreciate that Nusphere is so open to users requests etc...

So. PHPED works great for PRADO's php code. I am referring ot the template syntax--it's like HTML, but has it's own tag set.

Now...the ONLY reason I asked this question, is because HTML autocompletion exists I figured another XML type language could exist, as long as a proper "definition file" was provided. I am expecting to provide this definition file, as long as it can be plugged in somewhere.

Here is an example of the syntax:
PRADO HTML
<com:TButton ID="submit"> would be like <input type="button" value="submit">

To clarify what this syntax is, I quote the website: "PRADO is a component-based and event-driven programming framework for developing Web applications in PHP 5." These tags are the components as defined in the .tpl or .page files.

So, is there a configuration file (or ide setting) that would allow me to insert the autocompletion data for the PRADO template component syntax?

And lastly, I am not asking you to come up with the actual data for autocompletion, just provide a spot for me to plug it in.

Thank you

-Ben
View user's profileFind all posts by blarggstarSend private message


Joined: 20 Jun 2006
Posts: 5
Reply with quote
Am I right to say that the HTML autocomplete is provided exclusively by CSE Validator? If this is so...what I am requesting is not possible, except through CSE. Mabye I have answered my own question.
View user's profileFind all posts by blarggstarSend private message
Prado Autocomplete
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