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 7,907 of 9,834   
   Liz McGuire to Jeanette   
   Re: HELP - CmView by Peter Zevenaar   
   07 Nov 06 18:31:43   
   
   From: liz@paradoxcommunity.com   
      
   Jeanette wrote:   
   >   
   > I want to create a dlg so the User can enter a Contract # (string)   
      
   Why not use "inpdlg.fsl" for this?  That's what Peter's using and the   
   "basic" example (top push button in cmvdemo.fsl) demonstrates that...   
      
      
   if cmView("Enter","Contract #:","String", atSndRtrn) then   
      ;// do your checks here   
      view(atSndRtrn) ;// for testing, comment in production   
   else   
      ;// the user hit cancel   
   endIf   
      
   > After the input I will check it’s validity   
   > If OK do ‘stuff’   
   > Load in a PRIV tableframe   
   > 	Would like to do this in ARRIVE, INIT or OPEN   
   > Display the form with the PRIV table data   
   > If not OK display message   
   > Don’t open form   
      
   Since all this is separate from cmView, I'm going to skip it for now.   
   If you need help with one of these items, please post separately (so   
   folks know it's a separate issue and don't pass by because they don't   
   know about cmView).   
      
   Except for one thing, if you want "stuff.fsl" to open the input dialog,   
   get user input, validate it and if the user cancels or inputs an invalid   
   value, prevent "stuff.fsl" from finishing its open, then you'd better   
   use the init method and try this:   
      
   if cmView(..) then   
      if cmIsValid(atSndRtrn) then   
        ;// continue   
      else   
        ;// not valid   
        close()   
        return   
      endIf   
   else   
      ;// user hit cancel   
      close()   
      return   
   endIf   
      
   ...not sure if it's needed, but if it doesn't work well, try putting   
   this before close():   
      
   eventInfo.setErrorCode(UserError)   
      
   ...NOTE: I'm not sure you can do all of that in any method before the   
   form finishes opening - The uses clause may not have even executed yet.   
      
   I wouldn't do it that way.  I would get the user input in the form or   
   script that calls "stuff.fsl" and if the input isn't valid, don't even   
   start opening "stuff.fsl".   
      
   > ALSO, I am not sure which cmVIEW I should use.   
      
   The basic one - cmView().  Put your uses clause where the button calling   
   cmView can see it and be sure to open the lib and close it when done.   
   The demo form, second tab, explains this.   
      
   Liz   
      
   --- 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