Access a private variable?
Access a private variable?
- Subject: Access a private variable?
- From: Alex Johnson <email@hidden>
- Date: Thu, 14 Jul 2005 17:08:00 -0500
Hi all --
Does anyone know if it's possible to access an object's private variable?
Specifically, I want to get at
<x-tad-bigger>WODisplayGroup._displayedObjects</x-tad-bigger> so I can tell how many objects match the query settings. With batching turned on,
<x-tad-bigger>displayedObjects()</x-tad-bigger> only returns the current batch of objects.
The only solution I've come up with so far is:
<x-tad-bigger> </x-tad-bigger><x-tad-bigger>int</x-tad-bigger><x-tad-bigger> pp = numberOfObjectsPerBatch();
</x-tad-bigger><x-tad-bigger>int</x-tad-bigger><x-tad-bigger> pg = currentBatchIndex();
NSArray sel = selectedObjects();
setNumberOfObjectsPerBatch(</x-tad-bigger><x-tad-bigger>0</x-tad-bigger><x-tad-bigger>);
countOfQualifiedObjects = </x-tad-bigger><x-tad-bigger>new</x-tad-bigger><x-tad-bigger> Integer( displayedObjects().count() );
setNumberOfObjectsPerBatch( pp );
setCurrentBatchIndex( pg );
setSelectedObjects( sel );
</x-tad-bigger>
Thanks,
Alex Johnson
|
| |
|||
|| | |
||
| | |
|| || |
||
\\ SITE 9 \\ SITE9.COM \\ 312.670.8469 \\
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden