Recently we got a client with a special problem. A scanned paper with a signature has a lot of unused space around. The scan shows a bit of dust and dirt. People have greasy fingers, the flatbed scanner is not clean and the paper not perfect white. We have to clean it up and got a problem: The normal trim method in GMImageMBS class would remove some of the space, but a dust piece on the scan may prevent it from removing a bigger part.
We found a relative easy fix. We scale down the image to a much smaller size and all the dust points disappear. Now we can check for bounding box of the content and apply the found rectangle to the original picture.
(more)
When you use our chart classes in the MBS Xojo ChartDirector Plugin, you have the chance to have more than one X axis and/or more than one Y axis. When doing this, there are a few things to think about and some little things
The second axes for X and Y are basically always there, but only shown when you start configuring them. For example you may start with setting a title for the second axis:
// Add a title to the secondary (right) y axis
call c.yAxis2.setTitle("Throughtput (MBytes)")
Now you may also want to set some colors:
// Set the axis, label and title colors for the primary y axis to red (&hc00000)
// to match the first data set
c.yAxis.setColors(&hc00000, &hc00000, &hc00000)
(more)
Recently a client asked how to give an image shown in a Xojo web app a hover effect. Basically a few WebImageView controls show various pictures and you need to pick one. When the mouse moves over the images, we like to highlight the image by making it darker or brighter.
We quickly thought how to do it:
- in Xojo directly, there is no property and no MouseEnter/MouseExit events. But the server round trip would make this quite slow anyway.
- in JavaScript would be faster and run in the browser. Like install mouse event handler and then swap out the image for a darker version.
- in CSS is the best as the browser does it and we benefit from any graphics acceleration. And CSS doesn't need to swap the image and just darken it with an effect.
(more)
Just three months until the Xojo conference starts.
Early bird offer is about to end this week. If anyone likes to get a ticket, please be quick or pay the regular price later in the next months.
We got a nice group of attendees so far:
- We are happy to have three Xojo staff members there.
- Some long term Xojo community members are joining.
- Some students and teachers using Xojo in school are coming.
- We got newbies, who started Xojo less than a year ago.
- And we got retired people who code in Xojo.
- Finally we have a few professional people using Xojo as their development tool of choice.
- People from nine countries so far including a lot of Europe, Canada and USA.
- We have about 10 wives joining their husbands on the conference for the evenings. My wife may offer a city walk in Andernach one day while the conference runs. There is a lot of history, nature and culture to see.
More spots for conference and training days are available as well as hotel rooms in the Einstein Hotel. Register here and let us know if you need a hotel room.
We are very happy about the feedback we got. A lot of people seem to be excited for another conference.
In this article I want to introduce you the new functionalities from the MBS Xojo Plugins in version 24.0.
Randomness Decides
We have three new global methods that deal with randomness. We provide you with three algorithms with which you can generate random numbers.
You can choose from the normal distribution, exponential distribution and poisson distribution. You can also specify the mean or lambda in each method to further influence the method. RandomNormalDistributionMBS then returns random numbers according to the Normal (or Gaussian) random number distribution.
RandomExponentialDistributionMBS a random non-negative floating-point number, distributed according to probability density algorithm and RandomPoissonDistributionMBS gives you a non-negative integer value, distributed according to discrete probability algorithm
(more)
Does your Xojo made application run on macOS (or iOS) and shows some text? How about adding an action button, a contextual menu or a popup-menu to offer various actions for the text?
Using the NSDataDetectorMBS class from our MBS Xojo MacCocoa Plugin, you can analyze text using Apple's frameworks. You get an array of NSTextCheckingResultMBS objects for the found details, which can include:
- URLs
- Email addresses
- Phone numbers
- Addresses
- Transit Information
- Dates
We can process the found information and offer action commands. This may include copying the found text. When we have an URL or can build one, we can offer to open this URL. Normally this opens a website in the default browsers. Email addresses can open a new email in the mail application. With all this actions, we can show a menu like this:
In our example we use a timer to check the text a few milliseconds of the text changing. Once checked, we could decide whether to enable the button for the actions. You may provide it as a gear button like other applications to offer these additional actions.
The example project will be included with future plugins or you can email us for a copy as usual. If you'd like to do something similar for Windows or Linux, please check our RegEx plugin and use a few regular expressions to find phone numbers, emails or URLs yourself.
About three months left until we start our MBS Xojo Developer Conference in Andernach, Germany. Let's update you what's new this week:
Early bird offer
Don't miss the deadline for the early bird offer next week. If you planned to join the conference, three months before is a great time to plan your trip.
Hotel rooms are still available and can be cancelled up to one week before the
Dinner Event
We will go to Baggerado for the dinner event. We'll have a grill buffet, an open bar and plenty of space to sit.
(more)
Nickenich, Germany - (January 16th, 2024) -- Monkeybread Software today is pleased to announce MBS Xojo Plugins 24.0 for macOS, Linux and Windows, the latest update to their product that is easily the most powerful plugin collection currently available for Xojo. MBS Xojo Plugins have been updated and now includes over 3000 classes and 81,000 documented features, and the versatile plugins have gained more new functions:
We updated our plugins for Xojo 2023r4. We updated the delegates in CURL, iOS, Mac64bit, MacBase, MacCF, MacFrameworks, Picture plugins and improved the RowSet handling in our MBS Xojo SQL Plugin to be compatible. Then we improved our Chromium based classes for the new Xojo version since it uses a newer CEF version. We highly recommend updating the plugins if you like to try this Xojo version or future ones.
For this release we rearranged internal plugin parts. While we ship 52 plugins currently, they are internally composed of about 400 parts. That is less than the older plugins with over 500 parts. Our plugins load quicker in Xojo due to the reduced number of plugin parts to load.
If you use Google Ads in your iOS applications, please update to the new plugin with Google AdMob SDK in version 10.14 and enjoy the additional classes to show the content dialog. The new consent dialog is required for Google Play store. You can simulate the use of your application in a different region where more or less consent is needed.
Our new JSON plugin gets new functions for creating diffs with the changes between two JSON documents. Then we can apply the patch later. The functions allow you to log changes between JSONs to document changes.
For macOS we added new controls NSSegmentedControlControlMBS and NSPathControlControlMBS, so you can easier use a plugin provided SegmentedControl and PathControl controls.
The DynaPDF plugin got a new DynaPDFParserMBS class to make the parser available for Xojo developers. It allows you to find and replace text on a page, highlight or mark texts and delete texts.
For Windows we got new functions to WindowsPDFPageMBS for synchronous and asynchronous rendering of pages to images. For Bluetooth LE, we improved the WindowsDeviceInformationPairingMBS class to work better on Windows 10.
The BigNumberMBS and LargeNumberMBS classes got new functions to convert to/from strings. You can configure the behavior for BigNumberMBS class with the new BigNumberConversionMBS class. If you need random numbers in various distributions in Xojo, you can use RandomExponentialDistributionMBS, RandomNormalDistributionMBS and RandomPoissonDistributionMBS functions.
We improved scrolling for NSSearchFieldControlMBS class, the NSMutableAttributedStringMBS class got a new replaceCharacters function, we made more properties in CURLEmailMBS class visible to the debugger and the new CopyArrayMBS function helps to quickly copy arrays.
Finally we updated CURL to version 8.5.0, DynaPDF to 4.0.82.239, openssl to 3.1.4, SQLAPI to 5.3, SQLite to 3.44.1, LCMS to 2.16, Xcode to 15.2 and Visual Studio to version 2022.
See release notes for a complete list of changes.
With MBS Xojo DynaPDF Plugin 24.0 we include the DynaPDFParserMBS class. This class provides a top-level interface on the parser in DynaPDF. You can do various operation using this class:
- Parse a page
- Find text on the page.
- Extract text on the page
- Delete text within a rectangle.
- Query coordinates for found text.
- Replace found text with new text.
- Set alternative font for new text.
- Finally write changes back to page.
(more)
New in this prerelease of the 23.6 plugins:
Download:
monkeybreadsoftware.de/xojo/download/plugin/Prerelease/ or
from DropBox.
Or ask us to be added to our shared DropBox folder.
You can subscribe to our Xojo mailing list to get notified for new pre-release and release versions.
About three months left until we start our MBS Xojo Developer Conference in Andernach, Germany. Let's update you what's new this week:
New Sessions
We got a new session with Marc Zeedar and Christian Schmitz:
More Design Patterns
You may have heard about Design Patterns, but you aren't sure what they are, how they'd help, or how to implement them in Xojo. Here Marc builds on his London 2023 presentation and covers more patterns in Xojo with practical examples.
This session will cover topics such as:
- Types of design patterns (Creational, Structural, Behavioral)
- The benefits of using patterns:
- Reliability
- Reusability
- Simpler program structure and clarity
- Flexibility
- Better code encapsulation
- Forces you to use a more object-oriented design
- Demos and Examples
- Exploring several patterns such as Observer, Command, Facade
- Show how a pattern can benefit a project and solve a code-structure problem in a better way
by Marc Zeedar, publisher of
xDev Magazine.
(more)
For Xojo in macOS we got two new controls for you:
The
NSSegmentedControlControlMBS control hosts a
NSSegmentedControlMBS view to show a button with multiple segments. Similar to the SegmentedControl in Xojo itself. You can query the
NSSegmentedControlMBS object for the SegmentedControl to configure it with more options.
The
NSPathControlControlMBS control hosts a
NSPathControlMBS view to show a file path visually to the user. You may have seen this in the Finder in various places. The texts will localize automatically to the user and it shows icons for the folders if they have one.
On the way to implement this control we added two new events for
NSPathControlMBS class: willDisplayOpenPanel and willPopUpMenu. This events allow you to customize the control for what shows up when it shows a menu because there is not enough space available to show the full path. Further customization is possible using
NSPathComponentCellMBS, the cell subclass to display the path components.
We know that control is double there, but that's how the scheme works. We take the name of the view and append Control for the hosting control object in Xojo. The API 2 version has a Desktop prefix added automatically. But otherwise both variants are identical.
The new controls are available for version 24.0 for you to try. The control works on macOS only, but you can put it on a window and it will do nothing for Linux and Windows. If you use API 2 for your desktop projects, you will automatically use
DesktopNSPathControlControlMBS and
DesktopNSPathControlControlMBS controls.
New in this prerelease of the 23.6 plugins:
Download:
monkeybreadsoftware.de/xojo/download/plugin/Prerelease/ or
from DropBox.
Or ask us to be added to our shared DropBox folder.
While we have 100+ lexers to colorize your text in ScintillaControlMBS control, you may sometimes need a custom solution. If none of our existing lexers suits you, you can do it all yourself in Xojo.
You would implement StyleNeeded event to provide coloring for a range of text. You get the position where the action happened, e.g. user typed a few letters. Then you query EndStyled property to know when existing style information ended. Since you are asked usually in chunks, you may start where you finished recently. From there we usually go back to the start of the line, so we query the line with LineFromPosition and the start of the line with PositionFromLine. Then we colorize from that position to the current one.
(more)
Less than four months left until we start our MBS Xojo Developer Conference in Andernach, Germany.
Since early bird pricing ends
New Sessions
We added David Cox as speaker with two presentations:
Cross-platform development using Convert to Method Pair
If you have a massively multi-platform project you quickly discover that placing code in 12 locations (in Objects, Methods and Classes for Desktop, Web, iOS and Android)) becomes nearly impossible to manage. Using Convert to Method Pair allows you to place all your source code into one external Class per Window/Container/Page/Screen making your applications work consistently and making debugging much easier.
Using URLConnection to Export to PDF across all platforms
Providing PDF reports from HTML within your applications is easy for Desktop and Web apps, but nearly impossible with Mobile apps. Including additional software to do the conversion makes your app larger and more likely to be rejected by App Stores. Instead, create a RESTful Web server to take your HTML via a URLConnection and place the result into a database as a solution that works consistently for Desktop, Web and Mobile apps.
(more)
The January/February (22.1) issue of
xDev Magazine is now available. Here's a quick preview of what's inside:
Faster, Xojo, Faster! by Marc Zeedar
We got a new faster Xojo for Christmas, but just how much of a speed improvement will we see? Marc runs some tests.
Design Patterns Part 2 by Marc Zeedar
Our design pattern series continues with a look at the Decorator (a.k.a. Wrapper) pattern. It allows you to dynamically change the behavior of objects at run-time by wrapping one object with another.
Rasp Pi Electronic Fun Part 5 by Eugene Dakin
Getting information from your Raspberry Pi is important for debugging. Today we're going to demonstrate how to retrieve GPIO info, such as the state of various pins.
Sandstorm by Marc Zeedar
Marc got a "falling sand" desktop toy and used it as inspiration to simulate it in Xojo. Just how hard is it creating digital falling sand? Not hard at all, it turns out.
Plus: Topics such as Xojo 2023R4, handling exceptions, parsing emails, nonobvious obvious stuff, and more!
New in this prerelease of the 23.6 plugins:
- Fixed a problem with file property in NSColorSpaceMBS class not working.
- Updated SQLAPI to version 5.3.0.
- Fixed a problem with int32 read as string in SQL classes.
- Added CopyMemoryBlock method to SQLStringMBS class.
- Added SQL Unit Tests project, so you can run over 500 tests on our MBS Xojo SQL Plugin.
- Added replaceCharacters method to NSMutableAttributedStringMBS class.
Download:
monkeybreadsoftware.de/xojo/download/plugin/Prerelease/ or
from DropBox.
Or ask us to be added to our shared DropBox folder.