Hi All, i decided to give it a shot and try to wrap a small library, so far everything is going good, i am able to add the customview with the designer, also I can see the event been raised when the view is dragged.
The problem i'm having is with some of the methods being used, i get the following error when I try to set the left value and the right value.
To be more specific the library is a RangeBarSlider, so you can set the Minimum Value and the Maximum Value, also you can set the starting value of the left and right knobs.
In my .h file i have the following properties defined:
And in the iRangebar.m file i have the following:
And here's the code in B4i
If I comment out iRangeBar1.setMinMaxValue and iRangeBar1.setLeftValue lines then everything works, the iRangeBar1.setMinimumDistance works perfect, which is what I don't understand, why would that line work but not the setminmaxvalue and the setleftvalue.
Does anyone have any input on this?
Thanks,
Walter
The problem i'm having is with some of the methods being used, i get the following error when I try to set the left value and the right value.
iRangeBar1.setMinMaxValue(30, 120)
no visible @interface for 'iRangeBar' declares the selector 'setMinMaxValuemaxValue::'
To be more specific the library is a RangeBarSlider, so you can set the Minimum Value and the Maximum Value, also you can set the starting value of the left and right knobs.
In my .h file i have the following properties defined:
header file:
@interface iRangeBar : B4IViewWrapper <B4IDesignerCustomView>
- (void)DesignerCreateView:(B4IPanelWrapper *)base :(B4ILabelWrapper *)lw :(B4IMap *)props;
- (void)setMinMaxValue:(double)minValue maxValue:(double)maxValue;
- (void)setLeftValue:(double)leftValue rightValue:(double)rightValue;
- (void)setMinimumDistance:(double)minimumDistance;
And in the iRangebar.m file i have the following:
iRangeBar.m:
- (void)setMinMaxValue:(double)minValue maxValue:(double)maxValue{
[OBJ setMinValue:minValue maxValue:maxValue];
}
- (void)setLeftValue:(double)leftValue rightValue:(double)rightValue{
[OBJ setLeftValue:leftValue rightValue:rightValue];
}
- (void)setMinimumDistance:(double)minimumDistance{
[OBJ setMinimumDistance:minimumDistance];
}
And here's the code in B4i
iRangeBar library:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'Public variables can be accessed from all modules.
Private pg As Page
Private iRangeBar1 As iRangeBar
End Sub
Public Sub Show
If pg.IsInitialized = False Then
pg.Initialize("pg")
pg.RootPanel.LoadLayout("settings")
pg.Title = ""
End If
Log("minval: " & iRangeBar1.minimumValue)
iRangeBar1.setMinimumDistance(50)
iRangeBar1.setMinMaxValue(30, 120)
iRangeBar1.setLeftValue(50, 90)
Main.NavControl.ShowPage(pg)
End Sub
Sub iRangeBar1_SliderValueChanged (leftValue As Double, rightValue As Double)
LogColor("leftval: " & leftValue & " -- " & "rightVal: " & rightValue, Colors.Blue)
End Sub
If I comment out iRangeBar1.setMinMaxValue and iRangeBar1.setLeftValue lines then everything works, the iRangeBar1.setMinimumDistance works perfect, which is what I don't understand, why would that line work but not the setminmaxvalue and the setleftvalue.
Does anyone have any input on this?
Thanks,
Walter
Last edited: