Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there any way around this issue?
Message
From
28/05/2003 19:37:41
 
 
To
28/05/2003 19:16:29
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00793727
Message ID:
00793752
Views:
19
I suppose it's also not acceptable to create your functions/procs in prgs, and call those from the button's click()? That would at lease keep it reasonably generic.

You could also do your cut and paste thing as long as the prgs are: 1) 1 proc/func to a prg, so you can call the prg directly, and they are available in the path, or 2) in the project, or 3) named in a 'set proc' call, or 4) you use the 'IN ' syntax when calling the proc.

Alan

>>>>>That's what I'm trying to avoid. I don't want to create a class for just one use. If I can't use a class at least twice, what's the point of creating it?
>>>>
>>>>I see what you mean. Sometimes we create a class that's not gonna be reused in order to "manage complexity". But that's not your case.
>>>>
>>>>I think I'm missing your point: if this is something so specific for this button, why don't you just put the code on its Click method?
>>>
>>>It's a fairly complex procedure that could really use some sub-programs. The entire code is about 200 lines long and logically can be broken into about 4 different sub-programs.
>>
>>I know that you said you want to not use this.
>>
>>But its really easy to create new method for the form in the designer.
>>You just have to add the 4 methods to the form and call them from your button click...
>>
>>What do you need that cant be handle this way?
>
>I'm just trying to find a way to keep everything encapsulated in one location. The form really has nothing to do with what I need to have happen when I click the button. I would like to keep all the code inside the button, but I don't like creating a class for a single use. I'm hoping someone has found a different solution.
>
>In theory, I would like to keep it possible (even though I would never do it) to copy the button into the clipboard and paste it into another form. Just the way I prefer to program.
Previous
Reply
Map
View

Click here to load this message in the networking platform