Our Blog, Filemaker only, Xojo only, Archive (older), Follow us on Twitter, Xing, LinkedIn or Facebook.


Tip of the day: Calling function name

Sunday 25 September 2016 at 9:18 pm
Just talked today about how to know the calling function name. Solution can be to ask this by getting call stack. So here a code snippet:
Function CallingFunction() As string // Query name of calling function of a function #Pragma BreakOnExceptions false try // raise a dummy exception dim r as new NilObjectException raise r catch x as NilObjectException // get stack dim stack() as string = x.Stack // pick function name and return dim name as string = stack(2) Return name end try End Function
The name is encoded name including parameter hints for the compiler.

MBS Xojo / Real Studio Plugins, version 16.4pr9

Saturday 24 September 2016 at 3:25 pm
New in this prerelease of the 16.4 plugins:
  • Added orderFrontStylesPanel and orderFrontFontPanel for NSFontManagerMBS class.
  • Updated OpenSSL to 1.0.2i
  • Upgraded Unikey plugin to use latest 6.5 SDK and supports 64-bit and Linux ARM.
  • Added IOPowerSourcesMBS.ExternalPowerAdapterDetails function.
Download: macsw.de/plugin/Prerelease. Or ask us to be added to our shared Dropbox folder.

Xojo Optimization

Thursday 22 September 2016 at 2:54 pm
Xojo LogoThe last Xojo release brought us an optimization switch. We can now decide whether we want default, moderate or aggressive optimization. I just finished an article for Xojo Developer Magazine about some good optimization things happening. But there is still room for improvement.

For my article I have three nice cases to show you what is generated for default, moderate and aggressive, so you learn what the optimizer does. I see optimizations going on for loops, common subexpression and recalculating expressions.

But looking for optimization cases with math functions, the code generator could be better. As it does not use the standard functions for e.g. sqrt, but calls Xojo's runtime functions, the compiler can't optimize them away. (Feedback case 45298). And for multiple calls to object methods, the code generator could provide hints to compiler that self is not going to change while a method runs, so a lot of nil object checks could be optimized away. (Feedback case 45299)

We'll see what Xojo Inc. will reveal on future development at XDC. Be sure to join the conference and visit the sessions about the compiler to learn how it works.

Split and Join strings

Tuesday 20 September 2016 at 10:45 am
Splitting and joining string arrays is a common operation in Xojo projects. Beside the built-in Join and Split functions, we do have a couple of alternatives, optimized in their way.

First we have Split:

SplitMBS(value as String, delimiter as String = " ") as String()

This takes the string and if it is unicode convert it to UTF-8 and split it. If delimiter is nil, splits into an array of letters.
If encoding is different, we split it and keep the original encoding.

For joining, we have 5 alternatives:

JoinStringMBS(strings() as string) as string
JoinStringMBS(values() as variant) as string
JoinDataMBS(values() as variant) as string
JoinDataMBS(strings() as string) as string
JoinDataMBS(blocks() as memoryblock) as string

So we can join Strings as well as MemoryBlocks. As convenience we can also join arrays of variant with them mixed. JoinDataMBS joins data, so all the bytes are just added up ignoring any encoding. JoinStringMBS converts first all to UTF-8 and returns the text back as UTF-8.

Please try them. SplitMBS is in 16.4pr8.

MBS Xojo / Real Studio Plugins, version 16.4pr8

Monday 19 September 2016 at 2:24 pm
New in this prerelease of the 16.4 plugins:
  • Changed AliasInfoMBS properties to be read only.
  • Changed SplitMBS to be encoding aware for 8bit encodings. So you now split a Windows ANSI string and get back Windows ANSI strings.
Download: macsw.de/plugin/Prerelease. Or ask us to be added to our shared Dropbox folder.

Developer Meeting in Zurich, Swiss

Friday 16 September 2016 at 11:57 pm
This evening we had an excellent dinner together with FileMaker and Xojo developers in Zurich:



Second meeting with 12 people in total (and 8 the day before).
Interesting what people do and what they can show. The LehrerOffice application, made in Xojo, has an impressive feature set with custom reporting, self written controls including a grid and impressive user interface.

Sett you at the next conference in Houston, Salzburg, Berlin or Phoenix.

Two ideas for "no editor" panel

Friday 16 September 2016 at 11:31 am
When you select a class in your project in the list of project items, you see in the middle of the Xojo window nothing. There is no editor open, but this space could be used. At our meeting yesterday we discussed the idea to have there some information visible:

The first idea (Feedback case 43673) would simply fill the space with a note. That would be a note you normally add to the class. But if you assign it a special name, e.g. "About", it will be shown as default content there. If no such note exists, we still would get the no editor panel.

With that default note, we can have a convenient place to put documentation for your classes and everyone new to the class can easily find it.

The second idea (Feedback case 45236) is a bit more. There we ask for showing the public interface of a class. This would make the use easy as it is a kind of documentation. We see what methods and properties are there and all the private stuff and the code is hidden.

Especially for encrypted classes, where you can't look inside without password.

If you like this ideas, please add your comments and let's discuss that in Houston at XDC with Xojo engineers.

Developer Meeting in Zurich, Swiss

Thursday 15 September 2016 at 11:09 pm
This evening we had an excellent dinner together with FileMaker and Xojo developers in Zurich:



We had a lovely talk about plugins, Xojo and FileMaker and about the things people do with the tools. Amazing how many here use both tools to build solutions!
Talking about conferences, I hope to see you guys again in Houston, Salzburg, Berlin and Phoenix.

PS: Tomorrow the second round, maybe with double the number of people.

Register MBS Xojo Plugins

Thursday 15 September 2016 at 1:07 pm
When you get your emails for the license keys, you find the key inside in clear text. Also we provide a function call to register with clear text and one with a bit of encoding. So you can just add those to your app.open event and be happy:
// in a Register method called from App.Open // Complete Set: User Tester, MBS Complete, 201704, 5234524524352435 dim s as string = decodeBase64("S1JiU24523451liVG9oVUpybUQ=", encodings.UTF8) dim p as string = decodeBase64("TUJTI24352345sZXRl", encodings.UTF8) dim n as string = decodeBase64("V245435230ZXI=", encodings.UTF8) dim e as integer = 201704 dim t as string = decodeBase64("cWJWY3254325245xSWYxYk4=", encodings.UTF8) if not registerMBSPlugin(n, p, e, s+t) then MsgBox "MBS Plugin serial not valid?" end if // DynaPDF: "31452345-4523452345-23452345" dim key as string = DecodeBase64("IjMxNDUyMzQ1LTQ1MjM0NTIzNDUtMjM0NTIzNDUi", encodings.UTF8) DynaPDFMBS.setLicenseKeyGlobal key // ChartDirector: User Tester, 201704, 34234234, -202995723 dim serial1 as integer = 342342 dim serial2 as integer = -2029957 dim year as integer = 2017 dim month as integer = 4 dim x100 as integer = 100 dim name as string = DecodeBase64("VXNlciBUZXN0ZXI=", encodings.UTF8) // User Tester CDBaseChartMBS.setLicenseCode name, year*x100+month, serial1*x100+11, serial2*x100+23 // SQL Plugin: User Tester, 201704, 523452345, -203134534 dim serial1 as integer = 5234523 dim serial2 as integer = -2031345 dim year as integer = 2017 dim month as integer = 4 dim x100 as integer = 100 dim name as string = DecodeBase64("VXNlciBUZXN0ZXI=", encodings.UTF8) // User Tester SQLGlobalsMBS.setLicenseCode name, year*x100+month, serial1*x100+02, serial2*x100+-40 // LibXL with platform depending keys #if TargetMacOS then XLBookMBS.SetKeyGlobal "Test User", "mac-239487652908567926" #elseif TargetLinux then XLBookMBS.SetKeyGlobal "Test User", "linux-563547357345735475" #elseif TargetWindows then XLBookMBS.SetKeyGlobal "Test User", "windows-375473457345735473" #endif
Of course the standard encoding is very easy to break and when a key is leaked on the usual sites on the Internet, we have to block it. So please hide the keys a bit and help to make sure your key isn't going to be blocked. For LibXL you get keys per platform. You may not need all variants, but for those you use, please include the key like above.

MBS Xojo / Real Studio Plugins, version 16.4pr7

Wednesday 14 September 2016 at 10:16 pm
New in this prerelease of the 16.4 plugins:
  • Added SplitMBS function.
  • Added InternalSQLiteLibraryMBS.Shell function.
  • Updated SQLite to 3.14.2.
  • Fixed ScreenShotDisplayMBS to return nil instead of black picture on Windows when copying screenshot fails.
  • Added NSLayoutManagerMBS.usesFontLeading property.
  • Added more GraphicsMagick functions.
Download: macsw.de/plugin/Prerelease. Or ask us to be added to our shared Dropbox folder.

SQLite3 command line tool in Xojo

Wednesday 14 September 2016 at 2:37 pm
With next plugin version we allow you to run shell commands with SQLite3 within the plugin. This way you can easily script import/export things and use all the commands the SQLite3 command line tool offers.
dim arguments() as string dim f as FolderItem = SpecialFolder.Desktop.Child("test.sqlite") dim o as FolderItem = SpecialFolder.Desktop.Child("out.csv") arguments.Append "sqlite3" // path to app arguments.Append f.NativePath arguments.Append "-csv" arguments.Append "-header" arguments.Append "-cmd" arguments.Append ".output "+o.NativePath arguments.Append "-cmd" arguments.Append "select * from Documentation;" dim n as integer = InternalSQLiteLibraryMBS.Shell(arguments) Break
As our plugin supports encryption (SEE), JSON extension and full text indexing (FTS5), you can benefit from those, too. I think a few things can easily be automated in Xojo using this new interface. Please make sure you have the same database not open in your Xojo app the same time to avoid cache issues when writing to database.

Xojo 2016 Release 3 Available

Tuesday 13 September 2016 at 1:45 pm
Xojo LogoXojo 2016 Release 3 is now available for download at xojo.com/download. This release adds 90 improvements and 11 new features, including optimization settings to produce faster apps.

Xojo 2016 Release 3 features include:
  • Added Moderate and Aggressive compilation for 64-bit and ARM builds
  • SQLiteDatabase upgraded to v3.14.1 and now supports FTS5 for full-text searching
  • Additions to refactoring features of the IDE and Code Editor
  • Save Code Editor color schemes to easily share and re-use
  • ICU library included with Linux builds for improved compatibility
  • Easily convert Pictures in projects to Image Sets
The complete list of updates is available in the release notes.

Reddit AMA - Join us in the Xojo sub-Reddit today for an "Ask Me Anything" with Geoff Perlman at 1 PM CT. Bring your questions about the release, Xojo, running a software business, XDC, and everything else!

PS: Please make sure you have MBS Plugin in version 16.3 or newer to avoid trouble.

A Programmer's Day Xojo Sale!

Monday 12 September 2016 at 08:44 am
Let's celebrate Programmer's Day with a 48-hour Xojo sale! Get any new Xojo license, upgrade or renewal for 20% off when you complete your order by 11:59PM on Tuesday, September 13th! Simply use discount code PROGDAY16 when you check out!

New Licenses

New Xojo licenses are available in the store for each platform you wish to target, and we offer Xojo Pro (best value), which is a single license for all platforms, plus many additional benefits.

Upgrade to Xojo Pro

Already have a Xojo license but need more functionality? Save 20% on an upgrade to Xojo Pro, check out your specialized Xojo Pro upgrade price here!

Renewals

Keeping your license current ensures you will have the best Xojo has to offer! Renew for one or two years and save 20%!

Conference

The Xojo Developer Conference is just one month away and there is still time to register! Join us in Houston October 5-7th for the biggest Xojo event of the year, with 30+ sessions, 26 speakers, 2 great evening events and more! Learn more.

Programmer's Day offer valid through September 13th at 11:59PM CST. Offer only applies when you use the coupon code PROGDAY16 to checkout.

XDC in one month

Thursday 08 September 2016 at 4:33 pm
Just one month left for the 2016 Xojo Developer Conference. I hope you have signed up and got a hotel room before it's booked out.

So far a lot of Xojo developers registered and 50% of the attendees are international, with people coming all the way from the UK, Italy, Canada, Belgium, Germany, Japan, Austria, Sweden, New Zealand and Australia! Also they have a lot of first time attendees - we are really looking forward to meeting all of the new people!

Be sure to join dinner before/after conference with other attendees.

XDC will take place in Houston, TX October 5-7, 2016. It features sessions on best practices, special interests and other technical topics, with content for every level of Xojo developer. Educational sessions will cover topics like Xojo iOS, Raspberry Pi, database design, user interface design, debugging techniques, writing secure apps, and much more! Want to know what XDC is like? Watch our highlights video!

Register now!

XDC will take place at the lovely boutique Hotel Derek in the Galleria area of Houston. It's right in the middle of two airports, giving you plenty of options (and time) to find a great flight! We have negotiated a hotel room rate of $164 a night. Rooms can be reserved here.

If you have any questions about XDC, feel free to email Dana Brown.

MBS Xojo / Real Studio Plugins, version 16.4pr6

Wednesday 07 September 2016 at 4:45 pm
New in this prerelease of the 16.4 plugins:
  • Updated to DynaPDF 4.0.3.9
  • Added Has*Plugin constants to MBS module.
  • Changed NSProcessInfoMBS.NSActivityLatencyCritical to be a shared function to work around feedback case #31877.
  • Added Linux support for SystemInformationMBS.MACAddressMBS.
  • Fixed picture handling to accept HiDPI images for reading, so you can add a picture again to a page with DynaPDF directly.
  • Updated CanonEOSDigital plugin to load 3.x SDK and 2.x SDK. Please tell plugin if it's 2.x or 3.x as 3.x uses 64-bit integers.
  • Changed email functions to raise exception if you pass email address, subject or message ID including newline character.
  • Added more checks to methods in ServiceManagementModuleMBS module. To raise exceptions with wrong parameters.
  • Fixed a bug with StyledText.RTFDataMBS function handling font sizes.
  • Added Argon2MBS class.
  • Fixed crashes with CURLSEMailMBS when having low memory. Now raises OutOfMemoryException.
  • Improved LargeBinaryStreamMBS to better handle long paths on Windows.
Download: macsw.de/plugin/Prerelease. Or ask us to be added to our shared Dropbox folder.

Adding Has*Plugin constants

Tuesday 06 September 2016 at 3:34 pm
On the weekend I had an idea: Let's define in the plugin constants, so you can check with conditional compiling if a given plugin part is available. See this example where we can check if our linux plugin is available:

#if MBS.BuildNumber < 19123 then // older plugins MsgBox "Older Plugin. so status unknown." #elseif MBS.HasLinuxPlugin then // newer plugins and MBS Linux Plugin installed MsgBox "Linux Plugin is installed." #else // MBS Linux Plugin is not installed. MsgBox "Linux Plugin is not installed." #endif
The plugin on startup checks where it's on disk and what plugin files are in the same folder. Than the plugin provides the constants as part of our MBS module. If the plugin files are not found, we don't provide constants.

Of course this is just a solution for our plugins. It would eb nice if Xojo someday defines an #ifdef command or a defined() function. See feedback cases 986 and 9018.

Coming to Zurich, Switzerland

Friday 02 September 2016 at 1:57 pm
Once again I come to Switzerland in the Zurich area.

If you like, you can join me for a dinner with other developers. Please vote for a date here:

Xojo Developer Meeting  FileMaker Deverloper Meeting

I will be there and would appreciate some companion for the evening. Some shop talk about development, plugins, conferences and other cool topics.

Update: I will do both days and everyone is welcome. See you there!

xDev Magazine Issue 14.5 Issue

Friday 02 September 2016 at 12:13 am
The September/October 2016 (14.5) issue of xDev Magazine is now available. Here's a quick preview of what's inside:
  • Cooking with Xojo (Part 1) by Mark Strickland
    Wouldn't you love to type Xojo code to cook your steak? Well, Mark doesn't go that far, but he's planning a project to build his own Xojo-controlled cooker!
  • No Shortcuts for Shortcuts by Marc Zeedar
    Letting your users set their own keyboard shortcuts for your app is the ultimate power user feature. But how do you do it?
  • Making Better Examples 2 by Markus Winter
    Those who teach programming should always be working to be better—more clear, more helpful. Markus has more examples that could be improved.
  • Gestures and Tabs by Sam Rowlands
    Trackpad gestures on the Mac are powerful. Sam shows how you can use them in your own apps, and how to use MacOS Sierra's new Tabbed Windows.
  • Tracking Health Disorders, Part 3 by J.C. Cruz
    Jose continues his health tracking project, this time adding the complexity of tracking and recording a patient's vitals.
Plus: Hadoop, REST Classes, Xojo's latest iOS features, converting dictionaries to JSON, ReText, and much more.

Argon2 password hashing for Xojo

Wednesday 31 August 2016 at 4:04 pm
We got a new class to calculate password hashes using argon2 algorithm. Here is an example snippet for using our new Argon2MBS class:

dim a as new Argon2MBS a.OutputLength = 24 a.Password = "password" a.Salt = "somesalt" a.cost = 2 a.MemoryCost = 65536 // 64 Megabytes a.Lanes = 4 a.Threads = 4 dim hash as string = a.Calc(a.kTypeI) dim t as string = EncodeHex(hash) if t = "45d7ac72e76f242b20b77b9bf9bf9d5915894e669a24e6c6" then // ok else Break // failed end if

For more details, please check github page: github.com/p-h-c/phc-winner-argon2

MBS Xojo / Real Studio Plugins, version 16.4pr5

Monday 29 August 2016 at 7:01 pm
New in this prerelease of the 16.4 plugins:
  • Reduced number of internal plugin parts for Cocoa plugins.
  • Fixed a possible bug with HIDAPI on Mac when disconnecting device.
  • Added CreateStringMBS function.
  • Added WindowsFileStreamMBS class to list file streams on Windows.
  • Added methods to LargeBinaryStreamMBS to read/write/delete file streams on Windows.
  • Added Linux support to ExtendedAttributesMBS module.
  • Added CalculateCRC16MemoryMBS and CalculateCRC16StringMBS functions.
  • For SQLPreparedStatementMBS, the BindType is now optional. If no type is provided, we detect type by type of value.
  • Added SQLPreparedStatementMBS.Bind variant taking a dictionary.
  • Added SQLValueMBS.setVariant to set value (parameter) by variant.
  • Added SQLCommandMBS.SetParameters to set parameters by dictionary.
  • Added new methods to SQLValueMBS to prevent you from passing String/CLOB/LongText as memoryblock.
  • Added new methods to SQLValueMBS to pass blob/clob/longBinary/longText as folderitem or stream directly.
  • Added new methods to SQLValueMBS to pass memoryblock for BLOB, LongBinary and Bytes.
  • Added variants for ReadLongOrLob method on SQLFieldMBS and SQLParamMBS to read BLOB content directly to folderitem or writeable stream.
  • Changed SQL Plugin to set ODBCAddLongTextBufferSpace to false by default.
  • Changed SQLDatabaseMBS.Prepare to return a SQLPreparedStatementMBS directly, so you don't need to cast it.
  • Added SQLValueReadMBS.asBLobMemory and SQLValueReadMBS.asBLobString to get blob data easier.
  • Added several overloads to SQLValueMBS setBlob methods to take memoryblocks directly. This avoids conversion to string.
Download: macsw.de/plugin/Prerelease. Or ask us to be added to our shared Dropbox folder.

Older blog entries:

2016-08-29 20 years of Xojo T-Shirts
2016-08-25 Upcoming Changes for our SQL Plugin
2016-08-24 Save the date for MBS Xojo Conference in Berlin 2017
2016-08-23 Tip of the day: DynaPDF form creation with calculation
2016-08-22 Learn about code signing
2016-08-20 MBS Xojo / Real Studio Plugins, version 16.4pr4
2016-08-16 Office view this week
2016-08-12 Show download in a new tab
2016-08-08 MBS Xojo / Real Studio Plugins, version 16.4pr3
2016-08-06 Recent changes for DynaPDF licenses
2016-08-01 XDC in two months
2016-07-27 MBS Xojo / Real Studio Plugins, version 16.4pr2
2016-07-27 Xojo Meeting in Atlanta
2016-07-25 LCMS 2.8 released
2016-07-23 Xojo Meeting in Las Vegas
2016-07-21 Tip of the day: AppleScript with Properties to pass file path
2016-07-20 Atl Xojo Users Group - Mon, Jul 25th, 2016
2016-07-20 MBS Xojo / Real Studio Plugins, version 16.4pr1
2016-07-17 DynaPDF Optimize Command
2016-07-14 Use Raspberry Pi Camera in Xojo

Archives

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
XML: RSS Feed XML: Atom Feed