Interesting REALbasic language foibles

| | Comments (0)

So I ran across two interesting language foibles today. Both of them are easy to work around, and I haven't determined whether they're really even bugs or not.

1) Variant can't hold Ptr. Which means a Dictionary can't hold a Ptr. The only way to do it is to cast as an Int32 on the way in and out. I suspect that this is just a simple oversight.

2) RaiseEvent cannot work with qualified names (such as Foo.Bar). This is sensible -- otherwise you could do something like RaiseEvent someSameClassInstanceVariable.SomeEvent. However, it does have a drawback: you can raise an event from within a shared class method or shared computed property. In this case, you have to make an instance method which does the RaiseEvent for you.

I happened to run into both of these today while monkeying around with some basic threading ideas. Neither was a major obstacle, but both caught me off-guard.

Leave a comment

Disclaimer

I'm currently an employee of REAL Software. My blog is mine. The opinions represented in this blog are mine as well and may not represent my employer's opinions. All original material is copyrighted and property of the author.

REALbasic® is a registered trademark of REAL Software, Inc. REAL SQL Server™ and Lingua™ are pending trademarks of REAL Software, Inc. All rights reserved.