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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Do Form myForm In myApp.Exe - is there a way?

Status
Not open for further replies.

ChrisCarroll

Programmer
Oct 10, 2000
177
These are valid :
Code:
[I]* Works nicely[/I]
Do myProc in myApp.exe
[I]* So does this[/I]
Set procedure to myApp.exe
Do myProc
but this is not:
Code:
[I]* Doesn't work[/I]
Do Form myForm in myApp.exe
Anyone got a technique that allows me to Do form where the form is inside an exe?

for the curious, I'm led to want to do this by:
1) I've been using 2) I've done some stuff based on that for automatically testing UIs
3) It occurred to me that I could run my automated tests on the Exe, thereby guaranteeing that the shipped exe bahaved as expected outside my development environment
 
The command syntax itself won't allow you to do that. I can't see where you would be able to do that without building an exe which includes that form, unless you were to subclass the form and instantiate it that way.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Yo ho,
The situation I envisage is where I have indeed a built exe which includes forms.

Whereas FoxPro provides easy access to .PRGs, MPRS, (and .SPRs ;-) and even form-classes within the Exe file, it syntactically fails to provide access to SCXs. Which seemed kind of an oversight, so I wondered if I'd missed something.

It's not a complete dead loss. It is possible for instance to 'drive' an exe by pushing keystrokes to trigger menu items to trigger opening a form. An alternative is to have built a DoForm() function into the Exe.

But I was hoping for something simpler.

Thanks anyway,

Chris
 
Hi Chris,

I wonder why you want to test SCX forms. If you use such an object oriented way to even test with FoxUnit, I'd expect you to only use form classes.

Nevertheless the way to make Forms work "outside" an exe is to store a procedure or class in it, that does the DO FORM command for you:

Simplified version:
Code:
procedure DoForm(tcFormname, tuPara1, tuPara2,...)
   Do Form (tcFormname) With tuPara1, tuPara2,...
endproc

Bye, Olaf.
 
Ah Olaf! to change the subject completely :
The selling points of Object Orientation are hiding complexity and increasing code re-use. (And it's trendy, but that's not a good selling point). Both of these should in theory make software more reliable and make it faster to build.
So if using SCXs is simpler then it is better to use an SCX.
(However the reason in this case is that the codebase - like so much FoxPro - is years old and it is more productive to use it as-is than to rewrite it. And productivity is one of the selling points of VFP after all).
 
Oh no! Am I missing the latest trend even as I code?

I think it is still trendy because Java and .Net are still trendy.

And as an almost 40 year old VFPer, it's nice to know that I am, in some small way, still with it.

Chris
 
Nah, not 'trendy'

(I'm a little older at 45)

VFP is just TOO darn good to be trendy - I started a new project TODAY in VFP 9 - that feels good!


Regards

Griff
Keep [Smile]ing
 

Is OOP trendy? It's hardly new. OOP was invented in the mid 1960s by Kristen Nygaard and Ole Dahl, who developed the first real OOP language, Simula 67 (which actually appeared in 1968).

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Well I think that just proves you can be nearly 40 and still trendy.
Does this mean that if we check out 1970s computing ideas we could get ahead of the curve?

Chris
 
Does this mean that if we check out 1970s computing ideas we could get ahead of the curve?

When I was young and working in Fortran I was told "integers must start with an 'I'".

When I was a little older I was told that I could use any name I liked. Hurrah.

Now I'm a lot older I'm being told "integers must start with an 'i'".

It's that old deja vu feeling again.

Geoff Franklin
 
Gentlemen:

I am 60 years old and have been working with VFP form12 years. Trendy is not the issue. Powerful data applications and easy interfaces with other applications and the web are why VFP is still a great product. Anyone ever wonder why MS doesn't market this tool more?

Ray Ross
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top