Lazarus - Mac OSX Debugging Error
everyone!
I used to use Delphi 7 on my PC, but now that I bought a MacBook (Mid 2012
- OSX Mountain Lion), I wanted to continue programming in Pascal and have
a similar Interface. Lazarus seems to deliver most of the things I wanted,
but it seems to run into a lot of errors, when compiling even the simplest
applications! To test it, I made a simple "Russian Roulette" application,
just for fun, but the program just freezes, when launched or even when
compiled inside Lazarus. When launching it from command line, It shows me
the following error:
TCarbonButton.SetFocus Error: SetKeyboardFocus failed with result -30585
I don't think my coding is the problem, but I guess I should include it:
unit RussianRouletteUnit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
Buttons, ExtCtrls;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
Kugeln: TLabeledEdit;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
Number: Integer;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
begin
if Random(StrToInt(Kugeln.Text))+1 = 1 then
begin
Button1.SetFocus;
Memo1.Color := clred;
Memo1.Text := 'BOOM';
Memo1.Lines.Add('HEADSHOT');
end;
end;
initialization
randomize;
end.
I hope you guys can help me out, any help is apprechiated :D
No comments:
Post a Comment