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.
EventHandlerSub Shown() dim w asstring = str(me.Width) dim h asstring = str(me.height) dim o asstring = "document.getElementById('"+me.ControlID+"_image')"
Set Variable [$r; Value:MBS( "WebView.SetFormTextAreaValue" ; "MarkDownWebViewer"; "formtest"; "input"; WebViewer MarkDown::Input; 1 )]
Set Field [WebViewer MarkDown::Output; MBS( "WebView.GetFormTextAreaValue" ; "MarkDownWebViewer"; "formtest"; "output"; 1 )]
Set Web Viewer [Object Name: "PreviewWebviewer"; URL: "data:text/html," & WebViewer MarkDown::Output]
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:
MBS Xojo DynaPDF Pro Plugin:
MBS Xojo Complete Plugin:
total, sold separated:
total, with MBS Bundle:
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.
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 126.96.36.199, 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.
Next I launched the FileMaker Server installer (14v2) and cancelled it after it decompressed. Than I changed the "Assisted Install.txt" file in the Files folder with installation files to have the license key and name already, so I don't need to enter it myself.
In the setup.ini I had to remove below the [ISSetupPrerequisites] section the first four lines for Application Request Routing. I installed this software myself before and FileMaker's installer fails to download it.
To run the installer, I run cmd to open a terminal window. There I use cd to go into the folder and run this command line:
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.
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.
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)
//writesamplesinInt16formatwithstereotoaWAVfiledim b as BinaryStream = BinaryStream.Create(f, true)
b.WriteInt32 6+4+16+4+m.Size //sizeoffile
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.
As you may know our MBS Plugin can read compressed containers for a while. Now with new plugin version we add creation of compressed containers.
Container.Compress compresses an existing container. This way you can loop over records and compress them on the fly. But be aware that a lot of media formats (PDF, images like JPEG and PNG, audio and video files) are already compressed, so compressing them again may increase size! But you can use our Container.GetTotalSize function to check if size after compression is actually smaller.
With the new function Container.Decompress you can decompress containers. This allows you to decompress a container if it's compressed and pass it to a function which doesn't understand compressed containers. To know if a container is compressed, check with Container.GetTypes function if there is a ZLIB data stream in the container.
Our function Files.ReadFile can read a file. In next plugins you can use mode = "compressed" to return the content of a file as a compressed container.
All the compressed container functions work fine on older FileMaker versions like 11 where FileMaker doesn't support it.
As you see here, we build a menu in FileMaker. We go to a separate layout with our menu entries table. There we loop from first to last record and look if the group matches the one we got in script parameter. Than we add this menu entry to the menu for calling the script in the table. This way the user can edit menu by editing the table.
# go to layout with menu entries
Go to Layout [ “REP” (REP Reports) ]
# this script can be called with various groups
Set Variable [ $type ; Value: Get(ScriptParameter) ]
# make a new menu
Set Variable [ $menu ; Value: MBS( "Menu.CreateMenu") ]
# loop over records
Go to Record/Request/Page [ First ]
# if group matches
If [ REP Reports::Group = $type ]
# add new menu item with title from table
Set Variable [ $item ; Value: MBS( "MenuItem.CreateMenuItem"; REP::LabelReport) ]
# define which script to call if menu item is selected
Today we introduce our new XML.Import function for FileMaker. it can be used to import any XML file and create records. It translates any field or attribute to fields in new tables. And if the table is missing, the function creates the tables and add fields.
So when you have a job to get regularly a XML imported into your FileMaker solution, e.g. new zip code list every month, you can use this function. First you copy the import script from our example database and import the file once. This will not just import thousands of records, but also create all the required tables. We recommend to put this in a separate import database file, so all those records don't disturb your normal solution. Now when you have maybe 10 new tables generated by our plugin, you can create layouts to show the records. This way you can verify the data is right.
Next step is to use the data. There are two ways. One can be to just reference the import tables from your other database files for lookups, e.g. to find city name for a zip code. Other way is to have scripts walk over the records to copy the relevant portion of the data into your own tables. The imported xml values are all stuffed in text fields and you may have a lot more fields than you may need. So reducing the data and copying it into your own tables will improve performance for lookup. Feel free to add indexes to the tables as needed.
The import process itself runs asynchronously in the background at idle time. So you call XML.Import once and you get back the number of records it plans to create. Now you loop doing script pauses and checking for status. XML.Import.Status will return you the status. It will be "Working" until the work is done and it switches to "Finished". Using the XML.Import.Todo function you can query the current number and show progress dialog like our example.
All tables have three default fields. _RecordUUID is an unique identifier for the record. _ParentRecordUUID provides a link to the record one level higher in the XML. This can be used to find child/parent records. The _CreationTimeStamp is the creation date, so you can distinguish different imports.
Coming soon with next prerelease. For FileMaker 12 and newer.
PS: We also have FM.InsertRecordTSV function to import tab/return text and SQL functions to copy records from within FileMaker or other SQL database to a FileMaker table.
Today we looked into quick import of records from text. A client has from other application a big block of text with tab/return separated values and wants to import them into records.
Our new function FM.InsertRecordTSV takes a name of a table, file, the fields and the text blob and walks over the text to create new records. Works just fine and is very fast. We'll see what other wishes people have on this topic.
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!
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.
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.