Questions tagged [dwscript]

DWScript is an object-oriented scripting engine for Delphi based on the Delphi language, with extensions borrowed from other Pascal languages (FreePascal, Prism, etc.).

DWScript (Delphi Web Script) is an object-oriented scripting engine for Delphi based on the Delphi language, with extensions borrowed from other Pascal languages (FreePascal, Prism, etc.). It introduces a few Pascal language extensions of its own as well.

DWScript is an open-source project, issues that do not pertain to DWScript programming, usage or integration in host applications are probably best reported in the issue tracker.

93 questions
5
votes
2 answers

Delphi Web Script (DWScript) link a script method to an external control event

I'm wondering if DWScript supports using a script method as an event handler for a control on a Delphi form. For example I want to link a TButton OnClick event to a method that exists in script. I am able to do this with the RemObjects Delphi…
There is no spoon
  • 1,775
  • 2
  • 22
  • 53
5
votes
1 answer

Stack overflow when compiling a dwscript containing a TForm.Create(nil)

I'm trying to create a modal form with dwscript. Im registering the form with the ExposeRtti, then execute the script but it fails on a "Stack overflow" during the Script.Compile. Does anybody have a solution for this error. I surely hope i dont…
Marius
  • 51
  • 1
  • 3
4
votes
2 answers

Calling a script from another one

Suppose I have this function saved in a certain script: function Add(a,b:integer):integer; begin result:=a+b; end; and I have another script which is the following: var a,b,c:integer; a:=1; b:=2; c:=Add(a,b); …
Zeina
  • 1,573
  • 2
  • 24
  • 34
4
votes
2 answers

'designide' must be recompiled when installing DWScript on Delphi XE2

I'm running Delphi XE2 w/ update 3. I've just checked out the read-only branch of DWScript from the svn repository. I try to install dwsLib.dpk from the DelphiXE2 folder but receive the following error: [DCC Fatal Error] dwsLibRuntime.dpk(30): E2225…
RJCookeSE
  • 83
  • 1
  • 8
4
votes
2 answers

What's exactly is the web part of delphi web script?

I'm currently starting to integrate "Delphi Web Script" in my application basically only as a scripting engine (interfacing with functions, classes, etc.); awesome software for the standard delphi open source quality in my opinion, but just for…
pragmatic_programmer
  • 3,566
  • 3
  • 29
  • 36
4
votes
1 answer

DWScript: passing a set-of-enumerated-type will pass an array of integer

From a DWScript script, I call a method of an object instance exposed by the Delphi side. The method takes, among others, an argument which is a set of some enumerated data type. This enumerated datatype is exposed from Delphi to the script. I saw…
fpiette
  • 11,983
  • 1
  • 24
  • 46
4
votes
1 answer

How to declare a method of a Delphi object called from a script having a procedure type argument

In have a Delphi application running a DWS script. The Delphi application exposes an object instance, let's call it "MyApplication", to the script. The exposed object has a method which has one argument being a procedure. Fundamentally by goal is to…
fpiette
  • 11,983
  • 1
  • 24
  • 46
4
votes
0 answers

Invoking overloaded method from Delphi in DWScript

In the dwsDatabaseLibModule.pas unit, which is included with the engine, the constructor of a class is invoked by accessing the class through TProgramInfo.Vars[]. Analogously, I was thinking I could invoke the overloaded method in the same way:…
FHannes
  • 783
  • 7
  • 22
4
votes
1 answer

TdwsUnit performance

Will registering functions in a TdwsUnit yield the same performance as regular magic functions such as those registered in the dwsMathComplexFunctions.pas unit?
FHannes
  • 783
  • 7
  • 22
4
votes
2 answers

DWScript Install

I'm trying to install DWScript in XE2 and I seem to be struggling. I can't find any up to date installation instructions, and the older instructions I did find no longer seems applicable. I've tried both head from the svn repository, and also one of…
4
votes
1 answer

Invoke a dwscript procedure with a class as param from delphi

How can I call from delphi a DWScript procedure which takes a class as param? ex: DWScript side: procedure Proc1(AParam: TObject); begin // do something useful end; Delphi side: var Obj: TObject; Exec.Invoke('Proc1', [obj]);
theo pana
  • 41
  • 1
3
votes
2 answers

How to install DWSScript

I am having trouble installing DWSScript component. I am using Delphi XE2 and when I try to compile the dwsLibRuntime.dpk I get an error ( Array type required ). I am using the latest DWScript source pulled from the project's svn repo. What am I…
opc0de
  • 11,557
  • 14
  • 94
  • 187
3
votes
2 answers

Help with integrating latest Delphi Web Script (DWS) with SynEdit

I decided to have a concerted effort to get the excellent DWScript (Delph Web Script DWS) integrated into a simple IDE using SynEdit. DWScript is currently being agressively developed and has a number of advantages over other Pascal Script…
Brian Frost
  • 13,334
  • 11
  • 80
  • 154
3
votes
1 answer

Delphi Web Script: How to call a Script Function from Delphi Code within an Execution Context?

Imaging this scripting code: procedure A; begin CallToDelphi; end; procedure B; begin // do something end; I have exposed the procedure "CallToDelphi" to the script. So when it is called, I'm back from script in my Delphi code. I now want to…
Steffen Binas
  • 1,463
  • 20
  • 30
3
votes
1 answer

DWScript uses clause

I've hit a wall with DWScript trying to "use" other units example: uses utils, qusers; Syntax Error: Unknown unit "utils" [line: 3, column: 20] any help would be highly appreciated. Additional info: I also add to Script.Config.ScriptPaths the…
user497849