diff --git a/ChangeLog b/ChangeLog index c5cf23dc4..47bbb7be5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2002-11-27 Richard Frith-Macdonald + + * Source/NSBundleAdditions.m: Quick hack for setting ivars. + 2002-11-27 Adam Fedor * Source/NSTabView.m ([NSTabView -selectedTabViewItem]): Check diff --git a/Source/NSBundleAdditions.m b/Source/NSBundleAdditions.m index 30df93e0a..b32db7275 100644 --- a/Source/NSBundleAdditions.m +++ b/Source/NSBundleAdditions.m @@ -172,13 +172,21 @@ static const int currentVersion = 1; } else { + const char *nam = [_tag cString]; + const char *type; + unsigned int size; + unsigned int offset; + /* - * Use the GNUstep additional function to set the instance variable - * directly. - * FIXME - need some way to do this for libFoundation and Foundation - * based systems. + * Use the GNUstep additional function to set the instance + * variable directly. + * FIXME - need some way to do this for libFoundation and + * Foundation based systems. */ - GSSetInstanceVariable(_src, _tag, (void*)&_dst); + if (GSObjCFindInstanceVariable(_src, nam, &type, &size, &offset)) + { + GSObjCSetVariable(_src, offset, size, (void*)&_dst); + } } } }