| Subject |
Re: dBase Tutorial HELP needed |
| From |
Mervyn Bick <invalid@invalid.invalid> |
| Date |
Tue, 15 Mar 2022 11:13:34 +0200 |
| Newsgroups |
dbase.getting-started |
On 2022/03/15 04:08, Jake Herlihy wrote:
> I've been having issues with the tutorial, some of my own making. On Ken's advice, I scrapped everything I'd done for a week & started over.
> I've followed the instructions to the letter but continue having issues with
> Save as Custom to get the MyControls.cc.
> Below is scenario:
>
> When I open dBase, the following message box appears:
> Error: file does not exist: MyControls.cc
> I click on close 3 times & it goes away.
In the Command Panel type ? _app.inifile and press Enter
This will display the following in the Results Panel
C:\Users\Your_user_name\AppData\Local\dBASE\dBASE2019\Bin\PLUS.INI
Mark and copy this into the clipboard.
Close dBASE. This is important. If you don't the following won't work.
Open Notepad. Select Open from the File menu and paste from the
clipboard into the "File name:" entry field and open the file.
Use Ctrl-F to open the Find dialogue window. Enter [Custom] to find the
correct section. Delete the line containing MyControls.cc, save the
file and close it. You can now reopen dBASE.
>
> The other issue is when I type in:
> onGotFocus = this.keyboard( "{Home}" in Events in onGotFocus
> When I try to save it by hitting Enter or Ctrl S or File save, it changes to below:
> onGotFocus = {;this.keyboard( "{Home}" )}
> AND I GET THE FOLLOWING:
> Error: Error creating file: C:\dbasetutorial\MyControls.cc
onGotFocus is an event which is triggered when an object gets focus.
Normally giving an object focus does nothing. One can, however, assign
an event handler to an event. Whenever the event is triggered the code
in the event handler is executed.
An event handler can't be a stand_alone dBASE command such as
this.keyboard("{home}" The event handler assigned to an event must be
either a codeblock (an executable block of code) e.g onGotFocus =
{;this.keyboard("{home}")} or a function normally created within the
class definition e.g onGotFocus = class::code_to_execute_onGotFocus
which will execute the dBASE command.
function code_to_execute_onGotFocus
this.keyboard("{home}")
return
MyControls.cc should save without a problem even if it contains errors.
> This has been going on for 4 very frustrating days.
> Anybody please HELP!
The tutorial has been checked very carefully and thoroughly over the
years so there shouldn't be any problems. If something doesn't work it
is almost always due to a typo. :-(
I know it doesn't seem like it now but it will get better. :-)
Mervyn.
|
|