Eve icon indicating copy to clipboard operation
Eve copied to clipboard

Infinite loop when running code

Open ThomasGreiner opened this issue 7 years ago • 4 comments

After playing around with Eve for a few minutes I found that the code below creates an infinite loop in the browser tab. I'm not sure whether this is intentional that this should not compute but it'd help if there were some feedback for the user if it is.

commit @browser
[#div text: "Hello World!"]
search @browser
divs = [#div]

commit @view
[#value value: divs]

ThomasGreiner avatar Dec 07 '16 09:12 ThomasGreiner

It's already been reported I believe, and is happening because the view code is adding divs to the browser that can be seen by the search code.

You can work around it in a number of ways. commit @browser [#div #mydivs text: "Hello World!"]

search @browser divs = [#div #mydivs]

Is probably the easiest. Regards, Cormac.

Cormac-Williams avatar Dec 07 '16 09:12 Cormac-Williams

Thanks for the help. It looked like @browser only effects the application pane on the right.

Feel free to close this issue since it's based on a wrong assumption unless you think it makes sense for the editor to bind @browser to the application pane rather than the entire editor.

ThomasGreiner avatar Dec 07 '16 12:12 ThomasGreiner

We're planning to make it behave more like you're intuition, so we'll keep tracking this on the existing issue for it. The current behavior can be surprising for a host of reasons including this one.

On Wed, Dec 7, 2016, 04:59 Thomas Greiner [email protected] wrote:

Thanks for the help. It looked like @browser only effects the application pane on the right.

Feel free to close this issue since it's based on a wrong assumption unless you think it makes sense for the editor to bind @browser to the application pane rather than the entire editor.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/witheve/Eve/issues/667#issuecomment-265440900, or mute the thread https://github.com/notifications/unsubscribe-auth/AATKDn13QZbRJ6aXyk-Xhw3_e7gBs1yIks5rFq2agaJpZM4LGYB- .

joshuafcole avatar Dec 07 '16 16:12 joshuafcole

Will Eve allow users to create view extensions/modes/plugins using the Eve language or will this only be possible in the implementation language? If yes, should there not be some kind of DOM access for the @view?

asampal avatar Dec 10 '16 09:12 asampal