-
[F8] Listener Objects and CheckBoxes
I'm writing a script that will create a series of checkboxes at runtime, and I'm trying to figure out the best way to handle the click events. Given that there might be quite a few checkboxes (maybe 20), should I create a separate Listener Object for each checkbox, or just one for all of them?
-
Generally from a programming perspective, I'd say handle as much 'repetitive code' as you can in one place. Do you know of any actions for sure that all checkboxes need to do? If so, you can probably put that logic in one specific function.
Are there other, checkbox-specific behaviors that need to be done as well? Maybe have the common code function call these specific functions by passing a variable into the common function. It really all comes down to how much individual, checkbox-specific code there will be.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|