NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Tag/Attribute editor?


Joined: 16 Nov 2005
Posts: 28
Reply with quote
I have just had a look at v4.6, and it seems quite nice - except that it does not seem to have an attribute editor. ie when you click on a <BODY> tag, you get shown all the attributes of that tag.

This seems to be a serious omission for an otherwise excellent editor. In fact, it is probably a killer for me as it simply wastes too much time entering all those attributes manually.

Another great time saver is a <table> generator, which is not available. It is not even on the HTML tags list.

There is also a problem with the code insight in that it does not know about your own defined classes. Well, that is not true, I guess. It knows the classes, but not much else about them. ie no methods or variables. In fact, you get an error message like

"Code completion is not available due to the following error(s):
Failed to find class of "lblMessage" member, (declared as "QLabel")"

This, despite the fact that the class in question, and the member was defined in the previous line. It picked up the Class ok (ie QLabel), but not lblMessage.

This is not a huge problem as I have not found any other PHP editor that even gets this far, so PHPEd is to be congratulated for getting this far.
View user's profileFind all posts by kneighbourSend private message
Re: Tag/Attribute editor?


Joined: 01 Mar 2006
Posts: 42
Location: Poland
Reply with quote
kneighbour wrote:
I have just had a look at v4.6, and it seems quite nice - except that it does not seem to have an attribute editor. ie when you click on a <BODY> tag, you get shown all the attributes of that tag.

This seems to be a serious omission for an otherwise excellent editor. In fact, it is probably a killer for me as it simply wastes too much time entering all those attributes manually.

Another great time saver is a <table> generator, which is not available. It is not even on the HTML tags list.

Are you editing .html file ? If not, make sure you have your extension in HTML in Associations (tools -> settings).
Table generator is available: look at icons above the tabs, search for buttons "html" and "body" - it's next to them
View user's profileFind all posts by ertiusSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
I just went ahead, entered body tag, pressed space in and it showed me the following dropdown automatically:


Doesn't it show all the attributes you expected?
You may get the code-completion list by pressing Ctrl-Space, of course. When caret is on the tag or just after it, you'll get tags. When it is after a space on the right, list of attributes will be shown. For some attributes it will show possible values if caret is after the = sign.

Quote:
"Code completion is not available due to the following error(s):
Failed to find class of "lblMessage" member, (declared as "QLabel")"

If you still getting this problem, would you please submit your code sample there?
I can't get any problems, it constantly works for me:




completion for variable:



and completion for nested calls:




and there are many many other cases when code completion is useful.

It's not necessary for QLabel to be in the same file. It's sufficient if corresponding file is in the same project or is listed in list of "Code Insight Includes" (See Project properties).
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 22 Sep 2006
Posts: 3
Reply with quote
Hi

How about this code :

class Application {
var $Db;
}

class Database {
function init() {
}
}

$App = new Appliction();
$App->Db = new Database();
$App->Db->init();

and after typing $App->Db-> no code completion

Why?

Thanks,
View user's profileFind all posts by _dimka_Send private message
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
really?
See screenshot below:


I think your code will work for you too if you correct new Appliction() to new Application(). Do you see the difference between class name used in class definition and class name referenced in new?
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 22 Sep 2006
Posts: 3
Reply with quote
Its was just a typo.
But I see that I was wrong.

Thanks anyway,
View user's profileFind all posts by _dimka_Send private message
Re: Tag/Attribute editor?


Joined: 16 Nov 2005
Posts: 28
Reply with quote
ertius wrote:
Are you editing .html file ? If not, make sure you have your extension in HTML in Associations (tools -> settings).
Table generator is available: look at icons above the tabs, search for buttons "html" and "body" - it's next to them


No - a PHP file with embedded HTML. Who uses HTML files any more? This is a PHP editor, after all. I have found the TABLE function - ggod stuff.

I loaded a HTML file, and no-where could I find the tag/attribute editor. What tab/screen does it appear in?
View user's profileFind all posts by kneighbourSend private message


Joined: 16 Nov 2005
Posts: 28
Reply with quote
dmitri wrote:

If you still getting this problem, would you please submit your code sample there?
I can't get any problems, it constantly works for me:


Ok - this code does not work.

class SampleForm extends QForm {
protected $lblMessage;
protected $btnButton;

protected function Form_Create() {
$this->lblMessage = new QLabel($this);
$this->lblMessage->Text = 'Click the button to change my message.';
$this->btnButton = new QButton($this);
$this->btnButton->Text = 'Click Me';
$this->btnButton->AddAction(new QClickEvent(), new QServerAction('btnButton_Click'));
}
}

What I would like to work is
$this->lblMessage-> [popup here with properties]
View user's profileFind all posts by kneighbourSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
try to type text below:
<body |

(note: "|" denotes cursor location, not a symbol)
Immediately after you press space right to body, IDE will show you popup with list of HTML attributes available for tag body.
(you can invoke this list if you press Ctrl+Space)

Select dir attribute from this list and IDE will offer you two choises "ltr" and "rtl" as HTML standard proposes only these two values for this attribute.


It's it simple?

BTW, it works for html files and html parts of php files too.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 16 Nov 2005
Posts: 28
Reply with quote
dmitri wrote:
I just went ahead, entered body tag, pressed space in and it showed me the following dropdown automatically:


Doesn't it show all the attributes you expected?

No, this sort of thing is useless. It is actually SLOWER to use this sort of construct than to simply type in the properties manually. I mean a REAL tag/editor like in Dreamweaver, WeBuilder, etc.

This sort of code assist is only useful is you do NOT know the methods/properties. If you DO know, then it is simply too slow. For example, with an IMG tag, I ALWAYS set the image size parameters and set the BORDER to 0. I could probably set the BORDER propery ok with this system, but not the width and height as I might not know them yet. in fact, usually not. With Dreamweaver, I simply press the "calculate" button, and it works them out and inserts the values automatically. I also set the Border to 0 at the same time - a seconds work for all 3 properties!

With the Code Assist approach, it is hopeless. you basically have to type the whole thing manually. You also need to somehow find out the image size!

I could give many examples along these lines - believe me I have tried both systems and the code assist approach is MUCH slower.
View user's profileFind all posts by kneighbourSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8340
Reply with quote
PhpED has no web-authoring tools like in DW.
All things related to html you tried is all we offer at the moment.

Regarding IMG tag, real image width and height are shown after you select image file:


I didn't touch Width and Height fields. They were set automatically.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Tag/Attribute editor?
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