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

TOPIC:

pl_magicscript 4 years 1 week ago #14894

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4506
  • Thank you received: 1101
You can attach here any change to pl_MagicScript API.
We will test it and add to LAB CT
PilotLogic Architect and Core Programmer

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

pl_magicscript 3 years 11 months ago #14935

  • LuZZZZi
  • LuZZZZi's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 79
  • Thank you received: 1
Hello Guys,

I do have a problem with this package. See pictures



I have checked for double definition but the program crashes every time. Do you have a tip how can I clear this behavior?

Thx
Attachments:

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

pl_magicscript 3 years 11 months ago #14936

  • LuZZZZi
  • LuZZZZi's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 79
  • Thank you received: 1
I have found that issue. I have made a double definition. Sorry.


Thx

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

pl_magicscript 3 years 11 months ago #14937

  • Matis A.
  • Matis A.'s Avatar
  • Away
  • Moderator
  • Moderator
  • Posts: 1070
  • Thank you received: 152
Thanks
have fun
PilotLogic Core Programmer

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

pl_magicscript 3 years 11 months ago #14962

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

I'm not able to use more then 2 units in the uses clause. The third one wasn't found. The error message was "Unable to open file".


Thx

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

Last edit: by LuZZZZi.

pl_magicscript 3 years 11 months ago #15000

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

uses clause is working ok, because I have forgotten to add the extension to an added unit.



Thx

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

pl_magicscript 3 years 11 months ago #15001

  • Matis A.
  • Matis A.'s Avatar
  • Away
  • Moderator
  • Moderator
  • Posts: 1070
  • Thank you received: 152
Thanks Sir
have fun
PilotLogic Core Programmer

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

Last edit: by Matis A..

pl_magicscript 3 years 9 months ago #15144

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

I would like to register this source code:

AnchorAlign: array[TAlign] of TAnchors = (
[akLeft, akTop],
[akLeft, akTop, akRight],
[akLeft, akRight, akBottom],
[akLeft, akTop, akBottom],
[akRight, akTop, akBottom],
[akLeft, akTop, akRight, akBottom],
[akLeft, akTop] );

Is it possible to use Register_ConstWithType?


Thx

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

pl_magicscript 3 years 9 months ago #15146

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4506
  • Thank you received: 1101
This is a Variable Sir
NOT Const
PilotLogic Architect and Core Programmer

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

Last edit: by Sternas Stefanos.

pl_magicscript 3 years 9 months ago #15151

  • LuZZZZi
  • LuZZZZi's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 79
  • Thank you received: 1
No Sir. It is a structure out of the controls unit.

See here: lazarus-ccr.sourceforge.io/docs/lcl/controls/anchoralign.html

Thx

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

Last edit: by LuZZZZi.

pl_magicscript 3 years 9 months ago #15152

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4506
  • Thank you received: 1101
No Sir, I don't think it's possible, but you can test this...

oh
www.pilotlogic.com/codetyphon/webhelp/lc...ols/anchoralign.html

More in our Wiki
here...
PilotLogic Architect and Core Programmer

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

Last edit: by Sternas Stefanos.

pl_magicscript 3 years 9 months ago #15153

  • LuZZZZi
  • LuZZZZi's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 79
  • Thank you received: 1
Can you please give me a small example how to use Register_ConstWithType.

Thx

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

pl_magicscript 3 years 9 months ago #15154

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4506
  • Thank you received: 1101
Sir
TmscrScript don't have Register_ConstWithType procedure

Some of CodeTyphon elements can't register to MagicScript.
It's a scripter, NOT a Pascal compiler.

If you want to Register ALL elements of CodeTyphon to MagicScript
then I think you are in a wrong way.

This is the common problem of Scripters Developers and users.
They want to Register many elements of the programming tool in a Scripter
and to make the scripter same with the compiler or like a compiler.

But this is not possible.

..
PilotLogic Architect and Core Programmer

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

Last edit: by Sternas Stefanos.

pl_magicscript 3 years 9 months ago #15155

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

I know that I can't register all types of Pascal syntax and you are right that the Register_ConstWithType is not a public function. I'm converting pascal source as much as possible to a script.


Thx

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

pl_magicscript 3 years 6 months ago #15423

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

I would like to get the defined values of a registered enumeration type Register_Enum('TMyName','mnOne,mnTwo,mnTree');
I would like to get the enumeration values. I have got the the TmscrVarForBase class via the Find function. But I'm not able to get the enumeration values as a string.
I'm able to get them?


Cheers

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

pl_magicscript 2 years 9 months ago #16208

  • LuZZZZi
  • LuZZZZi's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 79
  • Thank you received: 1
Dear Sirs,

is it possible to set the FClassRef property of TmscrVarForClass from private to public?


Thx

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

pl_magicscript 2 years 9 months ago #16209

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4506
  • Thank you received: 1101
TmscrVarForClass has
property ClassRef: TClass read FClassRef;   
PilotLogic Architect and Core Programmer

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

pl_magicscript 2 years 9 months ago #16210

  • LuZZZZi
  • LuZZZZi's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 79
  • Thank you received: 1
Thx Sir.

My intension is to register a class by name. I believe that this is not possible in the moment.
Register_Class(AClass, 'TPersistent','TMyClass');

Thx.

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

pl_magicscript 2 years 9 months ago #16211

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4506
  • Thank you received: 1101
Yes is NOT possible yet.
We will move Code from pl_TitanScript to pl_MagicScript for this.
But we need time.
This month, in our LAB, we focus at "Database" CT components layer.

So, we need and your help if this is possible...
PilotLogic Architect and Core Programmer

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

Last edit: by Sternas Stefanos.

pl_magicscript 2 years 9 months ago #16212

  • LuZZZZi
  • LuZZZZi's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 79
  • Thank you received: 1
I need more specific infos about your "Database" project to made a decision to help you.


 

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