Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to retrieve text in command window?
Message
 
 
À
02/11/2001 08:35:39
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00576251
Message ID:
00576911
Vues:
13
>>Thanks to all, I can do now all my tricks.
>>Which is, to create menubars which contain all recently used "MODIFY" commands from the command window (I use for these menu bars a menu pad which is visible only in developers mode.)
>
>Christian,
>
>How about posting the code back? I would be interested in seeing what you've done. Or just email it to me. Sounds interesting...
>
>Renoir

The idea is very simple:
My menu is built up in code, and as source for the code I use a table, but you could also use classes.
I have in my menu one menu pad that is called DevPad and will be shown only if Developers mode is .T. (so a property somewhere).

Then I create menu bars according to the last stored MODIFY commands:
These commands come from the command window and I store them in a prg DevBars.PRG (so similar like FoxPro stores all lines into _Command.PRG).
>
*-- Define the pad:
DEFINE PAD DevPad OF _MSYSMENU PROMPT "Develop"
ON PAD DevPad OF _MSYSMENU ACTIVATE POPUP DevPad
DEFINE POPUP DevPad MARGIN RELATIVE SHADOW
*
lcBars = FILETOSTR("DevBars.PRG")
IF !EMPTY(lcBars)
  *-- create an array with all lines.
  *-- The DevBars.PRG already contains only lines containing "MODIFY"!
  lnLines = ALINES(paMemo, lcBars)
  *
  IF lnLines > 0
    FOR lnForNr = 1 TO lnLines
      IF !EMPTY(paMemo[lnLines])
        lcPrompt = paMemo[lnForNr]
        lcDefineBar  = [DEFINE BAR ] + TRANSFORM(lnForNr) + ;
                  [ OF DevPad PROMPT "] + lcPrompt + [" ]
        &lcDefineBar
        lcSelection = "ON SELECTION BAR " + TRANSFORM(lnForNr) + ;
                     " OF DevPad " + paMemo[lnForNr]
        &lcSelection
      ENDIF
    ENDFOR
  ENDIF
ENDIF
>
Christian Isberner
Software Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform