You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Chris,
Make CCR.CocoaToolbar.pas compile on XE7 with the following change:
function NSWindowOfForm(Form: TCommonCustomForm): NSWindow;
{$if CompilerVersion > 26.0}
var
Obj: TOCLocal;
{$ifend}
begin
{$if CompilerVersion > 26.0}
Result:= TMacWindowHandle(Form.Handle).Wnd;
{$else}
Obj := (FmxHandleToObjC(Form.Handle) as TOCLocal);
Result := NSWindow(TOCLocalAccess(Obj).Super);
{$ifend}
end;
I don't know when TMacWindowHandle was introduced so $CompilerVersion may be
wrong. But after this change the demo works fine on XE7.
In the demo the Enabled property of toolbar item has to be initialized,
otherwise there are sometimes disabled. So in Main.pas add handler for all
items:
Item := FHelper.AddItem('FileOpen');
Item.OnUpdate :=
procedure (Sender: TNSToolbarHelperItem; var EnableItem: Boolean)
begin
EnableItem:= True; // add this
end;
Best regards
Dirk Carstensen
Original issue reported on code.google.com by dirk.car...@gmail.com on 16 Jan 2015 at 1:25
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
dirk.car...@gmail.com
on 16 Jan 2015 at 1:25The text was updated successfully, but these errors were encountered: