Hello,
I updated my environment to Elements 9 and I have problem with compiling simple line var vwynik: FilterResults := new android.widget.Filter.FilterResults;
I got error :
Error 159 (E400) No overloaded constructor with 1 parameter for type “android.widget.Filter.FilterResults” D:\projekty\Android\biblioteki\inpx_android_wspolne\adapter_bazowy\TInpx_Adapter_Filtr_Bazowy_rv.pas 49 35 inpx_android_wspolne
Why ??? On Elements 8 all works fine
Simple object with one constructor without parameters as i call in my app
method MainActivity.onCreate(savedInstanceState: Bundle);
begin
inherited;
// Set our view from the "main" layout resource
ContentView := R.layout.main;
var vwynik := new android.widget.Filter.FilterResults; // E43 No static member "FilterResults" on type "android.widget.Filter"
end;
if FilterResults is supposed to be a nested type on that, i don’t see it. i’m referencing android-24/android.jar. What could i be missing compared to your scenario?
all i did was start a new Android app from template and add the one line.
method TInpx_Adapter_Filtr_Bazowy_rv.performFiltering(constraint: CharSequence): Filter.FilterResults;
begin
var vwynik: FilterResults {:= new android.widget.Filter.FilterResults} - this works on 8 and now i can’t create this object :(
if ((constraint = nil) or (constraint.length() = 0)) then begin
vwynik.values := flista;
vwynik.count := flista.size;
end
else
begin
var vWyszukanaLista: List := new ArrayList;
for each vPozycja: Element in flista do begin
if SprawdzWarunek(vPozycja, constraint) then
vWyszukanaLista.add(vPozycja);
end;
vwynik.values := vWyszukanaLista;
vwynik.count := vWyszukanaLista.size();
end;
exit vwynik