[squeak-dev] Re: Preferences with spaces in them
Andreas Raab
andreas.raab at gmx.de
Sun Aug 23 06:55:37 UTC 2009
Ronald Spengler wrote:
> Interesting. Two questions and a comment:
>
> q1) Would it be hard to add something meta to the 'more' menu in the
> Preference Browser that would clue a user in on where to start looking
> for a way to programmatically interact with the value? I realize that,
> perhaps, by the time one's doing that, one ought to know how to search
> with Cmd-Shift-E (I didn't, heh ^.^) but I liked being able to look at a
> preference in the browser and know right away how to set it script-wise
> without a lot of effort.
It would be fairly straightforward. If you look at the registry, the
pragma is registered with Class>>selector so browsing it from there is
easy. It's just that one would have to hook this into the UI and I don't
know my way around in the preferences browser.
> q2) The choice of the word 'pragma' is interesting. Are there people
> hoping to accomplish things analogous to the Perl idiom?
I have no clue what the perl idiom is (but I'm sure Randal can help ;-)
Do note that the terminology is incorrect though (and only used because
of the Pragma class which is equally incorrectly named); they should be
called "annotations". Some annotations, such as <primitive:> or <cdecl:>
are pragmas since they instruct the compiler to generate different code.
But the preference pragmas are not, they are merely structured
annotations to the method in question that the system can reflect about.
In this sense, they are just like metadata annotations in C# or Java.
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|