New to Xojo?
First you may want to learn Xojo by doing the tutorial coming with the Xojo download. Next I recommend you check for some books about Xojo. And you should subscribe to the Xojo Developer Magazine. Get the back issues and you have a huge library of articles, tutorials and example code to learn.
Extending Xojo with plugins
Once you learned how to get the code written, you will soon hit some limits. Some examples:
- The folderitem.SaveAsJPEG method can save you a JPEG, but it will always use 50% for the quality. What do you do if you need 75% cross platform?
- How do you create a PDF? Your user can install on Windows some PDF print driver or on Mac the user can save prints to PDF in the print dialog. But what if you want to do this directly? And use existing PDFs as template?
- Using the Movie class you may want to know the duration of that movie or get a picture at a given position?
- How do you get an icon from your application in the top right of the menu bar on Mac OS X?
- How do you render a chart without drawing everything yourself?
To extend Xojo with new features, you can use plugins. A plugin is a code library which gives you new classes, methods and controls in Xojo.
For example the MBS Xojo TIFF Plugin gives you a new TiffPictureMBS class which has all the little options you may need to process tiff files of any kind. With CMYK colors, special compression settings, multiple pictures, custom data fields, color profiles and XMP meta data.
You can easily fill your plugins folder with 200 MB of plugin files. But don't worry. Xojo will only link the plugin code into your application which is needed by your code. After compiling you can look into the application (on Mac OS X) or into the Libs folder (on Windows) to see which plugins are used.
Solutions with the MBS Plugins.
For the points above you find below the solutions:
Saving JPEGThe MBS Xojo JPEG Plugin has a folderitem.SaveAsJPEGMBS function which takes as a parameter the compression quality in percent. So you can save your JPEG files on Mac, Windows and Linux with any compression level you like. Also the JPEGExporterMBS class has many more options to save a jpg file. For example you can specify the resolution and the color profile.
For professional PDF handling on Mac OS X, Windows and Linux, I recommend the MBS Xojo DynaPDF Plugin. Compared with other professional solutions, the price is quite high, but this gives you a royalty free license. Watch the tutorial videos to learn more about this class.
If your application is writing invoices as PDF files, you can use both CoreGraphics and DynaPDF to import an existing PDF as a template. Than you write your invoice table, the address and whatever text you like on top of it. Finally you save everything as a new PDF file.
Movie duration and frame picture
The Movie class uses QuickTime (and Media Player on Windows). The MBS Xojo QuickTime Plugin adds a lot of methods to this class including the Movie.DurationMBS function to get the length of the movie in seconds. Sometimes the plugin can help with small things.
And the Movie.MoviePictureMBS can return you a picture of a video track for a given position.
If you like to export a movie to some other format, you should check the QTMovieExporterMBS class. Also if you want to add effects to a movie, add a time code display or add copy and paste functions to your movie editing application, you should check this plugin.
Icon in the top right
On Mac OS X you can have applications installing a menu in the menubar on the top right. Those are called Statusitems. The MBS Xojo Cocoa Plugin has all the classes needed to do this. The NSStatusItemMBS class can create a menu entry and attach a menu using the NSMenuMBS class.
You should check the example projects and the tutorial video to learn about what you can do here.
You can draw a lot of things yourself with the Graphics class in Xojo. But if you like to render a chart in 10 lines, you need professional help. The MBS Xojo ChartDirector Plugin has all the charts you may need in your application:
surface, pyramid, cone, funnel, pie, donut, bar, line, spline, step-line, trending, curve-fitting, inter-line coloring, area, scatter, bubble, floating box, box-whisker, waterfall, finance, gantt, vector, radar, polar line, polar area, polar spline, polar scatter, polar bubble, polar vector and rose charts.
Take some time to walk through the 170 example projects. You can open the folder with the examples and see directly all the pictures rendered using the examples. This way you can fast find the example which is closest to your chart. And if you like a feature of a chart you see, check the example to see how it was made. Also there are some tutorial videos you can watch.
Database access?If you need more database options than Xojo gives you, you should check whether there is a JDBC driver for your database server. Than you can use the MBS Xojo Java Plugin to use that driver with the Java VM to connect to your database server. Do not worry for speed as normally the processing time on the database server and the network time has more influence on the speed than the bridging with Java.
And you can access every database server with JDBC, even the onces RB does not have a direct connection like Microsoft Access.
Or you use our SQL Plugin to connect to multiple SQL databases (Centura SQLBase, DB2, Firebird, Informix, InterBase, MariaDB, Microsoft Access, Microsoft SQL Server, MySQL, ODBC, Oracle Database Server, PostgreSQL, SQL Anywhere, SQLite, SQLCipher and Sybase).