A Xojo Existential Crisis:  When Self is Nil

A couple of Formatted Text Control users found an interesting bug in the Xojo Windows 64-bit compiler.  If the user pasted anything into the control it would hard crash the Windows application.  I spent a couple of days trying to find a workaround and was flummoxed on how to fix.  Thankfully there’s an easy workaround thanks to Team Xojo.

In the Open event of the FTC control we create a new FTCUndoManager instance.  When the user pastes something into the control we pass the existing text into the Undo Manager so it can properly save the before state and allow an undo of the paste.

Pasting text calls the SavePaste method of the FTCUndoManager class.  This is where things start to go wrong.  This method passes Self into the constructor for the FTCUndoPaste class.  Stopping the debugger in this method shows us that self is nil!  What’s odd is several other passed in class objects are nil too (even though they are not at the control level).  That self is nil is indeed a problem since FTCUndoPaste needs the reference to the UndoManager for a variety of reasons.

How can self be nil?  After all this is a method in the class.  By definition self should be non-nil.  I think this would fall under ‘compiler problem’.  I submitted a private Feedback report to Xojo (53967)  and thankfully Xojo reviewed it quickly and were intrigued enough to look into it.  It was verified and a workaround was quickly found.

William from Xojo wrote this:  

There seems to be an issue with passing byval structure parameters (for 64-bit Window build), as a workaround you can pass these byref instead, i.e. MyFunction(…, Byref firstPa as ParagraphAttributes)

So I was able to change two methods, FTCUndoManager.savePaste and FTCUndoPaste.constructor, by using byRef for each object we pass into the Undo Manager into and in the Undo Paste class.  Voila!  Problem solved.

I suspect that FTC is big enough and complex enough to manifest some edge case for the 64-bit compiler.  If you run into an issue like this try this workaround.  And don’t forget to submit a Feedback report to Xojo since the more edge cases they can find the more likely it is they can determine the cause.

Happy Coding!

BKS Shorts 2.0.8

Today we released BKeeney Shorts 2.0.8.  This is a free update to all version 2.0.x users.
Shorts is the award winning reporting tool for Xojo applications.  Shorts allows a Xojo developer to embed a report designer inside in a desktop application, view reports in any resolution on desktop or web applications, save report files to file or to a database, and to export reports to HTML, CSV, and PDF (requires the DynaPDF plugin from MBS).  Shorts works with SQLite, CubeSQL, PostgreSQL, MySQL, MS SQL Server, ODBC, and Informix (requires the SQL plugin from MBS).
Shorts comes as 100% unencrypted Xojo source code.

New:
* DesignerCC.OpenReport now returns its success as a Boolean

Changes:
* Removed FTC and RTF support from Shorts (#3716)
* winReportDesigner.Visible is now default False
* Improvements to winReportDesigner toolbar / tool item handling
* DefaultStyle is now a function returning a consistent default style
* DesignerCC will no longer override the window title – it now raises an event
* Can no longer delete bands outside the band editor by defualt
* PrinterSetup simplifed to fix a UX issue (#3672)
* HandleExportHTML method rewritten to be sandbox friendly
* ReportBKS.ScrubSQLArray replaces conditions with RegEx for consistency
* DBWrapper ensures it’s DBInfo child has an instance of the DB (#3679)
* Designer window now has a File > Close (cmd-w) menu item (#3652)
* Report Template version number incremented due to a JSON change with styles
* Localizations updated

Fixes:
* SetToolbarItem can no longer cause OutOfBoundsException
* French translation of “Text” is no longer “Send a SMS”
* Navigator selection is not lost in rare cases (#3670)
* Changing paper setup no longer creates too many undo levels
* Can no longer enter negative page numbers in the report viewer (#3673)
* Contextual clicking outside of a single selection no longer causes NOE (#3676)
* Reports can no longer be run with no Database Fields to request data, preventing SQL errors
* Fixed image resolving issue (#3687)
* Fixed constant editor window title
* HandleExportHTML no longer causes uncaught exception when cancelling (#3698)
* Filter conditions no longer cause SQL errors with unescaped characters
* Backward compatible styles loading now more robust
* Corrected an issue with server constants and plugins
* Fixed a couple of Mojave drawing glitches.

For more pricing, demo versions, and training videos please visit http://www.bkeeney.com/allproducts/bkeeney-shorts/

BKS Report Studio

Connect to a Myriad of Databases without writing SQL: BKeeney Software Launches New, Cross-Platform Reporting Tool

###

LENEXA, KS, 20 September 2018 – BKeeney Software launches BKS Report Studio, a simple database reporting tool that features a visual interface, templates, and editing features that allow users to create reports without writing SQL.

Designed for every skill level, BKS Report Studio operates like a layout editor by allowing users to drag and drop data sources, labels, images, and even barcodes to build powerful reports, quickly.

Reports can be printed directly, or can be exported in several file formats. Created by a need to simplify and extend the database reporting process, BKS Report Studio focuses on making the report design phase easier.

BKS Report Studio features several functions:
– Drag & Drop layout design for report templates
– Export as PDF documents or print directly
– SQL engine generates the necessary query and gathers data
– Filter data beforehand, or live at runtime with dynamic runtime filtering
– Boolean display is fully customizable, and supports Emoji
– Format numbers, and perform scripts on bands as they are generated

Connect to the most popular database engines, or connect to any database engine that provides an ODBC driver. BKS Report Studio supports these database engines: CubeSQL, MySQL, ODBC, PostgreSQL, and SQLite

BKS Report Studio is available now for Mac and Windows. Download it from the website for free today. Demo reports will be watermarked. Purchase a license for $175 to permanently remove the watermark and unlock the export-to-file functions.

Website: https://bksreportstudio.com
Download: https://bksreportstudio.com/download/auto
Purchase: https://bksreportstudio.com/buy

###

BKeeney Software is software consulting firm specializing in cross-platform, web, and mobile applications, developer tools, and training using the Xojo development platform.

support@bkeeney.com

 

BKS Tab Control

Lenexa, KS (June 20th 2018) — BKeeney Software releases BKS Tab Control
The BKS Tab Control is a set of classes that offer developers a classic “tabs control” for Xojo Desktop applications. The Tab Control can attach to any RectControl or Window, and will maintain a relationship to this parent control if and when it changes size. Tabs can be displayed in one of four directions (North, South, East, West) and individually offer options like a close button, an icon, a background color, and can be disabled.
Other features:
— Optional CloseBox can be positioned on the left of right
— If the CloseBox is selected a CancelClose event is fired
— Optional Icon can be positioned on the left or right
— Each tab can have a different background color
— Each tab can be disabled
— Each tab text can be stylized with font, font color, text size, bold, italic, underline
— Tabs that overflow the available width may be accessed with an overflow popup menu
— Works in HiDPI and non-HiDPI modes
BKS Tab Control has been tested in macOS, Windows, and several varieties of Linux with Xojo 2018 R1.1 and back to Xojo 2017 R1.  The control may work, unchanged, in older versions of Xojo.
BKS Tab Control is sold as unencrypted source code and costs $75 USD.
More information and demo project download available at:
macOS
Windows
Linux
All Directions

The Award Winning BKeeney Shorts

Last week at the Xojo Developers Conference in Denver, BKeeney Shorts was awarded the Best Developer Tool as part of the Xojo Design Awards ceremony.  Being recognized as a great reporting tool for Xojo makes all the hard work worth it.  Often times it’s a labor of love for developer products and it’s nice to be recognized for designing something that many Xojo developers require in their products.

BKeeney Shorts is a set of classes and controls that allow developers to create complex dynamic reports.  Xojo desktop application developers can embed the Reporter Designer in their applications using a simple drop-in container.  Reports can be displayed in Xojo desktop and web apps using a drop-in viewer container.  Reports can be exported to HTML, CSV, or PDF (using the DynaPDF plugin from Monkeybread Software).  If you’d like to know more about Shorts please visit https://www.bkeeney.com/allproducts/bkeeney-shorts/

To celebrate this achievement we’re giving everyone a 20% discount for Shorts!  Use http://sites.fastspring.com/bkeeney/product/shorts20&coupon=XDC2018 to redeem this coupon.  Hurry, this offer expires on May 31st.

What Developer Components/Utilities Do We Need?

BKeeney Software has been doing Xojo development for a long time.  Our clients span continents and industries and when we’ve needed something that doesn’t already exist we’ve created it.  This is how ActiveRecord/ARGen and Shorts came into existence.  In both of those cases we used them internally for quite a while before making them available for others.  Some products, like Formatted Text Control, were purchased when the developer left the community and since we depended on the product we decided to keep up development on it.

The question of the day is this:  What components does the Xojo developer community really need/want that we don’t have yet?

To me, the clear winner is a nice grid component.  At one point I recommended the Einhugur StyleGrid and DataGrid controls but it was never updated for HiDPI and there are no plans to do so.  As far as I know there aren’t really any good replacements for them.  Add any suggestions to the comments below.

We use a ton of plugins but it makes no sense to have every plugin installed for every project.  We also don’t update plugins unless we have a need so a minor update to a three year old application probably doesn’t need the latest plugin.  Managing plugins across vendors is a real pain.  Likewise managing Xojo versions for client projects is a chore because one project might be on Xojo 2015 R4.1 for some technical reason while another is at a newer version (but not the latest) and some projects are on the 2017 R2.1. While it’s not hard to manage all this it’s harder managing that across multiple developers. I’d love to have a utility to manage Xojo and its plugins by project.  As far as I know there’s nothing out there that does all of this.  Do I need to write this myself?  And really, how many developers need this level of Xojo/plugin management?

What else do you need/want to make your Xojo development life easier?

Formatted Text Control 3.1.9

BKeeney Software has released version 3.1.9 of the Formatted Text Control, a canvas based word processing control for Xojo Mac OS X and Windows applications. The FTC is an alternative to the built-in TextArea control and allows for in-line graphics, hyperlinks, custom components, better RTF support and much more. The demo project has quite a few examples, including a Masked Text Field, XojoScript code editor example, Embedded FTC (in your own canvas), as well as the word processor with page view.

This is a maintenance release and is free for all version 3 users.  It fixes the following items:

– Fixed issue with view scale < 1.0 setting up the clipping page incorrectly (#3500)
– Fixed spelling replace on TestWindow (#3581)
– Fixed Mac text AutoComplete positioning (#3574)
– Fixed Tabstop Widths (#3500, #3576)
– Updated Linux declare for doubleClickTime to include GTK3 in newer Xojo versions (#3575)
– Fixed the Draw Control border on the right side (#3473)
– Added SpellCheck configuration testing to contextual menu on TestWindow
– Added SpellCheck configuration testing to App.Close event
– Fixed resources directory location for the the Spell Checker initialization
– Added more comments in code if plugins are missing

The Formatted Text Control costs $150 and is 100% unencrypted Xojo code. Version 3 and above requires the use of the Text Input Canvas plugin (included in package) to allow for proper text handling in Cocoa builds. Product page at https://www.bkeeney.com/formatted-text-control/

Shorts 2.0.5

Today we released BKeeney Shorts 2.0.5.  This is a free update to all version 2.0.x users.
Shorts is the premier reporting tool for Xojo applications.  Shorts allows a Xojo developer to embed a report designer inside in an application, view reports in any resolution, save report files to file or to a database, and to export reports to HTML, CSV, and PDF (requires the DynaPDF plugin from MBS).  Shorts works with SQLite, CubeSQL, PostgreSQL, MySQL, MS SQL Server, ODBC, and Informix (requires the SQL plugin from MBS).
Shorts comes as 100% unencrypted Xojo source code.

New:
* PreviewCC now has a ReportFinished event
* Report Designer Help menu item that goes to the documentation
* BandType constants in PAF_PrintBand
* Datestamps in the header and footer can now be formatted individually (#3572)

 

Changes:
* Ease of installation improvements
* Code demo window order of operations, design, and reports improved
* BKS_Shorts.ImageItem constructor copies over aspect ratio boolean
* Moved the PAF_PrintKit.StylesLoad call from App.Open event to winReportDesigner.Open event
* Moved Designer Constant “Page Placeholders” (Timestamp, PageNumber, PageCount) into constants of ReportBKS
* Property list uses shared disclosure triangle drawing method now
* Property list draws backgrounds for disclosure triangle and ellipsis to fix overlap issues
* Removed workaround for 64 bit text splitting as the issue has been marked as fixed in 2017r2 (#3567)
* Removed “ReportRun” notification sent through pfDispatcher, replaced with ReportFinished event on the ContainerControl
* Removed global setting for date formatting for header and footer, fields can now be individually formatted
* winReportDesigner.HandlePrint will now properly show the printer dialog for each print, as a user expects.
* winDBConnection Password no longer a required field to attempt a connection
* Added constant to recognize, or ignore, MS SQL Server (for future release).

 

Fixes:
* DynaPDF Renderer now draws images properly in high resolution
* Enum properties in the property list no longer have empty first value (causing KeyNotFoundException when selected)
* Report Designer no longer leaves on an extra “g” when finding the app name automatically (only affects Debug environments)
* Email PDF example protected against bad SSL settings
* Constants no longer get drawn several times in the designer (#3578)
* Error properly reported if no rows are returned from a SQL error
* winDBConnection will no longer show an empty MsgBox when connecting to some database types
* Image scaling no longer refuses to scale up, this improves how low resolution images are handled
* SC_GetCount works again
* Aggregates with body rows of repeating data (i.e. 2nd row data the same as the first and so on) works properly now

For more pricing, demo versions, and training videos please visit http://www.bkeeney.com/allproducts/bkeeney-shorts/

Shorts 2.0.4

Today we released BKeeney Shorts 2.0.4.  This is a free update to all version 2.0.x users.
Shorts is the premier reporting tool for Xojo applications.  Shorts allows a Xojo developer to embed a report designer inside in an application, view reports in any resolution, save report files to file or to a database, and to export reports to HTML, CSV, and PDF (requires the DynaPDF plugin from MBS).  Shorts works with SQLite, CubeSQL, PostgreSQL, MySQL, MS SQL Server, ODBC, and Informix (requires the SQL plugin from MBS).
Shorts comes as 100% unencrypted Xojo source code.  Please visit the product page at http://www.bkeeney.com/allproducts/bkeeney-shorts/

New:
* Super Simple Example project demonstrates the basics of using the core classes
* Checkbox field type for boolean data

Changes:
* Various improvements to the Property List for ease of use
* Updated PrintField SerializeJSON to use UInteger in preparation for 64bit
* BKS_Shorts.Settings.kUseBarcodePlugin now defaults as False
* OrderBy is now a menu to prevent malformed data (#3519)

Fixes:
* Checkboxes in the property list are now much easier to click on Windows (#3535)
* Property list text fields no longer float when the property list scrolls
* AlternatingList now draws properly on Linux, and code was simplified
* Removed Special/Any filter on select file dialogs, this fixes selection on Linux
* Removed AutoAlias from AddField method, this was creating invalid Aliases as we changed the way we use Alias in Shorts 2.0
* Multiple fields in ORDER BY handled properly in the schema identification process (#3537)
* Report Header with PageBreak no longer adds extra headers on the second page (#3538)

FTC 3.1.7

black-fountain-penToday we released version 3.1.7 of Formatted Text Control (FTC), our word processor control for Xojo.  This is a maintenance release and is recommend for all users.  It is a free update for all version 3 license holders.

License holders should get an email from the BKS FileShare system.  If you don’t get an email, please contact us.

Changes in this release:

  • Fixed issues with Unicode Hyperlinks
  • Fixed Windows Compiler Issue
  • Fixed HIDPT coordinates issue issue with ConstructContextualMenu event handler
  • Added ability to detect Windows HiDPI (requires Xojo 2016 R2 or better.
  • TextInputCanvas plugin rebuilt to be 64 bit compatible.
  • Spell Checker demo plugin rebuilt to be 64 bit compatible

The Formatted Text Control is a canvas based control for Xojo that implements word processor capabilities similar to Apple Pages or Microsoft Word. The FTC is a canvas (technically Text Input Canvas) subclassed control  for Xojo that allows you to instantly add word processing capabilities to your applications.  More information, pricing, and demo at http://www.bkeeney.com/formatted-text-control/