Diff of /ooDialog/branches/4.2.3/trunk/examples/oovideo.rex [r9605] .. [r9606] Maximize Restore

  Switch to side-by-side view

--- a/ooDialog/branches/4.2.3/trunk/examples/oovideo.rex
+++ b/ooDialog/branches/4.2.3/trunk/examples/oovideo.rex
@@ -41,6 +41,12 @@
 /*                                                                          */
 /* Description: Video archive                                               */
 /*                                                                          */
+/*
+ * Note: this program uses the public routine, locate(), to get the full path
+ * name to the directory this source code file is located. In places, the
+ * variable holding this value has been callously abbreviated to 'sd' which
+ * stands for source directory.
+ *
 /****************************************************************************/
 
   srcDir = locate()
@@ -67,7 +73,6 @@
 
  if dlg~initcode > 0 then do
     call errorDialog "Couldn't load the Video dialog"
-    mgr~goBack
     return 99
  end
  else if dlg~execute("SHOWTOP") = .MyDialog~IDOK then do
@@ -92,7 +97,6 @@
     "type" logfile
  end
 
- mgr~goBack
  return
 
 /*--------------------------------- requires -------------------------*/
@@ -105,6 +109,9 @@
 ::class 'MyDialog' subclass RcDialog
 
 ::method initDialog
+   expose sd
+
+   sd = locate()
 
    cb = self~newComboBox(IDC_CB_LOCATION)
    cb~add("Drawer 1")
@@ -124,9 +131,10 @@
    return 0
 
 ::method validate
+   expose sd
    tst = self~newEdit(IDC_EDIT_TAPE_NO)~getText
    if tst <> "" then do
-      call Play .application~srcDir"wav\take.wav"
+      call Play sd"wav\take.wav"
       return .true
    end
    else do
@@ -138,7 +146,9 @@
   return .false
 
 ::method cancel unguarded
-   ret = Play(.application~srcDir"wav\cancel.wav", yes)
+   expose sd
+
+   ret = Play(sd"wav\cancel.wav", yes)
 
    msg   = "Do you really want to cancel?       "
    title = 'Exiting Video Database Application'
@@ -156,4 +166,3 @@
 
    return 0
 
-