General information
Category:
Forms & Form designer
Grigore told you how to do what you asked so, I will suggest other approaches.
Your F_DOUBLECLICK procedure must have a CASE structure of a series of IF statements for the different behaviors, you could subclass your classes so that each object type gets its own streamlined F_DOUBLECLICK method. Another approach is to make an F_DOUBLECLICK class and make subclasses for the different behaviors. You can set a property of your objects to hold a reference to an instance of the subclass with the desired behavior. This second technique allows you to dynamically change the behavior for the doubleclick handler by assigning a new object reference to the object's property at any time.
>Hi Guys,
>
>I'm a VFP 7.0 newbie and need to find out how I pass the calling object's name to a common procedure. I have a form with 20 objects and I want each object to call procedure "f_doubleclick" when the user double clicks on that object. the procedure would act differently based on which object the user clicked on. so the doubleclick event of each object would read "do f_doubleclick" and nothing else.
>
>Thanks for your time,
>
>Nancy
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only