Recent

Author Topic: form inactive  (Read 2634 times)

elmar69

  • Newbie
  • Posts: 3
form inactive
« on: November 20, 2014, 05:28:49 pm »
I startet moving my Lazarus application to MacosX. Application works fine on Windows and Linux. But on MACOS op applications Main form does not react on mouseclicks or keyboard - even if the cursor is shown inside TEdit widget.

Any Idea what might go wrong?

I'm using current Lazarus 1.2.6 on Yosemite Macos 10.10.1

jwdietrich

  • Hero Member
  • *****
  • Posts: 1131
    • formatio reticularis
Re: form inactive
« Reply #1 on: November 20, 2014, 07:29:55 pm »
On Mac OS X, applications are bundles, i.e. special opaque folder structures that contain the executable and additional resources. If you double-click the bundle rather than the raw executable everything should work fine.

You can create a bundle easily with Project > Project Options... > Create Application Bundle.

See http://wiki.lazarus.freepascal.org/Carbon_interface_FAQ#When_I_execute_application_compiled_for_Carbon_interface.2C_it_can.27t_be_focused for details.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.0.10 | FPC 3.2.0 | PPC, Intel, ARM | macOS, Windows, Linux

elmar69

  • Newbie
  • Posts: 3
Re: form inactive
« Reply #2 on: November 21, 2014, 06:13:19 pm »
On Mac OS X, applications are bundles, i.e. special opaque folder structures that contain the executable and additional resources. If you double-click the bundle rather than the raw executable everything should work fine.

Ok, that helps.

Lazarus should warn user when debugging without App-folder.

jwdietrich

  • Hero Member
  • *****
  • Posts: 1131
    • formatio reticularis
Re: form inactive
« Reply #3 on: November 21, 2014, 09:21:13 pm »
Lazarus should warn user when debugging without App-folder.

You are right, that would be a useful feature for the Mac version of Lazarus. You might want to submit this suggestion to the bug tracker.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.0.10 | FPC 3.2.0 | PPC, Intel, ARM | macOS, Windows, Linux

 

TinyPortal © 2005-2018