Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Insert full code for LSL event handlers

Simil Miles
Creator
Join date: 1 Mar 2007
Posts: 300
04-18-2007 10:08
Hi,

At the bottom left of a script floater is a drop down menu that lets you insert, functions, events and arguments.

What are all the arguments for each even handlers ?
Do you know them all by heart ? In the correct order ?

I don't, so I have 2 solutions :

- type it in the script, look up the hover tip and type all the arguments
- type it in the wiki, search, and copy/paste the arguments

If only the insert feature could insert this :
CODE
listen(integer channel, string name, key id, string message)
{
}

instead of just this :
CODE
listen


it would save us a lot of time, don't you think ?


PS : this being said, the insert list is too long, functions, events and arguments should be in sub-menus, but that's another request.
_____________________
UnConWTech @ Flo (144, 84, 224) http://unconwtech.free.fr

SL books http://astore.amazon.com/secondlife-sl-20/

Need a beta tester for quality assurance ?
Need a translator for English, French, Spanish ?
Learjeff Innis
musician & coder
Join date: 27 Nov 2006
Posts: 817
04-18-2007 10:21
Got my vote.
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
04-19-2007 09:01
Mine too... but I want an option to put that { on the line above, where it belongs. Please no flamewars. ;)
RobbyRacoon Olmstead
Red warrior is hungry!
Join date: 20 Sep 2006
Posts: 1,821
04-19-2007 09:09
From: Lex Neva
Mine too... but I want an option to put that { on the line above, where it belongs. Please no flamewars. ;)


But... You started it!


.
_____________________
Sys Slade
Registered User
Join date: 15 Feb 2007
Posts: 626
04-19-2007 09:20
From: Lex Neva
Mine too... but I want an option to put that { on the line above, where it belongs. Please no flamewars. ;)

Yay, a real scripter!

:p
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
04-19-2007 10:14
This sort of stupid debate is why I carefully wrote our C coding standard so it didn't specify whether curly braces go on the same line or the following line. I forget the phrasing I used but it satisfied both the same-line and next-line nazis and only pissed off the ones who wanted the braces to line up with the enclosed code.
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
04-19-2007 10:20
Can we talk about literal tabs vs spaces, too??
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!!
- Go here: http://jira.secondlife.com/browse/SVC-1224
- If you see "if you were logged in.." on the left, click it and log in
- Click the "Vote for it" link on the left
Learjeff Innis
musician & coder
Join date: 27 Nov 2006
Posts: 817
04-19-2007 13:25
Leave the braces out. Problem solved.

And I strongly disagree that it "belongs" on the same line as the definition. It belongs wherever your coding style says it should be, and coding styles have a lot of arbitrary features. Contradictory opinions are usually defensible.

If you don't want a flame war, don't play with matches and gasoline! ;)
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
04-19-2007 14:33
From: Lex Neva
Mine too... but I want an option to put that { on the line above, where it belongs. Please no flamewars. ;)

Oh, thank God somebody else mentioned this before me.
_____________________
http://ordinalmalaprop.com/forum/ - visit Ordinal's Scripting Colloquium for scripting discussion with actual working BBCode!

http://ordinalmalaprop.com/engine/ - An Engine Fit For My Proceeding, my Aethernet Journal

http://www.flickr.com/groups/slgriefbuild/ - Second Life Griefbuild Digest, pictures of horrible ad griefing and land spam, and the naming of names
Sys Slade
Registered User
Join date: 15 Feb 2007
Posts: 626
04-19-2007 14:37
From: Meade Paravane
Can we talk about literal tabs vs spaces, too??

space...space...space...space...space...oh screw this!...tab!

:p
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
04-20-2007 08:44
From: Learjeff Innis
Leave the braces out. Problem solved.

And I strongly disagree that it "belongs" on the same line as the definition. It belongs wherever your coding style says it should be, and coding styles have a lot of arbitrary features. Contradictory opinions are usually defensible.

If you don't want a flame war, don't play with matches and gasoline! ;)


I know, I was totally just being inflammatory with that comment ;) The fact is, what I'm used to is putting the brace on the same line as, for example, an "if (...)", so when it's on the next line, it chafes. I wish we had some options, even hidden in the pile of configuration options for the viewer, to change that, and possibly the auto-undenting behavior associated with }. It's just a matter of what I'm comfortable with.