Changeset 386 for sans/Release/trunk/NCNR_User_Procedures/SANS
- Timestamp:
- Jun 16, 2008 4:00:54 PM (15 years ago)
- Location:
- sans/Release/trunk/NCNR_User_Procedures/SANS/Analysis/Models
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Release/trunk/NCNR_User_Procedures/SANS/Analysis/Models/Packages/FilesToRemove++.itx
r363 r386 1 1 IGOR 2 WAVES/T IExtFolders IExtFiles IHFolders2 WAVES/T IExtFolders 3 3 BEGIN 4 "Put in Igor Extensions" "SANS_Analysis.xop" "Put in Igor Help Files" 5 "NCNR_Extensions" "NCNR_Extensions" "NCNR_Help_Files" 4 "Put in Igor Extensions" 5 "NCNR_Extensions" 6 "Mac_XOP" 7 "Win_XOP" 6 8 END 7 9 X SetScale/P x 0,1,"", IExtFolders; SetScale y 0,0,"", IExtFolders 10 11 WAVES/T IExtFiles IHFolders 12 BEGIN 13 "SANS_Analysis.xop" "Put in Igor Help Files" 14 "NCNR_Extensions" "NCNR_Help_Files" 15 END 8 16 X SetScale/P x 0,1,"", IExtFiles; SetScale y 0,0,"", IExtFiles 9 17 X SetScale/P x 0,1,"", IHFolders; SetScale y 0,0,"", IHFolders -
sans/Release/trunk/NCNR_User_Procedures/SANS/Analysis/Models/Packages/NCNR_Install.ipf
r374 r386 24 24 Abort "You've already run the installer. If you want to re-install, you'll need a fresh copy from the NCNR website." 25 25 endif 26 27 // check for install problems 28 // locked folders, OS errors _err will be non-zero if there is an error 29 Variable UP_err,IH_err,IE_err 30 UP_err = FolderPermissionCheck("User Procedures:") 31 IH_err = FolderPermissionCheck("Igor Help Files:") 32 IE_err = FolderPermissionCheck("Igor Extensions:") 33 // Print UP_err,IH_err,IE_err 34 35 String alertStr="" 36 if(UP_err != 0) 37 alertStr += "User Procedures has no write permission.\r" 38 endif 39 if(IH_err != 0) 40 alertStr += "Igor Help Files has no write permission.\r" 41 endif 42 if(IE_err != 0) 43 alertStr += "Igor Extensions has no write permission.\r" 44 endif 45 46 if(UP_err != 0 || IH_err != 0 || IE_err != 0) 47 alertStr += "You will need to install manually." 48 DoAlert 0,alertStr 49 return(0) 50 endif 51 26 52 27 53 // check the platform … … 319 345 endif 320 346 347 // check for permissions 348 Variable UP_err,IH_err,IE_err 349 UP_err = FolderPermissionCheck("User Procedures:") 350 IH_err = FolderPermissionCheck("Igor Help Files:") 351 IE_err = FolderPermissionCheck("Igor Extensions:") 352 353 Print UP_err,IH_err,IE_err 354 355 String alertStr="" 356 if(UP_err != 0) 357 alertStr += "User Procedures has no write permission. Error = "+num2Str(UP_err)+"\r" 358 else 359 alertStr += "User Procedures permission is OK.\r" 360 endif 361 if(IH_err != 0) 362 alertStr += "Igor Help Files has no write permission. Error = "+num2Str(IH_err)+"\r" 363 else 364 alertStr += "Igor Help Files permission is OK.\r" 365 endif 366 if(IE_err != 0) 367 alertStr += "Igor Extensions has no write permission. Error = "+num2Str(IE_err)+"\r" 368 else 369 alertStr += "Igor Extensions permission is OK.\r" 370 endif 371 372 if(UP_err != 0 || IH_err != 0 || IE_err != 0) 373 alertStr += "You will need to install manually." 374 endif 375 376 Notebook $nb text="\r\r**Folder Permissions**\r" 377 Notebook $nb text=AlertStr +"\r" 378 379 321 380 Notebook $nb text="\r\r**InstalledVersion.txt**\r" 322 381 Notebook $nb text=textStr +"\r" … … 465 524 return(0) 466 525 End 526 527 //check each of the three folders 528 // folder string MUST have the trailing colon 529 Function FolderPermissionCheck(folderStr) 530 String folderStr 531 Variable refnum 532 String str="delete me" 533 534 String igorPathStr,resultStr="" 535 PathInfo Igor 536 igorPathStr = S_Path 537 538 NewPath /Q/O tmpPath, igorPathStr+folderStr 539 540 541 Open/Z/P=tmpPath refnum as "test.txt" 542 if(V_flag != 0) 543 return(V_flag) 544 else 545 FBinWrite refnum,str 546 Close refnum 547 548 // Print "folder OK" 549 DeleteFile/Z/P=tmpPath "test.txt" 550 endif 551 552 553 return(V_flag) 554 end -
sans/Release/trunk/NCNR_User_Procedures/SANS/Analysis/Models/Packages/Wrapper_v40.ipf
r381 r386 118 118 119 119 120 //obvious use 120 //obvious use, now finds the most recent data loaded, finds the folder, and pops the menu with that selection... 121 // 121 122 Function W_LoadDataButtonProc(ba) : ButtonControl 122 123 STRUCT WMButtonAction &ba … … 130 131 endif 131 132 Execute "A_LoadOneDData()" 133 134 ControlUpdate/W=WrapperPanel popup_0 135 //instead of a simple controlUpdate, better to pop the menu to make sure that the other menus follow 136 // convoluted method to find the right item and pop the menu. 137 138 // data is plotted, so get the "new" top graph 139 topGraph= WinName(0,1) //this is the topmost graph, and should exist, but... 140 if(cmpstr(topGraph,"")==0) 141 return(0) 142 endif 143 String list,folderStr 144 Variable num 145 list = TraceNameList(topGraph,";",1) //want the last item in the list 146 num= ItemsInList(list) 147 FolderStr = StringFromList(num-1,list,";") 148 folderStr = folderStr[0,strlen(folderStr)-3] //remove the "_i" that the loader enforced 149 list = W_DataSetPopupList() 150 num=WhichListItem(folderStr,list,";",0,0) 151 if(num != -1) 152 PopupMenu popup_0,mode=num+1,win=WrapperPanel 153 ControlUpdate/W=WrapperPanel popup_0 154 155 // fake mouse up 156 Struct WMPopupAction ps 157 ps.eventCode = 2 //fake mouse up 158 // ps.popStr = str 159 DataSet_PopMenuProc(ps) 160 161 // new data set has been selected, always uncheck the "use cursors", other checkboxes are benign. 162 CheckBox check_0,win=WrapperPanel,value=0 163 endif 132 164 break 133 165 endswitch 134 166 135 // ControlUpdate/W=WrapperPanel popup_0136 //instead of a simple controlUpdate, better to pop the menu to make sure that the other menus follow137 // but not sure how to get the most recently loaded file as the selected item - bring the138 // wrapper panel back to the top - then pop -139 167 140 168 return 0 … … 398 426 // print "str = ",str 399 427 //set the item in the coef popup, and pop it 400 PopupMenu popup_2 mode=(num+1)428 PopupMenu popup_2 win=WrapperPanel,mode=(num+1) 401 429 402 430 Struct WMPopupAction ps … … 1155 1183 STRUCT WMCheckboxAction &cba 1156 1184 1157 String topGraph= WinName(0,1) //this is the topmost graph 1158 String ciStr = CsrInfo(A , topGraph) 1159 1160 ControlInfo/W=wrapperpanel popup_0 1161 String folderStr=S_Value 1162 String traceList = TraceNameList(topGraph, ";", 1 ) 1163 1185 1164 1186 switch( cba.eventCode ) 1165 1187 case 2: // mouse up 1188 // check to make sure there really is a "topmost" graph 1189 String topGraph= WinName(0,1) //this is the topmost graph 1190 if(cmpstr(topGraph,"")==0) //no graphs, uncheck and exit 1191 CheckBox check_0,value=0 1192 return(0) 1193 endif 1194 1195 String ciStr = CsrInfo(A , topGraph) 1196 1197 ControlInfo/W=wrapperpanel popup_0 1198 String folderStr=S_Value 1199 String traceList = TraceNameList(topGraph, ";", 1 ) 1200 1166 1201 Variable checked = cba.checked 1202 1167 1203 if(checked) 1168 1204 //print "add the cursors to the topmost graph, if the data set is there, or move them" -
sans/Release/trunk/NCNR_User_Procedures/SANS/Analysis/Models/PlotUtilsMacro_v40.ipf
r338 r386 141 141 SetDataFolder root: 142 142 KillWaves $n0,$n1,$n2,$n3,$n4,$n5 // kill the default waveX that were loaded 143 //if(DataFolderExists("root:Packages:NIST"))144 //String/G root:Packages:NIST:gLastFileName = filename145 //endif //set the last file loaded to the one NOT loaded143 if(DataFolderExists("root:Packages:NIST")) 144 String/G root:Packages:NIST:gLastFileName = filename 145 endif //set the last file loaded to the one NOT loaded 146 146 return //quits the macro 147 147 endif
Note: See TracChangeset
for help on using the changeset viewer.