Commit graph

13 commits

Author SHA1 Message Date
Hugo Melder
6681a3da47
Initial port of WinObjC's KVO implementation to GNUstep (#420)
* GSAtomic: Add prefix to macro definitions

* NSKVOSupport: Import

* NSKVOSupport: Add test cases

* NSKVOSwizzling: Ugly C Rewrite

* NSKeyValueObserving: Use old implementation as fallback

* NSKeyValueObserving: Rename TypeEncodingCases header

* NSKVOSupport: Fix new objects not being added to NSKeyValueChangeNew set on set mutation

* NSKeyValueMutableSet: Fix will and didChange notifications for set operations

* NSKeyValueMutableSet: Document Accessor Search Patterns

* NSKVOSupport: Add toMany test

* NSKeyValueCoding: Change notifications when changing value via setValue:forKey:

* NSKVOSupport: Add more tests

* NSKVOSupport: Do not wrap block in try/finally to avoid crash in windows

* NSKVOSwizzling: use _alloca on Windows

* NSKVOSupport: Do not autorelease newWithObservee:

* NSKVOSupport: Do not leak Observee and TestFacade objects

* Improve runtime detection in makefile

* Add file extension of source file in GNUMakefile

* NSKVOSupport: Remove @status comments

* NSKVOSupport: Implement private notify method

* NSUserDefaults: KVO Support and fix macOS incompatibilities

* NSKeyValueObserving: Set old to null if nil

* NSKeyValueObserving: Remove cached new value

* NSMethodSignature: Add signature cache

* NSKVOSupport: Remove ObjC2 features and mark tests failing on GCC as hopeful

* Call class method instead of private _keyPathsForValuesAffectingValueForKey

* Move _keyPathsForValuesAffectingValueForKey body into class method and statically construct empty NSSet

* NSUserDefaults: Change notification should contain old value from other domains aswell

* NSUserDefaults: Fetch new value from all domains

* NSKVOInternal: Fixup filename in header

* NSUserDefaults: Go through search list instead of only one domain in KVO change

* Making indentation a bit less worse

* Add NSUserDefaults KVO tests

* NSKVOSupport: NSUserDefaults test small fixes

* Add autoreleasepool

* NSUserDefaults: Only emit change notifications if value changed

* Avoid compiler warnings and tidy some of the whitespace/formatting

---------

Co-authored-by: Frederik Seiffert <frederik@algoriddim.com>
Co-authored-by: rfm <richardfrithmacdonald@gmail.com>
Co-authored-by: rfm <rfm@gnu.org>
2024-11-10 17:05:23 +01:00
rfm
6667842dd5 Update FSF address as requested by Gregory 2024-11-07 13:37:59 +00:00
Gregory John Casamento
753c907938 Fix address for FSF and License name in all headers in base 2019-12-09 18:36:00 -05:00
Quentin Mathe
22b874ba15 Fixed NSKeyValueMutableArray/Set to post KVO notifications only if
+automaticallyNotifiesObserversForKey: returns YES, and match Cocoa behavior.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37622 72102866-910b-0410-8b05-ffd578937521
2014-01-20 17:18:57 +00:00
Eric Wasylishen
8f88383e61 Fix more unsigned int / int cases that should be NS[U]Integer
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31355 72102866-910b-0410-8b05-ffd578937521
2010-09-16 02:55:24 +00:00
Richard Frith-MacDonald
14b91c9052 fixups for libobjc2
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29753 72102866-910b-0410-8b05-ffd578937521
2010-02-25 18:49:31 +00:00
Richard Frith-MacDonald
7cc69dfaae Simplify header inclusion
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29669 72102866-910b-0410-8b05-ffd578937521
2010-02-19 08:12:46 +00:00
Richard Frith-MacDonald
b2b14398d2 allow developers more time to adapt to LGPLv3
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26606 72102866-910b-0410-8b05-ffd578937521
2008-06-08 10:38:33 +00:00
David Ayers
8d5b623c24 * Source/NSURLResponse.m: Add explicit include of NSDictionary.h.
Use available dictionary declartion.
	* Source/NSURLProtocol.m: Add explicit import of NSData.h.
	* Source/NSSerializer.m: Add explicit import of NSEnumerator.h.
	* Source/NSURLConnection.m
	([-initWithResponsePointer:andErrorPointer:]):  Add declaration.

	* Source/NSKeyValueMutableSet.m: Various non-functional variable
	and parameter renames to avoid bogus compiler warnings.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25661 72102866-910b-0410-8b05-ffd578937521
2007-12-02 21:13:09 +00:00
Richard Frith-MacDonald
62559023b9 Update to GPL3 and LGPL3
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25482 72102866-910b-0410-8b05-ffd578937521
2007-09-14 11:36:11 +00:00
Riccardo Mottola
d09e2096de code tidyup and c-99ism fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25341 72102866-910b-0410-8b05-ffd578937521
2007-07-19 21:38:14 +00:00
Richard Frith-MacDonald
f6a57d5fba Varous tidyups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25330 72102866-910b-0410-8b05-ffd578937521
2007-07-14 04:34:00 +00:00
Nicola Pero
6848cb6de9 Review of KVC and improvements by Chris Farber
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25313 72102866-910b-0410-8b05-ffd578937521
2007-07-10 17:16:31 +00:00