Domite at: aSelector shows up as nil

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Domite at: aSelector shows up as nil

Jörg Rade
Hi,

I use Domite to access and manipulate HTML code (https://github.com/joerg-rade/roast/blob/master/src/Roast.st#L428).

It is working and I can insert HTML as expected. What puzzles me is, that "Domite at: '#navigation'" shows up as nil in the debugger.
In another case (https://github.com/joerg-rade/roast/blob/master/src/Roast.st#L650) my temp var s is even nil although 'self gridSpec' returns the expected string.

Am I doing something wrong?

I'm running Amber CLI version 0.100.2 (Amber 0.17.0, NodeJS 6.9.1).

Thanks in advance
Jörg

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Domite at: aSelector shows up as nil

Herby Vojčík
Jörg Rade wrote:

> Hi,
>
> I use Domite to access and manipulate HTML code
> (https://github.com/joerg-rade/roast/blob/master/src/Roast.st#L428).
>
> It _is working_ and I can insert HTML as expected. What puzzles me is,
> that "Domite at: '#navigation'" shows up as nil in the debugger.
> In another case
> (https://github.com/joerg-rade/roast/blob/master/src/Roast.st#L650) my
> temp var s is even nil although 'self gridSpec' returns the expected string.
>
> Am I doing something wrong?

It is probably the error in the debugger, as you say the code works for
you. Helios uses ASTInterprer-based debugger, and it is not always
working as expected. IIRC I have seen some nils there as well where they
should not be.

Try adding `navigator inspect` in the code instead of `self halt`. Or
try the legacy debugger (do not open Helios, it will be active, then).

>
> I'm running Amber CLI version 0.100.2 (Amber 0.17.0, NodeJS 6.9.1).
>
> Thanks in advance
> Jörg

Herby

P.S.: Looking at all those `self tag:href:...`, why aren't you using
Silk to make them in a bit more readable way, also setting the attrs via
associations? Just asking, it's your style...

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Domite at: aSelector shows up as nil

Jörg Rade
Hi Herby,

thanks for your answer and I appreciate the recommendation!

I'll look at silk again when I start polishing my code.

Best regards
Jörg

On Mon, Jan 9, 2017 at 11:38 PM, Herby Vojčík <[hidden email]> wrote:
Jörg Rade wrote:
Hi,

I use Domite to access and manipulate HTML code
(https://github.com/joerg-rade/roast/blob/master/src/Roast.st#L428).

It _is working_ and I can insert HTML as expected. What puzzles me is,
that "Domite at: '#navigation'" shows up as nil in the debugger.
In another case
(https://github.com/joerg-rade/roast/blob/master/src/Roast.st#L650) my
temp var s is even nil although 'self gridSpec' returns the expected string.

Am I doing something wrong?

It is probably the error in the debugger, as you say the code works for you. Helios uses ASTInterprer-based debugger, and it is not always working as expected. IIRC I have seen some nils there as well where they should not be.

Try adding `navigator inspect` in the code instead of `self halt`. Or try the legacy debugger (do not open Helios, it will be active, then).


I'm running Amber CLI version 0.100.2 (Amber 0.17.0, NodeJS 6.9.1).

Thanks in advance
Jörg

Herby

P.S.: Looking at all those `self tag:href:...`, why aren't you using Silk to make them in a bit more readable way, also setting the attrs via associations? Just asking, it's your style...


--
You received this message because you are subscribed to a topic in the Google Groups "amber-lang" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/amber-lang/CP_Q9GMH0jY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.