Jump to content


Photo

Bug: NxEdit.pas - TNxComboBox.GetValueFromIndex


  • Please log in to reply
5 replies to this topic

#1 DiGi

DiGi
  • Members
  • 25 posts
  • Location:in the middle of nowhere

Posted 05 September 2008 - 03:47 PM

Hi,

in some of your last updates you changed:

NxEdit.pas, line 2544 from:
CODE
Result := Copy(Items[Index], Length(Items.Names[Index]) + 2, MaxInt) else
to
CODE
Result := Copy(Items[Index], Length(Items.Names[Index]) + 1, MaxInt) else


It is big trouble, because function result is now with separator.

sad.gif
www.qr.cz - news 4 u

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 05 September 2008 - 04:51 PM

Hello Digi,

Turn it back to + 2 then. One user have reported that one character is eaten.

I am sorry for any trouble.

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 miab

miab
  • Members
  • 9 posts

Posted 06 September 2008 - 11:05 AM

function TNxComboBox.GetValueFromIndex(const Index: Integer): string;
begin
if Index >= 0
then
if (DisplayMode = dmDefault)
then
Result := Copy(Items[Index], Length(Items.Names[Index]) + 1, MaxInt)
else
Result := Copy(Items[Index], Length(Items.Names[Index]) + 2, MaxInt)
else
Result := '';
end;

#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 06 September 2008 - 09:01 PM

Hello Miab,

I am not sure about your code. Can you please formate it with begin/end I am not sure where new statements begins.

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 miab

miab
  • Members
  • 9 posts

Posted 07 September 2008 - 12:49 AM

CODE
function TNxComboBox.GetValueFromIndex(const Index: Integer): string;
begin
if Index >= 0 then
if (DisplayMode = dmDefault) then
Result := Copy(Items[Index], Length(Items.Names[Index]) + 1, MaxInt)
else
Result := Copy(Items[Index], Length(Items.Names[Index]) + 2, MaxInt)
else
Result := '';
end;


#6 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 07 September 2008 - 03:23 PM

Hello Miab,

I will check it and add it if needed.

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.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users