Christian Tietze

  • Blog Posts
  • Writing
  • Apps
  • Work With Me
  • Contact

Pretty-Printing Variables, Objects, and Functions in JavaScriptCore

Jul 17th, 2024

By default, the string output of JSValue in JavaScriptCore printing (e.g. via my console.log) will produce a mere [object Object]. That’s not very helpful. It’s simple to pretty-print objects (if they are merely data-containers) via JSON:

Continue reading …

  • ∞ Permalink
  • • Comments
  • • Tags:
    • debugging
    • printing
    • javascriptcore
    • javascript

How to Print on macOS With An NSTableView and Customize the Result

Jun 15th, 2021

Teaser image

So a client of mine recently asked how he could customize his app’s printing. The app’s main window there mostly showed tabular data, so when you’re inside the NSTableView and hit ⌘P to print, the table view will redirect its draw(_:) output to the print dialog. That’s how you get printing for free.

Continue reading …

  • ∞ Permalink
  • • Comments
  • • Tags:
    • nstableview
    • printing

Contact • Newsletter • Blog Feed • /feeds • /now • /uses • @ctietze@mastodon.social • Privacy & Legal Information

Except where otherwise noted, content on this site is licensed CC BY-SA 4.0.

As an Amazon Associate I earn from qualifying purchases. This e.g. applies to links to Amazon.com.