problem about delphi-prism-Collection of common programming errors


  • Ken White
    .net datagridview delphi-prism datagridviewcolumn oxygene
    On a winform, I have a DataGridView and columns within it. For some odd reason, when I run my program, the columns are stacked on top of each other during runtime. No matter what I do, it won’t change. I don’t know if I am setting certain properties or what.During design time:During run time:

  • Jon Lennart Aasenden
    c# iphone cocoa delphi delphi-prism
    Comming from a purely Win32/Delphi background I am somewhat puzzled by my new Mac-centric environment. I have been looking for examples of how to open a Window from code only (C# or Delphi Prism), without using a NIB file. Sadly I find little on this subject. Every example I find makes use of the Interface Builder exclusively.Surely there must be an API call for this somewhere? Or at the very least, being able to construct a NIB at runtime and load from memory?

  • Rudy Velthuis
    .net winforms event-handling delphi-prism
    I am trying to set winform OnMouseDown event to a method I defined called SelectMouseDown.The method is defined as follows:method Maker.SelectMouseDown(Sender: Object; e: System.Windows.Forms.MouseEventArgs);and I am trying to do the following:OnMouseDown += System.Windows.Forms.MouseEventHandler(@Self.SelectMouseDown);The compiler throws the following error message: “There is no overloaded method “OnMouseDown” with 0 parameters.”What am I doing wrong? How do you set events during runtime?Thanks

  • Ken White
    multithreading delphi-prism oxygene
    I created a thread and that thread can be suspended. So, how do I kill or terminate a suspended thread?I tried to ABORT the thread and I got a runtime error message saying that the thread is suspended and it can’t be aborted. I’ve looked for terminate method or something similar and it doesn’t seem to exist.myThread := new Thread(@BigLoop); myThread.Start;myThread.Suspend; myThread.Abort; <<<===exception is raised.So, how do you kill or terminate a suspended thread?

  • Thayananthan Narayanan
    .net usb delphi-prism dongle hasp
    I am trying to add reference to my Delphi Prism project for HASP HL. So, I can communicate with the USB HASP HL dongle.After the initial set up, I couldn’t get my program to communicate with the USB HASP HL dongle. So, I watched a youtube tutorial video by SafeNet or Alladdin and followed their instruction to the teeth exactly, but I ran into another problem, which I can’t seem to figure out. As part of the HASP HL dongle setup, I am supposed to add reference for hasp_net_demo.dll to my project.

  • Thayananthan Narayanan
    .net properties delphi-prism toolstrip backcolor
    I need to have a toolstrip label and its back color changed during runtime, but no matter what I do. It just won’t change its backcolor, even though they give option to change its backcolor. Why is that and how do you get its backcolor property to change during runtime or design time?Thanks in advance,

  • RRUZ
    .net delphi-prism delphi-prism-2010
    I am learning to program in Delphi Prism and have gone through a crash course tutorial, which I thought was great. I learned a lot, but it failed to show me one very important programming technique that all window based programming languages allow the programmer to do. That is open a window from within another window like you click on a button to open a window which executes a command say Form1.Show;I tried that but nothing happens. What am I doing wrong or how do you do that?Thanks,

  • Ken White
    .net windows-8 com-interop delphi-prism oxygene
    I’m getting a very strange crash when testing an existing application in Windows 8. The main application is written in Delphi XE (Win32) and it does some calls to .Net assemblies using COM interop. The current .Net version being used is 3.5.When the application executes on a fresh install of Windows 8, it crashes up to 10 times before it suddenly starts to run properly. Once it has started to do OK it will continue to do so. No error logs or error messages are shown. The application just hangs o

  • Ken White
    linux mono delphi-prism oxygene
    I ran my Delphi-prism (.NET) program on Linux under Mono. It ran for awhile and crashed with the following error message on the terminal. But the same program runs perfectly fine on Windows 7Can anyone tell me why?Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an objectat System.Windows.Forms.XEventQueue+PaintQueue.Dequeue () [0x00000] in <filename unknown>:0at System.Windows.Forms.XplatUIX11.GetMessage (System.Object queue_id, System.Windows

  • Ken White
    .net dllimport delphi-prism oxygene
    I am trying to import dll in my delphi-prism program and never done it before. So, after finding some answer online, I put something together as follows but doesn’t work.MyUtils = public static classprivate[DllImport(“winmm.dll”, CharSet := CharSet.Auto)]method timeBeginPeriod(period:Integer):Integer; external;protectedpublicconstructor;end;Here is how I use it:var tt := new MyUtils; tt.timeBeginPeriod(1);When I run my program, I keep getting the following errors.”MyUtils” does not provide an ac

  • digitalanalog
    namespaces binaryfiles text-files delphi-prism
    I am new to Delphi Prism and been testing it out. When I hear and read programmers bad mouthing Delphi Prism for .NET, now I feel their pain. My God, I am having trouble with writing a simple code to create a binary or textfile and to write into them.Here is the code:Assignfile(f,”c:\Test.txt”); Rewrite(f,1); BlockWrite(f,x,sizeof(x)); closefile(f);I keep getting “unknown identifier” error messages for all the commands.How do you write this code for Delphi Prism? I think, I am not including the

  • digitalanalog
    .net derived-class base-class delphi-prism
    If the question seems vague or confusing, I apologize. This is for Delphi Prism .NET.I have a base class with a variable called bounds of type rectangle. From this class another class derives or inherits and has access to base class variable bounds. During design time, compiler recognizes bounds variable from base class, but during debug-time it keeps raising unknown error for the variable bounds in base class. So, my program compiles successfully but fails to run correctly.Here is the base clas

  • Arioch ‘The
    delphi delphi-prism oxygene
    I’m trying to call Window’s SendMessage method in Delphi Prism, I’ve declared the class as follow:typeMyUtils = public static classprivate[DllImport(“user32.dll”, CharSet := CharSet.Auto)]method SendMessage(hWnd:IntPtr; Msg:UInt32; wParam:IntPtr; lParam:IntPtr):IntPtr; external;protectedpublicend;When I tried to compile, I get the error Unknown identifier “DllImport”I used this as an example, http://stackoverflow.com/questions/2708520/how-to-call-function-createprocess-in-delphi-prism and the sy

Web site is in building