Welcome, Guest
Username: Password: Remember me
Components and Libraries for Scripting Development, discussions, problems and suggestions

TOPIC:

pl_magicscript 4 years 6 months ago #14757

  • LuZZZZi
  • LuZZZZi's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 87
  • Thank you received: 1
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

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

Last edit: by LuZZZZi.

pl_magicscript 4 years 6 months ago #14758

  • Matis A.
  • Matis A.'s Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1129
  • Thank you received: 170
Thanks
pl_Magicscript is under development
soon we will release and unit import tool
with auto registration abilities
PilotLogic Core Programmer

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

Last edit: by Matis A..

pl_magicscript 4 years 6 months ago #14767

  • LuZZZZi
  • LuZZZZi's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 87
  • Thank you received: 1
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.

pl_magicscript 4 years 6 months ago #14768

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4538
  • Thank you received: 1116
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:

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

Last edit: by Sternas Stefanos.

pl_magicscript 4 years 6 months ago #14773

  • LuZZZZi
  • LuZZZZi's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 87
  • Thank you received: 1
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.

pl_magicscript 4 years 6 months ago #14774

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4538
  • Thank you received: 1116
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

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

Last edit: by Sternas Stefanos.

pl_magicscript 4 years 6 months ago #14780

  • LuZZZZi
  • LuZZZZi's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 87
  • Thank you received: 1
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.

pl_magicscript 4 years 6 months ago #14781

  • Matis A.
  • Matis A.'s Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1129
  • Thank you received: 170
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

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

Last edit: by Matis A..

pl_magicscript 4 years 6 months ago #14782

  • LuZZZZi
  • LuZZZZi's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 87
  • Thank you received: 1
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.

pl_magicscript 4 years 6 months ago #14783

  • Matis A.
  • Matis A.'s Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1129
  • Thank you received: 170
Any script sample with the problem, for test ?
PilotLogic Core Programmer

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

Last edit: by Matis A..

pl_magicscript 4 years 6 months ago #14784

  • LuZZZZi
  • LuZZZZi's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 87
  • Thank you received: 1
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.

pl_magicscript 4 years 6 months ago #14785

  • Matis A.
  • Matis A.'s Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1129
  • Thank you received: 170
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

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

Last edit: by Matis A..

pl_magicscript 4 years 6 months ago #14786

  • LuZZZZi
  • LuZZZZi's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 87
  • Thank you received: 1
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

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

Last edit: by LuZZZZi.

pl_magicscript 4 years 6 months ago #14787

  • Matis A.
  • Matis A.'s Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1129
  • Thank you received: 170
Here, ALL samples in
codetyphon\CodeOcean\pl_MagicScript\samples\scripts\Forms\
directory working OK

Your OS ?
Your CT version ?
PilotLogic Core Programmer

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

Last edit: by Matis A..

pl_magicscript 4 years 6 months ago #14788

  • LuZZZZi
  • LuZZZZi's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 87
  • Thank you received: 1
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.

pl_magicscript 4 years 6 months ago #14789

  • Matis A.
  • Matis A.'s Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1129
  • Thank you received: 170
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:

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

Last edit: by Matis A..

pl_magicscript 4 years 6 months ago #14790

  • LuZZZZi
  • LuZZZZi's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 87
  • Thank you received: 1
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.

pl_magicscript 4 years 5 months ago #14891

  • LuZZZZi
  • LuZZZZi's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 87
  • Thank you received: 1
Hi folks,

There is another issue in the treeview. In the functions section the first entrance is not completely shown.


Thx

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

pl_magicscript 4 years 5 months ago #14892

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4538
  • Thank you received: 1116
Thanks Sir
any simple script to test ?
PilotLogic Architect and Core Programmer

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

pl_magicscript 4 years 5 months ago #14893

  • LuZZZZi
  • LuZZZZi's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 87
  • Thank you received: 1
I saw that not all of the entrances in the functions section not fully viewed. I have added some "fresh" methods to register_classes function. See picture
Attachments:

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