The Xojo meeting in Winterthur (Swiss) will take place twice.
Monday, 13rd October 2014
Saturday, 18th October 2014
We meet at about 7pm in a restaurant. If you are interested, please contact me. (Free entry)
Extract location will be emailed later.
Other meetings:
Hamburg: 1st October 2014
Den Haag: 8th October 2014
This little example code shows how to redirect printing to a PDF file in Xojo and still use the built in Xojo print commands via graphics class:
// get Xojo printer setup
dim p as new PrinterSetup
// now put it into NSPrintInfo to manipulate
dim n as new NSPrintInfoMBS
n.SetupString = p.SetupString
// change destination to file
dim f as FolderItem = SpecialFolder.Desktop.Child("test.pdf")
n.SetSaveDestination(f)
// move back
p.SetupString = n.SetupString
// and print as usual
dim g as Graphics = OpenPrinter(p)
g.DrawString "Hello World", 20, 20
At the Macoun I made some notes and wrote an article about the conference.
You can read it on the Mac & i website:
heise.de/mac-and-i/artikel/Macoun-2014-iOS-8-Yosemite-und-Swift-2405151.html
The event was great and a big family meeting of the Mac and iOS developer community in German speaking countries.
The Macoun conference is one of the biggest Mac and iOS developer conference with over 400 participants.
22 sessions about coding topics, well, it feels like a smaller WWDC in German.
Currently I enjoy another session about Swift.
Check the website:
macoun.de
Do you use Xojo Cloud?
Well, it's a convenient way to host Xojo apps:
- For a space for yourself to test web apps
- To host web apps you want to present to a client
- To get a server for client to host their app you wrote.
While you can setup yourself a virtual private server with some configuration work, for a lot of Xojo developers it's certainly more convenient to buy the xojo cloud server and deploy there. Let someone else install Linux updates and keep an eye on intruders and security.
And now they added more data centers:
- Chicago
- London
- Hong Kong
- Sydney
see
Announcement on Xojo website
If you have trouble sending email via CURL functions, how about trying those options:
- OptionUpload on
- OptionVerbose on
- OptionPort 587
- OptionFTPSSL all
- OptionURL smtp://server
This way, we get right port, use SSL, but with TLS upgrade on a normal smtp URL. Using SMTPS URL fails as it starts a SSL connection right away. For some server this fails as they need a normal SMTP start and later an upgrade to SSL.
PS: This way you can send email via MBS Plugin in both FileMaker and Xojo over Office 360 smtp servers from Microsoft.
New in this prerelease of the 14.4 plugins:
- Added CoreWLAN keychain utility functions to CWGlobalsMBS module.
- Added CGDisplayMBS.DisplayProductNames function.
- Added UDPSocketMBS.ReusePort property.
Download:
macsw.de/plugin/Prerelease. Or ask us to be added to our shared Dropbox folder.
Recently we had need to write a counter part in another development tool for EasyTCPSocket, so here is the format description of the packets:
- Packet starts with 4 byte length as Integer, big endian
- Followed by 4 byte command code as integer (big endian)
- Followed by the actual packet data
With this information, everyone can write a counter part and maybe someone from Xojo wants to officially confirm that and document it.
We are organizing some Xojo meetings in October and if you are interested, please join survey or contact me:
- Den Haag (Netherlands), date is Wednesday, 8th October in VJ Scheveningen/Den Haag. Like to join? Please email me.
- Toulouse (France), survey still running
- Winterthur (Swiss), survey still running
- Hamburg (Germany), date is Wednesday, 1st October in Hamburg. Like to join? Please email me.
New in this prerelease of the 14.4 plugins:
- Updated DynaPDF to version 3.0.35.101.
- Fixed problem with memory management which caused issue with overwritten memory in CURLSMBS.OutputData property.
- Added placeholderAttributedString and placeholderString to NSTextFieldMBS class.
- Changed JSONMBS to add items to object/array by reference if they belong to other tree.
- Changed TimerMBS to no longer be reentrant if something yields time in action event of timer.
Download:
macsw.de/plugin/Prerelease. Or ask us to be added to our shared Dropbox folder.
Due to recent requests, I put three more plugins part for individual purchase on the store.
Linux,
AVFoundation and
Lion.
While Linux plugin can be used alone, the other two plugins have
references to Cocoa plugin. So in order to use them and have projects compile you need to install the required plugins (Cocoa, CocoaBase, Leopard, MacOSXCG and MacOSXCF).
With Lion plugin alone you can of course just use the
new Mac App Store receipt classes. For AVFoundation plugin you can only use a few limited features without other plugins, like opening a video and reading meta data.
Tomorrow our training day starts and in evening we meet in beer garden (see picture) and you are welcome to join!
Later we go for dinner in the hotel restaurant.
If you like to attend, please register soon. We already have participants from 11 countries.
Xojo developers coming for a visit for dinner are welcome.
If you like to come Thursday, please contact me so you can join our dinner event.
NICKENICH, Germany (September 16th, 2014) -- Monkeybread Software releases
version 14.3 of the MBS plug-in for Xojo and Real Studio.
The MBS plug-in comprises a collection of several plug-in parts which extend the Xojo (Real Studio) development environment with 2,100 classes featuring over 53,000 documented functions. Our plugins support all three platforms Mac OS X, Windows and Linux with all project types desktop, web and console.
Some of the highlights on the 14.3 update:
For applications in the Mac App Store, we have the
StoreKit functions to handle in-app purchases. With the new plugin we add classes to read details from the app store receipt and check which in-app purchases have been purchased. Our plugin can also verify if the receipt is valid.
Our CURL Plugin can send and receive emails for years now via IMAP, Pop3 and SMTP. With the new plugin class
CURLEmailMBS we make it easier to build the emails for sending. So you can assemble an email with HTML, plain and rich text parts, attachments and various addresses and send it via SMTP server through CURL classes.
For Mac we implemented the
Image Capture classes and various views. So you can show the same user interface as Apple's applications. There is a device selector view, a scanner and a camera view. You can access devices like scanners and cameras, browse, import or scan images.
Our new
TimerMBS class provides a high resolution cross platform timer. While Xojo's built in timer only fires 60 times per second on Windows, our timer can run a quick as 1000 times per second.
The new
UDP Socket class in our plugins provides some more low level options for UDP. For example you can reuse addresses for multicast.
For printing we got improvements for both Mac and Windows. The
NSPrintInfoMBS class can now be used to modify PrinterSetup.SetupString to enable different options like duplex printing or switch printers. Similar things can be done on Windows using the
WindowsDeviceModeMBS class using new functions.
Our SQL Plugin now supports better using SSL with MySQL. The new ConnectionHandler events allow you to specify extra options for connecting. The
SQLDatabaseMBS class now raises exceptions if you call unsupported functions. This avoids trouble for unintended calls.
This update includes a lot of little improvements like get/set RTF data on a TextArea on Windows using native methods which is more efficient. We already have similar functions for Mac, so you can avoid using StyledText class methods. Our WinThumbnailMBS function provides preview images of supported file types on Windows.
With this update, we also provide updated libraries like zint, PortAudio, OpenSSL 1.0.1i, CURL 7.37.1, DynaPDF 3.0.35.100, LCMS 2.6 and LibXL 3.6.0.
See
release notes for a complete list of changes.
Interested in a Xojo meeting in Hamburg?
I'll be there in two weeks and would like to offer a dinner meeting.
Which date would you prefer?
30th September, 1st to 3rd October?
Survey to find date
New in this prerelease of the 14.3 plugins:
- Changed PictureMBS constructor so you can pass nil for temp folderitem for mac and linux and get an automatically temp file.
- Added UDPSocketMBS class.
- Updated DynaPDF to version 3.0.35.100.
- Added CGBitmapContextMBS.Create function which takes existing bitmap to make new object with different color space.
- Fixed bug in CombineTiff8BitCMYKtoTiffMBS.
- Changed PictureMBS.Constructor to no longer use 64 KB blocks on Windows. Now using 4 KB blocks which makes smaller temporary files.
- Fixed bug with AddAttachment with CURLEmailMBS class.
Download:
macsw.de/plugin/Prerelease. Or ask us to be added to our shared Dropbox folder.
Just run into the problem this week that double comparison often works, but also fails unexpected in an application. This remembers again to use comparison with tolerance for double variables. Like here with abs() and a 0.01 tolerance:
dim d as Double = 10
dim e as Double = 1.19
dim f as Double = d * e
// checking exact fails
if 11.90 = f then
Break
else
Break
end if
// better check with tolerance
if abs(11.90-f) < 0.01 then
Break
else
Break
end if
Just a little thing you can do every few months:
Press Shift key to start your Mac in safe mode. Than restart to get back to normal.
When doing that Mac OS X will do some cleanup and empty some folders with temporary files apps forgot to delete.
Freed 2 GB for me today
New in this prerelease of the 14.3 plugins:
- Rewrote DynaPDFMBS.RenderPagePicture function.
- Added CURLEmailMBS class.
- Added AUPlayerMBS.MaximumFramesPerSlice property.
- Added FromSetupString and SetupString methods to WindowsDeviceModeMBS class.
- Added parameters for WindowsDeviceModeMBS to read/write DEVMODE in either ANSI oder Unicode.
- Added NSPrintInfoMBS.SetupString compatible to PrinterSetup.SetupString.
- Added PDFDocumentMBS.PrintOperation.
- Improved NSPrintInfoMBS class to have more debugger visible properties.
- Added NSAppearanceMBS class.
- Changed a lot of properties in NSWindowMBS to make them visible in debugger.
- Added NSToolbarMBS.configurationDictionaryData.
- Added raster support for Cairo style picture objects in Linux desktop.
- Fixed some bugs with AppReceiptMBS class.
- Added SQLCommandMBS.isExecuting property.
Download:
macsw.de/plugin/Prerelease. Or ask us to be added to our shared Dropbox folder.
PS: In newer plugins, the WindowsTimerMBS class got renamed to TimerMBS.
Same as for Mac is also possible on Windows:
dim p as new PrinterSetup
// setup something
call p.PageSetupDialog
// now we have nice setupstring
dim ss as string = p.SetupString
// parse it in device mode
dim d as WindowsDeviceModeMBS = WindowsDeviceModeMBS.FromSetupString(ss)
// duplex is?
MsgBox "Duplex: "+str(d.Duplex)
// change printer
d.DeviceName = "Deskjet 2540 series#:2"
// enable duplex
d.Fields = BitwiseOr(d.Fields, d.DM_DUPLEX)
d.Duplex = d.DMDUP_HORIZONTAL
// now duplex is?
MsgBox "Duplex: "+str(d.Duplex)
// get back as setup string
dim da as string = d.SetupString
if da = "" then
MsgBox "failed to create setup string"
Return
end if
// assign back
p.SetupString = da
// take a look
call p.PageSetupDialog
// and print something
dim g as Graphics = OpenPrinter(p)
g.DrawString "Page 1", 20, 20
g.NextPage
g.DrawString "Page 2", 20, 20
So next plugins may help you if you need to modify printer setup strings on Mac and Windows.
With next plugins, we can use new
NSPrintInfoMBS methods to directly convert
SetupString from
PrinterSetup class into
NSPrintInfoMBS object. So we can change paper format, printer selection and a couple of other properties:
// start with a printer setup
dim p as new PrinterSetup
// clone to NSPrintInfo
dim info as new NSPrintInfoMBS(p.SetupString)
// find out what name second printer has
dim printers() as string = NSPrinterMBS.printerNames
dim printer as NSPrinterMBS = NSPrinterMBS.printerWithName(printers(1))
// now set a new paper size and this printer
info.paperSize = new NSSizeMBS(72*5, 72*6) // 5 by 6 inch
info.printer = printer
// and clone back
p.SetupString = info.SetupString
// now print to this printer with this paper
dim g as Graphics = OpenPrinter(p)
g.DrawString "Hello", 10, 10
As you see we can use modified setup string for using normal Xojo printing functions!
With next plugin prerelease, you can print PDF using PDFKit directly in Xojo:
// select a PDF
dim f as FolderItem = GetOpenFolderItem("")
if f = nil then Return
// open PDF
dim doc as new PDFDocumentMBS(f)
// define some print setting via PrintInfo
dim PrintInfo as new NSPrintInfoMBS
// start print operation
dim printOperation as NSPrintOperationMBS = doc.PrintOperation(printinfo)
// set options on operation
printOperation.showsPrintPanel = true
printOperation.showsProgressPanel = true
// and run it
call printOperation.runOperation
That is same command as we use for
PDFKit.Print in our FileMaker plugin.
Registration is now open for the 2015 Xojo Developer Conference (XDC), taking place in Austin, Texas April 29 - May 1, 2015 at the Radisson Hotel. XDC includes over 30 technical sessions presented by the company's development staff and leading users from around the globe. In addition, XDC will include a keynote address from Founder and CEO Geoff Perlman, numerous opportunities for attendees to interface with the Xojo engineers themselves, networking events with other Xojo users from the international community, and a new and exciting gaming code battle.
XDC features sessions on best practices, special interests and other technical issues, with content for every level of Xojo developer - from newcomers and students to advanced sessions for Xojo experts and professionals. With the introduction of the iOS platform in 2014, Xojo engineers will cover sessions at XDC on iOS development and best practices.
Conference pricing:
Early Registration Price, Ending 11/30/2014: $749
Advanced Registration Price, 12/1/2014 - 2/1/2015: $899
Advanced Registration Price, 12/1/2014 - 2/1/2015: $899
The Radisson Hotel is offering XDC attendees a special hotel room rate of $169/night during the conference. For more information, please visit:
xojo.com/xdc or
register now!
Just two weeks left until the conference starts. If you like to attend, please register soon. We already have participants from 10 countries and the hotel will soon run out of available rooms.
On the weekend of conference, there is the
38. SCHÄNGELMARKT in KOBLENZ.
3 Tage Stadtfest. Musik und Unterhaltung auf 6 Bühnen. Kunsthandwerkermarkt, Mittelalterspektakel, Burgunderfest, Autoschauen und Weinfest.
3 days city festival, Music and Entertainment on 6 stages. Artisans market, Middle Ages spectacle, Burgundy wine festival, car presentation and wine festival.
17th -
Xojo Training in German
18th and 19th -
MBS Xojo Conference in English
20th -
Xojo Training in English
New in this prerelease of the 14.3 plugins:
- Updated CURL to version 7.37.1
- Added DynaDFFontInfoMBS class.
- Updated DynaPDF to version 3.0.34.99.
- Added CurrencyValueMBS function to replace val() for parsing big numbers into currency data type.
- Rewrote EncodingToQuotedPrintableMBS and DecodingFromQuotedPrintableMBS.
- Changes to NSApplicationDelegateMBS require that you initialize your delegate subclass in app.constructor to receive the restoreWindowWithIdentifier events later.
Download:
macsw.de/plugin/Prerelease. Or ask us to be added to our shared Dropbox folder.
PS: In newer plugins, the WindowsTimerMBS class got renamed to TimerMBS.
On monday I wondered why my Time Machines stopped doing backups. Preparing took forever. Later that day I got messages from my scripts for building plugins about NilObjectExceptions. Turned out that operations like creating folders or creating binarystreams failed for virtual volumes. Later in evening the Finder started complaining that disk is full when copying files. VMWare stopped to launch as it could not write file for virtual memory. SMART analysis of my disk gave no errors, so I presumed a failure in the internal data structures for managing blocks.
Well, a SSD is a dream in speed, but when management fails on various levels, there is not much to repair like a good old hard disk with real disks.
I do have backups:
Online backup (so I can backup at client office, in hotel, etc.), Time Machine (Apple's backup software) with several Time Capsules in various places and an external bootable USB disk for cloning. So I updated my clone with last changes, formatted my internal SSD and cloned things back. Now everything is right and not a single file is lost.
If the clone is not an option, e.g. outdated, I would have used time capsule to restore last backup and use my online backup to get the changed files from the last 2 days.
What do you do for backup?
If you are interested in online backups and you want to use your own webspace or your own S3 account (Without an intermediate company between), you can use
Arq from
Haystack Software. It's a nice app to run in background and upload changed files. I'm using it now for over 2 years. Any I often see myself restoring files using Arq instead of Time Machine due the easier to use browsing.
If you like to order a copy, you can use this coupon code for 10% off: U17ITZRZL4UPIVBK (expires September 30, 2014).
I'm not affiliated with
Haystack Software and just an user enjoying this software.
The September/October 2014 (12.45 issue of xDev Magazine is now available.
Here's a quick preview of what's inside:
*
In-App Notifications * by Sam Rowlands
Using a timer to update user-interfaces is a good idea. But Sam's got a better one: ager! borrowing from a Obj-C technique, he's created an in-app notification system so your objects can talk to each other and be notified when they need to be updated.
*
Writing Apps for Game Center: Part 2 * by Tom Baumgartner
In Part 2, Tom explains how to request a match in real-time games.
*
Inside HandleSpecialURL * by Christian Schmitz
Web Edition provides a full web server that can handle custom URLs via the HandleSpecialURL event. Christian demonstrates how to use this to create your own REST-like API.
*
Yosemite Ready? * by Sam Rowlands
Mac OS X Yosemite is coming this fall. Are you ready for it? Sam provides some tips and techniques to get your Xojo app ready now.
Plus columns on object-oriented programming (SimpleDraw demo app), coding styles, database design, Xojo tips, meet a Xojo game developer, Regex conditionals, and much more.
Xojo features a data type called currency. It is used for storing currency values and uses internally a 64bit value. As 4 digits are reserved for right of the dot, the 1.0 value is stored internally as 10000. When converting between double and integer, values are divided/multiplied by 10000.
There is a problem:
Double values are only precise for 15 digits, so having a big value like 123456789012345.1234 in a currency will not work correctly, as this can't be stored in a double. You get 123456789012345.1136. There are rounding issues.
But some of use need to work with huge numbers and functions like val() internally use double, so there are rounding issues with parsing.
For next plugin we'll add a function CurrencyValueMBS to fix that. Our CurrencyValueMBS function will return currency values parsed up to "+922337203685477.5807" just fine. If value is out of range, we raise an exception, so you can track down errors.
New in this prerelease of the 14.3 plugins:
- Fixed JPEGExporterMBS.ExportRGBwithRowDataEvent to write out ICC Profile data (was missing).
- Fixed AVFoundationMBS.PeriodicTimeObserver event to pass parameters right.
- Fixed Win plugin to load again on Realbasic 2009.
- Changed Mac linking to create dylibs instead of bundle dylibs.
- Added AppReceiptVerificatorMBS, AppReceiptMBS and AppReceiptIAPMBS classes.
- Added SystemInformationMBS.IsYosemite.
- Added webview parameter to WebFrameLoadDelegateMBS events.
- Improved PDFPageMBS and PDFDocumentMBS classes to show more details in debugger.
- Renamed WindowsTimerMBS to TimerMBS as we got a Mac and Linux implementation for your cross-platform projects.
Download:
macsw.de/plugin/Prerelease. Or ask us to be added to our shared Dropbox folder.
PS: In newer plugins, the WindowsTimerMBS class got renamed to TimerMBS.
We recently got an example about color matching a JPEG file and I want to share this with you.
This code takes a JPEG file, reads it into memory. We pick the ICC profile from the JPEG file. If that is empty, we will substitute it with a generic SRGB profile. For the output profile, you pass it as folderitem to this method, so we need to read it to memory (for embedding later) and also open the profile for doing the color transformation. Now we can create two bitmaps, one for input, one for output. Input bitmap references directly our picture object and output creates a new bitmap with matching size and RGB color space. We create a color transformation with LCMS 2 and process the bitmaps. Now we query the picture and export it with the output profile to disk.
This is the simple version. Included with next plugins is the example project and it includes also an advanced version which uses memory blocks instead of picture object and works with CMYK, Gray and RGB input JPEG files.
Here the code of the method:
(more)