Hey guys,
I'm really confused with the array controller and core data. I don't know what
I have to use to get what I want.
My program has for now a CollectionView which is populated by a core data fetch
request.
If I use an arrayController, I don't have to make this fetch do I?
On Sep 12, 2013, at 9:11 AM, Benjamin Rindt wrote:
> I'm really confused with the array controller and core data. I don't know
> what I have to use to get what I want.
> My program has for now a CollectionView which is populated by a core data
> fetch request.
>
>
On 2 Oct 2012, at 11:10, Ken Thomases wrote:
> On Oct 1, 2012, at 10:20 PM, Kyle Sluder wrote:
>
>> On Mon, Oct 1, 2012, at 07:56 PM, Gerriet M. Denkmann wrote:
>>> So: how do I instruct my ArrayController to use localizedCompare: ?
>>
>> -[NSTable
On Oct 1, 2012, at 10:20 PM, Kyle Sluder wrote:
> On Mon, Oct 1, 2012, at 07:56 PM, Gerriet M. Denkmann wrote:
>> So: how do I instruct my ArrayController to use localizedCompare: ?
>
> -[NSTableColumn setSortDescriptorPrototype:]
>
> <https://developer.apple.com/li
On Mon, Oct 1, 2012, at 07:56 PM, Gerriet M. Denkmann wrote:
> So: how do I instruct my ArrayController to use localizedCompare: ?
-[NSTableColumn setSortDescriptorPrototype:]
<https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSTableColumn
I have a TableView and an ArrayController (no DataSource) and everything works
fine.
Clicking on a column header sorts my table ascending or descending.
But the order of the rows is totally wrong.
It seems that the ArrayController uses compare: to sort my strings.
The documentation rightly says
The windows's first responder will tell you if one of the table views has
focus. If there are other UI elements in the window which can have focus
though, this won't be good enough. Instead you'll have to start tracking the
first responder yourself and recording which table had it last
Sent fro
Hi,
I have two ArrayControllers in IB, ArrayControllerA and ArrayControllerB, who's
content are setup to show in two TableViews, TableViewA and TableViewB.
Pressing a button in the interface will perform some actions on the selected
objects from TableViewA or TableViewB. I can of course select
On Oct 26, 2011, at 7:02 PM, R wrote:
> If I don't pre-select the row, it takes two clicks of the button to
> register the correct object. The first click will register the
> previously selected row. It's like the button is at a higher priority
> than the selected row.
Sounds like the button’s
I've got a column of buttons in a tableView. I don't allow multiple
row selections.
A click of the button fires a method which says.
id obj;
obj=[[anArrayController selectedObjects] objectAtIndex:0];
NSLog(@"the object: %@",obj);
If I don't pre-select the row, it takes two clicks of the but
t it was a team
effort here -- nice work. Note that I used:
popupButton.contentValues -(Transformer)-> [arrayController].arrangedObjects
That said, I do think it's inconsistent with the way that I expected the pop-up
button bindings to work. I'll put together a simple example and send it
On Apr 20, 2011, at 4:00 AM, Quincey Morris wrote:
> On Apr 20, 2011, at 01:41, Ken Thomases wrote:
>
>> I'd call it a bug, but there's probably little chance of it being changed
>> now. File one, anyway, if you feel strongly enough.
>
> No, it's not a bug, it's correct behavior, as I pointed
Hi Quincey
> Your value transformer, if you insist on doing it that way, should be coded
> to expect this, and should transform an entire array of strings, not single
> strings.
I got the impression that the array in question could hold unprintable
characters (tab, etc) and that the transforme
On Apr 20, 2011, at 01:41, Ken Thomases wrote:
> Hmm. That was so surprising that it prompted me to experiment.
Well, that's four of us now who were prompted to experiment. :)
> I'd call it a bug, but there's probably little chance of it being changed
> now. File one, anyway, if you feel stro
On Apr 20, 2011, at 00:25, Ben Golding wrote:
> On 20/04/2011, at 15:41, Ken Thomases wrote:
>
>> On Apr 19, 2011, at 8:46 PM, Ben Golding wrote:
>>
>>> I should have been more specific. What I have looks like:
>>>
>>> popupButton.content -(Tra
On Apr 20, 2011, at 2:25 AM, Ben Golding wrote:
> On 20/04/2011, at 15:41, Ken Thomases wrote:
>
>> You can pretend the former case is more like the latter by using a model key
>> path like "description" or even "self", although the latter case still tends
>> to be more amenable to bindings.
>
Hi Ben
> Trouble is that what I'm trying to model really is an array of strings.
>
> To put this problem into context, what I'm trying to offer the user through
> the pop-up button is which character to use as a field separator when reading
> a CSV file. The value transformer is something that
On 20/04/2011, at 15:41, Ken Thomases wrote:
> On Apr 19, 2011, at 8:46 PM, Ben Golding wrote:
>
>> I should have been more specific. What I have looks like:
>>
>> popupButton.content -(Transformer)-> [arrayController].arrangedObjects
>> popupButton.s
On Apr 19, 2011, at 8:46 PM, Ben Golding wrote:
> I should have been more specific. What I have looks like:
>
> popupButton.content -(Transformer)-> [arrayController].arrangedObjects
> popupButton.selectedIndex --> [arrayController].selectionIndex
>
button. I like to use a syntax like this:
>
> popupButton.content --(CapitalizeTransformer)-->
> [arrayController].arrangedObjects
I should have been more specific. What I have looks like:
popupButton.content -(Transformer)-> [arrayController].arrangedObjects
popupButton.selectedIndex --> [arrayCon
On Apr 19, 2011, at 06:20, Ben Golding wrote:
> What I'd found was that the documentation doesn't indicate what the
> ValueTransformer indicated is passed. It seems to be a controller object,
> not the pop-up button item's title which is the only thing that seems to make
> sense in the context
ex:0]).
>
> I've also tried binding to contentValues which was unsuccessful too.
It might help to be a bit more precise. Enumerate all the configured bindings
on your popup button. I like to use a syntax like this:
popupButton.content --(CapitalizeTransformer)-->
[arra
On 19/04/2011, at 18:19, Quincey Morris wrote:
> On Apr 19, 2011, at 00:41, Ben Golding wrote:
>
>> I am a bit stumped. I have an array controller which I have hooked up to a
>> pop-up button and that works quite well. The members of the array are
>> NSStrings but I would like to reformat th
On Apr 19, 2011, at 00:41, Ben Golding wrote:
> I am a bit stumped. I have an array controller which I have hooked up to a
> pop-up button and that works quite well. The members of the array are
> NSStrings but I would like to reformat them when they're displayed by the
> pop-up button. Seem
On 19 Apr 2011, at 08:41, Ben Golding wrote:
> I am a bit stumped. I have an array controller which I have hooked up to a
> pop-up button and that works quite well. The members of the array are
> NSStrings but I would like to reformat them when they're displayed by the
> pop-up button. Seem
I am a bit stumped. I have an array controller which I have hooked up to a
pop-up button and that works quite well. The members of the array are
NSStrings but I would like to reformat them when they're displayed by the
pop-up button. Seems fairly straightforward, I thought I'd just write a l
On Mar 19, 2011, at 16:17, Darren Wheatley wrote:
> I have the default out-of-the-box sorting working, but when I click one of
> the column headers to sort the table I have problems.
Looks like you didn't get any takers on this yet.
TBH, I have no idea what "default out-of-the-box sorting" means
Hi,
I have an NSTableView bound to a core-data-backed NSArrayController by
binding individual columns to arraycontroller.arrangedObjects.
I have the default out-of-the-box sorting working, but when I click one of
the column headers to sort the table I have problems.
Basically the display of the
On Jan 1, 2011, at 5:13 PM, Ben Golding wrote:
> Controller key selection
This binding is wrong in your case. Refer to the examples in the Bindings
Programming Topics document:
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CocoaBindings/CocoaBindings.html,
espec
I feel like I must be doing something silly but I can't see it.
I am writing a crossword setting application. I have a Crossword class which
has two instance variables, grid and clues each of which is a custom class
(Grid and Clues).
My problem relates to the Clues class which has two instanc
IT WORKS AHHH SUCH A RELIEF!
Thans a lot, guys, you made me see the problem I was having, so I set up the
Set Content binding of the ItemXInvoice Array controller to be
_newInvoice.toItemsXInvoice properly set the relation in the add and
addPredifiened methods, and it did work!.
OMG
Keary Hello
On Mar 30, 2010, at 2:18 AM, Keary Suska wrote:
>
>> Item * newItem = [NSEntityDescription
>> insertNewObjectForEntityForName:@"Item" inManagedObjectContext:[self
>> managedObjectContext]];
>> ItemXInvoice * newItemXInvoice = [NSEntityDescription
>> insertNewObjectForEnti
On Mar 29, 2010, at 3:29 PM, Gustavo Pizano wrote:
> I have, Invoice < ->> ItemXInvoice << > Invoice, the Array controller I set
> up with ItemXInvoice entity, and when I click an add button I do:
Whenever possible, manipulate relationships directly. Perhaps you do this, but
the code isn't sh
Keary Hi.
On Mar 29, 2010, at 10:22 PM, Keary Suska wrote:
> On Mar 29, 2010, at 1:43 PM, Gustavo Pizano wrote:
>
>> My guess was that when removing the objects form the array controller, these
>> were being removed form the MOC, and therefore I couldn't see them in the
>> consultation mode,
On Mar 29, 2010, at 13:22, Keary Suska wrote:
> On Mar 29, 2010, at 1:43 PM, Gustavo Pizano wrote:
>
>> My guess was that when removing the objects form the array controller ...
>> Now I need to be able to clean the table after saving, otherwise I can't
>> create more items unless I restart the
On Mar 29, 2010, at 1:43 PM, Gustavo Pizano wrote:
> My guess was that when removing the objects form the array controller, these
> were being removed form the MOC, and therefore I couldn't see them in the
> consultation mode, only after restarting the app when the MOC fetch again the
> data.
Hello all.
before this email I had a problem with a to-many relationship, that after
saving the other view wasn't showing the invoice details, I found the error,
but I can't find the solution.
So what was happening, was that after saving I was clearing the data of the
NSArraycontroller that wa
gt; manually add a track the user presses the add button which runs the "add:"
> selector of the arrayController. Right now, to programmatically add a track
> I do:
>
> [arrayController performSelector:@selector(add:) withObject:nil
> afterDelay:0.0];
&g
the "add:"
selector of the arrayController. Right now, to programmatically add a track I
do:
[arrayController performSelector:@selector(add:) withObject:nil afterDelay:0.0];
That doesn't feel right to me. I want to create a new Track entity and add it
to the CD attribute tra
On Jan 20, 2010, at 5:27 AM, Grant Christensen wrote:
> I have an array controller that is feeding a NSTableView on a window. Also
> on the window are a few text fields showing the contents of the selected row
> (shows more than table). One of the fields is an NSTextView.
What property of th
Hi all,
I have an array controller that is feeding a NSTableView on a window. Also on
the window are a few text fields showing the contents of the selected row
(shows more than table). One of the fields is an NSTextView.
I am having a problem with fonts in the text view (google searches show
All,
I'm ok with creating a special view for a simple value - that is, a
single item.
I'm not sure what the best way is to design a view that displays items
from an array.
For the single item view, the view is based on three values that are
bound to the view. (eg: width, height, colour)
F
On May 15, 2009, at 11:47 PM, Gideon King wrote:
In the mini example, yes I would want the object array for weight to
have the full array, and the object array for the tyre size to have
the filtered array, and as you say, this could be accomplished with
separate controllers. However, this m
Thanks for the suggestion Ken, but I don't think that would help. In
the mini example, yes I would want the object array for weight to have
the full array, and the object array for the tyre size to have the
filtered array, and as you say, this could be accomplished with
separate controllers
On May 14, 2009, at 7:07 PM, Gideon King wrote:
Hi, I have a situation where I have an array of objects that I want
to bind to so I can use them in an inspector, but the objects are of
different classes, and I want the inspector to only see the objects
that have the key that I am binding to
Hi, I have a situation where I have an array of objects that I want to
bind to so I can use them in an inspector, but the objects are of
different classes, and I want the inspector to only see the objects
that have the key that I am binding to.
For example, if I have an array of vehicles, a
Chances are you're calling add: on the arrayController and then
assuming that the newly added object is added to the array immediately.
I'm pretty sure the documentation says that that's an incorrect
assumption. If the value absolutely positively has to be there right
away
On Feb 25, 2009, at 19:12, Walker Argendeli wrote:
The code is now this, which works- kindof:
[notebookController add:sender];
[notebookTableView editColumn:0 row:[notebookTableView selectedRow]
withEvent:nil select:YES];
Only problem is, for the second line, I actually have to kick off a
The code is now this, which works- kindof:
[notebookController add:sender];
[notebookTableView editColumn:0 row:[notebookTableView selectedRow]
withEvent:nil select:YES];
Only problem is, for the second line, I actually have to kick off a
timer...:
[NSTimer scheduledTimerWithTimeInterval:.
On Feb 25, 2009, at 2:11 PM, Walker Argendeli wrote:
I have a table with one column, that's bound to an array
controller. It calls add: on the array controller when I hit a plus
button. Problem is, I want the textFieldCell to be selected on
creation. I rewired the plus button to call a
On Wed, Feb 25, 2009 at 5:11 PM, Walker Argendeli
wrote:
> I have a table with one column
[...snip...]
> [tableView editColumn:1 row:[tableView selectedRow] withEvent:nil
> select:YES];
You are aware that arrays are 0-indexed, right?
--Kyle Sluder
__
I have a table with one column, that's bound to an array controller.
It calls add: on the array controller when I hit a plus button.
Problem is, I want the textFieldCell to be selected on creation. I
rewired the plus button to call a method in a custom class. The first
thing the custom
ArrayController had a binding with an
NSTableView I started to wonder if the performance hit was actually
caused by all the UI updating that needed to happen. Sure enough it
was. If I unbind the ArrayController before I update all the managed
objects, then rebind the ArrayController afterwards, then
I fixed it, I had the bindings set up perfectly. My challenge was in
my Project object my NSMutableArray was setup wrong:
@property (readwrite, assign) NSMutableArray *projectInfo;
should have been
@property (readwrite, copy) NSMutableArray *projectInfo;
with that change it works perfectly.
O
I have 2 array controllers. the 1st manages an array of Project
objects. within the project object there is an NSMutableArray of
ProjectInfo objects.
Here is an image of my Interface Builder setup for the 2 controllers:
http://www.design-factor.com/jason/bindings.jpg
The Projects array contr
On Jul 12, 2008, at 12:29 PM, Ashley Perrien wrote:
when I click the add button which calls a method in MyDocument it
ultimately does a [array addObject: newobject] and the
arraycontroller is not being notified that the array is being
updated so it's not redrawing the table. Any ti
On Jul 12, 2008, at 3:29 PM, Ashley Perrien wrote:
Click the add button to add a line, click through the table and fill
in the fields to get the data in.
Instead what I want is to have several textfields in the view, fill
those out, click add, it performs all the necessary operations with
I'm having another go at trying to figure out array controllers and
having problems. I can create a model and a view and use an
ArrayController to tie the two together without much problem. But In
that case, all the editing is done in the table. Click the add button
to add a line,
Ashley,
As it happens, I have written a chapter in "Cocoa Design Patterns"
about "why" NSArrayController and friends exist and how to use them.
I am interested in feedback on the chapter. Contact me privately if
you want to see if we can arrange some way for you to review the
chapter.
oller) are, how they work or how to configure them in
IB. Bindings I get and don't have a problem with. Creating my own
controller object I have no problem creating and getting to work. But
the black box of NSObject or ArrayController I just can't figure out.
I've also tri
On 4 Jun 2008, at 21:50, Shawn Erickson wrote:
On Wed, Jun 4, 2008 at 6:18 AM, Gerriet M. Denkmann
<[EMAIL PROTECTED]> wrote:
When this table contains some rows and I click on the table column
header I
always get:
*** -[NSCFArray objectAtIndex:]: index (-1) beyond bounds (5)
where 5 is the
6/4/08 8:50 AM, also sprach [EMAIL PROTECTED]:
>> When this table contains some rows and I click on the table column header I
>> always get:
>> *** -[NSCFArray objectAtIndex:]: index (-1) beyond bounds (5)
>> where 5 is the correct number of rows displayed.
>>
>> What am I doing wrong?
>> This is
On Wed, Jun 4, 2008 at 7:50 AM, Shawn Erickson <[EMAIL PROTECTED]> wrote:
> On Wed, Jun 4, 2008 at 6:18 AM, Gerriet M. Denkmann
> <[EMAIL PROTECTED]> wrote:
>
>> When this table contains some rows and I click on the table column header I
>> always get:
>> *** -[NSCFArray objectAtIndex:]: index (-1)
On Wed, Jun 4, 2008 at 6:18 AM, Gerriet M. Denkmann
<[EMAIL PROTECTED]> wrote:
> When this table contains some rows and I click on the table column header I
> always get:
> *** -[NSCFArray objectAtIndex:]: index (-1) beyond bounds (5)
> where 5 is the correct number of rows displayed.
>
> What am
SValidatesImmediately = 0;
NSValueTransformer = ;
NSValueTransformerName = ;
};
}
[ arrayController infoForBinding: @"contentArray" ] -->
NSObservedKeyPath = "query.results";
NSObservedObject = ;
NSOptions =
{
NSAlwaysPre
Set the filter predicate to nil to remove any predicates from the
array controller.
- d
On Mar 20, 2008, at 12:36 AM, WiFiFun wrote:
I have added filtering buttons (Like those at the top
XCode's documentation window) to my bindings and core data learning
application I have been working on. I
I have added filtering buttons (Like those at the top
XCode's documentation window) to my bindings and core data learning
application I have been working on. I have the buttons linking to an action
that creates a predicate and sets the fetched predicate to the array
controller. This all works great
Thanks, but I used Ben's suggestion of The UndoManager's groups to
solve this issue.
On Feb 26, 2008, at 11:51 AM, Dave Hayden wrote:
On Feb 16, 2008, at 12:31 PM, Justin Hawkwood wrote:
I have an array controller bound in the NIB to a Core Data Entity,
and a function to remove the selecte
On Feb 16, 2008, at 12:31 PM, Justin Hawkwood wrote:
I have an array controller bound in the NIB to a Core Data Entity,
and a function to remove the selected item (from tableview) through
that array controller. The problem is that I want to rescan the
array controller to set some other var
> columns!
>
> My conclusion therefore: obviously am I doing something wrong in the
> interaction between the tableview and the arraycontroller. The
> controller apparently has received new content but not signalled that
> to the tableview; the latter changing when prodded i
licking in the first column did not update
the view, though I cannot see a difference in binding with the other
columns!
My conclusion therefore: obviously am I doing something wrong in the
interaction between the tableview and the arraycontroller. The
controller apparently has received
71 matches
Mail list logo