Live data from Hacker News

Show HN: Behave.js – Coding Behaviors for textarea elements

jakiestfu.github.com

11–20 of 76 posts

Re: Show HN: Behave.js – Coding Behaviors for textarea elements

#11
post #5

Now please add mouse-hover hint box, dropdown list for auto completion and I am sold

Elaborate on the hover hint box, please

Okay,

suppose this line:

    result = someFunction(param1, param2='ok')
mouse over to `someFunction`, a small box shows brief description of function, what it does, how many parameters are required, what does optional parameters do.

It's basically a richer version of

Re: Show HN: Behave.js – Coding Behaviors for textarea elements

#13

> var editor = new Behave({ > var editor = Behave({ Is it a constructor or not?

On further inspection, it must be a constructor.

The second case is incorrect. The function assigns to "this", which would be undefined in strict mode, or the global object. Very bad either way.

Remember kids: objects are your friend.

Re: Show HN: Behave.js – Coding Behaviors for textarea elements

#19
Hey, this looks handy! I just wrote something kinda similar as part of an ad-hoc UI layer that just had to be done in HTML/JS. At first I was horrified, but by a couple hundred lines in I realized how nice it would feel to finally tame those meager input boxes into full on forces of good. ;)

Re: Show HN: Behave.js – Coding Behaviors for textarea elements

#20
post #9

This is awesome. I'm using http://ace.ajax.org/ right now in production and it's a huge heavyweight pain (but still the best thing out there). If only this had syntax highlighting i'd switch in an instant.

Maybe you'll like http://kueblc.github.com/LDT/examples/generic.html? but if you fix undo, add bracket matching, etc it will become huge too.

Also wanted to ask why do you think that ace is a pain? I agree that it's big, but seems to work ok?

Post reply on HN