derekr / php.sugar

Official Espresso php.sugar
69 stars 7 forks source link

class methods containing certain things don't show properly in navigator #18

Open donut opened 15 years ago

donut commented 15 years ago

The title really says it all. Here's some code for you!

Check the context!

Update: At first I thought it was just HTML in strings that messed things up. But I'm finding other things as well. I'll use the code block below to keep a running list of things that mess up the navigator in this same way:

<?php   
class Goomba {
    function nav_sees_me () {
        echo "I'm loved!"; }

    function nav_hate_HTML () {
        echo "<b>I'm not loved :(</b>"; }

    function nav_hate_STATIC () {
        static $i_mess_things_up_to;
        echo "The navigator hates me cuz of the static. :("; }
}

Note that these methods have to be in a class since non-class methods (functions?) are not seen by the navigator at all.

Espresso 1.0.4 & PHP.sugar 1.0b6

derekr commented 15 years ago

I have a good idea how to fix this. Should be ready for the official 1.0b6 release.