Hi all,
I get the above error message in hand code created, based on the Hello, Lesson 13 app.
As I am new to the Clarion code, any help would be very much appreciated.
Regards, Steve
The code is as follows:
PROGRAM
OMIT('***')
* Created with Clarion 9.1
* User: Steve
* Date: 30/06/2014
* Time: 10:43 PM
***
INCLUDE('Keycodes.CLW')
INCLUDE('Errors.CLW')
MAP
UpdateName PROCEDURE
Main PROCEDURE
END
Name1 FILE,DRIVER('TopSpeed'),CREATE
Rec RECORD
Name STRING(20)
END
END
CODE
Main
Main PROCEDURE
AppFrame APPLICATION('Update Name'),AT(,,280,200),SYSTEM,RESIZE,MAX
MENUBAR
MENU('&File'),USE(?File)
ITEM('&Browse Phones'),USE(?FileBrowsePhones)
ITEM,SEPARATOR
ITEM('E&xit'),USE(?FileExit),STD(STD:Close)
END
ITEM('&Update Name!'),USE(?UpdateName)
END
END
CODE
OPEN(AppFrame)
ACCEPT
CASE ACCEPTED()
OF ?UpdateName
Start(UpdateName,25000)
END
END ! ACCEPT
UpdateName PROCEDURE
!ReturnValue LONG,AUTO
window WINDOW('Update Name'),AT(,,185,92),SYSTEM,GRAY,RESIZE,MDI
PROMPT('N&ame:'),AT(14,14),USE(?Prompt1)
ENTRY(@s20),AT(68,13),USE(Name1.Rec.Name),REQ
BUTTON('OK'),AT(45,74),USE(?Ok),REQ,DEFAULT
BUTTON('Cancel'),AT(109,74,32,14),USE(?Cancel)
END
CODE
OPEN(window)
DO OpenFile
GET(Name1,1)
ACCEPT
CASE FIELD()
OF ?Ok
CASE EVENT()
OF EVENT:Accepted
PUT(Name1,1)
IF ERRORCODE() THEN STOP(ERROR()).
POST(EVENT:CloseWindow)
END
OF ?Cancel
CASE EVENT()
OF EVENT:Accepted
POST(EVENT:CloseWindow)
END
END
END
!RETURN
OpenFile ROUTINE
OPEN(Name1,42h)
CASE ERRORCODE()
OF NoError
OROF IsOpenErr
EXIT
OF NoFileErr
CREATE(Name1)
IF ERRORCODE() THEN STOP(ERROR()).
OPEN(Name1,42h)
IF ERRORCODE() THEN STOP(ERROR()).
ELSE
STOP(ERROR())
RETURN
END
I get the above error message in hand code created, based on the Hello, Lesson 13 app.
As I am new to the Clarion code, any help would be very much appreciated.
Regards, Steve
The code is as follows:
PROGRAM
OMIT('***')
* Created with Clarion 9.1
* User: Steve
* Date: 30/06/2014
* Time: 10:43 PM
***
INCLUDE('Keycodes.CLW')
INCLUDE('Errors.CLW')
MAP
UpdateName PROCEDURE
Main PROCEDURE
END
Name1 FILE,DRIVER('TopSpeed'),CREATE
Rec RECORD
Name STRING(20)
END
END
CODE
Main
Main PROCEDURE
AppFrame APPLICATION('Update Name'),AT(,,280,200),SYSTEM,RESIZE,MAX
MENUBAR
MENU('&File'),USE(?File)
ITEM('&Browse Phones'),USE(?FileBrowsePhones)
ITEM,SEPARATOR
ITEM('E&xit'),USE(?FileExit),STD(STD:Close)
END
ITEM('&Update Name!'),USE(?UpdateName)
END
END
CODE
OPEN(AppFrame)
ACCEPT
CASE ACCEPTED()
OF ?UpdateName
Start(UpdateName,25000)
END
END ! ACCEPT
UpdateName PROCEDURE
!ReturnValue LONG,AUTO
window WINDOW('Update Name'),AT(,,185,92),SYSTEM,GRAY,RESIZE,MDI
PROMPT('N&ame:'),AT(14,14),USE(?Prompt1)
ENTRY(@s20),AT(68,13),USE(Name1.Rec.Name),REQ
BUTTON('OK'),AT(45,74),USE(?Ok),REQ,DEFAULT
BUTTON('Cancel'),AT(109,74,32,14),USE(?Cancel)
END
CODE
OPEN(window)
DO OpenFile
GET(Name1,1)
ACCEPT
CASE FIELD()
OF ?Ok
CASE EVENT()
OF EVENT:Accepted
PUT(Name1,1)
IF ERRORCODE() THEN STOP(ERROR()).
POST(EVENT:CloseWindow)
END
OF ?Cancel
CASE EVENT()
OF EVENT:Accepted
POST(EVENT:CloseWindow)
END
END
END
!RETURN
OpenFile ROUTINE
OPEN(Name1,42h)
CASE ERRORCODE()
OF NoError
OROF IsOpenErr
EXIT
OF NoFileErr
CREATE(Name1)
IF ERRORCODE() THEN STOP(ERROR()).
OPEN(Name1,42h)
IF ERRORCODE() THEN STOP(ERROR()).
ELSE
STOP(ERROR())
RETURN
END