With Mac OS X 10.8 Apple adds GameKit for Mac. This is a great chance for a lot of new games on the Mac as the work needed to get your app working for several players is much easier.
For MBS Plugin 12.3 we have implemented the whole GameKit framework. As you see in the
documentation, this includes 20 classes with hundreds of methods, events and constants.
We had to make some design decision. One is the
GameKitMBS class. This is the base class with a few global methods, error constants and 50 events. Due to the way Apple implemented GameKit there are a lot of functions which run asynchronously. When the work is done, they call a function to inform the application that the work is done. Our plugin now doesn't provide you with a lot of events all over the classes, but events in one central class. So with one subclass you can handle all events.
As a convenience in the events, we pass you the objects and parameters from the method call. And we carry you a variant parameter call tag to the event for context information. For example if you load the image for a player or achievement, you could pass the canvas where the event puts the picture after loading is done.
Under the hood the plugin puts a lot of work into getting things thread safe. So all events are redirected to the main thread. For best performance, please keep the main thread unblocked.
For the game data, Apple allows to pass a block of bytes. But instead of having a memoryblock in Real Studio, we decided that it is more convenient to serialize a dictionary. This way you can pass a lot of data easily. The dictionary can contain memory blocks, strings, numbers, dictionaries and arrays. Of course we could later make this an option if you have special needs.
Who wants to make the first GameKit game in Real Studio?
if you want to find new plugins from us regularly and automatically in a folder on your hard disc, please sign up for
Dropbox account and email me to add you to our shared folder.
This way you have always the lastest plugins.
The Omega Bundle for Real Studio is a great way to get several titles around Real Studio in one package. Now the package is even better as we include Shade 10 Standard Edition for existing and future buyers. So when you are trying out Franklin 3D engine and you need a software to create models, Shade is just right for you.
Remind:
The offer ends 6th August 2012.
New in this prerelease of the 12.3 plugins:
- Updated DynaPDF to version 3.0.17.46.
- Added CustomNSSharingServiceMBS class.
- Added GotSharedAddressbook and sharedAddressbookMT to ABAddressBookMBS class.
- Now all plugins are compiled on Mac OS X 10.8.
Download:
macsw.de/plugin/Prerelease. Or ask us to be added to our shared Dropbox folder.
Do you know this dialog?
Well, Apple has a Collaboration framework for managing identities. For details, please read the
Introduction to Identity Services Programming Guide from Apple.
In our plugin we have a couple of
classes:
CBIdentityAuthorityMBS,
CBIdentityPickerMBS,
CBIdentityMBS,
CBUserIdentityMBS and
CBGroupIdentityMBS.
This may be useful in the future with other functions. But for now you can use it to learn about user and groups on a Mac.
Today I worked on this and got a few example code snippets for the documentation. Should be ready with next plugin prerelease.
This is a nice addition:
I have several apps where I can use geocoding. Currently we relay on google's services, but now we can also use Apple's. Simply use the
CLGeocoderMBS class. There you can have an address resolved to placemarks or also reverse geocode by looking up a geographical location. Or in other words, passing in "Kölner Dom", you get a record with details like city, country, latitude and longitude. But also by passing in longitude/latitude, the service can tell you what's there.
I think this is a great addition and I certainly have a few clients who can use that in their application for address lookup, address correction, geo mapping and coordinate tagging.
The example project will be included with new plugins in the next days.
Have you seen this dialog recently on Mac OS X 10.8?
Your language may be different, but the dialog is the same. It shows when your application wants to look into the addressbook for the first time. This happens when you call the sharedAddressbook method in ABAddressbook class. Or with our
ABAddressBookMBS class with constructor to the sharedAddressbook shared method.
Now the problem with the dialog is that it blocks the application. So in order to avoid it, we created sharedAddressbookMT function. It runs the dialog on a preemptive thread in the background. You call it on a Real Studio thread, so the normal threading in Real Studio works. The result is that the permissions dialog does no longer block your app.
Also we add a function GotSharedAddressbook to
ABAddressBookMBS class, so you can know whether the sharedAddressbook function has been queried before. Good to know whether a dialog may come.
This functions and the example project will be included in 12.3pr15.
With Mountain Lion you can now post user notifications to the user. Depending on the settings defined in system preferences, your notification shows an alert, a banner or nothing. You can play a sound and user can see the notifications. You can schedule notifications to fire while your app is in background or not running. When clicked on the notification, the system can launch your application and inform you which notification was clicked.
So let's look into it. Our plugins have
functions for Filemaker (in new 2.8 plugins) and
classes for Real Studio (in new 12.3 plugins).
First we need to create a new notification object. In Filemaker, we set a variable with the new reference number:
Set Variable [$ref; MBS("UserNotification.Create")]
And in Real Studio we create a new user notification object:
dim u as new NSUserNotificationMBS
Next we can define title, subtitle and the informative text. For that we use three more set variable steps in Filemaker. We pass the reference number and also put return values in result variables, so you can see the variables in debugger and notice any error message from the plugin.
Set Variable [$result; MBS("UserNotification.SetTitle"; $ref; "Hello World")]
Set Variable [$result; MBS("UserNotification.SetSubTitle"; $ref; "from Filemaker")]
Set Variable [$result; MBS("UserNotification.SetInformativeText"; $ref; "Our first Notification from Filemaker. ")]
In Real Studio we simply assign the properties with the texts:
u.Title = "Hello World"
u.subtitle = "from Real Studio."
u.informativeText = "Our first Notification from Real Studio."
You can customize the notification with an action button, but that button is only visible if user allows you to show alerts. In that case it is interesting to register a
callback in Filemaker or use the
NSUserNotificationCenterDelegateMBS class in Real Studio to get notified if button is pressed or notification content has been clicked.
For the notification you can also define a sound to be played and you can store user information data. That's text like a record ID which you can put into the notification and retrieve later when you get an event that button is clicked or notification has been delivered. Also you can query scheduled and delivered notifications and check the user info there to update your own database for what the user saw.
You can show a notification with the deliver function, but we really want to schedule the notification to show later. So for this example we query current date and time and simply add ten seconds. In Filemaker, you write this like this:
MBS("UserNotification.SetDeliveryDate"; $ref; Get ( CurrentHostTimeStamp ) + 10)
MBS("UserNotification.scheduleNotification"; $ref)
In Real Studio we use the date class to get current date, add ten seconds and set delivery date. To deliver or schedule we need an object of the
NSUserNotificationCenterMBS class, so we create an instance and call the scheduleNotification method:
dim d as new date
d.Second = d.Second + 10
u.deliveryDate = d
dim c as new NSUserNotificationCenterMBS
c.scheduleNotification u
Finally, to free memory, you can call
UserNotification.Release in Filemaker. In Real Studio simply let the objects go out of scope.
Also important: Your Filemaker solution or Real Studio applications need to have an unique application identifier. So for Real Studio, please make sure app.ApplicationIdentifier is set. On Filemaker, the app itself has an identifier, but runtimes may need to have it customized, so not all runtimes have same identifier. You find the bundle identifier in the info.plist inside the application package.
I hope you enjoy notifications and if you have questions, please do not hesitate to ask us.
New in this prerelease of the 12.3 plugins:
- Picture.RotateMBS plugin now loads again on older Real Studio Versions.
- All plugin parts are now linked with Mac OS X 10.7 SDK. Older functions are loaded on demand. This can mean that QuickDraw functions deprecated in Mac OS X 10.4 may stop working with Mac OS X 10.8/10.9 when Apple removes them from the frameworks.
Download:
macsw.de/plugin/Prerelease. Or ask us to be added to our shared Dropbox folder.
New in this prerelease of the 2.8 plugins:
- Added UserNotification.GetDescription for easier debugging.
- Added Audit.SetIgnoredFieldNames function.
- Changed Audit functions to take table name in order to find right table.
- Changed Audit functions to ignore unstored calculation and global fields.
Download later today at
monkeybreadsoftware.de/filemaker/files/.
These four frameworks are 64 bit only: Accounts, EventKit, GLKit and Social.
So while we have plugins for Accounts, EventKit and Social, you can only use them when Real Studio starts producing 64 bit Mac applications.
As of today, none of them are useable. Can you imagine how I feel after
coding the plugins?
New in this prerelease of the 12.3 plugins:
- Added new MountainLion plugin.
- Fixed BackingScaleFactorMBS to work on Mac OS X 10.6 and return 1 there.
- Updated DynaPDF to version 3.0.17.45.
Download:
macsw.de/plugin/Prerelease. Or ask us to be added to our shared Dropbox folder.
New in this prerelease of the 2.8 plugins:
- Fixed problem with CURL.AddInputPNG.
- Added WebDownloadDelegate.SetFolder, WebDownloadDelegate.GetFolder and WebDownloadDelegate.ClearFolder functions.
- Changed Path.FilemakerPathToNativePath to also remove filemac:, filewin: and file: prefixes.
- Added UserNotification functions for Mac OS X 10.8.
- Added Audit functions.
- Added Files.RenameFile.
Download later today at
monkeybreadsoftware.de/filemaker/files/. Or ask us to be added to our shared Dropbox folder.
From time to time we are asked on how to install our plugin on Filemaker Server. Today we tested if this is working with Filemaker 12 Server and Mac OS X 10.8. And yes, it's working just fine.
Simply follow the steps in the documentation coming with Filemaker Server. So first copy the plugin file into the extensions folder. On Mac OS X this is "/Library/FileMaker Server/Database Server/Extensions". On Windows this is "C:\Program Files\FileMaker\FileMaker Server\Database Server\Extensions". Once you copied the plugin there, you may need to restart the server to recognize the plugin. Once the server sees it, the admin console should list the plugin. Now you can enable plugins with the upper checkbox and enable the plugins you need in the list below. Save and once the plugin is loaded, you see "MBS Plug-in" in the list.
If you have questions or problems, please do not hesitate to ask us.
You can use our plugin to automatically perform tasks on the server using server side scripts. For example you can send emails at night to people who need to do something the next day. Or you have a shop where sales people enter orders on Filemaker with an iPad and the server sits in the office and talks with our plugin to a label printer in the shop to print labels or a receipt for the order. And of course you can do a lot of networking: Like when someone finishes an order on an iPad, the server automatically pushs an invoice to paypal for payment.
We'll have the plugins updated soon. For the time being, please check the gallery with new
programmable track cursors and
3D Scatter Charts..
This update is free for everyone with a current ChartDirector plugin license. People with older license can update soon.
New in this prerelease of the 12.3 plugins:
- Removed PackCursResourceMBS function.
- Added EyeOneISISMBS class for i1iSis SDK 1.0.8.
- Added EyeOnePro4MBS class for i1Pro SDK 4.0.4.
Download:
macsw.de/plugin/Prerelease
The
OmegaBundle is available through July 2012, so order soon. 12 items for Real Studio.
Just got a report from an user who informed me that new plugins 12.3pr13 shrinker his app from 132.8 MB down to 122 MB. So my restructure work on splitting plugins into smaller chunks and reducing dependencies was a success.
Also I can remind everyone to use #if to keep Real Studio from including Mac only plugins in Windows/Linux target and Windows only plugins in Mac/Linux targets.
There is another job offer in Germany for a Real Studio developer (full time job):
Entwickler/-in Programmierer/-in für Festanstellung gesucht
Maybe someone is interested?
New in this prerelease of the 12.3 plugins:
- Added isMountainLion and isWindows8 to SystemInformationMBS module.
- Fixed bug in LCMS2ProfileMBS.CreateLinearizationDeviceLink.
- Updated DynaPDF to version 3.0.17.44.
- Improved speed for QTPictureMovieTrackMBS.AddPicture a little bit.
- Removed deprecated functions (by Apple) from CGDisplayMBS class: BitsPerPixel, BitsPerSample, SamplesPerPixel, BytesPerRow, BaseAddress, BaseAddressAsMemoryBlock, BaseAddressForPosition and BaseAddressForPositionAsMemoryBlock.
- Added NSCalendarMBS, NSDateComponentsMBS and NSTimeZoneMBS classes.
- Added ValidateUUIDMBS function.
- Added WindowsPreviewHandlerMBS class.
- Added NSMenuMBS notifications. Useful to edit menus on Cocoa with plugin when Real Studio recreates menu.
- Added PixelHeight and PixelWidth to CGDisplayModeMBS for retina displays.
- Added ArrayIsAMBS and ObjectIsAMBS to help with feedback case 12213.
- Added destructor to NSNotificationObserverMBS class to automatically unregister it from NSNotificationCenterMBS and NSDistributedNotificationCenterMBS in case you forgot to avoid crashes.
Download:
macsw.de/plugin/Prerelease
New in this prerelease of the 2.8 plugins:
- Added more SystemInfo functions.
- Added Window.Update command.
- Form utility improved: Avoids black input fields, shows HTML code, shows options for select fields and updates URL field to current URL. And code signed for Mountain Lion.
- With backdrop window on Mac we hide other apps if you switch to Filemaker from other app and backdrop is active.
- Normal drag handler scripts are no longer called in layout mode. We could also disable other script callings in that case if needed or make it an option.
Download later today at
monkeybreadsoftware.de/filemaker/files/
- Mac OS X 10.8 may come around 25th July according to some rumor webpages.
- Our plugins are getting ready for the launch of Mountain Lion. I worked the last weekend on new classes for events, reminders and sharing services.
- Windows 8 internally is just a Windows 6.2. Vista was 6.0 and Windows 7 is 6.1. No idea why Microsoft let version differ so much between marketing and kernel. We'll update our OS version functions for this.
- If next Real World is in spring 2013, there may be room for another event in fall.
- Tomorrow office may be closed due to Michael's second birthday.
Someone asked me why I have a JPEG plugin. Real Studio can already read/write JPEG files.
While Real Studio has built in features for loading and saving JPEG picture files, this plugin gives you much more features:
- Load/Save RGB, CMYK and Grayscale JPEG images to/from file or memory.
- Faster than built in JPEG functions.
- Load damaged or partial downloaded JPEG files.
- Read/Write metadata and ICC Profiles.
- Get error/warning messages on damaged files.
- Rotate or flip JPEG images without recompression.
- Load JPEG files row by row to not block your app on huge files and show progress.
- Load/save JPEG files to/from memoryblocks as raw values.
- Read only JPEG header without image data to quickly find metadata.
- Read quickly thumbnails from JPEG files (2, 4 or 8 scale factor).
On the right you see a damaged JPEG file which our plugin could read.
Tonight, 7 pm at the Beaulieu (Erlachstr 3, Bern), you can meet a couple of swiss Filemaker developers.
Seems like Microsoft has a mechanism to load preview handlers and preview documents similar to
QuickLook on Mac.
So we can query the available preview handlers from the registry. You pick one and select a file and we try to show a preview. You find those in the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\ CurrentVersion\PreviewHandlers. The handlers are listed with Class ID there (a GUID) and a name as value.
Also for file extensions like ".contact" you find a registry key like this: HKEY_CLASSES_ROOT\.contact\shellex\{8895b1c6-b41f-4c1c-a562-0d564250836f}. This key has a default value with "{13D3C4B8-B179-4ebb-BF62-F704173E7448}". And this value is the class ID for the "Windows Contact Preview Handler".
Maybe this helps a few people developing better Windows applications. The WindowsPreviewHandlerMBS class will be available with next plugin prerelease.
English
Together with Alphadi we offer Real Studio trainings for database, desktop (Mac/Windows/Linux) and web development. The training is in german and if you need details, please check the flyer
Real Studio Seminar.pdf or the
website. Especially for people new to Real Studio, we offer this training to get started. But also if you already develop in some other environment, it may be interesting to add Real Studio knowledge to your portfolio. More advanced Real Studio developers can still learn a few new things which they didn't use yet.
Deutsch
In Zusammenarbeit mit Alphadi bieten wir ein Seminar zu Real Studio an:
Lernen Sie in zwei Tagen in Kassel, wie Sie mit Real Studio Anwendungen entwickeln. Mit Datenbankzugriff und sowohl als Desktop (Mac/Windows/Linux) wie auch als Web Anwendung. Insbesondere für interessierte Einsteiger oder Umsteiger bieten wir eine Einführung in Real Studio. Aber auch Fortgeschrittene Real Studio Entwickler finden sicher den ein oder Kniff, wie sie etwas in Real Studio umsetzen können. Für Entwickler von anderen Plattformen bietet sich hier die Möglichkeit Real Studio kennen zu lernen und damit sein Portfolio an Werkzeugen zu erweitern.
Wer Informationen im
Real Studio Seminar.pdf oder auf der
Webseite.
New in this prerelease of the 12.3 plugins:
- Now using REALObjectIsA in our plugins instead of own way to check classes. Works fine in Real Studio 2009 to 2012.
- Improved MD5 function's performance. Plugin MD5 is faster than Real Studio built in functions.
- Added WindowsVerticalBlankMBS class.
- Added new key Offset parameter to SystemInformationMBS.WinProductKey needed for reading product ID from Microsoft Office 2010.
- Removed data source for SQL Plugin. Please create connections only in code to database, not in IDE. If someone really uses this, we can bring it back.
- Moved to newer Plugin SDK for RS 2012.
- In working around Feedback case 11329 for some clients with huge projects, we split some more plugin parts.
- Split Java, HTMLViewerDOM, QuartzCore, PDFKit and CF plugin parts.
- Warning: Zip file classes use a lot of stack space. If running in a thread, you need to make sure the thread has big stack (1 MB) instead of smaller default size.
- Changed ABPickerMBS.InstallEvents method to raise exception on non Carbon targets. This method can only work on Carbon. For Cocoa, please use ABPeoplePickerViewMBS class.
- Updated CURLSMBS class to use CURL 7.26.0 for Windows.
- Updated DynaPDF to version 3.0.17.43.
- Added OverlayMBS WinIsTopMost property.
- Fixed NSWindowMBS window level constants. They are now shared methods.
- Added NSWindowMBS.backingScaleFactor.
Download:
macsw.de/plugin/Prerelease
Sometimes people have applications made with Real Studio which are bigger than they need to be.
For example if you have an application which uses both NSStatusitem for Mac and SystemTrayItem for Windows. If you don't use #if and variant properties, your app probably has both plugin parts for Mac and Windows included in application.
Your dll folder for Windows may look like this:
Now if you put #if targetwin32 and #endif around them, the number of DLLs does not really go down. But now if you change the properties from "statusitem As NSStatusItemMBS" to "statusitem As Variant", you can get your app compiled without most DLLs. Of course if you want to use this property, you cast back to your normal class. For example you can have code like "dim s as NSStatusItemMBS = statusitem" and than use the local variable within the #if block.
Finally the DLL folder may look like this:
As you see there is no DLL here with Mac only classes.
Test project:
appsizetest.zip
July 2012 -- Real Studio Developer Magazine is pleased to announce that the new July/August 2012 (10.5) issue is now available in PDF and print-on-demand formats.
This latest issue of the magazine includes the following feature articles:
*
News from Real World * by Marc Zeedar
Real Software announced so much new stuff at the Real World Conference in Orlando last month that we almost need a book to explain it all. From Real Studio for iOS to the new IDE, easy web app deployment, and the new pricing system, we've got the full scoop here.
*
To Real World and Back Again * by Marc Zeedar
Couldn't go to Real World this year? Wondering what it was like? Marc relates his experiences and includes a lot of pictures -- it's almost as good as being there!
*
Intro to Fun * by Daniel Gross
The idea behind Functional Programming is to eliminate the side effects of calculations that depend on a certain state by reducing everything to a repeatable function. What does that mean in practical terms? Daniel Gross has been exploring adapting Real Studio for Functional Programming and he shares his results in this introductory article.
In our regular columns we've got articles on how to convert Markdown, rethinking your processes for better efficiency, web toolbars, and much more. Enjoy!
It looks like the website is online and the store is open. So please take a look on the new
Omegabundle 2012.
This time we are in with Complete and DynaPDF Starter plugins.
But please checkout all 12 pieces in this great bundle!
If you have questions, please email us.
Real Studio seems to have a global function list of plugin features. So when your code triggers the linker to add enough plugin stuff, you see a failed assertion at PluginGlue.cpp:214. See
feedback case 11329.
It's not about how many plugins are in plugins folder. You can easily have several plugin collections there with over 100 rbx files. Also it doesn't depend much on how much plugin functions you use.
It all depends on how many entries in the global plugin function list are used by some plugin. I'm not sure how it's counted, but it seems like classes and methods certainly are added there. And this list has a limit, maybe those 8192 entries listed in the feedback case.
You can trigger it easily with this sample code in a new project.
Warning! This can crash Real Studio, so close other projects!
dim d as new DynaPDFMBS
dim c as new CDBarLayerMBS
dim q as new QTKitMovieMBS
dim f as new CIFilterMBS(0)
dim w as new WebDocumentRepresentationMBS
This triggers inclusion of enough plugin features so that the linker fails. Those classes reference a lot of other classes, so on the end, the list is full.
The only thing I can do is to split plugins into smaller pieces. But for that I'd need to know what people use and what not. And some plugin parts can't be split like ChartDirector.
New in this prerelease of the 12.3 plugins:
- Renamed SaveProfileToString to SaveProfileToMemory for returning a memoryblock.
- Added PictureMBS.FillRectApply.
- Fixed DynaPDF Linux plugin to support more than 2 GB when writing files.
- Fixed bug in CDDrawAreaMBS constructor for use with CDDataSetMBS.setDataSymbol.
- Added ServiceManagementModuleMBS module.
- Fixed memory leak in QTKitMovieMBS.addImage introduced in pr5.
- Updated DynaPDF to version 3.0.17.42.
- Added new table layout classes for DynaPDF.
Download:
macsw.de/plugin/Prerelease
English
Seats available - training will take place.
Together with Alphadi we offer Real Studio trainings for database, desktop (Mac/Windows/Linux) and web development. The training is in german and if you need details, please check the flyer
Real Studio Seminar.pdf or the
website. Especially for people new to Real Studio, we offer this training to get started. But also if you already develop in some other environment, it may be interesting to add Real Studio knowledge to your portfolio. More advanced Real Studio developers can still learn a few new things which they didn't use yet.
Deutsch
In Zusammenarbeit mit Alphadi bieten wir ein Seminar zu Real Studio an:
Noch Plätze frei - Kurs findet statt!
Lernen Sie in zwei Tagen in Kassel, wie Sie mit Real Studio Anwendungen entwickeln. Mit Datenbankzugriff und sowohl als Desktop (Mac/Windows/Linux) wie auch als Web Anwendung. Insbesondere für interessierte Einsteiger oder Umsteiger bieten wir eine Einführung in Real Studio. Aber auch Fortgeschrittene Real Studio Entwickler finden sicher den ein oder Kniff, wie sie etwas in Real Studio umsetzen können. Für Entwickler von anderen Plattformen bietet sich hier die Möglichkeit Real Studio kennen zu lernen und damit sein Portfolio an Werkzeugen zu erweitern.
Wer Informationen im
Real Studio Seminar.pdf oder auf der
Webseite.
We visited Paris to meet a few clients and also join the Paris Real Studio User Group for a meeting in Joe Allen restaurant. Very nice to meet plugin users and see what they use from our plugins. More than 20 people showed up even when our picture shows only a few of them. The group was so big that we didn't fit on the big table, so people spread in groups in the room.
Stephane Pinel from Real Software showed the new Real Studio IDE and discussed upcoming changes to the licensing. And I had the possibility to show a few plugin additions.
For future meetings, please join the
google group and check the
blog.