- Posts: 15
- Thank you received: 0
×
General discussions, feature requests for CodeTyphon Project and discussions that don't fit in any of the other specific CodeTyphon forum categories.
Solved Add other components to MagicScript
- Javier
- Topic Author
- Offline
- New Member
-
Less
More
8 months 1 week ago #16151
by Javier
Add other components to MagicScript was created by Javier
Hi there
I was wondering if it is possible to add other componets to a MagicScript, like TRXDBgrid for example.
var
f: TForm;
b: TButton;
g : TRXDBGrid ; <----
Thanks in advance for your help
CT : 7.5 /
My OS : Windows 10
I was wondering if it is possible to add other componets to a MagicScript, like TRXDBgrid for example.
var
f: TForm;
b: TButton;
g : TRXDBGrid ; <----
Thanks in advance for your help
CT : 7.5 /
My OS : Windows 10
Please Log in or Create an account to join the conversation.
- Sternas Stefanos
-
- Offline
- Moderator
-
- Ex Pilot, M.Sc, Ph.D
8 months 1 week ago - 8 months 1 week ago #16152
by Sternas Stefanos
PilotLogic Architect and Core Programmer
Replied by Sternas Stefanos on topic Add other components to MagicScript
Yes Sir
use TmscrScript functions:
function Register_Class
procedure Register_Object
procedure Register_Component
procedure Register_Form
function Register_Record
procedure Register_Const
procedure Register_Enum
procedure Register_EnumSet
procedure Register_Method
procedure Register_Variable
procedure Register_Type
I hope to release MagicScriptBuilder tool, at next primary CT version.
use TmscrScript functions:
function Register_Class
procedure Register_Object
procedure Register_Component
procedure Register_Form
function Register_Record
procedure Register_Const
procedure Register_Enum
procedure Register_EnumSet
procedure Register_Method
procedure Register_Variable
procedure Register_Type
I hope to release MagicScriptBuilder tool, at next primary CT version.
PilotLogic Architect and Core Programmer
Last edit: 8 months 1 week ago by Sternas Stefanos.
Please Log in or Create an account to join the conversation.
- Javier
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 15
- Thank you received: 0
8 months 1 week ago #16153
by Javier
Replied by Javier on topic Add other components to MagicScript
Thank you for your answer
I am trying to do this:
ONCREATE FORM:
MSCR_GlobalScripter.Register_Class(TRxDBGrid,'TRxDBGrid') ;
ON SCRIPT:
var
f: TForm;
g: TRxDBGrid;
begin
f := TForm.Create(nil);
f.Caption := 'Test it!';
f.BorderStyle := bsDialog;
f.Position := poScreenCenter;
g := TRxDBGrid.Create(f);
g.Name := 'Grid1';
g.Parent := f;
g.SetBounds(10, 40, 75, 250);
f.ShowModal;
f.Free;
end.
But I get this error:
STACK OVERFLOW OR STACK MISALIGNMENT
Am I forgetting something?
Thaks for your help.
I am trying to do this:
ONCREATE FORM:
MSCR_GlobalScripter.Register_Class(TRxDBGrid,'TRxDBGrid') ;
ON SCRIPT:
var
f: TForm;
g: TRxDBGrid;
begin
f := TForm.Create(nil);
f.Caption := 'Test it!';
f.BorderStyle := bsDialog;
f.Position := poScreenCenter;
g := TRxDBGrid.Create(f);
g.Name := 'Grid1';
g.Parent := f;
g.SetBounds(10, 40, 75, 250);
f.ShowModal;
f.Free;
end.
But I get this error:
STACK OVERFLOW OR STACK MISALIGNMENT
Am I forgetting something?
Thaks for your help.
Please Log in or Create an account to join the conversation.
- Javier
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 15
- Thank you received: 0
8 months 1 week ago #16154
by Javier
Replied by Javier on topic Add other components to MagicScript
Me again 
And How to inherit properties and methods from those components I included
For example if I add an Edit component
MSCR_GlobalScripter.Register_Component(Edit1);
MSCR_GlobalScripter.Register_Component(SpinEdit1);
Edit does not have REPAINT method.
and SpinEdit1 Sent an error "Stack overflow or stack misalignment" and close de Application
for i:= 10 do begin
edit1.Text = IntToStr(i) ;
edit1.Repaint ; <--- Error
spindedit1.Value := i ;
spinfedit1.Repaint ; <--- Error
end;
Thank you for your support.

And How to inherit properties and methods from those components I included
For example if I add an Edit component
MSCR_GlobalScripter.Register_Component(Edit1);
MSCR_GlobalScripter.Register_Component(SpinEdit1);
Edit does not have REPAINT method.
and SpinEdit1 Sent an error "Stack overflow or stack misalignment" and close de Application
for i:= 10 do begin
edit1.Text = IntToStr(i) ;
edit1.Repaint ; <--- Error
spindedit1.Value := i ;
spinfedit1.Repaint ; <--- Error
end;
Thank you for your support.
Please Log in or Create an account to join the conversation.
- Sternas Stefanos
-
- Offline
- Moderator
-
- Ex Pilot, M.Sc, Ph.D
8 months 1 week ago - 8 months 1 week ago #16155
by Sternas Stefanos
PilotLogic Architect and Core Programmer
Replied by Sternas Stefanos on topic Add other components to MagicScript
You must register and REPAINT method of Edit1 and SpinEdit1
MagicScript auto register only Published properties NOT Public procedure, functions, etc.
If some public procedure, functions, etc missing you must register manual.
Look at Registration units of pl_MagicScript
MagicScriptBuilder tool do this job
MagicScript auto register only Published properties NOT Public procedure, functions, etc.
If some public procedure, functions, etc missing you must register manual.
Look at Registration units of pl_MagicScript
MagicScriptBuilder tool do this job
PilotLogic Architect and Core Programmer
Last edit: 8 months 1 week ago by Sternas Stefanos.
The following user(s) said Thank You: Javier
Please Log in or Create an account to join the conversation.