home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.paradox      To crash or not to crash, asks Borland      9,834 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 8,445 of 9,834   
   Jim Hargan to Kenneth   
   Re: Unlocking problem...   
   10 Apr 07 10:45:32   
   
   From: noJimspam@omitThisHarganonline.com   
      
   On Tue, 10 Apr 2007 09:28:39 -0400, Kenneth wrote:   
   > I have removed the OPEN statement as per Liz's suggestion   
   > (which eliminated the possible "space after alias"   
   > difficulty Tony mentioned), and have added the Return   
   > statements as per Tony's (subtle ) suggestion.   
   >   
   > The code now looks like this, but still generates the   
   > Unassigned Variable error on the attach line:   
   >   
   >   
   > method arrive(var eventInfo MoveEvent)   
   > var   
   > 	tc1 tCursor   
   > 	PeopleKS form   
   > 	Viewed uiObject   
   > endVar   
   >   
   > if not tc1.attach(Viewed)   
   > 	then errorShow()   
   > endif   
      
   That's because the uiObject variable named Viewed has not been assigned. To   
   assign it, attach it to the uiObject. And you *must* insert a return after   
   errorshow, just like Tony said.   
      
   method arrive(var eventInfo MoveEvent)   
   var   
   	tc1 tCursor   
   	PeopleKS form   
   	Viewed uiObject   
   endVar   
      
   if not viewed.attach(objectName) then   
      msgInfo("Arrive Error","Could not attach uiObject to tvMyTable")   
      return   
   endif   
   if not tc1.attach(Viewed) then   
      msgInfo("Arrive Error","Could not attach tcursor to MyTable.db")   
      return   
   endif   
      
   BTW, verbose error messages are a pain to write, but tell me exactly what   
   went wrong -- very important when executing multiple nested library   
   methods. Not so important for simple form methods, but a good habit. You'll   
   thank me later .   
      
   Jim Hargan   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca