delphi-prism

How set dynamic array size in Delphi Prism (SetLength doesn't work)

What is the equivalent of SetLength using Delphi Prism? I'm trying to size an integer array. var listIndexes: array of integer; begin setLength(listIndexes,5); // doesn't work end; ...

How access datarow value using Delphi Prism

The following line of code generates the compile time error (PE19) There is no overloaded method "get_item" with 0 parameters. Any idea on how to access the data in the datarow using Delphi Prism? indexValue:=dtIndexValues.Rows[1].Item('IndexID'); ...

How convert string to integer in Delphi Prism

In Delphi, there is a function StrToInt() that converts a string to an integer value; there is also IntToStr(), which does the reverse. These functions doesn't appear to be part of Delphi Prism, and I can't find a reference to something that can do that. How can it be done? ...

Hidden Features of Delphi prism

Continuing with the series "Hidden features" I think it's time to Delphi Prism. I believe that's a great way to encourage the development of delphi prism, is that we all share what we discovered in the daily use of this great language. Bye. ...

How to instantiate a COM object using interop in Delphi Prism

What is the correct syntax for instantiating a COM object in Delphi Prism using COM interop - new does not seem to do the job. I've added it as a reference to the website project. Here is the relevant code: method _Default.Button1_Click(sender: System.Object; e: System.EventArgs); var FModel: MarketBuilderLib.MarketBuilderModel; be...

Strange GAC error in ASP.Net application

I'm experiencing a strange failure when trying to view my website under IIS. If I create a new ASP.Net web site application, don't modify it at all and run it (F5) the web page shows up with the error: Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review t...

Is there a lock() statement in Delphi Prism?

What is the equivalent of the c# lock() statement in Delphi Prism? In VB.Net it's synclock() I believe. Thanks in advance. ...

What is the paramstr equivalent in Delphi Prism

Is there a simple statement that can give a result similar to paramstr() in Delphi? ...

Is there a problem in my delphi prism (.net) compiler?

when i try to compile my application in delphi prism, i got these errors C:\Users\Burak\Documents\Visual Studio 2008\Projects\Project1\WindowsApplication1\WindowsApplication1\Main.pas(6,3) : Error : (PE17) Namespace "Windows" does not exist or has no public types C:\Users\Burak\Documents\Visual Studio 2008\Projects\Project1\Windows...

Is Delphi Prism a new version of Delphi .net ?

First of all (before this question get down voted): I am a developer developing 99,99% of my programs using Delphi targeting Win32 (developing in Delphi 7 still, very slowly migrating to Delphi 2010). When Delphi 2006 or 2007 (can't remember which version at the moment) came out I bought the RAD Studio edition to be able to start develo...

What is Delphi Prism LineFeed

What is the equivalent of C#'s \n and Visual Basic's vbCRLF or vbNewLine in Delphi Prism? Do I have to use Environment.NewLine? ...

Why are there so many $IF DEFINED(CLR) in the VCL/RTL?

I've just compared the Delphi 2009 VCL/RTL code to the 2010 one. I noticed that there are many $IF DEFINED(CLR) conditional defines and they got more in the 2010 version. I thought that these conditional defines have fall into disuse, since Delphi .NET has been discontinued. The VCL/RTL aren't really used in Delphi Prism? Or are they? ...

How call lockWindowUpdate using DelphiPrism

How can I call lockWindowUpdate using Delphi Prism? ...

How can I pass a Delphi string to a Prism DLL?

We try to pass a string from a native Delphi program to a Delphi Prism DLL. We have no problem passing integers, but strings are mismatched in the DLL. We saw Robert Love's code snippet in response to another question, but there is no code for the native Delphi program. How can we pass strings from Delphi to a Delphi Prism DLL? ...

Why does Delphi Prism complain about System type mismatches?

I encountered a strange compiler error in Delphi Prism 2010 that I am unable to resolve. The error is calling a method on an object defined in a third-party assembly that manipulates a specialized image format. The assembly itself was compiled against the .Net 2.0 Runtime. Despite providing the correct list of parameters, I consistently...

Cast int to Enum in Delphi Prism

Basically the same as this question, but in Delphi Prism: http://stackoverflow.com/questions/29482/cast-int-to-enum-in-c I manage to do it from a string: YourEnum := Enum.Parse(TypeOf(YourEnum), "mystr") as YourEnum But I tried the following, and get a type mismatch error: YourEnum := 3 as YourNum Any ideas what the syntax is for...

How to make Delphi Prism indexed properties visible to C# when properties are not default

I have several Delphi Prism classes with indexed properties that I use a lot on my C# web applications (we are migrating a big Delphi Win32 system to ASP.Net). My problem is that it seems that C# can't see the indexed properties if they aren't the default properties of their classes. Maybe I'm doing something wrong, but I'm completely lo...

List.AddRange inline declaration

Hello, This may seem an easy question, but not to me, also a search has led to nothing. Up until now the only .net programming I have done is with Delphi Prism. With Prism I can do things like: var l := new List<String>(['A','B','C']); or var l := new List<String>; l.AddRange(['A','B','C']; but can I do a similar thing in C#, or d...

How to call function CreateProcess in Delphi Prism?

I wrote function CreateProcess( lpApplicationName:String; lpCommandLine:String; lpProcessAttributes:IntPtr; lpThreadAttributes:IntPtr; bInheritHandles:Boolean; dwCreationFlags:Int32; lpEnvironment:IntPtr; lpCurrentDirectory:IntPtr; ...

delphi prism online resources

google search on ''delphi prism' , ''delphi prism resources'' or ''delphi prism code snippets'' reveal almost no good site at all are there any good programming site(s) with some good amount of code snippets and tutorials on delphi prism thanks in advance ...