Tip of the day: Use more local variables

Speed
Using local variables to cache values you query often can speed up an app a lot. For example in a web app, if you use a loop of code and you access the current session with the session function, you waste a lot of time. Just an example:

for i as integer = 1 to 1000
Session.t.test
next

and this code is 10 times faster:

dim t as test = Session.t
for i as integer = 1 to 1000
t.test
next

Same applies for arrays where it's often better to lookup the value once in a loop.

Debugging
Another reason for local variables can be to see them in the debugger. For the runtime speed of your app it doesn't really matter if a value is stored locally. In a lot of projects I have code like this:

dim db as database = Session.db

So I can see the local properties of the database right there in debugger.

My Xojo Web App does not launch. Why?

Here is a list of checks to do for linux apache installations with Xojo or Real Studio Web applications:
  • You have 64bit linux?
    Than you need 32 bit compatibility libraries.
  • The folder of your app is writable?
    Set permissions to 777.
  • The cgi script is executable?
    Set permissions to 755.
  • The app file itself is executable?
    Set permissions to 755.
  • You uploaded cgi file as text, so it has unix line endings?
    (this often gives error "Premature end of script headers" in apache log)
  • You uploaded config.cfg file and made it writable?
    Set permissions to 666.
  • Your apache allows execution of cgi scripts?
    You enabled cgi for apache and uncommented addhandler command for CGI on a new apache installation?
  • You uploaded the app file and libraries as binary files?
    Upload as text breaks them.
  • You did upload the libs folder?
  • You don't have code in app.open, session.open and other events which crashes app right at launch?
  • You don''t have a print command in your app.open event?
    (see feedback case 23817)
  • You allowed htaccess file to overwrite permissions?
  • The server really has same lib files in the libs folder as you on your build machine?
    Web Apps calling function with plugin library missing will die without comment (see feedback case 27741).

Xojo, Inc. is Hiring!

Just got notice from a job offer from Xojo, Inc:

We are looking for someone to join our engineering team! If that’s you, you’ll be working on the Xojo IDE, web framework and sharing the IT responsibilities. View the full job description and apply today at
xojo.com/company/careers.php

SetProgressState on Windows

Using WindowsTaskbarListMBS class on Windows you can show progress in the task bar for your windows:

The image above shows the different states: No progress, normal progress, indeterminate progress, error progress and paused progress.

Connection Strings

If you use our SQL plugins, you sometimes have trouble connecting. And so far 99% of our users who had trouble with our SQL plugin do just need to find the right connection string. Because if you pass in wrong format for the connection string, you just get an error, often not even a helpful error message.

Here a few sample connection strings:

DB2:
Driver={IBM DB2 ODBC DRIVER};Database=urDataBase;Hostname=yourServerAddress;Port=1234; Protocol=TCPIP;Uid=yourUsername;Pwd=yourPassword;

MySQL:
192.168.1.80:3306@test

PostgreSQL:
127.0.0.1:5432@TestDB

SQLite:
/Databases/test.db

Microsoft SQL Server direct:
PcName\SqlServerInstanceName@DatabaseName

As you see some databases use a ODBC style, some just IP or DNS Name with port and database name after the @ character. SQLite simply uses the path to the database file. And for Microsoft SQL Server, you need to know the instance name and the database name.

For some services, you can include the password in the connection string. In general we avoid that and pass the password through the password property/parameter. This way you can still show the connection string somewhere.

If you use SQLDatabaseMBS class in Xojo or Real Studio, please prefix the connection string with the right prefix. e.g. "DB2:" for DB2. With SQLConnectionMBS or our Filemaker plugin, please set the right client.

New Toys from Apple

Recently at WWDC, Apple announced a couple of things. Beside the new hardware, there was quite a few software things. So the last days, I had some fun trying out some of the new features. It's nice to see that Apple got a couple of new satellite images for their maps application. Our house is now on the map. You can see it on iOS maps app already if you like.

The new Xcode 5 developer preview is already working well. I already tested our Filemaker and Xojo (Real Studio) plugins here with it and they compile file here. Already I found & fixed a few bugs found by the improved static analyzer.

If you have access to the WWDC videos, please take the time to watch them. Including the ones from the last years. There are sessions about LLVM which will also be used in next year's Xojo version. So It's good to know the details about that compiler. You find all videos from WWDC conferences on Apple's developer video page.

Of course once we move here to Mac OS X 10.9 as development platform, we may need to quit compiling Real Studio plugins for PPC target. Also at some point we may loose backwards compatibility for Mac OS X 10.4.

Image upload from iOS to Web Apps

Did you know you can upload images from an iPhone, iPad or iPod touch to a Web App made in Xojo (Real Studio)?

As you see this works now. Must have been added recently, maybe in iOS 6?

Planning Xojo (Real Studio) Developer Meetings in South California

We are visiting San Diego for the Filemaker Developer Conference in early August. While we are in the area, we like to offer some meetings for Xojo developers. We plan to visit Los Angeles as that's our airport, San Diego for the conference and Las Vegas to see where next year's Xojo Developer Conference will be.

Exact dates and times have not been set yet. But we give you two choices for each location. Please add yourself where you see fit with your schedule. For the date with most attendees, we'll pick somewhere a restaurant, reserve a table and have dinner together. At least we try to find a place we can all sit and shop talk. If you have suggestion for good locations, please tell us.

Date Surveys

So for 7th or 8th August, we plan a meeting in Los Angeles: doodle.com/q477aua5ubqn8rgd

For 9th or 10th, we plan one in Las Vegas, maybe the Monte Carlo Hotel where next year's Xojo conference will take place: doodle.com/eskb9vu4y8mxtdrq

And for 11th or 16th we plan a meeting in San Diego: doodle.com/88g2kzvbskcbzffu

If you like to join a meeting, please add yourself, so we can find the best date. Also you may want to email us, so we put you on the list and inform you about progress. Meeting time will be around 6pm to 9pm. If you come later or leave earlier, that's no problem (as with all our meetings). Later we may be at a bar and talk more if people have time.

For all meetings, we can discuss Xojo & Real Studio as well as the current Xojo 2013r2 release (not sure if it's in alpha, beta or release state in august). And we can discuss about all your plugin related questions.

Personal meetings or trainings

It is also possible to have a personal training or meeting there, where we could review your projects, help you add plugin functions or show you what you can do with Xojo.

Auckland Xojo Users Group

There is a Xojo (Real Studio) developer meeting in Auckland. Maybe you want to join it and meet other developers from New Zealand?

When: Thursday 27th June at 6:00pm
Where: Mindhive, Level 3, 10-12 Customs Street East, Britomart Quarter, Auckland CBD
Who should attend: Anyone interested in coding with or learning about the Xojo Development Environment.
Guest Speaker: Geoff Perlman, CEO of Xojo Inc.
RSVP: meetup.com/Auckland-Xojo-Users-Group/

MBS Xojo / Real Studio Plugins, version 13.2pr6

New in this prerelease of the 13.2 plugins:
  • Fixed bug width picture creation where some function returned nil (introduced in pr3).
  • Changed CFDictionary conversion code to pass empty string as empty CFString instead of nil.
  • Added exceptions to be raised on HTMLViewer extensions if called on wrong platform.
  • Added MoviePlayer.QTKitMovieViewMBS function.
  • Fixed bug in SQL plugin where initialization of SQLDatabaseMBS failed in Web Applications.
  • Changed ABPickerMBS.SelectedValues to return array of variant instead of string.
  • Fixed ChannelType values with GMImageMBS class to correct now.
  • Added NSButtonControlMBS and NSPopUpButtonControlMBS controls.
Download: macsw.de/plugin/Prerelease. Or ask us to be added to our shared Dropbox folder.

QTkitMovieMBS and Movieplayer trouble

Today we had an interesting issue. A client uses our QTkitMovieMBS class to load a movie from disk. Than he queries the movie object and assigns to Movieplayer. The code looks like this:

dim qtkm as QTKitMovieMBS = QTKitMovieMBS.LoadMovieFromFile(mvFile,e)
MoviePlayer1.movie = qtkm.movie

It does work fine in Carbon, but fails for Cocoa. In Cocoa, you get a couple of new threads for each time you do this and that is very bad. On the long run you either run out of CPU time (app gets slower) or out of memory (Crash).

The reason is under the hood. We convert from QTMovie in QTKit to a regular Movie in old QuickTime API. In Cocoa targets Xojo itself uses QTKit for the MoviePlayer, so they convert from the Movie back to a QTMovie. And somewhere here the cleanup does not work correct. So for each movie a few threads are started (audio, video, decoder) and they are not closed when the movie is destroyed.

The solution is to use the existing QTKitMovieViewMBS class in our plugins:

dim qtkm as QTKitMovieMBS = QTKitMovieMBS.LoadMovieFromFile(mvFile,e)
dim q as QTKitMovieViewMBS = MoviePlayer1.QTKitMovieViewMBS
q.movie = qtkm

So here we query the MovieView for the movieplayer and assign the video directly. This way Xojo does not know about the change. Things like autoResize don't work. But it solves the thread problem so far.

The new functions used here will be part of next plugin prerelease.

MBS Xojo Developer Conference in Koblenz, Germany

Our conference will start September, 12th 2013 and you can be part of it. We have enough confirmed registrations so that the conference will definitely take place. You may have heard about floods in central Europe. Luckily, our conference site in Koblenz is not likely to be affected.

Early Bird Offer ending soon

Until July, 12th we offer early bird registration price. So instead of 299 Euro, it is only 249 Euro (you save 50 Euro). Those prices include VAT, so if you are from Europe and your company has VAT ID, the actually early bird price is 209.24 Euro. This also applies for US visitors (and other countries like Swiss) with a company where registration fee currently would be $279 USD.

Security Session

Due to general demand, I have added a session about security. We had a similar session two years ago in Frankfurt, but a lot of things changed since then. The content has been updated as we want to focus more on web security. If you develop a web app, you really want to make it as difficult as possible to hack. And of course if you do iOS development, you will soon be doing client/server apps, where security is also very important.

Language

There has been some confusion about the language during the conference. Although the conference will take place in Germany all the sessions will be held in English. We also offer one training day in English and one in German. But between sessions and in the evening, you may hear a lot of different languages. We already have confirmed registrations from France, Spain, Italy, United Kingdom and Germany.

Speakers wanted

If you have an interesting topic you'd like to talk about, please contact us soon. We have still 2 big sessions available for you. And we have 3 smaller sessions for showing your product in 15 minutes. So if you have an application made with Real Studio or Xojo and you like to demonstrate it, we'd be happy to offer you a short session there. You can show what your app does and talk about how you coded it and which tools you have used.
If you fill one of the longer sessions, we also grant you a reduced speaker price for the conference ticket of just 149 Euro including VAT.

More details about the conference and registration on the website.

Mac OS X 10.9 coming this fall

We bet you all saw the keynote if you are interested in Apple's products.

Some things on the OS X 10.9 Maverick presentation sounds very great. We'll soon dig into the details and make sure we have some powerful Xojo (Real Studio) & Filemaker plugins available for you in time.
Especially a few things like Maps API will be interesting, new notificaton APIs and all those functions to help saving energy.

If you have wishes, please do not hesitate to tell us.

MBS Xojo / Real Studio Plugins, version 13.2pr5

New in this prerelease of the 13.2 plugins:
  • Fixed problem when CFObjectMBS subclass should be created, but failed as the plugin part of it is not used in application. Now returning CFObjectMBS instead of nil.
  • Fixed memory leaks introduced in pr4 in image handling code.
  • Removed PPC Code for CURL plugin. We have issues there on PPC which we can not fix.
  • Added DriveToUNCPathMBS function.
  • Added more NSViewMBS methods for keyview.
  • Added TextArea.SetTextThreadSafeMBS and TextField.SetTextThreadSafeMBS.
  • Fixed a bug with CURL plugin's registration code. Did not affect complete license keys.
  • Added CocoaControlMBS.WantsFocus property.
  • Added new GlobalIdleTimeMBS function and deprecated MacGlobalIdleTimeMBS function.
  • Fixed a bug related to NSMenuItemMBS.validateMenuitem event.
  • Fixed text encoding problem with WindowsProxyMBS class.
Download: macsw.de/plugin/Prerelease. Or ask us to be added to our shared Dropbox folder.

Xojo Meeting in Berlin

As you see we had a nice meeting in Berlin with a couple of Xojo developers:

If you like, you can join the Berlin group, so you can discuss there about future meetings.
For other groups, please go to the xojo community page. See you in Koblenz and Las Vegas!

RealStudio-Treff Hamburg (Germany)

Der "RealStudio-Treff Hamburg" ist eine kostenlose, lockere Runde und dient zum Informations- und Erfahrungsaustausch und -beim leckeren Essen und Trinken- natürlich zum Diskutieren, Beraten, Schnacken und viel Spass haben!
Willkommen ist jeder RealStudio-Interessierte: vom Neuling bis zum Profi.

Das nächste Treffen findet statt am: Mittwoch, 12. Juni 2013.

Anmeldung und Informationen: DrBuzy.de.

MBS Xojo Developer Conference Update

So, we signed the contract for the hotel two weeks ago and rooms are locked. We have plenty of space reserved, but not as many bed rooms blocked as I'd like to have. So please sign up soon and reserve hotel room. We only have 20 double rooms blocked, so if you need one, be quick.

Stephane Pinel also confirmed he is coming. He'll present 2013r2 and show preview of 2013r3. And of course iOS will get an extra session. Not yet sure who will present iOS. Maybe Stephane, maybe Geoff via Skype or even better Joe Strout via Skype. Joe is the developer of the iOS framework for Xojo. But if Skype fails, we'd simply switch back to Stephanes copy of the iOS enabled Xojo version and do it locally.

For the attendees, we'll setup a google group (with mailing list), so you can sign up there after registration and share travel plans. Maybe some people take the same trains/flights and want to share a taxi? Email me for the invitation to the group.

We so far talked with a lot of interested people and have already a dozen people on the list to come to the conference. People from spain, USA, Netherlands, Great Britain, France and Germany already said they will come.

For the social program, I updated the infos for our sightseeing day. So if you stay longer in Germany, we'd be happy to drive you around that day.

More details and registration on the website.

Xojo and our MBS SQL Plugins

We have updated the plugin recently in the 13.1 release for Xojo.
As Xojo requires a Database Server license for the built in plugin classes to connect to a database server.

Other plugins using the Database API from Xojo also need this license.
So with our plugin and the SQLDatabaseMBS class you need the license for Database Servers.

But if you use SQLConnectionMBS class to connect and work on the database, you are not using the database API.
So in this case you should not need a Database Server license.

Database Server license required:
SQLDatabaseMBS → yes
SQLConnectionMBS → no

This is of course only the status for Xojo in version 2013r1 and Xojo, Inc could change the rules at any time.

Las Vegas!

from the new xojo website: XDC 2014 will be held in the spring in Las Vegas! More information coming soon.

Great to go there. See the casinos, the Hoover Dam, Colorado River and much more!

Welcome Xojo!

Xojo is there and you can download it. You can read reviews about it at the Xojo Developer Magazine, Bob Keeney's Briefs and a few more including the Real Software Blog.

Xojo is a great release. It finally moves forward and brings the new IDE and switches the license model. Also we will enjoy the new books/manuals and the new cloud feature. Also Feedback app is updated with a new look. We are happy about all the bug fixes in the framework, but still fear that some changes/bugs may corrupt projects. We'll see how the release will do in everyday work.

Plugins for Xojo
With Xojo a new plugin file format is introduced. But older plugins still work. On the long run you will want to use the new format as it loads quicker and the files are smaller. And as MBS plugins are available in both favors, they have not the same content. The rbx files still contain the PPC code which is missing for the new xojo plugins. And our xojo plugins will be the plugins which will include 64bit some day.

Whether you use rbx or xojo format plugins doesn't really matter. Just make sure you use recent plugins. 13.1 is okay, but 13.2pr4 is better. We fix bugs as soon as we know and we hope everything is right for Xojo so far.

MBS Xojo / Real Studio Plugins, version 13.2pr4

New in this prerelease of the 13.2 plugins:
  • Added NSErrorMBS.userInfo.
  • Added AVCaptureDeviceFormatMBS.DisplayName and AVFrameRateRangeMBS.DisplayName.
  • Added NSResponderMBS.presentError method.
  • Updated DynaPDF to version 3.0.25.68
  • Fixed bugs in AVFoundation.
  • Fixed bug in Cocoa exception handling from pr3.
Download: macsw.de/plugin/Prerelease. Or ask us to be added to our shared Dropbox folder.

MBS Xojo / Real Studio Plugins, version 13.2pr3

New in this prerelease of the 13.2 plugins:
  • Recompiled CURL plugin. Fixed but in CURL for PPC to avoid crashes on SSL.
  • Fixed PictureMBS Rotate180 function to not forget one line on some pictures.
  • Added better support to PictureMBS for alpha channel pictures.
  • Rewrote parts of the Cocoa exception handling. Now gives more details for NSException and allows program to catch it.
  • Added NSExceptionMBS.callStackSymbols, NSExceptionMBS.RaiseException and NSExceptionMBS.UserInfo.
  • Added NSExceptionHandlerMBS class.
  • Improved picture handling code to make it more robust agains memory leaks.
  • Fixed our NSException global catch function to no longer show a dialog box if not on the main thread.
  • Fixed crash with CURLSMBS with SSL on PPC Macs.
  • Added CGPictureContextMBS.CopyPictureWithMask.
  • Fixed table.SetCellPadding parameter order.
  • Added LCMS2BitmapMBS.Constructor for taking picture and a rectangle to copy.
  • Added LCMS2BitmapMBS.CopyToPicture and CMBitmapMBS.CopyToPicture functions.
  • Updated ZipFileMBS and ZipUnFileMBS to handle better file path encoding. Now using UTF16 so it should work in asian countries.
Download: macsw.de/plugin/Prerelease. Or ask us to be added to our shared Dropbox folder.
The biggest plugin in space...

Archives

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