Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement static event registration for controls in Vireo. #455

Merged
merged 31 commits into from
Jun 26, 2018
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
3e46bc0
JS C API for registering control events
segaljared Jun 14, 2018
35911d7
Update Xcode project
spathiwa Jun 19, 2018
f897fc2
Refactor RefNumVal type to not carry its type with its data.
spathiwa Jun 19, 2018
09cefde
Add controlEvents module to vireo loader.
spathiwa Jun 19, 2018
b5e3c8d
First pass at Vireo-side of static control event registration.
spathiwa Jun 19, 2018
8dd0a36
Fix lint issues.
spathiwa Jun 19, 2018
cba8029
Add example static control reg test file (not in testList yet, subjec…
spathiwa Jun 19, 2018
8dadea5
Fix ESLint errors
spathiwa Jun 19, 2018
8ca79a8
Ignore non-numeric controlIDs
spathiwa Jun 20, 2018
b13ac87
Add VI UnregisterForStaticEvents, called when top-level VI finishes.
spathiwa Jun 20, 2018
1dc847b
Store controlRef value in EventOracleObj indexed by eventOracleIndex
spathiwa Jun 21, 2018
0a8004e
Make ControlReferences to the same item in the same VI always be the …
spathiwa Jun 21, 2018
a41a3d2
Update test to ensure ControlRefs are unique for a given controlID
spathiwa Jun 21, 2018
fffa31d
Fix construction of previous refnum from index (and previous refnum h…
spathiwa Jun 21, 2018
9142267
Add error checking in JS OccurEvent to make sure eventOracleIndex mat…
spathiwa Jun 21, 2018
798d069
JS wrapper for the OccurEvent C API
siddhukrs Jun 21, 2018
910829e
Add first set of tests
siddhukrs Jun 21, 2018
895a5e0
Tests for multiple registrations and valuechange on unregistered control
siddhukrs Jun 21, 2018
fc94e86
Fix linting errors
siddhukrs Jun 21, 2018
bad5298
Merge pull request #1 from siddhukrs/valueChangedEvents
spathiwa Jun 21, 2018
d239dfc
Add simple Vireo unit test for Value Changed event.
spathiwa Jun 21, 2018
2c72c1a
Bug fix: Different events on same control should use same eventOracle…
spathiwa Jun 22, 2018
a739686
Address Carlos' feedback.
spathiwa Jun 22, 2018
7c3bad6
Address review feedback: Remove exception handling code around js reg…
spathiwa Jun 23, 2018
4fa6c64
Address review feedback from Sankara.
spathiwa Jun 25, 2018
f70b2ad
Address rajsite feedback; make default registerForControlEvents callb…
spathiwa Jun 25, 2018
650ae4f
Address Sankara feedbak: use const & instead of * in refnum method.
spathiwa Jun 25, 2018
5a7372f
Fix eslint error
spathiwa Jun 25, 2018
d5aa407
Lint is well-named, because it also describes the intelligence of the…
spathiwa Jun 25, 2018
4588fc2
Back out of throw in reg/unreg because it fails control event karma t…
spathiwa Jun 26, 2018
c6b3d9f
Update .eslintignore, exclude Documents folder and temp folder in tes…
spathiwa Jun 26, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions test-it/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,11 @@
});
// Vireo unit tests can't fire JS events, so register no-op registration functions
vireo.controlEvents.setRegisterForControlEventsFunction(function () {
// No-op. Wait, didn't you just say above this function was a no-op?
// Why yes, yes I did, but this comment is here to defeat stupid eslint rules.
Copy link
Member

Choose a reason for hiding this comment

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

The tool is only as smart as its contributors! You can see the rule definition here: https://eslint.org/docs/rules/no-empty-function

Maybe make a pull request to add an option to have line before comments as an additional option. That would be pretty cool :)

Hopefully we can get your local dev environment set-up so you don't have to got back and forth with the CI for running lint tests. That really is a silly and inefficient way to run your linter :P

Copy link
Member

Choose a reason for hiding this comment

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

Also just for future reference the linter gives a handy token in the error message: https://travis-ci.org/ni/VireoSDK/builds/396619087#L833

like no-empty-function which makes it pretty quick to look-up and see a description of the rules 👍

});
vireo.controlEvents.setUnRegisterForControlEventsFunction(function () {
// No-op. Ditto.
});

try {
Expand Down