Widgets based on NSPopUpButton do not set LCLObject caption to match newly selected item
Original Reporter info from Mantis: djenkins @dfjenkins
-
Reporter name: David Jenkins
Original Reporter info from Mantis: djenkins @dfjenkins
- Reporter name: David Jenkins
Description:
Widgets based on NSPopUpButton do not set LCLObject caption to match newly selected item. TCocoaWSWinControl.GetText is called but desired value is not stored in the NSControl.value.
Code needs to be added to TCocoaWSWinControl.GetText that checks if obj is NSPopUpButton and if so set the Title.
Additional information:
Patch
Index: cocoawscommon.pas
===================================================================
--- cocoawscommon.pas (revision 22609)
+++ cocoawscommon.pas (revision 22656)
@@ -1202,6 +1202,11 @@
if not Result then
Exit;
obj := NSObject(AWinControl.Handle);
+ Result := obj.isKindOfClass_(NSPopUpButton);
+ if Result then begin
+ AText := NSPopUpButton(obj).titleOfSelectedItem.UTF8String;
+ exit;
+ end;
Result := obj.isKindOfClass_(NSControl);
if Result then
AText := GetNSControlValue(NSControl(obj));
Mantis conversion info:
- Mantis ID: 32824