Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. Module m1 = edit("1. MY_MODULE", false)
  2. save(m1)
  3. close(m1)
  4.  
  5. Module m1 = edit ("/myproject/myfolder/mysubfolder/1. MY_MODULE", false)
  6.  
  7. string fullPathToMod = "/myproject/myfolder.."
  8. Item i = item fullPathToMod;
  9. if null i then error "there is no item called " fullPathToMod
  10. if "Module" != type i then error "there is an item, but it's not a module, it's a " type i
  11.  
  12. void checkModule(string folderPath, string mName, Skip list, int listSize, int listLastIndex, string headers[], string heading[], string headerKey, bool uniqueKey, string combinedKey[]){
  13. if (module mName){
  14. Folder f = folder(folderPath)
  15. current = f
  16. Module m = edit(folderPath""mName, false)
  17. current = m
  18. Object o = first(m) // error sometimes: Se ha pasado un parametro Module null en una posición de argumento 1
  19. if (o == null){
  20. loadModule(m, list, listSize, listLastIndex, headers, heading)
  21. } else {
  22. updateModule(m, mName, list, listSize, listLastIndex, heading, headerKey, headers, uniqueKey, combinedKey)
  23. save(m)
  24. close(m)
  25. }
  26. if (lastError() != ""){
  27. print "Error: " lastError() "n"
  28. }
  29. } else {
  30. print "No module " mName ".n"
  31. }
  32.  
  33. current = m
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement