Forex Tester Forum (Professional Training Software for Traders) Forum Index Forex Tester Forum (Professional Training Software for Traders)

Back to main site   Risk disclosure
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Latest StrategyInterfaceUnit.pas error when compiling

 
Post new topic   Reply to topic    Forex Tester Forum (Professional Training Software for Traders) Forum Index -> Bug reports
View previous topic :: View next topic  
Author Message
dackjaniels



Joined: 24 Feb 2009
Posts: 151

PostPosted: Sat Aug 20, 2011 3:02 pm    Post subject: Latest StrategyInterfaceUnit.pas error when compiling Reply with quote

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
View user's profile Send private message
FT Support



Joined: 11 Jul 2009
Posts: 902

PostPosted: Sun Aug 21, 2011 11:44 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
dackjaniels



Joined: 24 Feb 2009
Posts: 151

PostPosted: Sun Aug 21, 2011 10:41 pm    Post subject: Reply with quote

Great, thank you.

Steve
Back to top
View user's profile Send private message
dackjaniels



Joined: 24 Feb 2009
Posts: 151

PostPosted: Fri Aug 26, 2011 10:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
readyyy



Joined: 04 Sep 2011
Posts: 11

PostPosted: Sun Sep 04, 2011 11:57 am    Post subject: Reply with quote

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
View user's profile Send private message
readyyy



Joined: 04 Sep 2011
Posts: 11

PostPosted: Sun Sep 04, 2011 1:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
FT Support



Joined: 11 Jul 2009
Posts: 902

PostPosted: Wed Sep 07, 2011 4:42 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Forex Tester Forum (Professional Training Software for Traders) Forum Index -> Bug reports All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group