Foxpro Language into a table


Sometimes it’s useful to get the VFP language into a table, including commands, functions, properties, events, and methods.


 


 


CREATE CURSOR lang (word c(30), stuff c(20))


FOR nType=1 to 4


      n=ALANGUAGE(aa,nType)


      FOR i = 1  to n


            INSERT INTO lang VALUES (aa[i],””)


            IF nType= 3 AND aa[i] != “Ole” && baseclasses, but not olecontrol, oleboundcontrol


                  obj=CREATEOBJECT(aa[i])


                  nProps=AMEMBERS(arrMem,obj,1)


                  FOR j = 1 TO nProps


                        INSERT INTO lang VALUES (aa[i]+”:”+arrMem[j,1],arrMem[j,2])


                  ENDFOR


            ENDIF


      ENDFOR


ENDFOR


GO TOP


 


BROWSE LAST NOWAIT


LIST off to t.txt


CURSORTOXML(0,”c:\t.xml”,1,512)


 


LOCAL oIe as internetexplorer.application


oIe=NEWOBJECT(“internetexplorer.application”)


oIe.Visible=1


oie.Navigate(“c:\t.xml”)


MODIFY COMMAND t.txt nowait


 

Comments (3)

  1. Craig Boyd says:

    That’s pretty cool Calvin.

  2. Glenn Taylor says:

    That’s cool.

    One minor enhancement might be to replace INSERT INTO lang VALUES (aa[i],"")

    With:

    IF ALEN(aa,2)=0

    INSERT INTO lang VALUES (aa[i],"")

    ELSE

    INSERT INTO lang VALUES (aa[i,1],aa[i,2])

    ENDIF

    since ALANGUAGE() returns a two-dimensional array for one of the types.

  3. JustAnotherGenius says:

    Dude, you are like so lame. U totally suck!!!