
CW20: Enhancement \ Fixes : Suggestions
Below are problems or suggested enhancements to templates that I have
reported several times, but never received an answer on. As of version
CW 2.002.01 these problems still exists.
I was hoping they could be addressed before CW2.003 comes out! <G>
1) In "FileCtrl.TPW"
#GROUP(%FileControlInitialize)
-and-
#GROUP(%FileControlSetFlags)
We could use an #EMBED point at the end of each of these groups.
If you are trying to gather this information, or add exrta files
to %ProcFilesUsed you need to do it at this point.
2) "Control.TPW" - Simon Burrows found this
On a FORM, (Insert mode) If a user begins to enter data, then presses
CANCEL, the msg "do you want to save" comes up. If the user presses
the
CANCEL button on this dialog, then presses the "OK" button on the
form;
They will get the dreaded ERRORCODE() =3D 33, ("Record Not Available")=
In the "ClosingWindow" ROUTINE the following should be added under
the
"IF RecordChanged" area
IF RecordChanged
#IF(%ActionOnCancel =3D 'Offer to save changes')
CASE StandardWarning(Warn:SaveOnCancel)
OF Button:Yes
POST(Event:Accepted,%OKControl)
Update::Reloop =3D 1
EXIT ! KBE - 2/18/97 Fixes
Delete
OF Button:No
OF BUTTON:Cancel
SELECT(%FirstField)
Update::Reloop =3D 1 =
EXIT ! KBE - 2/18/97 Fixes
Delete
END
#ELSE
IF StandardWarning(Warn:ConfirmCancel) =3D Button:No
SELECT(%FirstField)
Update::Reloop =3D 1
EXIT ! KBE - 2/18/97 Fixes
Delete
END
#ENDIF
END
3) "Relations.TPW"
You are missing two "ROLLBACK" commands in the update and delete
process.
If the action on the children fails, you handle the ROLLBACK OK, but
if
the action fails on the "Parent" you just RETURN.
I know that when you close the file, w/ a LOGOUT w/o a matching
COMMIT it
will do a ROLLBACK. But this will not work properly.
The Forms are not the procedure opening the file, and thus when you
leave
the Form, back to the Browse, the user will probably do additional
editing
on other records in the file, before leaving the Browse. If the
browse is
the procedure opening the file the "Auto Rollback" will occur, but
will
wipeout all the other chanages the user made. Evn this is not always
correct;
The files being affected may have been opened as few levels above the
browse
in question...
Quote:
>> IN: RIUpdate:%[11]File FUNCTION(BYTE FromForm)
#IF(%LogoutDesired)
ROLLBACK ! Added by KBE 1/7/97
#ENDIF
Should be added, before the last
DO RICloseFiles
RETURN(1)
This is about 10 lines from the end of the ROUTINE.
I am not talking about at the end of the ROUTINE the last
DO RICloseFiles
RETURN(0)
Quote:
>> IN: RIDelete:%[11]File FUNCTION
#IF(%LogoutDesired)
ROLLBACK ! Added by KBE 1/7/97
#ENDIF
Should be added, before the last
DO RICloseFiles
RETURN(1)
This is about 10 lines from the end of the ROUTINE.
I am not talking about at the end of the ROUTINE the last
DO RICloseFiles
RETURN(0)
This is After the
DELETE(%CurrentPrimary)
Inside
IF ERRORCODE()
RISaveError
StandardWarning(Warn:RIDeleteError,'%CurrentPrimary')
4) Also, your "KeyCodes.CLW" file causes us to get "dynamic pool limits"
when we compile. You have over 700 lines of EQUATES and we found that
in our entire APP (48 all together) we only use about 51 EQUATES from
this file.
Can you figure out a better way of doing this instead of creating so
many equates?
Thanks for your time and effort in reviewing my concerns\suggestions.
-- =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Visit our web page - http://www.*-*-*.com/
"Begin a new era of productivity; =
leave the mundane aspects of programming to us!"=A9
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D