Soon coming in the MBS Filemaker plugin:
Drawing commands to modify pictures with GraphicsMagick by drawing rectangles, round rectangles, lines, circles, ellipses and arcs.
New in this prerelease of the 12.5 plugins:
- Added memoryblock variants of the MD5 functions to avoid conversion from memoryblocks to string.
- Fixed problem in MD5MBS on Mac OS X 10.4.
- Added ExtendedAttributesMBS module.
Download:
macsw.de/plugin/Prerelease. Or ask us to be added to our shared Dropbox folder.
On Mac OS X the frameworks behave differently depending on which Mac OS X SDK version was used to build the app. For example the
HTMLViewer draws background of textfield differently. Also our
NSStatusItemMBS class works better with 10.6 than with 10.4 SDK setting. And now we also see that
NSImageMBS works differently. Picture orientation is not recognized if SDK setting is 10.4, but works in 10.6.
So switch your Real Studio copy on Mac OS X to mark applications to get 10.6 behavior, you can use this line in terminal:
defaults write com.realsoftware.realstudio "Mac SDK Version" -string "10.6"
Update: This also affects MBQueryMBS.
Warning: This is a global setting which affects all your projects. This can have bad side effects, especially in Cocoa project where the framework expects you to use the default version. Default SDK for 2012r2 Cocoa is 10.7, so the plugin functions should work fine there without you use this setting.
Here a few pictures from the conference:
(more)
Real World 2013 is just five months away. The good news today is: Our MBS Real Studio Plugin Session has been accepted. Your chance to see what's new in our plugins, learn about what is coming and ask questions directly to me.
If you know already that you will join us for the conference, you can register on the
conference website and have the chance to win a Disney Park ticket.
Also if you have an interesting topic for a session, please contact Real Software.
Real World 2012 was a huge success with over 100 attendees from 14 countries, featuring 20 exciting sessions. On the heals of that success, we will be returning to sunny Orlando, Florida in 2013 at the Holiday Inn Downtown Disney!
The
2013 Developer Conference will be even bigger and better than 2012, with 3 full days of presentations and events!
With our latest MBS Filemaker Plugin prerelease we added support for using DynaPDF library in Filemaker. Using newest plugins you can enjoy our new
DynaPDF functions. We start with just a few high level functions for the most requested functions:
So we have functions to open a PDF for import and import all pages or just selected ones. Also you can read/write document informations like title or subject. You can query page size and page count. With the render page function you can get a picture from a page. Good for creating a thumbnail. And finally you can save a PDF you created.
(more)
We plan to do trainings on our MBS FIlemaker Plugin. And for that we had a nice idea. We could store the license key for the training Mac right in the Filemaker preferences. So before the training, we open a little Filemaker database from an USB stick, run a script and apply the registration key. Than whenever someone uses the plugin on that computer, it is automatically registered.
This feature is also good for my presentations in the future where no more warning dialogs for missing licenses will show up.
To store registration you can use a script step like this:
$r = MBS( "StoreRegistration"; Register::LicenseeName; Register::Component; Register::LicenseType; Register::ExpireMonth; Register::SerialNumber )
As registration details are stored in Filemaker preferences, you need to apply this for every Filemaker version you use. This should also work on a server.
New in this prerelease of the 3.0 plugins:
- Added DynaPDF functions for Mac/Win PDF functions.
- Added RichText functions for Mac.
- Added ClearRegistration, IsRegistered and StoreRegistration for preloading registration on Macs used for training.
- Changed Syntax Coloring to also see functions if between function and braket is a space.
Download at
monkeybreadsoftware.de/filemaker/files/Prerelease/.
New in this prerelease of the 12.5 plugins:
- Fixed bug in VLC Plugin with drawing to CGContext.
- Fixed NSControlMBS.stringValue so assigning empty string does not raise an exception.
- Added ReadPipePacket, WritePipe and WritePipePacket methods to WinUSBMBS class.
- Added MacUSBMBS class.
- Added Icon, IconImage, IconMask to IconFamilyMBS class.
- Fixed bug in WinUSBMBS.PipePolicyMaximumTransferSize.
- Changed CURLMBS/CURLSMBS.OpenMTInputFile to set input size to file size.
- Added AddValues/AddKeys methods to map classes for older Realbasic versions.
- Added SetGrayPicture, SetRows and a few constants to PNGPictureMBS class.
Download:
macsw.de/plugin/Prerelease. Or ask us to be added to our shared Dropbox folder.
You can have a GUI application in Real Studio and still take command line parameters and output to console. This means that people can launch your app by double clicking and use it normally. But someone else can write a shell script (or batch file on Windows) to call your app with command line parameters and just do a certain task. After the task is done, the app quits so it can be called again for the next batch job.
In order to do this, we have
StdOutMBS class in our plugins and our latest 12.5pr plugins contain a sample project for this. You can use StdOutMBS.Write to write to the console. Be aware that some actions like showing a msgbox turn your app into a GUI app which may make it impossible to write to the standard output.
Check out the example and try to see if you can find an use for this. If you have questions, please do not hesitate to contact us.
Real Software engineers, how about having a command line switch for the Real Studio IDE to load a project, build it and quit? This way we could easier batch build projects.
Save 30% on all new Real Studio licenses.
Real Studio, the cross-platform web, desktop and console development tool, will be on sale for Black Friday, November 23, 2012, the biggest shopping day of the year in the United States, from 12:00 AM to 11:59 PM Central Time. All new licenses will be discounted to 30% off their original price. Go to the Real Software Store on Friday, November 23rd and the discount will be applied when you checkout!
Real Software Store
Thanks to Holger Herbst for sharing his experience with our MBS Plugin on the Filemaker Magazin Forum.
See article here:
filemaker-magazin.de/forum/beitrag/124809
New in this prerelease of the 12.5 plugins:
- Fixed plugin pictures on console target, so they are no longer 100% transparent.
- Fixed StringToVariantHashMapMBS and other map classes to have ValueAtIndex and Key functions to work on Realbasic 2007.
- Added ChartDirector examples for cursor tracking.
- Fixed bug in RegistryValue.asLong32 and RegistryValue.asLong64.
- Fixed RegistryMBS.getStringValue function.
- Fixed WinUSBMBS constructor.
Download:
macsw.de/plugin/Prerelease. Or ask us to be added to our shared Dropbox folder.
The conference ended and went well.
I actually presented something very new: Cursor tracking in ChartDirector.
With 12.5pr10 we include six new example projects with our plugins for tracking cursors.
Just take a look at the pictures and wait for the new plugins:
a financial chart:
with line and values in legend:
with line and values in chart:
with values on the axes:
with values on the axes for two vertical axes:
and also with bar charts:
Stéphane is just giving presentation about state of the Real Software projects like Cocoa, Web Edition, LLVM and 64 bit. And of course we can't wait for him to show RS 2012r2. Later tonight Geoff will show 2013r1 and we are excited to see iOS support.
If you are in Koblenz, join us tonight with our boat trip and/or the dinner in the Weindorf restaurant.
Just a picture taken at lunch time.
Already a couple of other people arrived for tomorrow and we are enjoying the hotel bar.
Today we want to show you how to use our
CURL functions in the MBS Filemaker Plugin to do some simple tasks. First we download a picture file and than we upload a file with ftp.
(more)
New in this prerelease of the 12.5 plugins:
- Changed some multithreading functions to use Grand Central Dispatch on Mac OS X 10.6 and newer like PictureMBS.Scale.
- Changed icon functions to be console safe.
- Fixed leak of threads in many multithreading functions like PictureMBS.Scale.
- The plugin created threads now have a stack size of 2 MB to avoid stack overflows and names to make debugging easier.
- Fixed DynaPDFMBS.GetFieldName to work with unicode names.
Download:
macsw.de/plugin/Prerelease. Or ask us to be added to our shared Dropbox folder.
I'm writing this on saturday. Just one day left until we meet with a few people in the hotel. Some people taking the training actually come sunday evening.
If you like to join us, feel welcome to come. Even if you are not joining the conference. Actually it's quite likely to find people on every evening in the hotel at the bar. Or downstairs in the Weindorf next to the hotel.
You can still
register on the conference website.
The Mercure hotel located in Julius-Wegeler-Str. 6, 56068 Koblenz.
New in this prerelease of the 12.5 plugins:
- Added WindowsKeyboardLayoutMBS class.
- Added Window.NSPanelMBS function.
- Added Picture.ColorizeMBS.
- Added CUPSMBS.SetDefaultPrinter.
- Updated DynaPDF to version 3.0.21.55.
- Updated ShortPathMBS and LongPathMBS on folderitem to be unicode safe.
- Added NSControlMBS.ConnectActionEvent method.
- Fixed possible crash with NSSavePanelMBS class.
- Added SetGrayPicture, SetRows and a few constants to PNGPictureMBS class.
- Added Picture.IsGrayMBS method.
- Added new methods and properties to Twain classes.
- Removed InstallEvent and RemoveEvent from TwainMBS class.
- Added CDMultiChartMBS.getChart, CDTTFTextMBS.destroy, CDXYChartMBS.getLayer and CDXYChartMBS.getLayerByZ.
- Added StdoutMBS.AttachConsole and StdinMBS.AttachConsole.
- Added TextInputSourceMBS class.
- Fixed possible leak in NSLocaleMBS constructor.
- Fixed crash in PHPMBS constructor. Now it raises exception if PHP library is not loaded.
- Updated ChartDirector to version 5.1.1.
Download:
macsw.de/plugin/Prerelease. Or ask us to be added to our shared Dropbox folder.
New in this prerelease of the 3.0 plugins:
- Added Printer.SetDefaultPrinter, Printer.PrinterName, Printer.PrinterCount and Printer.GetDefaultPrinter.
- Added String.EncodeToBytes, String.EncodeHexToBase64, String.EncodeBytesToBase64, String.DecodeHexFromBase64, String.DecodeFromBytes and String.DecodeBytesFromBase64.
- Added WebView.SetEditable, WebView.LoadHTML and WebView.GetEditable.
- Added String.FindBetween function.
- Fixed problem with CURL and SFTP transfers (SSH).
- Improved trace output on Windows.
- On Filemaker Server we now write to DebugView/Console.app the message that the plugin has been loaded. This makes it easier to verify things are working.
Download at
monkeybreadsoftware.de/filemaker/files/Prerelease/.
Real Software
announced the Real Studio 2012r2 beta and the 2013r1 alpha.
The good thing: They make progress and show something and it looks like we get another release this year. 2012r2 will have the old IDE, but new framework and 2013r1 will have the new IDE.
If you like,
join the beta program and test 2012r1b1.
If you see a problem with our plugins, please send bug report directly. We test our plugins with 2012r2b1 and 2013r1a1, but if you see an issue it helps us getting things fixed quicker.
The magazine just arrived. Check it out and read about the Filemaker conference, how I got the plugin award and how to you optimize your Filemaker solutions for retina displays.
Also I have an article about our
Runtime Shrinker application.
(of course only if you understand German)
More details on the
Filemaker Magazin website.
Ten days left to register and seats are filling already. We still have a few left, so you can still
register on the conference website. Already we have people from France, Romania, Sweden, Austria and Germany.
Take the chance to learn about Real Studio 2012r2 and 2013 versions, see progress on new IDE and the iOS support. Learn about how to use web edition, databases, color management and xml to improve your applications. Talk directly to Stephane Pinel from Real Software. Take the chance to get in touch and show your problems, make feature requests and present your own projects.
If you need help for finding a hotel or planning your trip, please don't hesitate to contact us. See you there!
Sometimes you run a script and call 20 MBS plugin functions. But something goes wrong in-between and you'd like to know what function returns an error or gets a bad parameter. Maybe you have a typing error in the function name, a wrong parameter or some function returns an error?
In our plugin we have a special command called
Trace. This command lets the plugin output messages for all calls to plugin functions to either a log file or the standard debug console. A file is useful for people developing or if you want your solution to write a log file for your user to send you.
For seeing live trace logs, we normally recommend to simply call MBS("
Trace") with no parameters and run Console.app on Mac OS X and DebugView on Windows. The Debugview tool can be downloaded for free from Microsoft. In order to see messages from Filemaker Server, you need to run it as Administrator.
Like when using our Rename Container example database with tracing and you run the RenameIt script, you see output like this:
Nov 10 13:27:34 cs FileMaker Pro[8239]: | MBS Plugin called with 3 parameters. |
Nov 10 13:27:34 cs FileMaker Pro[8239]: | Parameter 0: "Container.Rename" |
Nov 10 13:27:34 cs FileMaker Pro[8239]: | Parameter 1: Binary Data with 4 streams, 27304 Bytes in total: FNAM "filemac:/SnowLeopard/Users/cs/Desktop/logo.jpg", FORK "........", JPEG "......JFIF.....H.H......Photoshop 3.0.8BIM .......x.(...H.H.......R.......[ ..(.................4...2", SIZE 350 x 350 |
Nov 10 13:27:34 cs FileMaker Pro[8239]: | Parameter 2: "test.jpg" |
Nov 10 13:27:34 cs FileMaker Pro[8239]: | ErrorCode 0 (no error), Result: Binary Data with 4 streams, 27228 Bytes in total: FNAM "file:test.jpg", FORK "........", JPEG "......JFIF.....H.H......Photoshop 3.0.8BIM .......x.(...H.H.......R.......[ ..(.................4...2", SIZE 350 x 350 |
Nov 10 13:27:34 cs FileMaker Pro[8239]: | MBS Plugin called with 2 parameters. |
Nov 10 13:27:34 cs FileMaker Pro[8239]: | Parameter 0: "Container.getName" |
Nov 10 13:27:34 cs FileMaker Pro[8239]: | Parameter 1: Binary Data with 4 streams, 27304 Bytes in total: FNAM "filemac:/SnowLeopard/Users/cs/Desktop/logo.jpg", FORK "........", JPEG "......JFIF.....H.H......Photoshop 3.0.8BIM .......x.(...H.H.......R.......[ ..(.................4...2", SIZE 350 x 350 |
Nov 10 13:27:34 cs FileMaker Pro[8239]: | ErrorCode 0 (no error), Result: "filemac:/SnowLeopard/Users/cs/Desktop/logo.jpg" |
Nov 10 13:27:34 cs FileMaker Pro[8239]: | MBS Plugin called with 2 parameters. |
Nov 10 13:27:34 cs FileMaker Pro[8239]: | Parameter 0: "Container.getName" |
Nov 10 13:27:34 cs FileMaker Pro[8239]: | Parameter 1: Binary Data with 4 streams, 27228 Bytes in total: FNAM "file:test.jpg", FORK "........", JPEG "......JFIF.....H.H......Photoshop 3.0.8BIM .......x.(...H.H.......R.......[ ..(.................4...2", SIZE 350 x 350 |
Nov 10 13:27:34 cs FileMaker Pro[8239]: | ErrorCode 0 (no error), Result: "file:test.jpg" |
The first thing you see is that we have three MBS plugin calls there, but the script has only one call. Weird? Actually no as the database defines two field with calculations, so the plugin is called there, too.
Now the plugin informs you about the calls and the number of parameters. It writes those parameters to the log. For text you see the text in quotes. For container values, you see Binary Data being listed with very detailed content details. Like the first one has 4 streams and contains a file name, a fork with data, a JPEG data stream and the SIZE information. In the streams all the unprintable characters are printed as dots.
After the function was executed, the plugin shows the error code and the result. For the error codes we know a few and can show the error type. For the result as for parameters the content is shown so you see exactly what is returned.
So we hope this command helps you. Especially with looking for bugs in scheduled scripts on a Filemaker Server.
In Filemaker you sometimes want to export text. For that people usually use the Export Field Contents script step in Filemaker. There you can specify a field and a filename. Filename can include variables and specify different paths on Mac and Windows. Field can be a field you select or the current field. If you export a container, you get the file written there (make sure you have right extension!) and for text it writes an UTF-16LE encoded text file.
Now sometimes you need more. Like you want to export values in a variable without putting them in a field. You may want to export text as UTF-8, MacRoman, Windows ANSI or some other text encoding instead of UTF-16LE. With
String.WriteTextFile you can specify the text encoding you want. Maybe you want to pass text before through
String.ReplaceNewline to make sure the right newline character is used. For example CR for Classic Mac, CRLF for Windows or LF for Unix Mac OS X. Next you may want to write a log file and just append to a file with
String.AppendTextFile.
For containers you can export them with
Container.Export. There you can specify a container as field or variable and a path to write to. And you select what to export. Like if your container contains a TIFF picture, you can either export the TIFF or the preview JPEG. The function
Container.GetTypes tells you which types are in a container.
If you like, please check
Container.Export,
String.AppendTextFile,
String.WriteTextFile or
String.ReplaceNewline.
On the Real Software Blog you find some useful tips and tricks articles:
New in this prerelease of the 12.5 plugins:
- Updated MBS Plugin Manager project.
- Rewrote RenderSamplesMBS function.
- Improved DirectShow grabber so it uses half the CPU time.
- Added SCPreferencesMBS.CreateWithAuthorization.
- Added MySQLMBS.NumberOrRows.
- Added RecordCount support for RecordSet in use with SQLDatabaseMBS class and PostgreSQL or MySQL.
- Added TwainMBS.DontUnload.
- Added NSLayoutManagerMBS.font property.
Download:
macsw.de/plugin/Prerelease. Or ask us to be added to our shared Dropbox folder.
New in this prerelease of the 3.0 plugins:
- Changed SyntaxColoring.AddTag function to take a new selector parameter to specify what to color: function, scriptstep, variable or formula.
- Added SyntaxColoring.Enabled function.
- Added Container.GetName function.
- Added Container.Rename function.
Download at
monkeybreadsoftware.de/filemaker/files/Prerelease/.
Just two weeks left until the
conference. Everything is ready and if you like, you can
register your seat today.
Take the chance to learn about Real Studio 2012r2 and 2013 versions, see progress on new IDE and the iOS support. Learn about how to use web edition, databases, color management and xml to improve your applications. Talk directly to Stephane Pinel from Real Software. Take the chance to get in touch and show your problems, make feature requests and present your own projects.
For tuesday evening, we will do a sight seeing boat trip on the Rhine, so if you are registered, please notice us if you like to join this trip. Also we reserved space in the Weindorf restaurant for dinner as it's very nice location and quite close to the conference hotel.
If you need help for finding a hotel or planning your trip, please don't hesitate to contact us.
See you in two weeks!
Sometimes it can be difficult to get things working in several development tools. For example if you encrypt something in a server shell script using openssl, you may want to decrypt in a Real Studio app. For example this command line:
openssl aes-128-cbc -in input.txt -out input_enc.txt -k mypassword -p
Runs AES 128bit CBC Mode encryption on an input.txt file. Result is written to input_enc.txt file and we use the given password. Also we didn't disable salting, so the encryption will get some salt.
So how we decrypt with
MBS Plugin?
Well, we first locate the file and read it. If first 8 bytes are "Salted__", than the next 8 bytes are the salt. This is how OpenSSL adds flavor. Next we need to build key and initial vector using password, key and salt and pass them through MD5 to make them more random.
Now we can set key to
AESMBS class. With passing key as string, the length of the key (16 bytes) will define that we use AES-128. We built memoryblocks for input and output and pass them Through DecryptCBC. Finally we need to remove PKCS7 padding. In result variable, we keep the result. If you encrypted text, this is the time where you can add a DefineEncoding call to mark it as UTF-8 or so.
Below you see the complete code:
(more)
We currently have 19 people here as a few cancelled. But still a great meeting with a lot of interesting projects and details:
If you missed this event or you need more, please join the
conference in Germany in three weeks.
The
stack size of threads is an issue. It can cause random crashes. For code in Real Studio, there is extra code inserted in every method to ensure you get a
StackOverflowException. But in C code, this check is not performed. So if you have a full stack and you call into the Real Studio runtime, some DLL or a plugin, the function can overwrite the some objects in memory located behind the end of the stack.
With a tiny stack of just 64 K by default on Mac this is very likely to happen with a little bit of recursion.
So please set stacksize to a higher value like one million bytes.
Also sign on this bug report:
22996: Increase default Thread.Stacksize
We were 12 people for dinner and it was an interesting discussion about Real Studio, Macs/PCs, iOS/Android and weather in the US.
See you tomorrow!
I arrived today in Birmingham and will soon join others for dinner and cold drinks.
If you like to come along for a beer, you can join us from 6pm tonight at the Bacchus Bar, Burlington Arcade, New Street, Birmingham B2 4JH (near the Pallisades ramp).
If you come for the Real Studio event, please enter this door. It's the side of the house looking to the temple building. Than go to the front bar and ask for the room of the meeting.
Due to missing house numbers, we needed to walk around the house to find the right door.