Solved

Value List Editor and SetEditorText

Posted on 2004-08-10
7
242 Views
Last Modified: 2010-04-05
hello,

i have a problem using the value list editor as usual , i  need to make some changes
in my memo1 when the user edit the cell text but this resulted an infinite
loop causing EStackOverFlaw,
cause each time memo1.setfocus is executed in the value editor setedittext
event , the setedittext is fired again and again and again (probably
because the valuelisteditor loses focus or something),

procedure TFrmMain.vleSetEditText(Sender: TObject; ACol, ARow: Integer; const Value: String);
begin
memo1.SelText := 'blabla';
--stuff---
memo11.SetFocus;
end;

how to solve this?, i read about using OnExit event but i need the SetEditText event to
access the old and new "value" variable,
any ideas?

Thanks In A
Yehia
0
Comment
Question by:yehiaeg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 12

Expert Comment

by:esoftbg
ID: 11764599
I tested, but have not EStackOverFlow ????
0
 
LVL 12

Expert Comment

by:esoftbg
ID: 11764667
I have not Exception at all. Just Memo11 is Focused....
0
 
LVL 12

Expert Comment

by:esoftbg
ID: 11764737
I'll be back after 12 - 16 hours ....
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:yehiaeg
ID: 11764808
i ensure it does, i debug it line by line and when i reach memo1.SetFocus the debugger move to the top of of SetEditText event
0
 
LVL 12

Accepted Solution

by:
esoftbg earned 125 total points
ID: 11769557
Okay, you are right, when I Click on a ValueListEditor's Cell it raises an Event :
SetEditText(....);
Because inside this event performs:
  memo1.SetFocus;
it rises 4 times:
SetEditText(....);
but I have not exception ....

emil
0
 

Author Comment

by:yehiaeg
ID: 11772227
maybe because there is a few lines written in your SetEditText, i have about 30 lines of code and it does repeat itself continuously (not 4 times), any ideas?
0
 

Author Comment

by:yehiaeg
ID: 11772543
oops, i discovered that changing maintext.selstart causes the loop because when changing it the maintext SelChanged is fired wich also fires SetEdittext again...

Sorry for wasting your time.
Thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month5 days, 19 hours left to enroll

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question