par Cedric » 07 Oct 2003 à 14:14
Voici un bout de code d'une appli sur laquelle je travaille.Je ne sais pas quel ane batté a écrit ça, mais voila exactement ce qu'il ne fait pas faire.Même si "Les vrais programmeurs ne commentent pas leur code. C'était dur à écrire, ça doit être dur à lire".Bon, sans plus attendre, voici l'horreur :Agent Import@Command([Compose] ; "Import") ;@Command([EditGotoField] ; "Body") ;@Command( [FileImport]) ;@Command([FileSave]) ;@PostedCommand([FileCloseWindow]) ;@PostedCommand([ToolsRunMacro] ; "Import1")Agent Import1@Command([OpenView] ; "(Import)") ;@Command([ToolsRunMacro] ; "Import2") ;@PostedCommand([ToolsRunMacro] ; "Import3")Agent Import2FIELD Form := Form ;@SetField("Form" ; "Import2") ;SELECT @AllAgent Import3@Command([OpenView] ; "(ImportText)") ;@Command([EditDocument] ; "1") ;@Command([FileSave]) ;@Command([FileCloseWindow]) ;@Command([ToolsRunMacro] ; "Import4") ;@PostedCommand([ToolsRunMacro] ; "Import5")Agent Import4FIELD Form := Form ;@SetField("Form" ; "ChampSepare") ;SELECT @AllAgent Import5@Command([OpenView] ; "(ChampSepare)") ;@Command([EditDocument] ; "1") ;@Prompt([OK]; "title";"Import Ok");@Command([FileSave]) ;@Command([FileCloseWindow]) ;@Command([ToolsRunMacro] ; "Import6") ;@Command([FileCloseWindow]) ;@Command([FileCloseWindow]) ;@PostedCommand([ToolsRunMacro] ; "Import7")Agent Import6FIELD Form := Form ;@SetField("Form" ; "FicheSecurite") ;SELECT @AllAgent Import7@Command([OpenView] ; "Securite" ; @Environment("SOPREMANomProduit")) ;@Command([EditDocument] ; "1") ;@PostedCommand([FileSave]) ;@PostedCommand([FileCloseWindow]) ;@PostedCommand([FileCloseWindow]);@PostedCommand([FileCloseWindow]);@PostedCommand([OpenView] ; "Securite")Agent Import8@Command([OpenView] ; "Produit" ; @Environment("SOPREMANomProduit")) ;@PostedCommand([ToolsRunMacro] ; "Import9")Agent Import9FIELD FicheSecurite := FicheSecurite ;@SetField ("FicheSecurite" ; "1");SELECT @All