Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ToolBox Question
Message
From
28/05/2009 15:41:13
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01402450
Message ID:
01402537
Views:
38
>Ok, I figured out how to get the name of Program/Method/Window that is the target of my Text Snippet drop from the ToolBox.
>
>MWINDOW().
>
>Now, Is there any way to execute code in a text snippet? For example, if I want to assign a variable using INPUTBOX() and then test to see if it is empty...

You'll be better off creating an intellisense script for that... here's what I have:
LPARAMETER oFoxCode
local lcs
sd=set("date")
set date ymd
set cent on
lcIncl="Include\Appl.h"
do case
	case atc("dum",curd())>0
		lcIncl="other\fw.h"
	case atc("apvfp",curd())>0
		lcIncl="GenerAll.h"
*-- etc etc, set it to include the proper one for the current type of projectds
endcase
	
text to lcs noshow textmerge
***
***	<<justfname(oFoxcode.Filename)>>
***

* 	<<datetime()>>
* 	<<version()>>

#include <<lcIncl>>

***
*** ----------------------------------
***
~
endtext
oFoxCode.ValueType="V"
set date &sd
return lcs
Of course, you can add your own stuff to this and accommodate whichever specifics you may have.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform