home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Science / Science.zip / goat006.zip / SRC.ZIP / goatsrc / Configuration / 1006.0 < prev    next >
Text File  |  2002-08-17  |  2KB  |  61 lines

  1. /* Event Clicked/selected - DONE  1006 */
  2. Arg window self
  3.  
  4. closewindow=0
  5.  
  6. /* Get current index 1013 Spin Button */
  7. ttype=VpGetItemValue(window, 1013, 'INDEX')
  8.  
  9. /* Get item value 1002 Entry Field */
  10. value1 = VpGetItemValue(window,1002)
  11. /* Get item value 1008 Entry Field */
  12. imageparameters = VpGetItemValue(window,1008)
  13. /* Get item value 1004 Entry Field */
  14. value3 = VpGetItemValue(window,1004)
  15. /* Get item value 1009 Entry Field */
  16. textparameters.ttype = VpGetItemValue(window,1009)
  17.  
  18. If length(value1)>0 then
  19.   rc1=stream(value1,'C','QUERY EXISTS')
  20. else rc1=''
  21.   
  22. if length(value3)>0 then
  23.   rc2=stream(value3,'C','QUERY EXISTS')
  24. else rc2=''
  25.     
  26.  
  27. if length(rc1)>0 | length(value1)=0 then
  28.   do
  29.     imageeditor=value1
  30.     closewindow=1
  31.   end
  32. if length(rc2)>0 | length(value3)=0 then
  33.   do
  34.     texteditor.ttype=value3
  35.     closewindow=closewindow+2
  36.   end
  37.  
  38. If closewindow=3 then
  39.   do
  40.     call saveini
  41.     CALL VpWindow window,'CLOSE'
  42.   end
  43.   else
  44.      DO
  45.        if closewindow=2 then
  46.          do
  47.            response=VpMessageBox(window,'GOAT - ERROR','You have entered an invalid path or program for the Image Editor.')
  48.            imageeditor=oldimageeditor
  49.            /* Set item value 1002 Entry Field */
  50.            CALL VpSetItemValue window,1002,oldimageeditor
  51.          end
  52.        if closewindow=1 then
  53.          do
  54.            response=VpMessageBox(window,'GOAT - ERROR','You have entered an invalid path or program for the Text Editor.')
  55.            texteditor.ttype=oldtexteditor.ttype
  56.            /* Set item value 1004 Entry Field */
  57.            CALL VpSetItemValue window,1004,texteditor.ttype
  58.          end
  59.      END
  60.  
  61.