Latest StrategyInterfaceUnit.pas error when compiling

Bug reports and errors in the program
Message
Author
dackjaniels
Posts: 151
Joined: Tue Feb 24, 2009 1:03 pm

Latest StrategyInterfaceUnit.pas error when compiling

#1 Postby dackjaniels » Sat Aug 20, 2011 10:02 am

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: Select all

{-----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: Select all

procedure ObjectsDeleteAll(window: integer = 0; ObjType: TObjectType = obj_AnyObject);


...just so it will compile, but not sure if this is correct.

Steve

FT Support
Posts: 905
Joined: Sat Jul 11, 2009 10:54 am

#2 Postby FT Support » Sun Aug 21, 2011 6:44 am

Hello Steve,

Your fix is correct. Also this issue is fixed in Forex Tester 2.8.5 (will be available soon).
Check our other product here:
http://www.forexcopier.com

dackjaniels
Posts: 151
Joined: Tue Feb 24, 2009 1:03 pm

#3 Postby dackjaniels » Sun Aug 21, 2011 5:41 pm

Great, thank you.

Steve

dackjaniels
Posts: 151
Joined: Tue Feb 24, 2009 1:03 pm

#4 Postby dackjaniels » Fri Aug 26, 2011 5:17 pm

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

readyyy
Posts: 14
Joined: Sun Sep 04, 2011 6:36 am

#5 Postby readyyy » Sun Sep 04, 2011 6:57 am

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);

readyyy
Posts: 14
Joined: Sun Sep 04, 2011 6:36 am

#6 Postby readyyy » Sun Sep 04, 2011 8:48 am

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'

FT Support
Posts: 905
Joined: Sat Jul 11, 2009 10:54 am

#7 Postby FT Support » Wed Sep 07, 2011 11:42 am

Hello,

To fix this just replace "window: integer = 0" with "window: integer".
Sorry for this error.
Check our other product here:
http://www.forexcopier.com


Return to “Bug reports”

Who is online

Users browsing this forum: No registered users and 13 guests