A client asked about why the print dialog for printing PDF with DynaPDF missed options for copies and collate?
Well, for next pre-release, we will add those options after I found the right flags for the Windows print dialog:
To enable those options, we have to opt-in via putting in a flag to allow it. But that's not enough as the option won't show unless you also tell the dialog how many pages you have. But as that also shows the page number selection, we have to ask the dialog to hide that.
For next version, you can try DynaPDF.Print in FileMaker or PrintPDFFileWithDialog and PrintPDFPageWithDialog methods in DynaPDFMBS class for Xojo.
As you may know there is an open source project called TextInputCanvas. It provides some better text input events to Xojo apps using custom text control like the Formatted Text Control.
Recently Xojo 2017r2 was released which uses GTK in version 3.0 on Linux. Previous versions used GTK 2.
This plugin is build with my plugin build system, so it has MBS in the name and includes libraries for Mac, Windows and Linux including ARM, so you can use it in all projects. If you find a bug related to the building it, please tell me.
A speciality of MBS Plugins with GTK is, that we built plugins to link dynamically to GTK and use either GTK 2 or GTK 3 depending on the Xojo version. This should help to have just one set of plugins to work with Xojo 2013 up to 2020.
As you may know we celebrated 20 years of Monkeybread Software in April 2020. Sadly the party had to be cancelled due to the Covid-19 pandemic.
We moved the date to 2021 and it's now six months till that date. But as the pandemic is getting even bigger over the winter, we don't expect anyone to want a party in April 2021. As airplane travel is limited and most clients invited live outside of Germany, travel may be impossible. We talked to the manager of the venue and decided to postpone the party date to somewhere in the future. We hope this will be before we celebrate 25 years! But for international travel, we may have to decide on a date at least six months in advance.
One thing you should know is that a business event would have to define a hygiene concept and make sure the planned measures would be enforced. But a party with 1.5 meter distance between guests, no hugs and touching, no buffet and wearing masks all day doesn't sound very pleasant. If anything would happen, we would face serious trouble including 4 to 5 digit penalties.
Let's wait until the situation improves, a hygiene concept is no longer needed, flights between Europe and America run normally and masks are no longer are mandatory.
For next pre-release we upgrade our MBS Xojo Network Plugin with new DataAvailable event for SSH2ChannelMBS class. This allows to easier use the SSH connection and react event based on incoming data. And we used the chance to build a new example for a GUI based SSH Terminal application example:
Like the TCPSockets in Xojo, the trick is a timer running in the background to check regularly for new data. We start it when you call Execute method and then the timer checks for new data. If you don't use the DataAvailable event, we disable the timer of course, so you can just read yourself.
Originally we started the SSH classes to solve the problem, that normal SSH command line tool doesn't accept password as parameter or via pipe input. With our SSH2SessionMBS class you can provide password, use keyboard interactive password passing or private key file. The last one is the most secure of course.
Will come later this week with 20.5pr3. Please do not hesitate to contact us if you have questions.
It may be good to combine this link feature with underline \ul# and then switch color with \FC[] and the right color. For blue, we use 16711680, which is 255 * 256 * 256 as returned by DynaPDF.RGB funtion:
Looks like this: Test. As you see we pick blue color, underline and the text with link inside. But on the end we turn underline off and set text color to black (0).
In Xojo use this with WriteFText and WriteFTextEx functions in DynaPDFMBS class. If you like to use styled text from TextArea control, please use ConvertStyledText function to get the text converted for WriteFText. Then you can add links after that and before you pass text to WriteFText funtions.
Over time we collected a few functions in our plugins to help with variants. Beside the internal routines to convert from/to various classes like SAValue, NSObject, CFObject, PROPVARIANT and VARAINT and Xojo variants, we got a lot of useful helps for your daily coding.
GetVariantArrayMBS
We often encounter variants containing arrays and like to assign them to a local variable in Xojo. But you can't just assign an array inside a variant to an array of variant in Xojo. This raises a TypeMismatchException without explanation message. See Feedback case 24167.
Our GetVariantArrayMBS function checks whether the variant contains an array of type object. If so, we return it as an array of variant and you can use it.
GetVariantArrayUboundMBS
When you have a variant of some type of array, you have no way in Xojo to know the upper bound easily (see Feedback case 31799). You would have to query the type of array, then assign to a matching local variable, handle over 20 types for that then know the upper bound. Our GetVariantArrayUboundMBS function makes this easier as it works for all array types.
GetVariantArrayValueMBS
The GetVariantArrayValueMBS function allows you to query an array values independent of the type of array as variant. No need to query type and assign to local variable, risking a TypeMismatchException. You simply pass index, we lookup type of array and carefully check which variant value to return. As our plugin knows the upper bound, we can do bounds checking and raise an OutOfBoundsException if needed and include a message text of course.
Need to set a value in an array? You can use SetVariantArrayValueMBS function to set a value in any type of array universally.
GetVariantAsDictionaryArrayMBS
The GetVariantAsDictionaryArrayMBS function is relatively new in one of the last releases. Our code to convert JSON to Xojo objects uses dictionary arrays, but how to cast them correctly? Well, in Xojo you have no way to check whether an array is of type object/variant and then check whether all items inside are Dictionary (or nil). Our plugin function does exactly that and helps to process easily arrays of Dictionary stored in variant.
We put in some safe guards, so it will raise an exception if something isn't as expected. Feedback case 61541.
GetVariantTypeMBS
We just added this function to expose our way to know in the plugin, whether a variant contains an unsigned integer. The built-in VarType() function as well as variant.type property will return 2 for both Int32 and UInt32 and 3 for both Int64 and UInt64. Our GetVariantTypeMBS function returns 102 for UInt32 and 103 for UInt64. Adding 100 to the constant value seems to be the easiest for now. There is a feature request for Xojo (Feedback case 36888) to add their own constants and use them everywhere. In case that gets implemented, we could change our functions to return the new values. So be sure you define yourself a kVariantTypeUInt32 = 102 and kVariantTypeUInt64 = 103 constant, so you have one place in future to adjust those values if needed.
The new GetVariantTypeMBS function is coming for version 20.5pr2 of our plugins together with better UInt32/UInt64 variant handling in a dozen classes.
Please do not hesitate to contact us with questions or if you have ideas for new functionality!