| View previous topic :: View next topic |
| Author |
Message |
dackjaniels
Joined: 24 Feb 2009 Posts: 151
|
Posted: Sat Aug 20, 2011 3:02 pm Post subject: Latest StrategyInterfaceUnit.pas error when compiling |
|
|
Error when compiling strategy using the latest pas file (FT v2.8.4).
Error is:
[Error] StrategyInterfaceUnit.pas(1513): Default value required for 'ObjType'
In this code:
| Code: | {-----Delete all objects-----------------------------------------------------}
procedure ObjectsDeleteAll(window: integer = 0; ObjType: TObjectType);
begin
if assigned(IntrfProcsRec.ObjectsDeleteAll) then
IntrfProcsRec.ObjectsDeleteAll(window, integer(ObjType));
end; |
I'm not attempting to use this or any other object related functions in my strategy.
For now I've changed it to...
| Code: | procedure ObjectsDeleteAll(window: integer = 0; ObjType: TObjectType = obj_AnyObject);
|
...just so it will compile, but not sure if this is correct.
Steve |
|
| Back to top |
|
 |
FT Support
Joined: 11 Jul 2009 Posts: 902
|
Posted: Sun Aug 21, 2011 11:44 am Post subject: |
|
|
Hello Steve,
Your fix is correct. Also this issue is fixed in Forex Tester 2.8.5 (will be available soon). _________________ Check our other products here:
www.fx-metropolis.com
www.forexcopier.com |
|
| Back to top |
|
 |
dackjaniels
Joined: 24 Feb 2009 Posts: 151
|
Posted: Sun Aug 21, 2011 10:41 pm Post subject: |
|
|
Great, thank you.
Steve |
|
| Back to top |
|
 |
dackjaniels
Joined: 24 Feb 2009 Posts: 151
|
Posted: Fri Aug 26, 2011 10:17 pm Post subject: |
|
|
Hi,
I just did the upgrade to FT 2.8.5 from within FT then copied across the appropriate .pas files from the examples folder to my development folders and the above error has returned.
Do I need to do a clean install or has this fix not been included in 2.8.5?
Steve |
|
| Back to top |
|
 |
readyyy
Joined: 04 Sep 2011 Posts: 11
|
Posted: Sun Sep 04, 2011 11:57 am Post subject: |
|
|
Got a similar or maybe exactly the same issue in 2.8.5 using delphi. Did exactly the same steps as in Lession 1.
When Compiling with CTRL-F9:
[Error] StrategyInterfaceUnit.pas(600): Unsatisfied forward or external declaration: 'ObjectsDeleteAll'
The following line is red:
procedure ObjectsDeleteAll(window: integer = 0; ObjType: TObjectType = obj_AnyObject); |
|
| Back to top |
|
 |
readyyy
Joined: 04 Sep 2011 Posts: 11
|
Posted: Sun Sep 04, 2011 1:48 pm Post subject: |
|
|
Just tried to compile it with Visual Studio C++, there is also a problem with objectsdeleteall:
1>c:\users\documents\visual studio 2010\projects\firstscript\firstscript\strategyinterfaceunit.h(1692): error C2572: 'ObjectsDeleteAll' : redefinition of default parameter : parameter 1
1> c:\users\documents\visual studio 2010\projects\firstscript\firstscript\strategyinterfaceunit.h(623) : see declaration of 'ObjectsDeleteAll' |
|
| Back to top |
|
 |
FT Support
Joined: 11 Jul 2009 Posts: 902
|
Posted: Wed Sep 07, 2011 4:42 pm Post subject: |
|
|
Hello,
To fix this just replace "window: integer = 0" with "window: integer".
Sorry for this error. _________________ Check our other products here:
www.fx-metropolis.com
www.forexcopier.com |
|
| Back to top |
|
 |
|