CompuServe Thread

#CAN'T CREATE METHODS??

4 messages in this thread
#2740From: David SmithOct 12, 1991 6:16 AM
I purchased the CDK and have invested many hours in learning it and creating some sample controls. When I finally buckled down and had learned enough to start on my first real control, I realized that the kit does not allow me to define my own methods for controls. Is this true? I can see a few ways to get around this (ex. creating several properties to replace a single method that would have multiple arguments). Am I not looking in the right place in the manual or is this true? Is there a beta version of the CDK that allows me to define my own methods? David There is 1 Reply.
#2746From: Mark Novisoff/MicroHelpOct 12, 1991 7:42 AM
David, You are correct – there are no custom methods. My company (MicroHelp) uses properties to accomplish the same thing. For example, when you want to place a bitmap into a control, we have you do: CtlName.LoadPicture = "c:\filename" This is slightly different than the "method" used by VB, but it accomplishes the same thing. Similarly, we have a built-in "method" that searches our list box for the string you specify. If VB had something similar, it would look like: IndexWhereFound = CtlName.FindString "String to search for" We implement it using properties: CtlName.FindString = "String to search for" IndexWhereFound = CtlName.FoundString Mark
#2827From: Jonathan Zuck (UFI)Oct 13, 1991 1:23 AM
David, Mark's suggestion of using properties is a good one. Another alternative is to provide an exported function or sub that takes the name of the control as one of its paramters. -=- Jonathan There is 1 Reply.
#2860From: David SmithOct 13, 1991 1:54 PM
I'll probably do a combination of yours and Mark's suggestions. By the way, I liked your article in DBMS; it was filled with a lot of good ideas. Thanks, David