Code Monkey home page Code Monkey logo

delphi-foundations's People

Contributors

chrisrolliston avatar

Watchers

 avatar

delphi-foundations's Issues

Make NSToolbar wrapper compile on XE7

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 [email protected] on 16 Jan 2015 at 1:25

TAndroidPreferencesIniFile not writing or reading Boolean values correctly

What steps will reproduce the problem?
1. Created Android app to use CCR.PrefsIniFile.Android custom ini file
2. write a boolean true to the ini file and exit the application
3. Enter the app and read the boolean - its always false (the default I guess)

What is the expected output? What do you see instead?
Should be true, is always false

What version of the product are you using? On what operating system?
XE5. Android Samsung Galaxy S3

Please provide any additional information below.
Since I am unfamiliar with these files, I cannot be sure if its not writing the 
value correctly, not reading value correctly or both.

In further testing, using the AndroidPreferences demo, I found that writing a 
boolean gets written, but when read it comes in as false. If you read it in as 
a string it shows the value "true". So something seems to be wrong with reading 
a boolean value from the file. To work around this I will change the readbool 
to readstring and work from there.

Original issue reported on code.google.com by [email protected] on 23 Oct 2013 at 7:56

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.