![](./templates/Morpheus/images/spacer.gif) |
![](./templates/Morpheus/images/blue/hdr_left_post.gif) | A copmile like feature. (Run instant error analysis) | ![](./templates/Morpheus/images/blue/hdr_right_blue.gif) |
![](./templates/Morpheus/images/ftr_right.gif) |
![](./templates/Morpheus/images/blue/hdr_left_post.gif) | | ![](./templates/Morpheus/images/blue/hdr_right_blue.gif) |
Site Admin
Joined: 13 Jul 2003 |
Posts: 8351 |
|
|
![](./templates/Morpheus/images/spacer.gif) |
Posted: Wed Apr 25, 2007 11:59 am |
|
![](./templates/Morpheus/images/posttop_left.gif) |
![Reply with quote Reply with quote](templates/Morpheus/images/lang_english/blue/icon_quote.gif) |
![](./templates/Morpheus/images/spacer.gif) |
![](./templates/Morpheus/images/spacer.gif) |
Quote: | Run instant error analysis |
PhpED runs this analysis by default. For example if you enter code below:
<?
$a = 5
$b = c
?>
it will underline $b because there is no semicolon after 5
If for any reason you turn this feature off in tools->settings->code insight, you may still run such checks manually. That's what the menu option is for.
|
_________________ The PHP IDE team
|
![](./templates/Morpheus/images/ftr_right.gif) |
![](./templates/Morpheus/images/blue/hdr_left_post.gif) | | ![](./templates/Morpheus/images/blue/hdr_right_blue.gif) |
![](./templates/Morpheus/images/ftr_right.gif) |
![](./templates/Morpheus/images/blue/hdr_left_post.gif) | | ![](./templates/Morpheus/images/blue/hdr_right_blue.gif) |
![](./templates/Morpheus/images/ftr_right.gif) |
![](./templates/Morpheus/images/blue/hdr_left_post.gif) | | ![](./templates/Morpheus/images/blue/hdr_right_blue.gif) |
![](./templates/Morpheus/images/ftr_right.gif) |
![](./templates/Morpheus/images/blue/hdr_left_post.gif) | | ![](./templates/Morpheus/images/blue/hdr_right_blue.gif) |
![](./templates/Morpheus/images/ftr_right.gif) |
![](./templates/Morpheus/images/blue/hdr_left_post.gif) | | ![](./templates/Morpheus/images/blue/hdr_right_blue.gif) |
![](./templates/Morpheus/images/ftr_right.gif) |
![](./templates/Morpheus/images/blue/hdr_left_post.gif) | | ![](./templates/Morpheus/images/blue/hdr_right_blue.gif) |
![](./templates/Morpheus/images/ftr_right.gif) |
![](./templates/Morpheus/images/blue/hdr_left_post.gif) | | ![](./templates/Morpheus/images/blue/hdr_right_blue.gif) |
Veteran
Joined: 30 Nov 2006 |
Posts: 186 |
|
|
![](./templates/Morpheus/images/spacer.gif) |
Posted: Wed Apr 25, 2007 3:32 pm |
|
![](./templates/Morpheus/images/posttop_left.gif) |
![Reply with quote Reply with quote](templates/Morpheus/images/lang_english/blue/icon_quote.gif) |
![](./templates/Morpheus/images/spacer.gif) |
![](./templates/Morpheus/images/spacer.gif) |
dmitri wrote: | Quote: | The same goes for Abstract functions, they are declared in the abstract class, but any child classes that extends the abstract class MUST implement the abstract functions |
I can only repeat, if a class does not implement an abstract method defined in its parent, it is not a problem at all. For example you may define them in a class derived from this. Why not? |
Well it should be a problem. It is bad OOP design if child classes does not implement abstract methods. A warning by a compile feature would be nice.
Better code, fewer errors.
PHP is lacking strict type checking, compared to C# and Java. It would be nice to have a feature that will catch the most common mistakes, that are a little more complicated than forgetting a ;
|
|
![](./templates/Morpheus/images/ftr_right.gif) |
![](./templates/Morpheus/images/blue/hdr_left_post.gif) | | ![](./templates/Morpheus/images/blue/hdr_right_blue.gif) |
Site Admin
Joined: 13 Jul 2003 |
Posts: 8351 |
|
|
![](./templates/Morpheus/images/spacer.gif) |
Posted: Wed Apr 25, 2007 3:45 pm |
|
![](./templates/Morpheus/images/posttop_left.gif) |
![Reply with quote Reply with quote](templates/Morpheus/images/lang_english/blue/icon_quote.gif) |
![](./templates/Morpheus/images/spacer.gif) |
![](./templates/Morpheus/images/spacer.gif) |
Quote: | Well it should be a problem. It is bad OOP design if child classes does not implement abstract methods. A warning by a compile feature would be nice |
why?
Say I have a class named OBJECT which has two abstracts MOVE and DRAW defined.
I can derive FLYINGOBJECT and define MOVE
then I will derive FLY and define DRAW.
I'm not going to create any instances of FLYINGOBJECT.
What's wrong with this?
Why would IDE blame such code and tell me that FLYINGOBJECT must have DRAW?
|
_________________ The PHP IDE team
|
![](./templates/Morpheus/images/ftr_right.gif) |
![](./templates/Morpheus/images/blue/hdr_left_post.gif) | | ![](./templates/Morpheus/images/blue/hdr_right_blue.gif) |
Veteran
Joined: 30 Nov 2006 |
Posts: 186 |
|
|
![](./templates/Morpheus/images/spacer.gif) |
Posted: Wed Apr 25, 2007 3:55 pm |
|
![](./templates/Morpheus/images/posttop_left.gif) |
![Reply with quote Reply with quote](templates/Morpheus/images/lang_english/blue/icon_quote.gif) |
![](./templates/Morpheus/images/spacer.gif) |
![](./templates/Morpheus/images/spacer.gif) |
dmitri wrote: | Quote: | Well it should be a problem. It is bad OOP design if child classes does not implement abstract methods. A warning by a compile feature would be nice |
why?
Say I have a class named OBJECT which has two abstracts MOVE and DRAW defined.
I can derive FLYINGOBJECT and define MOVE
then I will derive FLY and define DRAW.
I'm not going to create any instances of FLYINGOBJECT.
What's wrong with this?
Why would IDE blame such code and tell me that FLYINGOBJECT must have DRAW? |
Well because if the DRAW function only makes sense for the FLY object and
Move only makes sense for FLYINGOBJECT then they have nothing to do on the base OBJECT class, they belong to the CHILD class only.
Base classes should only have functions that are general for all child classes. If a function is a general function but can not be implementet on the Base class because the individual implementation should basicly be different for each child, it must be declared Abstract and this enforces that child classes MUST implement these functions.
Have a look at this URL http://www.developer.com/lang/php/article.php/3604111
|
|
![](./templates/Morpheus/images/ftr_right.gif) |
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 2
|
|
|
| ![](./templates/Morpheus/images/spacer.gif) |