Tip of the day: Map Links on Mac and iOS

As described on Apple's website you can use special links to open Map app on Mac and iOS. For example here are two links:

http://maps.apple.com/maps?q=Nickenich
http://maps.apple.com/maps?daddr=Berlin&saddr=Paris

So the URL always begins with http://maps.apple.com/? and you add parameters. Like q for a simple search. You can use saddr and daddr to provide source and destination address for a route. You can include type of map with t parameter with "m" for map, "k" for satellite and "h" for hybrid.

Those URLs work fine on Mac desktop and iOS devices with FileMaker, Xojo and Real Studio.

Xojo Developer Conference starts in 2 months

The conference is only 8 weeks away and there are less than 15 tickets on sale. If you think about coming, please decide soon to get you ticket. Also hotel rooms are limited, so please also reserve your room soon to enjoy the discounted rate.

Registration on the website for Xojo Developer Conference 2014 in Monte Carlo Resort and Casino. Be sure to take advantage of the early bird offer: $850 until February, 14 2013. Regular price is $950. Hotel rate is $69 for some days, but if you stay a week you are at about $77 in average.

The Xojo developer conference is the biggest event in the year for Xojo developers. Usually there are about 100 guests, but maybe this time a few more due to being in Las Vegas? See you there in two months!

MBS Xojo / Real Studio Plugins, version 14.0pr5

New in this prerelease of the 14.0 plugins:
  • Updated DynaPDF to version 3.0.32.82.
  • Added support to window transparency functions for Linux.
  • Added SSH2ConnectFailedExceptionMBS class.
  • Improved VerifyEmailMBS function.
  • Changed linker flags on Linux to avoid collision with other version of same library in app memory. (e.g. png).
  • Added some functions to PictureMBS to handle 16bit grayscale pictures.
  • Added DynaPDFMBS functions for searching and highlighting of text.
  • Changed CURL plugin to now call ClearData automatically before Perform to make sure buffers are cleared.
  • Updated LibXL to version 3.5.4.
  • Fixed bug in WindowsSerialPortsMBS class so it finds more devices.
  • Added VLCMediaMBS.MediaWithData and VLCMediaMBS.MediaWithFile.
  • Added VLCMediaPlayerMBS.Tag property.
Download: macsw.de/plugin/Prerelease. Or ask us to be added to our shared Dropbox folder.

Planning training day in Germany

We think about offering training days for Xojo in the week of 20th to 23th May 2014. Location should be near Bodensee (e.g. Konstanz), so people from both Swiss and southern Germany can easily reach it. So if you are interested, please tell us and make a choice on the date suggestions.

The training should be two days, one more for beginners and one more for advanced. Topics will be desktop, web, database and if possible also iOS.

And one evening we would like to offer a Xojo dinner meeting, so you can come and exchange ideas and meet other developers.

If you are interested, please join our Survey to find best date.

Xojo Sale

As I just read there is a sale going on:

25% on renewals today
14% on new licenses with code GET14

And it seems like some people got an email about this sale.

Update: You don't receive the email if you opted-out for marketing emails. But you can opt-in again if you like to know about offers.

Tip of the day: avoiding cgi in the call to a web app

if your web app has an URL like this:

http://webapps.monkeybreadsoftware.de/WebStarterKit/webstarterkit.cgi

you can also have it like this:

http://webapps.monkeybreadsoftware.de/WebStarterKit/

For that to work, you need to modify the default .htaccess created by Xojo to look like this:
Options +ExecCGI +Indexes
DirectoryIndex webstarterkit.cgi
order allow,deny
deny from all
<Files *.cgi>
allow from all
</Files>
<Files "">
allow from all
</Files>
So we added the "+Indexes" and we added the line with "DirectoryIndex webstarterkit.cgi" with the name of our CGI. Next we added the allow to all for the Files with an empty name. This will make sure you don't get a forbidden message.

MBS Xojo / Real Studio Plugins, version 14.0pr4

New in this prerelease of the 14.0 plugins:
  • Added SSH2 classes for doing SSH connections to remote computers.
  • Added Tag properties for SQLCommandMBS, SQLConnectionMBS and SQLDatabaseMBS.
  • Updated XMP library to version 5.5.
  • Added RaiseExceptions Property on SQLConnectionMBS class.
  • Added GetVariantArrayMBS function.
  • Added more exceptions to be raised if you call for example QuickTime functions on Linux.
  • Added VerifyEmailMBS function.
  • No longer optimizes away stack frame pointers for linux, so stack traces are more readable.
Download: macsw.de/plugin/Prerelease. Or ask us to be added to our shared Dropbox folder.

Interested in XMP or SSH2?

We got the XMP plugin updated to a newer XMP toolkit which improves a couple of things including fixing a few bugs.
And it looks like we got a nice SSH2 plugin for Xojo and Real Studio working.

As usually, if you see something missing what XMP or SSH2 libraries provide, please tell us. Not every feature is included in the plugin and new features are added based on user requests.

coming soon in the next prerelease.

Update for our QuickLook Plugin for Xojo and Real Studio Projects

You have several Xojo and Real Studio versions in use? Want to know in advance what version a project has?
Well, in that case, try our new plug-in for QuickLook: MBS-Xojo-QuickLook-Plugin.dmg
Before you install it, your project icons look like this:

but after you installed our plug-in to /Library/QuickLook and you restarted the Finder or logged in the next time, your icons look like this:

Enjoy! This plug-in is freeware, so tell your friends. Version 1.4 adds support for upcoming 2014 Xojo versions.

SSL Trouble

Today I reported two bug cases for SSL connections.

Case 31707: Web Standalone leak
Yesterday I saw the blog article about using SSL in standalone web edition applications. Nice addition, but when I try it, it leaks a lot of memory. Over 10 MB per new session. Seems like some memory from the session/sockets are not freed. The bug does not happen in this magnitude without SSL.

Case 31706: SSLSocket leak with ServerSocket
When working the last days on a client server project for a client, I saw the problem that my sockets on the server are not freed. The management of the sockets is up to the server socket. But even as they are closed, the destructor is not called.
Digging into the reference counting system, I see that in connected event my SSLSocket object has a reference count of 5 while without SSL, it only has 3. So there is a leak somewhere in the handling of SSL Sockets.

Case 2820: Certificates with sslsocket, httpsecuresocket
This is an old case about a feature missing in Xojo. We can't check the certificate from the server in our SSL Socket. So we can't prevent a man-in-the-middle attack.
I'd love to change the plugin and add at least an event to provide the certificate data. This way code in the event could make decision and return true or false back to the socket on whether to accept of not.

We'll see what can be fixed for 2014r1.

Connecting to a Firebird database using Xojo, Real Studio or FileMaker

If you need to connect to Firebird, you can use our MBS SQL Plugin. First you need to set option on SQLConnectionMBS: The kOptionLibraryFirebird option must point to the name/path of the firebird library file, e.g. fbclient.dll. Next you connect to the database. Connection string for a local database is simply the file path like "C:\webfakt\daten\webfakt.fdb" in our sample. The username and passwords must be set, e.g. "SYSDBA" and "masterkey". Now call connect method and pass connection string, username, password and the client which is kFirebirdClient.

Now when you do queries, the plugin will ask firebird library to provide strings in unicode. For that the database must have a character set defined. But what happens if none is defined? In that case the try to convert the guessed character set to Unicode will destroy probably the umlauts in the text. The solution can be to cast the encoding like this: CAST(FIRMA as varchar(100) CHARACTER SET ISO8859_1)

So for each field we select, we redefine the datatype with a cast operation and fix the encoding. On the long run the database encoding should be defined to fix this and have the plugin automatically provide correct strings.

PS: Same works in FileMaker with our MBS FIleMaker Plugin and the SQL functions.

MBS Xojo / Real Studio Plugins, version 14.0pr3

New in this prerelease of the 14.0 plugins:
  • Updated MacHIDMBS class, so you now can send feature and output reports.
  • Added DynaPDFMBS.SetFillColor and SetStrokeColor with color data type, so you can easier set RGB colors.
  • Tuned registration. The dialog for plugin version mismatch now shows also in debugger. And for built app it shows a warning which includes the tip to reinstall app.
  • Added SQLCommandMBS.CommandCount and SQLConnectionMBS.ConnectionCount.
  • Fixed bug in DnayPDFMBS.RenderPDFFile.
  • Fixed bug in EyeOnePro4MBS event handling.
  • Added flag methods for SignalHandlerMBS. This way you can have the signal catched, a flag set and later react on it.
  • Added OpenSSLMBS.ErrorString.
Download: macsw.de/plugin/Prerelease. Or ask us to be added to our shared Dropbox folder.

Tip of the day: Find network interfaces by name

We had this week the issue that we need to find a NetworkInterface object for a network interface based on the name. As NetworkInterface class does not have a property for that, we use our NetworkInterfaceMBS class to build a mapping from IP address to actual name. It works well here and I think this code maybe useful for you. Beside name, it also allows to use any IP or MAC address to specify the interface.

Function FindNetworkInterface(name as string) As NetworkInterface name = name.trim if name.len = 0 then Return nil // search by IP/MAC dim u as integer = System.NetworkInterfaceCount-1 for i as integer = 0 to u dim n as NetworkInterface = System.GetNetworkInterface(i) if n.IPAddress = name or n.MACAddress = name then Return n end if next // use MBS Plugin to build a mapping dim interfaces() as NetworkInterfaceMBS = NetworkInterfaceMBS.AllInterfaces dim map as new Dictionary for each n as NetworkInterfaceMBS in interfaces dim IPv4s() as string = n.IPv4s dim IPv6s() as string = n.IPv6s for each IPv4 as string in IPv4s map.Value(IPv4) = n.Name next for each IPv6 as string in IPv6s map.Value(IPv6) = n.Name next if n.MAC<>"" then map.Value(n.MAC) = n.Name end if next // now search interfaces by name, IPv4 or IPv6 for i as integer = 0 to u dim n as NetworkInterface = System.GetNetworkInterface(i) if map.Lookup(n.IPAddress, "") = name then Return n end if if map.Lookup(n.MACAddress, "") = name then Return n end if next End Function

MBS Xojo / Real Studio Plugins, version 14.0pr2

New in this prerelease of the 14.0 plugins:
  • Updated most CURL examples to work better in Xojo with threads and avoid exceptions.
  • Added NSMenuMBS functions to get main, window or help menus.
  • Updated SQL Plugin classes. Now much more properties, so you see values better in debugger. Some functions renamed and dropped Get in name as they are now properties. (changed 70 items)
  • Fixed bug in CarbonWindowsEventsMBS constructor added in pr1.
  • Added events TextDidBeginEditing, TextDidEndEditing and TextDidChange to NSControlMBS.
  • Added events textShouldBeginEditing, textShouldEndEditing, TextDidBeginEditing, TextDidEndEditing and TextDidChange to NSTextFieldControlMBS and NSSearchFieldControlMBS.
  • Fixed bug where an object in variant conversion was seen as Memoryblock, but that was false.
  • Added CallDelegateOnMainThreadMBS method to easily call methods on main thread.
  • Added InputData property to CURLMBS and CURLSMBS classes. So you can provide simple data for upload without Read event.
Download: macsw.de/plugin/Prerelease. Or ask us to be added to our shared Dropbox folder.

xDev Magazine Issue 12.1

The January/February 2014 (12.1) issue of xDev Magazine is now available.
Here's a quick preview of what's inside:

* Birmingham 2013 * by Richard Duke
Did you miss the Xojo Conference in Birmingham, England last November? Don't worry--Richard's got the complete scoop, along with plenty of photos.

* Window Tricks * by Sam Rowlands
Mac OS can do a lot things automatically for you--if you know how to harness the right Cocoa calls. Sam shows how to get the OS to manage a window menu for you, save and restore window positions, add a document icon proxy, and much more.

* Reporting Valentina * by Paul Budd
Did you get a copy of Valentina Reports with last summer's OmegaBundle? You may have been wondering how to use the software, so Paul gives you step-by-step instructions on using it with Xojo.

* Smart Localization * by Trisha Duke
Localization might seem like something you add last-minute to your application, but it's really something you need to carefully plan. In this article, Trisha reveals her tips and techniques for localizing your Xojo applications.

Plus: Event-driven programming, tips and tricks, database structure, using AddHandler, RegEx, and much more!

Call delegate on main thread

We just added a new feature to the plugin: CallDelegateOnMainThreadMBS

We call the delegate on the main thread later with passing a parameter. Our plugin supports various combinations of up to 2 parameters of type string, variant, boolean, double, integer and object. If you need more combinations, please contact us.

Here are a few example calls:

CallDelegateOnMainThreadMBS AddressOf testString, "Hello"
CallDelegateOnMainThreadMBS AddressOf testNumbers, 5, 6
CallDelegateOnMainThreadMBS AddressOf TestNoParameters
CallDelegateOnMainThreadMBS AddressOf Test, "4th call", 4

This allows us to call methods to update GUI directly from a thread :-)
And with the automatic type matching, you can simply use addressOf/weakAddressOf with your method and if the plugin has a matching method, the compiler will accept and build the plugin.
PS: I added this myself because feedback case 16504 is not implemented.

MBS Xojo / Real Studio Plugins, version 14.0pr1

New in this prerelease of the 14.0 plugins:
  • Fixed DarwinChmodMBS.Flags and Gen properties.
  • Updated AVFoundation to Mac OS X 10.9 APIs. 400 new/updated functions.
  • Updated AVFoundation to use variant tags everywhere. Please try to avoid reference cycles.
  • Rewrote PermissionsMBS class with newer API. There is a switch to retain old behavior, but you should use newer one.
  • Updated some functions for 64bit: VolumeFreeSizeMBS, VolumeSizeMBS and GetDoubleClickIntervalMBS.
  • Added Cocoa implementation for OpenDialogMBS with new options.
  • Fixed issue with registration engine for 64bit.
  • Fixed bug in DarwinChmodMBS.chflags.
  • Added AVFoundationMBS.WriteCGImageToFile method so you can write CGImage to file in a background thread and get an WriteCGImageToFileCompleted Event later.
  • Improved speed on SQL plugin for reading integers from SQLite databases. Much faster now!
  • Fixed a few cases in CIImageMBS methods where passing nil parameter may cause a problem.
  • Added Cocoa support for WindowHidden and WindowShown events in OverlayMBS class.
  • Updated DynaPDF to version 3.0.31.81.
  • Added GTKWindowMBS.SetIcon method.
  • Fixed ACLEntryMBS.GroupFromGID function.
  • Fixed RenderWebsiteImageMBS to avoid NSImageCacheException if image size would be 0/0. Now returns simply nil.
  • Fixed problem in MacUSBMBS class where the device was not properly closed when no exclusive access was available.
  • Fixed memory leak in MacUSBMBS class on closing.
  • Fixed memory leaks with CURL plugin when using FormFinish and SetOptionHTTPHeader methods.
  • Fixed console flags for AVFoundation, Picture and Barcode plugin so they compile on older Real Studio versions again for console target.
  • Fixed some framework references to be weak linked so the plugins works again on older Mac OS X versions.
Download: macsw.de/plugin/Prerelease. Or ask us to be added to our shared Dropbox folder.
The biggest plugin in space...

Archives

Jul 2024
Jun 2024
May 2024
Apr 2024
Mar 2024
Feb 2024
Jan 2024
Dec 2023
Nov 2023
Oct 2023
Sep 2023
Aug 2023
Jul 2023
Jun 2023
May 2023
Apr 2023
Mar 2023
Feb 2023
Jan 2023
Dec 2022
Nov 2022
Oct 2022
Sep 2022
Aug 2022
Jul 2022
Jun 2022
May 2022
Apr 2022
Mar 2022
Feb 2022
Jan 2022
Dec 2021
Nov 2021
Oct 2021
Sep 2021
Aug 2021
Jul 2021
Jun 2021
May 2021
Apr 2021
Mar 2021
Feb 2021
Jan 2021
Dec 2020
Nov 2020
Oct 2020
Sep 2020
Aug 2020
Jul 2020
Jun 2020
May 2020
Apr 2020
Mar 2020
Feb 2020
Jan 2020
Dec 2019
Nov 2019
Oct 2019
Sep 2019
Aug 2019
Jul 2019
Jun 2019
May 2019
Apr 2019
Mar 2019
Feb 2019
Jan 2019
Dec 2018
Nov 2018
Oct 2018
Sep 2018
Aug 2018
Jul 2018
Jun 2018
May 2018
Apr 2018
Mar 2018
Feb 2018
Jan 2018
Dec 2017
Nov 2017
Oct 2017
Sep 2017
Aug 2017
Jul 2017
Jun 2017
May 2017
Apr 2017
Mar 2017
Feb 2017
Jan 2017
Dec 2016
Nov 2016
Oct 2016
Sep 2016
Aug 2016
Jul 2016
Jun 2016
May 2016
Apr 2016
Mar 2016
Feb 2016
Jan 2016
Dec 2015
Nov 2015
Oct 2015
Sep 2015
Aug 2015
Jul 2015
Jun 2015
May 2015
Apr 2015
Mar 2015
Feb 2015
Jan 2015
Dec 2014
Nov 2014
Oct 2014
Sep 2014
Aug 2014
Jul 2014
Jun 2014
May 2014
Apr 2014
Mar 2014
Feb 2014
Jan 2014
Dec 2013
Nov 2013
Oct 2013
Sep 2013
Aug 2013
Jul 2013
Jun 2013
May 2013
Apr 2013
Mar 2013
Feb 2013
Jan 2013
Dec 2012
Nov 2012
Oct 2012
Sep 2012
Aug 2012
Jul 2012
Jun 2012
May 2012
Apr 2012
Mar 2012
Feb 2012
Jan 2012
Dec 2011
Nov 2011
Oct 2011
Sep 2011
Aug 2011
Jul 2011
Jun 2011
May 2011
Apr 2011
Mar 2011
Feb 2011
Jan 2011
Dec 2010
Nov 2010
Oct 2010
Sep 2010
Aug 2010
Jul 2010
Jun 2010
May 2010
Apr 2010
Mar 2010
Feb 2010
Jan 2010
Dec 2009
Nov 2009
Oct 2009
Sep 2009
Aug 2009
Jul 2009
Apr 2009
Mar 2009
Feb 2009
Dec 2008
Nov 2008
Oct 2008
Aug 2008
May 2008
Apr 2008
Mar 2008
Feb 2008