Re: VBA to Applescript
Re: VBA to Applescript
- Subject: Re: VBA to Applescript
- From: Paul Berkowitz <email@hidden>
- Date: Thu, 14 Feb 2008 23:32:16 -0800
- Thread-topic: VBA to Applescript
On 2/14/08 12:27 PM, "has" <email@hidden> wrote:
>
> On 14 Feb 2008, at 19:18, Paul Berkowitz wrote:
>
>> The other thing you have to bear in mind is that in VBA, there are
>> Collections (what in AppleScript would be a list of 'every element'
>> of some
>> class) that have fixed, custom values that cannot be altered, sort
>> of like a
>> 'read-only' element. That's a gap in AppleScript - in Applescript,
>> anything
>> defined as an element of a class must be class itself, and can ne
>> created
>> with whatever values you want for its various properties.
>
>
> Not true: there's no reason why an object can't have read-only
> elements. The sdef format even allows you to specify element access
> (read-only/write-only/read-write), and I assume Cocoa Scripting
> enforces the appropriate behaviour for free in applications that use
> CS as the foundation for their scripting support. Applications that
> don't use CS will have to implement their own access control code, of
> course.
>
I didn't quite describe the issue correctly. In AppleScript, as far as I
know, you can
make new [element] at [(end of) class] with properties {record}
Are you saying that the sdef format allows a read-only element access to the
class in question such that 'make new' is not permitted/errors?
If so, that's interesting. Microsoft Excel is, of course, very far from
being Cocoa Scripting - it's as Carbon as they come. And when its
AppleScript implementation was being re-done for Office 2004, the OS was
still Jaguar (got to Panther just before 2004 release, but the
implementation started several years earlier). I don't know how developed
the sdef format was at that time - I'm pretty sure it was nowhere near the
finished article - Jaguar still used Script Editor 1.9. They were working
with aete, not sdef.
I don't think they'd redo it all now. Too bad, that looks like a much better
way to hook into the VBA (actually, OLE) object model for these
Collections/classes. There are really a lot of them.
--
Paul Berkowitz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden