Jump to content


Photo

NxAutoComplete Not Working Properly


  • Please log in to reply
16 replies to this topic

#1 bion

bion
  • Members
  • 20 posts
  • Gender:Male

Posted 29 September 2007 - 02:34 AM

Hi Boki,


Using: Delphi 2007
Problem : NxAutoCompletion

//---------------------CODE
CODE
uses
//..........
NxAutoCompletion,
//........

{$DEFINE DYNAMIC}
var
tsInputList : TStrings;
tsOutputList : TStrings;

implementation

//ACol = 1 = TNxTextColumn

procedure TfrmNewEmail.NextGrid1AfterEdit(Sender: TObject; ACol,
  ARow: Integer; Value: WideString);
begin
{$IFDEF DYNAMIC}
{----Works}
if (ACol = 1) then
begin
  if Assigned(NxAutoCompletion2) then
   begin
    FreeAndNil(NxAutoCompletion2);
   end;
end;
{$ENDIF}
end;

procedure TfrmNewEmail.NextGrid1Edit(Sender: TObject; ACol, ARow: Integer; Value: WideString);
begin
{$IFDEF DYNAMIC}
  if (ACol = 1) then
   begin
    if not (Assigned(NxAutoCompletion2)) then
     begin
      NxAutoCompletion2 := TNxAutoCompletion.Create(Self);
      NxAutoCompletion2.Sources := [asList];
      NxAutoCompletion2.Strings.AddStrings(tsOutputList);//tsOutputList is already assigned
     end;

    if (Assigned(TNextGrid(Sender).InplaceEdit)) and (NxAutoCompletion2.Associate <> TNextGrid(Sender).InplaceEdit) then
     begin
      NxAutoCompletion2.Associate := TNextGrid(Sender).InplaceEdit;
      NxAutoCompletion2.Enabled := True;
     end;
   end;
{$ENDIF}
end;//---------------------PROBLEM


The list contains for example
Jan
Japan
January


Typing in the cell the first time the first character 'J' doesn't dropdown the AutoCompleteList nor does it Autosuggest anything
After typing a second letter it starts working.
How can it be fixed so that one types from the first time a character 'J' and the AutoCompleteList works?


Regards
Jan

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 29 September 2007 - 10:09 AM

Hello Jan,

Try to move your code into OnApplyEditText event. I have test it now, and it work fine in this event.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 Guest_Guest_Bion_*_*

Guest_Guest_Bion_*_*
  • Guests

Posted 29 September 2007 - 03:06 PM

Hello Boki,

Still no use sad.gif

Please download the movie and I hope you will better understand what I mean wink.gif

http://users.skynet....pleteError1.zip

I used your demo application:
- Added a row in the grid
- Type letter 'a', and nothing happens
- Type another 'a' and the autocompletion starts.

Regards,
Jan Maryssael

#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 29 September 2007 - 03:25 PM

Hello Jan,

Thank you. Please download next sample (attached) to see what you need to do to made it work:
Attached File  Bion.zip   280.42KB   6 downloads

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#5 bion

bion
  • Members
  • 20 posts
  • Gender:Male

Posted 29 September 2007 - 03:47 PM

Hello Boki,

Your example only works on the first row and only once.
Reentering 'J' doesn't autocomplete a second time
Nothing happens on the second row the first time or more( or higher after adaptation NextGrid1.AddRow(5)wink.gif

Regards,
Jan

#6 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 29 September 2007 - 04:46 PM

Hello Jan,

I will try to re-write demo completelly and send you back.

I will finish it today or tomorow. Thank you.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#7 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 30 September 2007 - 02:09 AM

Hello Jan,

I will need some more time to archive it. I will be back here as soon I finish it.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#8 bion

bion
  • Members
  • 20 posts
  • Gender:Male

Posted 30 September 2007 - 01:39 PM

Hello Boki,

Ok, no problem.
Just yell when it is ready wink.gif

Jan

#9 bion

bion
  • Members
  • 20 posts
  • Gender:Male

Posted 13 October 2007 - 12:39 AM

Hello Boki,

The question has been asked some time ago rolleyes.gif

I hope it is getting fixed by now????

Regards,

Jan

#10 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 13 October 2007 - 10:50 AM

Hello Bion,

Unfortunatelly not, but I am working on it. I am sorry for my delay.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#11 Marc

Marc
  • Members
  • 62 posts

Posted 21 October 2007 - 11:49 AM

QUOTE (Boki (Berg) @ Oct 13 2007, 11:50 AM) <{POST_SNAPBACK}>
Hello Bion,

Unfortunatelly not, but I am working on it. I am sorry for my delay.

Best regards


I have another problem with NxAutocompletion.

Since last update (not the lastest release), autocompletion don't work.

If I have "abc" in the list, when I enter "a", autocompletion show "aabc". and nothing autoselect.

In options property, I have only selected to true "aoAutoAppend"

sad.gif

#12 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 21 October 2007 - 11:53 AM

Hello Marc,

If this is related to problem with NxAutoCompletion and NextGrid, this seems to be same bug as bion's. I am working on it, and it is related to NextGrid.

Most probably all work fine by you when you attach NxAutoCompletion on normal Edit or some other control?

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#13 Marc

Marc
  • Members
  • 62 posts

Posted 21 October 2007 - 12:20 PM

QUOTE (Boki (Berg) @ Oct 21 2007, 12:53 PM) <{POST_SNAPBACK}>
Hello Marc,

If this is related to problem with NxAutoCompletion and NextGrid, this seems to be same bug as bion's. I am working on it, and it is related to NextGrid.

Most probably all work fine by you when you attach NxAutoCompletion on normal Edit or some other control?

Best regards


Hi,

I've now installed the lastest 4.2 release, and Autocompletion works good

Sorry and thx !

#14 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 21 October 2007 - 12:39 PM

Hello Marc,

I am glad that it works smile.gif

I will still need to work on Bion's problem.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#15 bion

bion
  • Members
  • 20 posts
  • Gender:Male

Posted 09 December 2007 - 02:06 AM

Hello Boki,

Some time has passed since my question - remark - problem rolleyes.gif
I am still waiting for a solution.
Did you have time to fix that error?

Regards,

Jan Maryssael

#16 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 11 December 2007 - 01:32 AM

Hello Bion,

Unfortunatelly not yet. I will work on this problem as soon as possible.

Thank you for your waiting.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#17 wvd_vegt

wvd_vegt

    Master Member

  • Honorable Members
  • PipPipPipPipPip
  • 710 posts
  • Gender:Male
  • Location:the Netherlands

Posted 12 December 2007 - 01:36 PM

Hi,

It seems to me that you attach the autocompletion to the editor after the first letter is typed. So it starts responding on the 2nd letter. So maybe the event is not on the correct place (If i'm correct typing is one way to activate the edit mode).

QUOTE (bion @ Dec 9 2007, 02:06 AM) <{POST_SNAPBACK}>
Hello Boki,

Some time has passed since my question - remark - problem rolleyes.gif
I am still waiting for a solution.
Did you have time to fix that error?

Regards,

Jan Maryssael

G.W. van der Vegt




2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users