- Posts: 46
- Thank you received: 0
- Forum
- CodeTyphon Studio
- CodeTyphon Studio Components and Libraries
- Scripting Development
- pl_magicscript
Question pl_magicscript
- LuZZZZi
- Topic Author
- Offline
- Junior Member
-
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.
- Matis A.
-
- Offline
- Moderator
-
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.
- LuZZZZi
- Topic Author
- Offline
- Junior Member
-
- Posts: 46
- Thank you received: 0
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
-
- Away
- Moderator
-
- Ex Pilot, M.Sc, Ph.D
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.
- LuZZZZi
- Topic Author
- Offline
- Junior Member
-
- Posts: 46
- Thank you received: 0
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
-
- Away
- Moderator
-
- Ex Pilot, M.Sc, Ph.D
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.
- LuZZZZi
- Topic Author
- Offline
- Junior Member
-
- Posts: 46
- Thank you received: 0
Thx
Please Log in or Create an account to join the conversation.
- Matis A.
-
- Offline
- Moderator
-
"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.
- LuZZZZi
- Topic Author
- Offline
- Junior Member
-
- Posts: 46
- Thank you received: 0
Thx
Please Log in or Create an account to join the conversation.
- Matis A.
-
- Offline
- Moderator
-
PilotLogic Core Programmer
Please Log in or Create an account to join the conversation.
- LuZZZZi
- Topic Author
- Offline
- Junior Member
-
- Posts: 46
- Thank you received: 0
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.
- Matis A.
-
- Offline
- Moderator
-
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.
- LuZZZZi
- Topic Author
- Offline
- Junior Member
-
- Posts: 46
- Thank you received: 0
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.
- Matis A.
-
- Offline
- Moderator
-
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.
- LuZZZZi
- Topic Author
- Offline
- Junior Member
-
- Posts: 46
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- Matis A.
-
- Offline
- Moderator
-
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.
- LuZZZZi
- Topic Author
- Offline
- Junior Member
-
- Posts: 46
- Thank you received: 0
Thx
Please Log in or Create an account to join the conversation.
- LuZZZZi
- Topic Author
- Offline
- Junior Member
-
- Posts: 46
- Thank you received: 0
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.
- Sternas Stefanos
-
- Away
- Moderator
-
- Ex Pilot, M.Sc, Ph.D
any simple script to test ?
PilotLogic Architect and Core Programmer
Please Log in or Create an account to join the conversation.
- LuZZZZi
- Topic Author
- Offline
- Junior Member
-
- Posts: 46
- Thank you received: 0
Attachments:
Please Log in or Create an account to join the conversation.