Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

compare function of TLIST sort...

Status
Not open for further replies.

speedy2

IS-IT--Management
Oct 24, 2006
3
CA
Can anybody help? I've coded the sort method of a TLIST object. Coded the compare function which I can only get it to work if it doesn't have the TFORM qualifier. I can't use any other functions within this function because it can't see them. Is this how delphi works? Is there a work around? Do you understand what I'm asking? I would really appriciate any help that can be given..

Regards

Speedy
 
Prepend the form's variable name to any function call in Compare.
eg call Form1.myMethod as opposed to just myMethod.
 
I have tried prepending the form name, but receive the error:

This form of method call only allowed for class methods

Any clues/ideas?
 
No, use the name of the form variable; not the class name.
e.g. call Form1.method as opposed to TForm1.method
 
MikeEd,

Thanks for your time. You've just saved me a good 50 lines of code. Can't believe how quick you've answered..

King regards

Speedy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top