Subject Re: Overwrite Memory File
From Mervyn Bick <invalid@invalid.invalid>
Date Sun, 18 Feb 2018 13:47:36 +0200
Newsgroups dbase.getting-started
Attachment(s) test_msgbox.wfm

On 2018-02-17 9:21 PM, Norman Snowden wrote:

> Case Solved! I forgot that the Command SET Safety OFF should have been included. I found the answer in Alan Simpson's classic dBASE IV 4 1.1 Book

It's well over 20 years since I last used it but I still have his dBASE
III+ Programmers Reference book in my bookshelf.  It was a veritable
gold-mine in it's day and worth every cent it cost me.

>
> A problem further: Using Plus 10 every time I started to type SET ... the Program crashed! Message was" dBASE has encountered an internal error and must close"

It's a while since I used dBASE Plus 10 but I have no recollection of
having problems with SET.  This is a command that most programmers use
regularly and I can't recall having seen it reported in the bug-reports
newsgroup.

>
> I also have Plus 11 and using it I was able to type in SET SAFET OFF successfully.
>
> I don't use Plus 11 normally because in it Message Boxes are extremely slow to Appear and  also extremely slow to disappear!

I use dBASE 11.3 in Windows 10 and message boxes appear instantly.  Try
the little example program attached.  On my computer the message box
appears as the mouse button is released.

What could be causing the problem is if your program has, for example,
to churn through a long table before deciding that it needs to open a
message box.  Using OODML instead of XDML should improve things but it's
quite a steep learning curve.

There may also be ways of speeding up your existing code depending, of
course, on what your program actually does.  Back in the day of SLOW
computers a lot of effort went into cutting down the time spent in a
loop.  Today, with nice fast computers, this has become less of a priority.


Mervyn.





** END HEADER -- do not remove this line
//
// Generated on 2018/02/18
//
parameter bModal
local f
f = new test_msgboxForm()
if (bModal)
   f.mdi = false // ensure not MDI
   f.readModal()
else
   f.open()
endif

class test_msgboxForm of FORM
   with (this)
      height = 16.0
      left = 106.5714
      top = 8.5909
      width = 40.0
      text = ""
   endwith

   this.PUSHBUTTON1 = new PUSHBUTTON(this)
   with (this.PUSHBUTTON1)
      onClick = class::PUSHBUTTON1_ONCLICK
      height = 1.0909
      left = 9.0
      top = 7.0
      width = 15.2857
      text = "Show msgbox"
   endwith


   function PUSHBUTTON1_onClick()
      msgbox('How slow was that?','test msgbox',0)
      return

endclass