jmpessoa / lazandroidmodulewizard

LAMW: Lazarus Android Module Wizard: Form Designer and Components development model!
247 stars 82 forks source link

Set paths using Paths/Settings dialog box not working #382

Closed WayneSherman closed 3 years ago

WayneSherman commented 3 years ago

Tested Lazarus / LAMW with:

Xubuntu 20.04 64-bit
installed using FPCUPdeluxe ver 1.8.2u
FPC/Lazarus Stable/Stable
also tested with FPC/Lazarus Trunk/Trunk
LAMW git (2021-Jun-05)

After a fresh install, the following LAMW.ini settings have not yet been set: PathToAndroidNDK, PathToAndroidSDK, NDK, PrebuildOSYS

I run Lazarus and open the LAMW Paths/Settings window, and I have these problems:

1) If I set the "Path to Android NDK", the edit box gets cleared when I select an NDK version, or NDK Prebuild, or set the Android SDK path.

2) If I set the "Path to Android SDK", it also gets cleared when I change another setting (like NDK Version, Path, or Prebuild)

3) The NDK Prebuild combo box is populating with a long list of repeated entries for "linux-x86-32" and "linux-x86-64".

Work-Around: If I set these settings by editing the LAMW.ini file directly, then I can successfully create and build new projects.

Forum Reference: https://forum.lazarus.freepascal.org/index.php/topic,54891.0.html

LongDirtyAnimAlf commented 3 years ago

Please provide installed NDK version.

WayneSherman commented 3 years ago

Android NDK revision 22

WayneSherman commented 3 years ago

Also tested with NDK rev 21.4.7075529 with similar problems settings the paths.

WayneSherman commented 3 years ago

This has been fixed. The problem was caused by using OnActivate instead of OnShow to initialize the form controls. On Linux, the OnActivate event of the active form is apparently triggered when another dialog box is displayed (browse folder dialog) which was causing parts of the form to reset.

Fixed in commit: #https://github.com/jmpessoa/lazandroidmodulewizard/commit/a64eff3e47bb185e91ad451f1c70cc45218ff2b2

Reference: https://forum.lazarus.freepascal.org/index.php/topic,54878.msg408795.html#msg408795