bigfish24 / abfrealmgridcontroller Goto Github PK
View Code? Open in Web Editor NEWUICollectionViewController subclass that binds data in Realm
License: MIT License
UICollectionViewController subclass that binds data in Realm
License: MIT License
Running the demo thats provided, I am getting a 'Can only add notification blocks from within runloops.' RLMException. This is happening on Realm 0.97.0, everything appears to be working fine on versions < 0.97.0.
The following build commands failed:
CompileC /Users/R.Thomas/Library/Developer/Xcode/DerivedData/RBQFetchedResultsController-bmigfzqqnjxiscfkhwfaryztxdfa/Build/Intermediates/RBQFetchedResultsController.build/Release-iphonesimulator/RBQFetchedResultsController.build/Objects-normal/i386/RBQRealmNotificationManager.o RBQFetchedResultsController/Source/RBQRealmNotificationManager/RBQRealmNotificationManager.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
/Users/Shared/xna/app/ios/stpetemall/Carthage/Checkouts/RBQFetchedResultsController/RBQFetchedResultsController/Source/RBQRealmNotificationManager/RBQRealmNotificationManager.m:272:66: error: property 'path' not found on object of type 'RLMRealm *'
/Users/Shared/xna/app/ios/stpetemall/Carthage/Checkouts/RBQFetchedResultsController/RBQFetchedResultsController/Source/RBQRealmNotificationManager/RBQRealmNotificationManager.m:285:46: error: property 'path' not found on object of type 'RLMRealm *'
/Users/Shared/xna/app/ios/stpetemall/Carthage/Checkouts/RBQFetchedResultsController/RBQFetchedResultsController/Source/RBQRealmNotificationManager/RBQRealmNotificationManager.m:502:43: error: no visible @interface for 'RLMRealm' declares the selector 'removeNotification:'
A shell task failed with exit code 65:
** BUILD FAILED **
Great if you could implement compatibility for Carthage
Define the fetchedResultsController variable with public access (read-only). Probability for access count of resuts.
I have crash
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Attemting to insert at index beyond bounds!'
*** First throw call stack:
(
0 CoreFoundation 0x000000010ae63e65 exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010a8dcdeb objc_exception_throw + 48
2 CoreFoundation 0x000000010ae63cca +[NSException raise:format:arguments:] + 106
3 Foundation 0x000000010a5294de -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198
4 ABFRealmGridControllerExample 0x00000001092bd072 -[RBQFetchedResultsController applyDerivedChangesToCache:state:] + 5666
5 ABFRealmGridControllerExample 0x00000001092bb401 -[RBQFetchedResultsController calculateChangesWithAddedSafeObjects:deletedSafeObjects:changedSafeObjects:realm:] + 3681
6 ABFRealmGridControllerExample 0x00000001092ba3c4 __58-[RBQFetchedResultsController registerChangeNotifications]_block_invoke + 1396
7 ABFRealmGridControllerExample 0x00000001092cd566 -[RBQRealmNotificationManager sendNotificationsWithRealm:entityChanges:] + 518
8 ABFRealmGridControllerExample 0x00000001092cf780 __50-[RBQRealmChangeLogger registerChangeNotification]_block_invoke + 256
9 ABFRealmGridControllerExample 0x00000001094229d9 -[RLMRealm sendNotifications:] + 1065
10 ABFRealmGridControllerExample 0x000000010942e987 _ZN12_GLOBAL__N_121RLMNotificationHelper10did_changeERKNSt3__16vectorIN5realm14BindingContext13ObserverStateENS1_9allocatorIS5_EEEERKNS2_IPvNS6_ISB_EEEE + 71
11 ABFRealmGridControllerExample 0x0000000109469af2 _ZN5realm5_impl11transaction6commitERNS_11SharedGroupERNS_13ClientHistoryEPNS_14BindingContextE + 402
12 ABFRealmGridControllerExample 0x00000001094586d7 _ZN5realm5Realm18commit_transactionEv + 519
13 ABFRealmGridControllerExample 0x0000000109422db2 -[RLMRealm commitWriteTransaction:] + 50
14 ABFRealmGridControllerExample 0x0000000109422d6f -[RLMRealm commitWriteTransaction] + 47
15 ABFRealmGridControllerExample 0x00000001094869e2 __50+[NYTStory loadLatestStoriesIntoRealm:withAPIKey:]_block_invoke_2 + 946
16 CFNetwork 0x000000010cc3a6b5 __75-[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:]_block_invoke + 19
17 CFNetwork 0x000000010cc4ca02 __49-[__NSCFLocalSessionTask _task_onqueue_didFinish]_block_invoke + 302
18 Foundation 0x000000010a551304 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK + 7
19 Foundation 0x000000010a48d035 -[NSBlockOperation main] + 101
20 Foundation 0x000000010a46ff8a -[__NSOperationInternal _start:] + 646
21 Foundation 0x000000010a46fb9b __NSOQSchedule_f + 194
22 libdispatch.dylib 0x000000010c85749b _dispatch_client_callout + 8
23 libdispatch.dylib 0x000000010c83d8ec _dispatch_queue_drain + 2215
24 libdispatch.dylib 0x000000010c83ce0d _dispatch_queue_invoke + 601
25 libdispatch.dylib 0x000000010c83fa56 _dispatch_root_queue_drain + 1420
26 libdispatch.dylib 0x000000010c83f4c5 _dispatch_worker_thread3 + 111
27 libsystem_pthread.dylib 0x000000010cb8f68f _pthread_wqthread + 1129
28 libsystem_pthread.dylib 0x000000010cb8d365 start_wqthread + 13
)
How to reproduce:
I setup to sectionNameKeyPath of MainGridController vc value "kicker"
RBQFetchedResultsController just got updated, and the fixed a typo.
So, the private routine updateFetchedResultsController()
, no longer compiles.
The last argument label in self.fetchedResultsController.updateFetchRequest
was "andPeformFetch". It is now changed to "andPerformFetch" in 4.0 of RBQ, spelling "perform" correctly.
Use realm's notifications directly.
I refactored my app to use RealmGridController because I was running into a random crash. It all appeared to be working well, except today I started seeing the very same crash:
Fatal Exception: NSInternalInconsistencyException
Invalid update: invalid number of items in section 0. The number of items contained in an existing section after the update (14) must be equal to the number of items contained in that section before the update (14), plus or minus the number of items inserted or deleted from that section (1 inserted, 0 deleted) and plus or minus the number of items moved into or out of that section (0 moved in, 0 moved out).
RealmGridController.swift line 316 specialized
This sounds like a race condition? Am I understanding correctly that the count remains the same even though a new item is being added? So the count is being taken before the item actually makes it to the count() method? or?
Any suggestions on how to get to the bottom of this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.