DevCPT Vote
- DGDanforth
- Posts: 1061
- Joined: Tue Sep 17, 2013 1:16 am
- Location: Palo Alto, California, USA
- Contact:
Re: DevCPT Vote
Folks,
I just ran the same test using Marco solution and here is the run time message I get
(the same as with Chris' solution)
"command error: object Controllers.EditMsg inconsistently imported from MyCpTemplates"
I assume means the code files generated by the 'new' DevCPT are detectably different from from the code files generated by the (old) original DevCPT.
That says neither solution is acceptable.
Josef,
Can you please rebuild the BB system for each branch "Marco" and "Chris" and see if either of them work consistently?
-Doug
I just ran the same test using Marco solution and here is the run time message I get
(the same as with Chris' solution)
"command error: object Controllers.EditMsg inconsistently imported from MyCpTemplates"
I assume means the code files generated by the 'new' DevCPT are detectably different from from the code files generated by the (old) original DevCPT.
That says neither solution is acceptable.
Josef,
Can you please rebuild the BB system for each branch "Marco" and "Chris" and see if either of them work consistently?
-Doug
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: DevCPT Vote
> "command error: object Controllers.EditMsg inconsistently imported from MyCpTemplates"
Doug, can you show us MyCpTemplates and the complete sequence of steps that
reproduce the error message. Also please specify the BlackBox version that you are using
for your tests.
I would expect that the bug fix creates changes in the symbol files only for those cases where the bug shows up.
All other cases should produce an unchanged symbol file.
The BlackBox system itself does not contain a situation where the bug shows up, so the bug fix should not
produce any changed symbol files for the BlackBox system.
I recompiled for example Controllers without any change in the symbol file.
- Josef
Doug, can you show us MyCpTemplates and the complete sequence of steps that
reproduce the error message. Also please specify the BlackBox version that you are using
for your tests.
I would expect that the bug fix creates changes in the symbol files only for those cases where the bug shows up.
All other cases should produce an unchanged symbol file.
The BlackBox system itself does not contain a situation where the bug shows up, so the bug fix should not
produce any changed symbol files for the BlackBox system.
I recompiled for example Controllers without any change in the symbol file.
- Josef
- DGDanforth
- Posts: 1061
- Joined: Tue Sep 17, 2013 1:16 am
- Location: Palo Alto, California, USA
- Contact:
Re: DevCPT Vote
The MyCpTemplates module inserts snippets of text into the focus view for the
purpose of reducing the amount of typing when creating a CP program. The
procedures in MyCpTemplates are called by buttons in a form (not shown here).
I am using Blackbox 1.6.
Here is the code
purpose of reducing the amount of typing when creating a CP program. The
procedures in MyCpTemplates are called by buttons in a form (not shown here).
I am using Blackbox 1.6.
Here is the code
Code: Select all
MODULE MyCpTemplates;
IMPORT
Controllers,
Dialog,
HostWindows,
Ports,
WinApi;
CONST
eol = 0DX;
tab = 09X;
ltab = 0AX;
TYPE
Par = Dialog.Par;
EditMsg = Controllers.EditMsg;
VAR
clipboard*: BOOLEAN;
(**)
(*Glyph pasting and refocusing*)
PROCEDURE SetFocus;
VAR res: INTEGER; win: HostWindows.Window;
BEGIN
win := HostWindows.dir.Focus(Controllers.targetPath);
res := WinApi.SetFocus(win.wnd);
res := WinApi.UpdateWindow(win.wnd)
END SetFocus;
PROCEDURE PasteThisChar (char: CHAR);
VAR editMsg: EditMsg;
BEGIN
editMsg.char := char;
editMsg.clipboard := clipboard;
editMsg.op := Controllers.pasteChar;
Controllers.Forward(editMsg);
SetFocus;
END PasteThisChar;
PROCEDURE PasteString (IN s: ARRAY OF CHAR);
VAR
i: INTEGER;
BEGIN
FOR i := 0 TO LEN(s$)-1 DO PasteThisChar(s[i]) END
END PasteString;
(*Types*)
PROCEDURE Bool*;
BEGIN
PasteString("BOOLEAN");
END Bool;
PROCEDURE Byte*;
BEGIN
PasteString("BYTE");
END Byte;
PROCEDURE SChar*;
BEGIN
PasteString("SHORTCHAR");
END SChar;
PROCEDURE Char*;
BEGIN
PasteString("CHAR");
END Char;
PROCEDURE SInt*;
BEGIN
PasteString("SHORTINT");
END SInt;
PROCEDURE Int*;
BEGIN
PasteString("INTEGER");
END Int;
PROCEDURE LInt*;
BEGIN
PasteString("LONGINT");
END LInt;
PROCEDURE SReal*;
BEGIN
PasteString("SHORTREAL");
END SReal;
PROCEDURE Real*;
BEGIN
PasteString("REAL");
END Real;
PROCEDURE Pointer*;
BEGIN
PasteString("POINTER TO ");
END Pointer;
PROCEDURE Array*;
BEGIN
PasteString("ARRAY OF ");
END Array;
PROCEDURE Record*;
BEGIN
PasteString("RECORD");
END Record;
PROCEDURE Module*;
CONST
s = "MODULE ident; [ImportList] DeclSeq" + eol
+ "[BEGIN StatementSeq]" + eol
+ "[CLOSE StatementSeq] END ident." + eol;
BEGIN
PasteString(s);
END Module;
PROCEDURE If*;
CONST
s = "IF Expr THEN StatementSeq" + eol
+ "{ELSIF Expr THEN StatementSeq}" + eol
+ "[ELSE StatementSeq]" + eol
+ "END" + eol;
BEGIN
PasteString(s);
END If;
PROCEDURE For*;
CONST
s = "FOR ident := Expr TO Expr [BY ConstExpr] DO" + eol
+ "StatementSeq" + eol
+ "END" + eol;
BEGIN
PasteString(s);
END For;
PROCEDURE While*;
CONST
s = "WHILE Expr DO" + eol +
"StatementSeq" + eol +
" END;" + eol;
BEGIN
PasteString(s);
END While;
PROCEDURE Procedure*;
CONST
s = "PROCEDURE name (args);" + eol +
"CONST c=val;" + eol +
"VAR v: type;" + eol +
"BEGIN" + eol +
"statments" + eol +
" END name;" + eol;
BEGIN
PasteString(s);
END Procedure;
PROCEDURE Case*;
CONST
s = "CASE n OF" + eol +
"| num: statement" + eol +
"| num: statement" + eol +
"ELSE" + eol +
"statments" + eol +
" END;" + eol;
BEGIN
PasteString(s);
END Case;
END MyCpTemplates.
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: DevCPT Vote
> can you show us MyCpTemplates and the complete sequence of steps that
reproduce the error message.
I cannot reproduce the problem.
Please give us also the the "complete sequence of steps that
reproduce the error message".
Start with a clean 1.6 installation.
Then step-by-step what must be done for producing the error message.
- Josef
reproduce the error message.
I cannot reproduce the problem.
Please give us also the the "complete sequence of steps that
reproduce the error message".
Start with a clean 1.6 installation.
Then step-by-step what must be done for producing the error message.
- Josef
- DGDanforth
- Posts: 1061
- Joined: Tue Sep 17, 2013 1:16 am
- Location: Palo Alto, California, USA
- Contact:
Re: DevCPT Vote
Steps
(1) Compile DevCPT as modified for Chris' solution.
(2) Exit BlackBox.
(3) Start BlackBox.
(4) Compile MyCpTemplates (as given in above code).
(5) Execute using a commader @ MyCpTemplates.Int
You should get the message "command error: object Controllers.EditMsg inconsistently imported from MyCpTemplates"
-Doug
(1) Compile DevCPT as modified for Chris' solution.
(2) Exit BlackBox.
(3) Start BlackBox.
(4) Compile MyCpTemplates (as given in above code).
(5) Execute using a commader @ MyCpTemplates.Int
You should get the message "command error: object Controllers.EditMsg inconsistently imported from MyCpTemplates"
-Doug
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: DevCPT Vote
> Steps
I still don't get the error message.
- Josef
I still don't get the error message.
- Josef
- DGDanforth
- Posts: 1061
- Joined: Tue Sep 17, 2013 1:16 am
- Location: Palo Alto, California, USA
- Contact:
Re: DevCPT Vote
I just reinstalled BB1.6 from the Center's download and ran the program again
and still got the same error message.
and still got the same error message.
- DGDanforth
- Posts: 1061
- Joined: Tue Sep 17, 2013 1:16 am
- Location: Palo Alto, California, USA
- Contact:
Re: DevCPT Vote
Perhaps one of our other Center members can attempt to run my code with Chris' DevCPT modifications and report whether or not they get an error.
If I am the cause by either incorrectly coding Chris' solution or have some other (strange) state on my system then I apologies in advance, but let's see what other people say.
-Doug
If I am the cause by either incorrectly coding Chris' solution or have some other (strange) state on my system then I apologies in advance, but let's see what other people say.
-Doug
- DGDanforth
- Posts: 1061
- Joined: Tue Sep 17, 2013 1:16 am
- Location: Palo Alto, California, USA
- Contact:
Re: DevCPT Vote
Does the program write 'INTEGER' to the focus view?Josef Templ wrote:> Steps
I still don't get the error message.
- Josef
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: DevCPT Vote
> Does the program write 'INTEGER' to the focus view?
Yes, it does write 'INTEGER'.
Can you please compare your version of DevCPT with
https://github.com/BlackBoxCenter/black ... od/CPT.odc
There must be a difference.
You can use F9 to search for differences in the two top most text documents.
- Josef
Yes, it does write 'INTEGER'.
Can you please compare your version of DevCPT with
https://github.com/BlackBoxCenter/black ... od/CPT.odc
There must be a difference.
You can use F9 to search for differences in the two top most text documents.
- Josef