Forum Discussion
tristaanogre
9 years agoEsteemed Contributor
Quick update:
I tried a number of things before trying this. The below code works with my object in DelphiScript
procedure test;
var myObject1;
begin
OgreODT.Classes.Declare('test');
OgreODT.Classes.test.AddProperty('prop1');
OgreODT.Classes.test.AddProperty('prop2');
OgreODT.Classes.test.AddMethod('logBlah', 'Unit1.testODT');
myObject1 := OgreODT.Classes.New('test');
aqObject.CallMethod(myObject1, 'logBlah');
end;
I'm really not sure why this makes a difference but, for whatever reason, this works. It's a good short term work around while I try and figure other stuff out but, effectively, I have a way now, in DelphiScript, to declare and instantiate objects in code.