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;
...
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');
...
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?
...
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.
...
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...
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...
What is the equivalent of the c# lock() statement in Delphi Prism? In VB.Net it's synclock() I believe.
Thanks in advance.
...
Is there a simple statement that can give a result similar to paramstr() in Delphi?
...
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...
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 the equivalent of C#'s \n and Visual Basic's vbCRLF or vbNewLine in Delphi Prism? Do I have to use Environment.NewLine?
...
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 can I call lockWindowUpdate using Delphi Prism?
...
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?
...
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...
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...
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...
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...
I wrote
function CreateProcess(
lpApplicationName:String;
lpCommandLine:String;
lpProcessAttributes:IntPtr;
lpThreadAttributes:IntPtr;
bInheritHandles:Boolean;
dwCreationFlags:Int32;
lpEnvironment:IntPtr;
lpCurrentDirectory:IntPtr;
...
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
...