View Issue Details

IDProjectCategoryView StatusLast Update
0023063LazarusIDEpublic2015-02-18 10:30
Reporterindianajones Assigned ToJuha Manninen  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.1 (SVN) 
Summary0023063: Carbon: Path Editor Menu buttons are disabled
DescriptionHere are the steps:
1. Project Options --> Paths --> Other Unit Files (-Fu)
2. Path Editor form --> Replace / Add / Delete / Delete Invalid Paths buttons are disabled.

Additional InformationSVN 38969
FPC 2.7.1
TagsNo tags attached.
Fixed in Revisionr47877
LazTarget-
WidgetsetCarbon
Attached Files

Activities

Juha Manninen

2012-10-05 15:15

developer   ~0062903

They became enabled when there is data to work on.
For example type or select a new path on the edit line just above the buttons and you can add it to the list.

Juha Manninen

2012-10-06 11:44

developer   ~0062925

Does it work for you?

indianajones

2012-10-06 13:30

reporter   ~0062932

@Juha, you are right, if you enter something to the edit line buttons became enabled, but if you choose or click the directory icon and select the directory, they dont become enabled.

Juha Manninen

2012-10-07 14:08

developer   ~0062968

Last edited: 2012-10-07 14:36

Then it must be a bug in OS/X Carbon bindings.
For me it works with QT and GTK2 bindings and IIRC it works with Windows bindings, too.

The control is TShortPathEdit, inheriting from TDirectoryEdit and TCustomEditButton.
Its OnChange event handler updates the buttons like this:

 procedure TPathEditorDialog.DirectoryEditChange(Sender: TObject);
 begin
   UpdateButtons;
 end;

Apparently the OnChange event is not fired on Carbon.
Could you please look for related issue reports and create a new one if there is none.
I don't have a Mac to test with.

The ListBox OnSelectionChange event handler also updates the buttons :

 procedure TPathEditorDialog.PathListBoxSelectionChange(Sender: TObject; User: boolean);
 Var
   FullPath : String;
 begin
   with PathListBox do
     if ItemIndex>-1 then begin
       DirectoryEdit.Text:=BaseRelative(Items[ItemIndex]);
       FullPath := Items[ItemIndex];
       IDEMacros.SubstituteMacros(FullPath);
       DirectoryEdit.Directory:=PathAsAbsolute(FullPath);
     end;
   UpdateButtons; <- here it updates the buttons
 end;

There was a bug some time ago but it works well in recent trunk versions (for me).

Juha Manninen

2012-10-12 23:47

developer   ~0063108

Can other Mac users reproduce this?

indianajones

2012-10-13 15:59

reporter   ~0063127

I looked at the code in the 'patheditordlg.pas'. The given source is the same.
So?

Juha Manninen

2012-10-13 19:44

developer   ~0063132

> So?

I don't have a Mac to test with. Maybe you could isolate the problem with events into a simple test application and make another report.

indianajones

2013-10-03 02:14

reporter   ~0070496

Now it is working but there is also another case which is related with this issue. Do I open another issue or add the problem in here?
Thanks.

Juha Manninen

2013-10-08 17:27

developer   ~0070665

> Do I open another issue or add the problem in here?

It is better to open a new one. We can make it related to this one.
Somebody with a Mac must take care of it.

Juha Manninen

2013-12-30 00:28

developer   ~0072090

Carbon issue, detaching from myself.

CudaText man

2015-02-15 06:13

reporter   ~0081085

Confirm it; L1.2.6 on macos. rather annoying thing; can you fix it by addin OnChange?

Juha Manninen

2015-02-16 00:51

developer   ~0081122

> can you fix it by addin OnChange?

You can try it and provide a patch if it works. It should be tested with other widgetsets, too, not only with Carbon.

CudaText man

2015-02-18 01:51

reporter  

p_ide.dif (424 bytes)   
Index: ide/patheditordlg.pas
===================================================================
--- ide/patheditordlg.pas	(revision 47816)
+++ ide/patheditordlg.pas	(working copy)
@@ -270,6 +270,7 @@
   var Value: String);
 begin
   DirectoryEdit.Text := BaseRelative(Value);
+  DirectoryEdit.OnChange(nil); //not auto-called on Mac
 end;
 
 procedure TPathEditorDialog.DeleteInvalidPathsButtonClick(Sender: TObject);
p_ide.dif (424 bytes)   

CudaText man

2015-02-18 01:53

reporter   ~0081201

Added-patch:one line and after "Browse" pressing buttons are enabled now

Juha Manninen

2015-02-18 10:30

developer   ~0081207

Alexey, I added it inside an IFDEF. This is considered a temporary fix. A proper fix must go to the control itself.

Issue History

Date Modified Username Field Change
2012-10-05 13:23 indianajones New Issue
2012-10-05 13:23 indianajones Widgetset => Carbon
2012-10-05 15:12 Juha Manninen Status new => assigned
2012-10-05 15:12 Juha Manninen Assigned To => Juha Manninen
2012-10-05 15:15 Juha Manninen Note Added: 0062903
2012-10-06 11:44 Juha Manninen LazTarget => -
2012-10-06 11:44 Juha Manninen Note Added: 0062925
2012-10-06 11:44 Juha Manninen Status assigned => feedback
2012-10-06 13:30 indianajones Note Added: 0062932
2012-10-07 14:08 Juha Manninen Note Added: 0062968
2012-10-07 14:36 Juha Manninen Note Edited: 0062968
2012-10-12 23:47 Juha Manninen Note Added: 0063108
2012-10-13 15:59 indianajones Note Added: 0063127
2012-10-13 19:44 Juha Manninen Note Added: 0063132
2013-10-03 02:14 indianajones Note Added: 0070496
2013-10-03 02:14 indianajones Status feedback => assigned
2013-10-08 17:27 Juha Manninen Note Added: 0070665
2013-12-30 00:28 Juha Manninen Assigned To Juha Manninen =>
2013-12-30 00:28 Juha Manninen Status assigned => new
2013-12-30 00:28 Juha Manninen Summary Path Editor Menu buttons are disabled => Carbon: Path Editor Menu buttons are disabled
2013-12-30 00:28 Juha Manninen Description Updated View Revisions
2013-12-30 00:28 Juha Manninen Additional Information Updated View Revisions
2013-12-30 00:28 Juha Manninen Note Added: 0072090
2015-02-15 06:13 CudaText man Note Added: 0081085
2015-02-16 00:51 Juha Manninen Note Added: 0081122
2015-02-18 01:51 CudaText man File Added: p_ide.dif
2015-02-18 01:53 CudaText man Note Added: 0081201
2015-02-18 10:08 Juha Manninen Assigned To => Juha Manninen
2015-02-18 10:08 Juha Manninen Status new => assigned
2015-02-18 10:30 Juha Manninen Fixed in Revision => r47877
2015-02-18 10:30 Juha Manninen Note Added: 0081207
2015-02-18 10:30 Juha Manninen Status assigned => resolved
2015-02-18 10:30 Juha Manninen Resolution open => fixed