B4J Library [B4X] [XUI] xRotaryKnob class

klaus

Expert
Licensed User
Longtime User
The class has been updated to version 1.5 in the first post.

Added following properties:
SnapToZero when True snaps to ZERO after releasing the knob.
If there is no ZERO position in the scale, it snaps to the position nearest to ZERO.
The duration of the snap can be set with the SnapToZeroDuration property
SnapToZeroDuration in milliseconds.
Updated the Tag property according to Erels recommendation:
https://www.b4x.com/android/forum/t...lv-or-any-other-container.117992/#post-738358
 

james_sgp

Active Member
Licensed User
Longtime User
Hi,
I`m updating my existing B4i app that uses Rotaryknob, but i`m getting an error when compiling:

Error: ** BUILD FAILED **


The following build commands failed:
CompileC /Users/blank/Downloads/App\ Stuff/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_xrotaryknob.o /Users/blank/Downloads/App\ Stuff/B4iBuildServer/UploadedProjects/<user id>/B4iProject/b4i_xrotaryknob.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

I`m on B4i 7.2 & Xcode 12.5.

Not sure whats happened, appreciate any advice.
 

james_sgp

Active Member
Licensed User
Longtime User
Ok, I switched over to using the Class instead of the latest B4X library; and it's working again now. NOTE the latest class 1.5 also generates an error due to the MOD function on line 212.

James
 

klaus

Expert
Licensed User
Longtime User
It does not work with AFTERMOVE either.
I my mind there was no need to have the ValueChanged event because the knob snaps to a value on the scale and the result is clearly seen.
I will look at it to see if i can add the ValueChanged event after the snap.
 

klaus

Expert
Licensed User
Longtime User
The xRotaryKnob library has been updated to version Version 1.7
Added ValueChanged event for all SnapModes
Attention: Changed the Value variable type in the ValueChanged event from Int To Double
If you use the ValueChanged event you need to change it in your projects !
Amended problem of highlighted scale value
The demo project is now a B4XPages project !
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…