× Components and Libraries for Scripting Development, discussions, problems and suggestions

Question pl_magicscript

  • LuZZZZi
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
1 month 5 days ago - 1 month 5 days ago #14757 by LuZZZZi
pl_magicscript was created by LuZZZZi
I'm using the new Magicscript package for my project.
1. Is there any documentation available for this package ?
2. I'm trying to register self defined records with nested records.

but I'm not able to get or put a value to the area definition. The setter variant variable is of type int64 but I don't know how to get the record structure.



ex:
procedure TLibrary_Graphics.RegisterRecords(aScript: TmscrScript);
begin
With aScript Do
Begin
With Register_Record('TRegionOperation', TypeInfo(TRegionOperation)) Do
Begin
Register_Element('ROType', 'TRegionOperationType', RecGetProp, RecSetProp);
Register_Element('Source1','Integer', RecGetProp, RecSetProp);
Register_Element('Source2','Integer', RecGetProp, RecSetProp);
Register_Element('Dest','Integer', RecGetProp, RecSetProp);
Register_Element('CombineMode','TRegionCombineMode', RecGetProp, RecSetProp);
Register_Element('Rect','TRect', RecGetProp, RecSetProp);
end;
end;
end;

procedure TLibrary_Graphics.RecSetProp(aInstance: Pointer; aTypeInfo: PTypeInfo; const aPropName: String; aValue: Variant);
type
PRect = ^TRect;
var
_ro: TRegionOperation;
_ptr: Int64;
name: String;
begin
if aTypeInfo=TypeInfo(TRegionOperation) then
begin
_ro:= TRegionOperation(aInstance^);
if aPropName = UpperCase('ROType') then
_ro.ROType:= aValue
else
if aPropName = UpperCase('Source1') Then
_ro.Source1:= aValue
else
if aPropName = UpperCase('Source2') Then
_ro.Source2:= aValue
else
if aPropName = UpperCase('Dest') Then
_ro.Dest:= aValue
else
if aPropName = UpperCase('CombineMode') Then
_ro.CombineMode:= aValue
else
if aPropName = UpperCase('Rect') Then
begin
name:= aTypeInfo^.Name;
_ptr:= Int64(aValue); ??????
_ro.Rect:= PRect(Int64(aValue))^; ??????
end;
end;
end;


Cheers
Last edit: 1 month 5 days ago by LuZZZZi.

Please Log in or Create an account to join the conversation.

More
1 month 5 days ago - 1 month 5 days ago #14758 by Matis A.
Replied by Matis A. on topic pl_magicscript
Thanks
pl_Magicscript is under development
soon we will release and unit import tool
with auto registration abilities

PilotLogic Core Programmer
Last edit: 1 month 5 days ago by Matis A..

Please Log in or Create an account to join the conversation.

  • LuZZZZi
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
1 month 2 days ago #14767 by LuZZZZi
Replied by LuZZZZi on topic pl_magicscript
I'm trying to implement these event:

TGetDesignerFormEvent = function(APersistent: TPersistent):TCustomForm of object;

but the CallHandler function can not receive a value. What can I do?

Thx

Please Log in or Create an account to join the conversation.

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
1 month 2 days ago - 1 month 2 days ago #14768 by Sternas Stefanos
Replied by Sternas Stefanos on topic pl_magicscript
Sir
first of all
pl_MagicStript is under development as @matis post above for 2 years now.

2) Please look at :

codetyphon\CodeOcean\pl_MagicScript\samples\rttimodules\
codetyphon\CodeOcean\pl_MagicScript\samples\rttimodules\pl_GLScene\
codetyphon\CodeOcean\pl_MagicScript\samples\rttimodules\pl_Graphics32\


folders for more import to MagicStript samples.
These files produced by Unreleased MagicScript import utility



3) If your code is Class published event property
then when you register parent class type to MagicStript, automatic this event register and to MagicStript.

And please give us time...
MagicScript is the future of pascal scripting...

PilotLogic Architect and Core Programmer
Attachments:
Last edit: 1 month 2 days ago by Sternas Stefanos.

Please Log in or Create an account to join the conversation.

  • LuZZZZi
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
1 month 3 days ago #14773 by LuZZZZi
Replied by LuZZZZi on topic pl_magicscript
Hi Sternas,

thx for your quick reply. I'm very interested in this package because I will build a project for me. I do have some experiences working with pascal scripting and I would like to help you to expand these package.



Ephraisto;)

Please Log in or Create an account to join the conversation.

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
1 month 3 days ago - 1 month 3 days ago #14774 by Sternas Stefanos
Replied by Sternas Stefanos on topic pl_magicscript
Thanks Sir
we are always open for help (Ευχαριστώ πάρα πολύ, Vielen Dank)

pl_MagicScript is the "Evolution" and the "Recoding" of pl_TitanScript

MagicScript Vision is:
A simple and fast Pascal Scripter with MultiOS and MultiCPU abilities.
I give to our LAB team before 2 years, the above vision with the restriction
NOT to use assembly to this pkg, which is the main problem of Pascal Scripting.

Until now MagicScript
-Has NO "Types" syntax
-Has NO "Virtual", "Overload", etc methods
-Can handle "Register" Object, Classes, Simple Records, Constants, procedure, functions, events, variables, etc

I hope at some of next LAB CT releases to put and the Import utility.

PilotLogic Architect and Core Programmer
Last edit: 1 month 3 days ago by Sternas Stefanos.

Please Log in or Create an account to join the conversation.

  • LuZZZZi
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
1 month 22 hours ago #14780 by LuZZZZi
Replied by LuZZZZi on topic pl_magicscript
I do have defined a record structure 2 times and the result of that was a sigsev error in the register_element function. Is it possible to raise an error with some informations for the reason of that?


Thx

Please Log in or Create an account to join the conversation.

More
1 month 16 hours ago - 1 month 16 hours ago #14781 by Matis A.
Replied by Matis A. on topic pl_magicscript
If you run script program in CT debugging, YES.

"Register" types and elements for the scripter, "Script API" it's critical.
and you must test it before run a script.

Some times "Script API" can't be the same with CT API, it's NOT possible.

PilotLogic Core Programmer
Last edit: 1 month 16 hours ago by Matis A..

Please Log in or Create an account to join the conversation.

  • LuZZZZi
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
4 weeks 1 day ago #14782 by LuZZZZi
Replied by LuZZZZi on topic pl_magicscript
I'm not able to get a value from the callmethod "CREATE". It is always Nil.


Thx

Please Log in or Create an account to join the conversation.

More
4 weeks 1 day ago - 4 weeks 1 day ago #14783 by Matis A.
Replied by Matis A. on topic pl_magicscript
Any script sample with the problem, for test ?

PilotLogic Core Programmer
Last edit: 4 weeks 1 day ago by Matis A..

Please Log in or Create an account to join the conversation.

  • LuZZZZi
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
4 weeks 1 day ago #14784 by LuZZZZi
Replied by LuZZZZi on topic pl_magicscript
ex:
program test;

var f: TForm;
begin
f:= TForm.Create(Nil);
if f=Nil then
ShowMessage('Error....')
else
f.Show;
end.


the callmethod

if aClassType = TForm Then
begin
If aMethodName = 'CREATE' then
Result:= fmscrInteger(TForm(aInstance).Create(TComponent(fmscrInteger(aCallVar.Params[0]))))
end

Thx for help

Please Log in or Create an account to join the conversation.

More
4 weeks 1 day ago - 4 weeks 1 day ago #14785 by Matis A.
Replied by Matis A. on topic pl_magicscript
Sir
TForm.Create is all ready register in the pl_MagicStript

did you look at
codetyphon\CodeOcean\pl_MagicScript\samples\01_SimpleIDE\ ?

did you test
codetyphon\CodeOcean\pl_MagicScript\samples\scripts\Forms\ sample\ ?

PilotLogic Core Programmer
Last edit: 4 weeks 1 day ago by Matis A..

Please Log in or Create an account to join the conversation.

  • LuZZZZi
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
4 weeks 1 day ago - 4 weeks 1 day ago #14786 by LuZZZZi
Replied by LuZZZZi on topic pl_magicscript
Only the first example is working all the others are crashing.
One message is that there is no Free function available
and the other is that Tform is nil.

In which unit do I can extend the Form functionality?
I believe that I don't understand the concept in the right way. I have written all my changes in the mrtti_forms unit.


Thx
Last edit: 4 weeks 1 day ago by LuZZZZi.

Please Log in or Create an account to join the conversation.

More
4 weeks 1 day ago - 4 weeks 1 day ago #14787 by Matis A.
Replied by Matis A. on topic pl_magicscript
Here, ALL samples in
codetyphon\CodeOcean\pl_MagicScript\samples\scripts\Forms\
directory working OK

Your OS ?
Your CT version ?

PilotLogic Core Programmer
Last edit: 4 weeks 1 day ago by Matis A..

Please Log in or Create an account to join the conversation.

  • LuZZZZi
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
4 weeks 1 day ago #14788 by LuZZZZi
Replied by LuZZZZi on topic pl_magicscript
My OS verion is win 8.1 x64 and my CT is the newest lab version.

Please Log in or Create an account to join the conversation.

More
4 weeks 1 day ago - 4 weeks 1 day ago #14789 by Matis A.
Replied by Matis A. on topic pl_magicscript
I don't know, in our tests ALL are OK

Win64 ent



Win64 ent 2



MacOS 10.15.5






If you want I can screen pl_MagicScript samples to any CT Host OS.

PilotLogic Core Programmer
Attachments:
Last edit: 4 weeks 1 day ago by Matis A..

Please Log in or Create an account to join the conversation.

  • LuZZZZi
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
4 weeks 21 hours ago #14790 by LuZZZZi
Replied by LuZZZZi on topic pl_magicscript
I do have sent my source Code to your admin Addresse for checking the issues that I have.


Thx

Please Log in or Create an account to join the conversation.