Skip to content

Replace num_detected with {DetectedEvent}#22

Open
tapple wants to merge 6 commits into
secondlife:mainfrom
tapple:LLDetectedEvent
Open

Replace num_detected with {DetectedEvent}#22
tapple wants to merge 6 commits into
secondlife:mainfrom
tapple:LLDetectedEvent

Conversation

@tapple
Copy link
Copy Markdown

@tapple tapple commented Dec 27, 2025

No description provided.

@tapple tapple changed the title Rename DetectedEvent to LLDetectedEvent Replaces num_detected with {DetectedEvent} Feb 5, 2026
@tapple tapple changed the title Replaces num_detected with {DetectedEvent} Replace num_detected with {DetectedEvent} Feb 5, 2026
Copy link
Copy Markdown

@monty-linden monty-linden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One bit of cruft.

local name: string = ll.DetectedName(i)
local key: string = ll.DetectedKey(i)
LLEvents:on("touch_start", function(events: {DetectedEvent})
for i: number, event: DetectedEvent in events do
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for number, event: DetectedEvent in events do

Copy link
Copy Markdown
Author

@tapple tapple May 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

either one works, but annotating both variables is more consistent with the rest of the code examples on this page; most of them have type annotations.

The annotations don't really help in this specific example though. I shortened it: b37870e

Copy link
Copy Markdown

@monty-linden monty-linden May 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, not all my review comments are useful (particularly in the early morning). Don't be shy about pushing back. No need to verify the internal operations of '... in <table> do' here but if you want to for consistency, go ahead.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy either way. It's also not a terrible idea to show examples of both with and without annotations on this page, since it's one of the first pages new lua scripters will see (it was for me)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants