[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GSObjCFindVariable
From: |
David Chisnall |
Subject: |
Re: GSObjCFindVariable |
Date: |
Sun, 13 Jun 2010 17:56:31 +0100 |
On 13 Jun 2010, at 17:50, address@hidden wrote:
> I would like to know if it is to possibe to get the correct offset to the "x"
> or "y" field in the "mFoo" member of "Brak" using GSObjCFindVariable or some
> similar function. It would be pretty cool if I could set selected struct
> fields inside an instance by using GSObjCSetVariable. AFAIK the struct types
> are encoded, so the information should be there.
Kind of, but basically no.
The types of the struct fields are encoded, but the names are not. Thus, it is
possible (in theory, at least) to say 'set the first int field of the struct
called mFoo,' but you can't say 'set the x field' because the runtime does not
know that the field is called x.
I agree that this would be nice, but due to the fact that NeXT completely
failed to specify any sane set of parser interfaces for type encodings, there
are a large number of ad-hoc parsers out there which would be broken by any
changes to the type encoding system.
Oh, and -1 style point for using the C++ dialect of MS Systems Hungarian
notation for Objective-C code...
David
-- Sent from my IBM 1620