|
| |
WWDC
WWDC, Apple's developer love-fest, starts today. I went a few years ago and I can tell you that it is a blast. My favorite part is all the free Guinness. Any company that treats its developers to free Guinness knows what it is doing.
Well, ok, there were also some cool presentations on new Apple technology. When I went I believe that OS X hadn't even shipped yet. But Apple was talking about it a lot. And there were many sessions on OS X stuff. There were also a number of WebObjects' sessions. WebObjects is another NeXT technology that Apple got when it bought NeXT. I was amazed by the number of people attending the WebObjects' sessions. And Java as well. Many people interested in Java. Not me, though.
This year REAL Software will have a big presence at WWDC. I wish I could go just to meet the RS people that I correspond with on the RB mailing list.
But I've got two buddies there so they can have a good time for me. Doh!
10:07:27 AM #
|
|
tiffany naked
To whoever keeps searching for tiffany naked at Google and finding my page: You need go no further. There are no naked pictures of Tiffany here. I think I linked once to a story about it. That's it. You'd be hard pressed to find that post again anyway. So you might as well keep moving to the next Google link in the list :)
10:01:55 AM #
|
|
AppleEvents and REALbasic Developer
I have to write one "extra" column for REALbasic Developer and I had thought of covering localization but I've changed my mind. The problem with localization is that it is a great big complicated topic that would really require an in-depth analysis of all issues to get right. The chance of saying something wrong is great, I believe. There are bugs in REALbasic, for starters. For example, in Mac OS X, you can't enter Japanese in the constants dialog. So if I want to make constants with a Japanese version, I have to do some extra work. Probably European languages would be easier. Most if not all of the characters are available with the English keyboard. But so-called 2-byte languages like Japanese and Chinese are challenging.
Another problem is that REALbasic by itself just can't really handle the entire localization issue. You need separate apps. Two that I've found are REALglot and RBulk. Both very useful. But if I were to write an article about all of this there would be a number of issues I'd have to work through to make sure I didn't make a mistake.
So instead I've decided to talk about handling AppleEvents instead. The fact that I've been messing with AppleEvent handling in ResPloder is certainly one of the reason's that I've made that decision. It is still an interesting and important aspect of REALbasic programming. And it is a topic for which a 1500-word article should be possible.
Have I sold out?
7:59:43 AM #
|
|
Scriptable ResPloder
Last night, instead of concentrating on "Six Feet Under", I spent my time making ResPloder scriptable. It's quite easy to do in REALbasic. There are some interesting quirks I had to deal with, but all in all a fun experience.
All the magic happens in the Application class' HandleAppleEvent event. You get all the info you need to figure out what kind of AppleEvent it is. AppleEvents themselves are objects with accessor methods for getting at the parameters. Replying to the event is also simple. The AppleEvent class has methods for added different kinds of replies.
I really wanted to return enough information to indicate success or failure (a boolean), the reason for failure (a string), and a reference to the exploded folder or imploded file (an alias). My first thought had been an AERecord, which appears to be a like like a REALbasic dictionary. It maps keys to values. But I couldn't figure out how to get the Script Editor to understand my keys. They weren't being treated as strings, which makes me think I hadn't set up something correctly in my 'aete' resource. So I decided to put the three things in an AEDescList, which is really just an array of values. That worked out very well, the only problem being that users will have to know the order of the values. They won't be able to pull them out by key.
More on the 'aete' resouce: You need to tell the outside world how to talk to a scriptable app in a high-level language like AppleScript. You can talk directly to a scriptable app using AppleEvents if you build the AppleEvents yourself. But if you want to allow scripting with AppleScript, then you need to indicate the verbs and such that your app understands. ResPloder understand two new verbs: explode and implode. Each takes one required parameter and two optional parameters. The one required parameter is a reference to the file or folder to explode or implode. The two optional parameters are the name and location of the exploded folder or imploded file.
7:49:56 AM #
|
|
|
|
© Copyright
2002
Will Leshner.
Last update:
5/6/02; 7:49:57 AM.
|
|
| May 2002 |
| Sun |
Mon |
Tue |
Wed |
Thu |
Fri |
Sat |
| |
|
|
1 |
2 |
3 |
4 |
| 5 |
6 |
7 |
8 |
9 |
10 |
11 |
| 12 |
13 |
14 |
15 |
16 |
17 |
18 |
| 19 |
20 |
21 |
22 |
23 |
24 |
25 |
| 26 |
27 |
28 |
29 |
30 |
31 |
|
| Apr Jun |


|