AutoFormFill in runtime ?

hi,.

i'm trying to load data from a DB into an AutoFormFill component, but i keep seeing this "waiting wheel" in the browser every time it gets to the loading part, like it's in an infinite loop.
when i fill the aff in design time, everything is running ok.

here is the small code to load the data :
---------------------------------------
  aff1.PresetValues.Clear;

  With UserSession.ibtClients Do Begin
    If Active Then Close;
    Open;
    First;
    While NOT EOF Do Begin
      If RecNo=0 Then
        aff1.PresetValues.Append(FieldByName('ClientName').AsString+';'+FieldByName('ClientCity').AsString)
      Else
        aff1.PresetValues.Append('#'+FieldByName('ClientName').AsString+';'+FieldByName('ClientCity').AsString);
      Next;
    End;
    Close;
  End;
---------------------------------------
"ibtClients" is a TIBTable i used, to work with Firebird db.

i also tried it in a clean project, that have only 2 IWEdits in the form, and the same code and aff
i even copied the aff from your example and tried this code on it (i changed the "FormControls of course)

i use :
latest TMS components (5.1.2.0)
IW 12.2.8
Delphi XE2 Update 3
and Firebird 2.5 (if it matters)

am i doing something wrong, or is the AutoFormFill component can't load data in runtime?

I have not been able to reproduce this issue.

The AutoFormFill should be able to display this data at runtime.
The "waiting wheel" usually indicates a JavaScript error has occurred on the page. Can you please have a look at your browser's error log to find out exactly which error you are getting?
If the problem persists, can you please provide a ready to run sample project that demonstrates the issue so I can further investigate this?
Sample projects can be emailed to: mailto:info@tmssoftware.com

ok, so i tried something "new", but this still gives me the same result (the "waiting wheel") :
--------------------------------
procedure TIWForm1.IWButton1Click(Sender: TObject);
Var SL : TStringlist;
begin
  aff1.PresetValues.Clear;
  SL:=TStringlist.Create;
  SL.Clear;

  With UserSession.ibtClients Do Begin
    If Active Then Close;
    Open;
    First;
    While NOT EOF Do Begin
        SL.Append('#'+FieldByName('ClientName').AsString);  <<---  this is only to see if the DB part works ok
      Next;
    End;
    Close;
  End;

  aff1.PresetValues.Assign(SL);   <<--- i placed a breakpoint here and only then it freezed and showed me the wheel
end;
--------------------------------

i also made a test with a new and almost empty database (firebird) with only 2 field, and i filled it with only 2 records.
the result was still the same, so i don't think the problem is from the DB, or the DB component
i'm saying that because i think it's something very simple, so i don't think there is anything to send.

i use mostly Firefox, and all i could find is this file "hs_err_pid1868.log".
i saw many 0x Hexa numbers, but couldn't really understand their meaning...

thanks


Can you please try pressing "Ctrl-Shft-J" in FireFox when the "spinning wheel" is visible?
This should display the error console where all (JavaScript) errors that have occurred are displayed.

If an error has indeed occurred, can you please provide the full error description and the HTML source of the webpage so I can further investigate this?
Bart Holvoet2012-09-18 02:49:44

hi bart,.

thanks for teaching me something new today (Ctrl+Shift+J) :)

the list is very long even when i filter it.
is there a way to export it?
it shows many errors, and many of them are on the same 2-3 lines, but when i look at the source, it's not what it shows, so i'm guessing maybe it's because it got those errors during the process of creating the page?

copying the error, will copy only one error at a time.
i can send you the html page, but would it help without looking at the error page of the error console?

do you know of a plugin that will let me save the error console's report?
or maybe get some same report from IE maybe?

thank you

I'm not sure if there's a way to copy all error messages.

You can mail the HTML source without the errors and I'll have a look if I can find out what's causing this.

i finally found the problem !

every time there is a quote ( " ) in the PresetValues's text - it happens
(i use hebrew so i need the " in my text)

pfff....  that was a hard one to find  :D

hope to see it fixed next update.
thank you very much for your help, time and patience.

Thank you for notifying.
This issue has now been fixed.
The update will be available with the next release of the TMS IW Component Pack.