In recent plugin prereleases we added functions like this:
CallMethodMBS(target as object, name as string, value... as variant) as boolean
CallMethodOnMainThreadMBS(target as object, name as string, value... as variant) as boolean
CallMethodOnThreadMBS(BackgroundThread as BackgroundThreadMBS, target as object, name as string, value... as variant) as boolean
They are very similar. Currently they can take up to three variants as parameters, but that number can be increased if you need. The number of parameters you pass must of course match the declaration of the method you want to call.
Now you may ask: What do this methods do and why should I use them?
Well, first they call a method for you. Something that you can do yourself. Let's say you have a method like this:
sub test(someParameter as variant)
Now you can call in your code this method like this: window1.test("Hello World"). But you can also use our CallMethodMBS function can call it this way: CallMethodMBS(window1, "test", "Hello World"). As you see you need to pass an object for the function to be searched on. As you pass the function name as a string, you can make it dynamically. From time to time a feature like this is requested on the mailing lists and forums, so here you have it. CallMethodMBS returns a boolean whether the call worked. It fails of course if the target object is nil or has no such method.
Next you can use CallMethodOnMainThreadMBS to call this method. While this function returns directly to you, the actual function call will happen later on the main thread. Normally within a few milliseconds, but that depends on how busy your application is. You need a function like this if you do some work in a background thread and you need to perform code on the main thread. There is code doing GUI functions which must be called on the main thread, because it will crash otherwise. Especially with the new Cocoa target we will see this need. That it works most cases on Carbon/Win32 code has its reason in the fact that the main thread is mostly idle at that time.
The third set of functions called CallMethodOnThreadMBS will create a new thread for you and call your method there. Is makes multi threading in REAL Studio much easier than before. So instead of calling window1.test(somedata), you can now call CallMethodOnThreadMBS(new BackgroundThreadMBS, window1, "Test", somedata). This will spin off a new thread and do the execution there, so your main thread has time for doing GUI actions. Your other code will run after this line just fine.
We need you to pass a new BackgroundThreadMBS object as the plugin can't create one on itself. Within some limitations you could build functions like this yourself, but our plugin gives you a convenience way to improve your times. Email us if you have more ideas for functions like this.
ScaleMBS works for me, but crashes for one customer. Help on reproducing is very welcome.
Replaced REALBuildPictureFromGWorld from the plugin SDK with my own replacement for Cocoa so all plugin functions using it, will now work on Cocoa. for example: StringtoPictureByOSTypeMBS and StringtoPictureMBS.
Today REAL Software released a new version of REAL Studio. We worked hard on getting plugins ready, but the Cocoa target and the console graphics gave us a lot of work. Most is ready, we hope, but not everything.
We already have a few bug reports REAL Software said they will fix in a 3.1 update. For example feedback ID 12772 where a project with the line "Backdrop = LogoMBS(500)" in a window.open event in Cocoa will not show the picture. Although the picture is there and you can see it in the debugger or if you display it in a canvas.backdrop.
Please email us about any problem you find related to our plugins so we can fix it.
A few changes are coming to plugin developers with REAL Studio 2010r3. We make progress on this and also REAL Software fixed a few of the bugs we found in the latest final candidates. So we are confident, we can have our 10.4 plugins working well with the new REAL Studio release.
Of course our version supported table will soon be updated to show plugin version 10.4 as minimum for REAL Studio 2010r3. This does not mean that older plugins will stop working if you upgrade REAL Studio, but we recommend keeping the plugins up to date.
Currently we are busy like crazy. REAL Studio 2010r3 is close to release and will bring a beta of the new Cocoa target. I do expect that we'll get a ton of support requests because something is not working. And I do hope that we can simply point most people to download the latest plugin beta version.
So please be patient. Especially if REAL Studio 2010r3 may have some bug or non implemented functionality which we need for our plugins and you'll have to wait for 2010r4.
Some things work already, but some not, so we hope the final release will fix the problems.
Added a lot of new methods for DiscRecording plugin affecting the following classes: DRTrackMBS, DRSetupPanelMBS, DRFSObjectMBS, DRFileMBS, DREraseProgressPanelMBS, DREraseMBS, DRDeviceMBS, DRBurnSetupPanelMBS, DRBurnProgressPanelMBS and DRBurnMBS.
Renamed initWithLinkType to linkWithLinkType in DRFileMBS class.
Added more write methods to DynaPDF so you can pass arrays of values.
Unregistered plugin dialogs now show version number and process ID.
Fixed FontActivateMBS and FontDeactivateMBS on Windows to work again. Also console safe now.
Made changes to the common picture creating code for better support of future REAL Studio versions.
Normally we all put username and password in the URL for a download. It's simple and convenient. Like this:
But what to do if the username or the password contains characters like "@" or ":"?
this URL will fail to parse as CURL expects the server name after the first @.
The solution is to use the OptionUsername and OptionPassword properties for the name and password:
c.OptionUsername = "christian@mbs"
c.OptionPassword = "123456"
c.OptionURL = "ftp://ftp.someserver.com/test/file.txt"
I hope this helps you.
Today a user asked: Where can I get this URL from the file I downloaded?
The answer is to use the MacQuarantinePropertiesMBS class. There you have properties to get he origin URL, normally the website. Also the data URL where the file is located, the time stamp and which app did make the download. Also there is a property to tell you what type of download it is like a web download, an email, an calendar event or an instant message attachment.
A quick note to those who looked for this: Next plugins will have a MacUSBDeviceMBS class to enumerate all USB devices on Mac.
For Windows, I suggest you check the WindowsDeviceMBS class which enumerates all devices on a Windows machine. Getting the vendor and product IDs is a little bit tricky there as you grab it from the device path, but certainly doable.
Please check them, add a comment or put them on your favorites list. Every vote counts
Report 12692: CDbl/Val fail when encountering BOM character in UTF8 files Report 7742: add a runtimeexception.ClassName property Report 12703: OutOfBoundsException exceptions should have details Report 6284: Add function to test for identifier existants Report 12704: Feedback should have recent changes list on the library part of the bar on the left.
With the 10.4pr4 release of the plugins, we crossed the 30,000 mark on the feature count. So now we have 30,267 documented features in 1378 classes, 9 controls, 23 modules and 908 global functions. Also our plugin collection features 1190 example projects as well as 4215 examples inside the reference.
Go and get your copy. Check the new layout, which is better for reading on the iPad.
Don't have a subscription?
Well, we raffle 3 six months subscriptions off today.
If you want one, send us an email, a text message, post a comment or use the feedback form to inform us with your email address. We will select three people randomly on tomorrow morning.
Update: A little bit late, but we got our 3 winners. Congratulations and thanks to everyone who emailed or commented.
What to do on a hot summer day? We have here 36°C (97 F) here today.
My suggestion is to take your wife or girl friend and drive to the next air conditioned shopping mall. Buy the next birthday presents you need, maybe a little gift for a friend, enjoy some gelato and just look around
We drove today to the Löhr Center in Koblenz (140 shops).
And now enjoy the soccer game: Argentina against Germany
I have been to two REALworld events in Austin Texas. Beside the conference we spend a good time there visiting a lot of nice places:
The OMNI Hotel we stayed had a big inner courtyard where dinners for big groups like ours were served.
Looking outside there is the Texas capitol where we walked in. I was amazed on how much we were allowed to see. Walking on several levels we looked in both the Texas Senate Chamber and the Texas House of Representatives Chamber.
This is the catholic bishop church just two blocks away from the hotel:
One evening we drove to a nearby rodeo, cowboy, car show event.
We also drove to George Town, north of Austin
There was a nice dripstone cave:
Driving to the west of austin through the country side we found a big nice lake:
South of Texas we visited an old historical city from the wild west:
And this is near Gruene the oldest church of Texas. The grave yard nearby has a lot of graves with German names.
And finally on the way back to Austin we came to a big shopping outlet:
10.4pr3 later today will add a couple of Windows related functions:
WindowsIsApplicationRunAsAdminMBS as boolean
WindowsIsUserInAdminGroupMBS as boolean
WindowsIsProcessElevatedMBS as boolean
WindowsGetProcessIntegrityLevelMBS as integer
To see what which function returns on what Windows version, I made a couple of screenshots and composed the picture on the right.