You are here: PSPad forum > English discussion forum > Re: PHP labels in code explorer
Posted by: DonQuichote | Date: 2017-04-19 08:47 | IP: IP Logged
In PSPad 5.0.0(182), the code explorer has the labels section opened by default if you switch to another PHP file. However, these labels are no labels at all. The labels given are "else:" and "parent:", which are keywords in PHP. ("else:" belongs to the "alternative syntax", which I use because it is more legible than the c-style syntax.
As you see in the picture, the label list gives no real info, but pushes the class and method info out of the window. Is it possible to fix the labels or to not expand the labels by default?
Thanks,
Willem
Posted by: pspad | Date: 2017-04-19 09:17 | IP: IP Logged
Send me some source code example please
Posted by: DonQuichote | Date: 2017-04-19 09:34 | IP: IP Logged
Quote:<?php
class clsWhatEver
{
private $m;
/// Constructor.
public function __construct()
{
parent::__construct();
if(TRUE):
//something
else:
// something else
endif;
switch($var):
case 'something':
// do something
break;
default:
// default
endswitch;
} // method __construct
} // class clsWhatEver
?>
The above code snippet will show "parent:", "else:" and "default:"
Edited 1 time(s). Last edit at 2017-04-19 09:44 by pspad.
Posted by: pspad | Date: 2017-04-19 09:41 | IP: IP Logged
ok
Parent:: is wrong
label is defined as name:
If there are words what can't be consider as labels, e.g. default: or else:, I can remove it
Edited 1 time(s). Last edit at 2017-04-19 09:43 by pspad.
Posted by: DonQuichote | Date: 2017-04-25 10:38 | IP: IP Logged
In the new version, the wrong labels have disappeared. Thanks!
Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR