Xojo Web App with image error handler and scaling

By default the WebImageView in Xojo will not scale down images (Feedback case 40994) and not handle the case where an URL doesn't work (Feedback case 40996).
For a project here, we need those features, so here is a possible implementation. In our application we show preview images, but those are hosted via apache (outside the web app). This allow us to put them on other servers and keep the Xojo web app less busy. Normally in Xojo it looks like the picture below. Image doesn't fit and if an URL is broken, it shows a question mark.



Now we can change the img object with javascript. We change the sizes so the image is scaled non-proportional to the size of the control. Also we install an error handler, so we assign a new image URL for the image view for the case the image loading fails.

EventHandler Sub Shown()
dim w as string = str(me.Width)
dim h as string = str(me.height)
dim o as string = "document.getElementById('"+me.ControlID+"_image')"

// set width/height to the one of the control.
me.ExecuteJavaScript o+".width = '"+w+"px';"
me.ExecuteJavaScript o+".height = '"+h+"px';"
me.ExecuteJavaScript o+".style.width = '"+w+"px';"
me.ExecuteJavaScript o+".style.height = '"+h+"px';"
me.ExecuteJavaScript o+".style.marginLeft = '0px';"
me.ExecuteJavaScript o+".style.marginTop = '0px';"
me.ExecuteJavaScript o+".style.top = '0px';"
me.ExecuteJavaScript o+".style.left = '0px';"

// set on error event, so we replace image with error image in case of load error
me.ExecuteJavaScript o+".onerror=function(){ this.src='"+me.ErrorImage.URL+"' };"
End EventHandler
The web app now looks like this:



Of course this will work much smoother and nicer once Xojo Inc. add such a feature to the web framework. Until than we have a solution.

[ANN] MonkeyBread Software Releases the MBS Xojo Event Kit in version 1.0

Nickenich, Germany (September 29th, 2015) -- Monkeybread Software releases version 1.0 of the MBS Xojo Event Kit.

The MBS Xojo Event Kit provides you with a few useful classes for using the calendar for your Xojo iOS application.

Wrapper for iOS/Mac EventKit framework:
  • Query/Get access to the internal calendar and reminder database
  • Create, modify and delete reminders and events
  • Handle multiple sources of calendar data
  • Query participants for events
  • asynchronously fetch events or reminders
  • build search parameters using predicates
  • Handle recurrence rules in various aspects
Wrapper Features
  • For Xojo 2015r1 or later
  • Using exception handling to track error
  • Test code included
  • All classes with MB postfix to avoid name conflicts.
  • All module definitions are protected to avoid conflicts
  • Inline documentation
  • Full Source code, no encryption
  • Works for 32bit and 64bit targets.
Our Event Kit requires Xojo 2015r1 or newer.
If you need similar classes for OS X (32 and 64bit), you can check the MBS Xojo Cocoa Plugins from us.

The Event Kit is available for $99 USD or 79 Euro (+VAT if needed).

You can learn more on our website.

MBS Xojo / Real Studio Plugins, version 15.3pr5

New in this prerelease of the 15.3 plugins:
  • Fixed bug with sending emails. Inline graphics were not embedded correctly.
  • Updated DynaPDF to version 3.0.43.130.
  • Added LCMS2StageMBS.CubeSize functions.
  • Added more variants for LCMS2StageMBS.CreateStageWithCLut16bit and LCMS2StageMBS.CreateStageWithCLutFloat.
  • Added variants of LCMS2StageMBS.CreateStageWithCLut16bitGranular/LCMS2StageMBS.CreateStageWithCLutFloatGranular for taking array or memoryblock. Clutpoints is now always an array.
  • Updated SQLite to 3.8.12 alpha for the vacuum bug fix.
  • Added CGDisplayMBS CreateImageAsync.
  • Updated libXL to version 3.6.4.
  • The internal SQLite library now includes the SQLite Encryption Extension.
Download: macsw.de/plugin/Prerelease . Or ask us to be added to our shared Dropbox folder.

Now offering bundles with Xojo and MBS Plugin licenses

We have been reselling a few Real Studio licenses over the years. With Xojo we also want to offer this service in the future with attractive bundles. So if you need a plugin licenses and Xojo licenses, you can now order them from us together as a package with a discount.

We can resell new licenses for Pro, iOS, Desktop, Console and Web. Simply check what you need and we make you an offer like this:

Xojo Pro with 12 month updates:620 €(from $699)
MBS Xojo DynaPDF Pro Plugin:799 €
MBS Xojo Complete Plugin:199 €
total, sold separated:1618 €
total, with MBS Bundle:1444 €

As you see we grant here a special price which saves you 174 Euro in this example. To order simply send us an email and we write an invoice for you.

Embedded SQLite and encryption

As you may know we are big fans of SQLite. So we offer for both Xojo and FileMaker to use SQLite for connecting to database with our SQL functions.

Now we have a SQLite internal library already for some time in Xojo. With next prerelease we add that for FileMaker. So with both tools you can now use MBS SQL functions and use the internal SQLite library. This frees you from providing yourself a dylib/dll file. Currently we use version 3.8.11.1, but can update at any time. If you need a specific extension for SQLite, we can also check if we can enable it by default. Currently we support column metadata, full text search, soundex and thread safety.

Another thing we add with next prerelease is encryption. We licensed the SQLite Encryption Extension and include it now by default. You can use it to access SQLite databases using our plugin with AES 128 OFB, AES 256 OFB and RC4 encryption. The AES 128 mode is the same as in Xojo (or Real Studio).

To enable encryption, please use in FileMaker the SQL.SQLite3.SetKey function after connecting. In Xojo we have SQLiteEncryptionKey properties in both SQLDatabaseMBS and SQLConnectionMBS classes. If you set those, the plugin will apply the key after connecting automatically for you. Alternatively you can use SetKey method in SQLite3MBS class directly.

Interested in testing, please contact us soon to get a copy to try or wait for the next prerelease to be uploaded.

MBS Xojo / Real Studio Plugins, version 15.3pr4

New in this prerelease of the 15.3 plugins:
  • Changed DarwinResourceUsageMBS.SystemTimeUsed and DarwinResourceUsageMBS.UserTimeUsed to doubles.
  • Added ShowDifferences function for DynaPDFMBS class.
  • Added MimeEmailMBS.HTMLToPlainText function used to get plain text from html-only emails..
  • Fixed bug in PHP plugin which caused crash with phpinfo function.
  • Updated VLC to version 2.2.1. The new functions are 64-bit only.
  • Fixed email parsing to also parse emails without mime parts.
Download: macsw.de/plugin/Prerelease . Or ask us to be added to our shared Dropbox folder.

PDF Differences

For the next prerelease we add a new DynaPDF function for both FileMaker and Xojo to show differences in two PDF pages.

This is a new function written to annotate a page in a PDF with highlight annotations if two blocks in a the pages have different image. This works well here and shows differences in various PDFs. We include a check to make sure that lines moved up or down on the PDF page don't cause to be highlighted.

Please try soon in next prerelease. You'll need a DynaPDF Pro license as this is based on the render feature.

Xojo Conferences and Meetings

Some conference and meetings are currently planned:

First, we are considering doing a one day event in UK in/near London. As you can read on the forum (forum.xojo.com/25990-little-xojo-conference-in-uk/), we have a proposal and are currently looking for who is interested and to find a date. The survey already shows a couple of dates where several people can attend, but we'd like to see more votes there. Once we have a few dates with 10 people, we can sync our date list with various hotels and make reservation.

Second, I will visit both Hamburg (survey here) and Gothenburg (survey here) in October, so I look for interested developers for a meeting in a restaurant for dinner. Just a chatting about Xojo, maybe showing some pictures from XDC in Austin or talking about latest Xojo release.

And finally we still take bets for where XDC 2016 will be.

Tip of day: Write WAV file

Sometimes you write an audio app in Xojo and need to write your audio data to a file. Using the WAV file format is very easy and this code is from an app we made today. Samples are stored in memoryblock in LittleEndian byte order and with stereo. The code to write WAV file looks like this:

Sub WriteWAV(f as FolderItem, m as MemoryBlock) // write samples in Int16 format with stereo to a WAV file dim b as BinaryStream = BinaryStream.Create(f, true) b.LittleEndian=true b.Write "RIFF" b.WriteInt32 6+4+16+4+m.Size // size of file b.Write "WAVE" b.Write "fmt " b.WriteInt32 16 // size of following data b.WriteInt16 1 // format, uncompressed b.WriteInt16 2 // 2 Channels b.WriteInt32 44100 // Samples per Second b.WriteInt32 44100*4 // Bytes per Second b.WriteInt16 4 // Block align, Size of Sample in Bytes b.WriteInt16 16 // bits per sample b.Write "data" b.WriteInt32 m.Size b.Write m return f End Sub

MBS Xojo Conference in Scheveningen

Presentations are running...



Stephane Pinel talked about what is soon coming in 2015r3 and what's planned for future releases. We are all looking forward for those new things!
Than we had my presentation about MBS Plugins with a few demos. And currently Dirk Cleenwerck talks about Arbed and SVN (Slides).

After lunch we started with my presentation about PDF and our DynaPDF Plugin. If you are interested in the invoice standard: Forum electronic invoicing in Germany. With DynaPDF we can create the PDF/A files with embedded XML for you.



Now Daniel Burkhalter shows his application for testing systems. Connecting to various devices, databases and data sources, it can test various devices and write reports and keep track of thousands of test runs. And all can be configured with huge XML files.

Later we have Hans van Schaick showing us his applications using databases and reporting. Than we have a conversation with Paul Lefebvre about new frameworks, iOS and raspberry PI support.

We closed after the session about CURL and after a little break walked to the beach to a restaurant. It was a nice evening with a lot of shoptalk about xojo development. I hoped you all stayed for saturday with sunshine from noon till sunset.

Greetings from Scheveningen

We started yesterday evening with a first round of beer and nice indian buffet here at the beach in Netherlands:

Now we have our room full of Xojo developers and Stephane shows us what's coming later this year to the Xojo world!

MBS Xojo / Real Studio Plugins, version 15.3pr3

New in this prerelease of the 15.3 plugins:
  • Recompiled LinuxARM stuff with older GCC version for better compatibility (now need libstdc++ 6.0.19 instead of 6.0.20).
  • Added example projects for viewing email files and an email client example.
  • Added more methods for AVAudioUnitMBS class to get/set/listen properties/parameters.
  • Added SplineMBS class.
  • Added more properties to CGImageMBS and NSViewMBS classes.
  • Added new Mime Email parsing classes.
  • Added a few more CALayerMBS properties and you can now assign either CGImageMBS or NSImageMBS for contents property.
Download: macsw.de/plugin/Prerelease . Or ask us to be added to our shared Dropbox folder.

Video playback with mask on OS X

As you see on picture I played to day with transparency for playing video.

We can play video in OverlayMBS (without title bar) and in normal Xojo window. Both with applying the mask and keeping window transparent and background shines through.

The screenshot is with using Xojo window where we let you see the title bar. The version with overlay looks the same except that there is no titlebar.

PS: Example project included with MBS Plugin in AVFoundation examples folder.

Xojo on Sale

If you need a new license (or an update) for Xojo, please check the current Xojo sale for Programmer's Day.

20% on a new licenses and on upgrades to Xojo Pro.

Now if you have an update which expires within the next 2 months, it may be cheaper to buy a new license within the sale compared to your update price!
Do the math before you order and decide wisely.

Coupon code PROGDAY15

If you got new staff who is still using a free version, maybe it's now the time to give him/her the full power of Xojo?

PS: Sometimes you add something to the order for a few bucks, get over a limit to use a discount coupon or get free shipping and although you get more the end price will be cheaper.

MBS Xojo Conference in two weeks!

Our MBS Xojo Conference starts in two weeks. We have a few last seats to offer, so if you want to be there, decide quickly.
This is an english speaking conference located in the middle of Europe in Bad Hotel Scheveningen in Scheveningen a suburb at the beach near Den Haag.

The conference will start on 17th September 2015 in the evening with a casual get-together. The exact location will be given earlier same day. Meet your colleagues, have a drink together and chat about what's new in Xojo world.

Our conference sessions will run on 18 September 2015 from about 9:00 to 17:00 with lunch and coffee breaks in-between. Sessions include an overview from Stephane Pinel about what is new in Xojo this year and what's on the way for the future. Christian Schmitz presents what is new for MBS Plugins. Followed by sessions of attendees.

On the evening, we offer to have dinner together with others in a casual get-together. If you like, extends your stay for more days and stay the weekend in Den Haag at the beach.

Everyone is invited to share his knowledge. Show your big Xojo projects and tell how you did solve problems and how Xojo helped you to deliver solutions quickly to your clients. Talk about Xojo related topics and what things you have to offer. If you like to get a session, please contact us with a topic description.

Registration is possible at the MBS website. Cost is 49€ + VAT. Companies inside european union do not need to pay VAT if they provide their VAT ID. All others have to pay 21% VAT which gives a total of 59,29€.

Space is limited, so be quickly. We are looking forward to meet you all there!

xDev Magazine Issue 13.5

The September/October 2015 (13.5) issue of xDev Magazine is now available.
Here's a quick preview of what's inside:

* Spot the Error * by Markus Winter
Errors with different integer types can be extremely subtle. What happens when you convert from one type to another? What about overflow errors? Markus challenges you to "Spot the Error" and explains what's really going on.

* Simple Is Better * by Mark Strickland
We're programmers -- we naturally like to make things complicated. But sometimes simple is a better approach, especially when it comes to user interfaces. Mark writes about how he used the simplest interface of all -- cell phone text messaging -- to create an electronic time clock system that employees in the field can use without a computer or even a smartphone.

* Tracking Medications for Personal Health * by JC Cruz
You might think a personal health journal is all about tracking your exercise, heart rate, and other details, but keeping your medications
up-to-date is also critical. Jose explains how that works in his ongoing health project.

Plus articles on Xojo open source software, database design tools, making document-based applications, tips, and much more.

MBS Xojo / Real Studio Plugins, version 15.3pr2

New in this prerelease of the 15.3 plugins:
  • Added WiringPiMBS module.
  • Updated DynaPDF to version 3.0.43.128.
  • Added new AVFoundation classes for Audio Units and Audio Engine.
Download: macsw.de/plugin/Prerelease . Or ask us to be added to our shared Dropbox folder.

QTEditableMovie Plugin

As you may know Xojo 2014 and 2015 don't support QuickTime on Windows any more. Some users still need that for their projects.

So we developed a plugin which is similar to the EditableMovie class in Real Studio and still work in Xojo. So you can open a movie file as QTEditableMovie or create a new movie file. You can query tracks, insert/append/scale tracks, create new tracks or flatten the movie to a new file. Our MBS classes like QTPictureMovieTrackMBS and QTMovieExporterMBS can be used in combination with QTEditableMovie to create new track from pictures or export the movie in a different format.

This is of course a bridging technology. The new plugin will not work on 64-bit. But it allows some clients to move from Real Studio to Xojo. The classes work for Mac and Windows, even Cocoa target as long as it's 32-bit.

Thanks to Xojo Inc. for providing source code and help to get it running.

If you are interested, please contact me.
Depending on what features you need, more customization to the plugin maybe needed.

PS: You may need to use QuickTime 7.7.6 on Windows 8 or 10. Version 7.7.7 may not install.
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