problem about oxygene-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:

  • sav
    .net nullable oxygene
    I’m writing a program in Oxygene .net There seems to be a problem with how I am handling nullable typesnamespace RULER;interfaceusesSystem,System.Drawing,System.Collections,System.Collections.Generic,System.Windows.Forms,System.ComponentModel;type/// <summary>/// Summary description for Settings./// </summary>Settings = public partial class(System.Windows.Forms.Form)privatemethod Settings_Shown(sender: System.Object; e: System.EventArgs);method GetLowerBound : System.Nullable<Doub

  • 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?

  • 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

  • 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