n Oct 15, 2012, at 6:23 AM, Koen van der Drift wrote:
>
>> On Mon, Oct 15, 2012 at 8:19 AM, Jerry Krinock wrote:
>>>
>>> On 2012 Oct 15, at 03:45, Koen van der Drift
>>> wrote:
>>>
>>>> So I cannot directly filter an array of dictionaries u
On Mon, Oct 15, 2012 at 11:51 AM, Keary Suska wrote:
> Willeke probably addressed your issue best. The contents of the collection
> that you pass to the aggregate expression must be the same type of value as
> the left hand expression. So, to have "name IN {ARRAY}", ARRAY *m
On Oct 15, 2012, at 6:23 AM, Koen van der Drift wrote:
> On Mon, Oct 15, 2012 at 8:19 AM, Jerry Krinock wrote:
>>
>> On 2012 Oct 15, at 03:45, Koen van der Drift
>> wrote:
>>
>>> So I cannot directly filter an array of dictionaries using a predicate
On Mon, Oct 15, 2012 at 8:19 AM, Jerry Krinock wrote:
>
> On 2012 Oct 15, at 03:45, Koen van der Drift
> wrote:
>
>> So I cannot directly filter an array of dictionaries using a predicate? That
>> was the whole goal of my question, see my original post.
>
> Oh
On 2012 Oct 15, at 03:45, Koen van der Drift wrote:
> So I cannot directly filter an array of dictionaries using a predicate? That
> was the whole goal of my question, see my original post.
Oh, now I see. I'd assumed that 'persons' was an array. It's a dictiona
So I cannot directly filter an array of dictionaries using a predicate? That
was the whole goal of my question, see my original post.
- Koen.
On Oct 15, 2012, at 6:33 AM, Willeke wrote:
>
> Op 15 okt 2012, om 02:05 heeft Koen van der Drift het volgende geschreven:
>
>>
>
;}
>>
>> what is persons in this statement?
>> [fetchRequest setPredicate: [NSPredicate predicateWithFormat: @"name IN %@",
>> persons]];
>
> 'persons' is an array of dictionaries, where one of the key-value pairs
> contains the name.
>
> Maybe another clue, if I NSLog the predicate, I get this:
>
> name IN {{"name" = "Jones A."}, {"name" = "Williams S."}, {"name" =
> "Brown M."}, {"name" = "Tobias S."}}
>
> That seems as expected to me.
>
the predicate should be something like
name IN {"Jones A.", "Williams S.", "Brown M.", "
On Oct 14, 2012, at 10:43 AM, Jerry Krinock wrote:
> On 2012 Oct 14, at 07:05, Koen van der Drift
> wrote:
>
>> name IN {{"name" = "Jones A."}, {"name" = "Williams S."}, {"name" =
>> "Brown M."}, {"name" = "Tobias S."}}
>>
>> That seems as expected to me.
>
> It says that the name should be
On 2012 Oct 14, at 07:05, Koen van der Drift wrote:
> name IN {{"name" = "Jones A."}, {"name" = "Williams S."}, {"name" =
> "Brown M."}, {"name" = "Tobias S."}}
>
> That seems as expected to me.
It says that the name should be in a set of predicates, which are boolean.
That doesn't make sens
Maybe another clue, if I NSLog the predicate, I get this:
name IN {{"name" = "Jones A."}, {"name" = "Williams S."}, {"name" =
"Brown M."}, {"name" = "Tobias S."}}
That seems as expected to me.
- Koen.
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.
On Sat, Oct 13, 2012 at 11:58 PM, Jerry Krinock wrote:
> So you need to experiment with different methods.
>
> • Remove the -setPredicate: statement. Now is filteredPersons everything in
> the store, as expected, or still empty?
Yes, it contains all the names currently in the store.
> • Chang
It looks to me like what you're doing should work as you expect. I don't think
you are violating any of the predicate gotchas in Core Data Programming Guide ▸
Persistent Store Features.
So you need to experiment with different methods.
• Remove the -setPredicate: statement. Now is filteredP
I have a large array for Person entities, and want to filter them before
importing into my Core Data database, so that each Person will be only once in
the database based on the name. The names are pulled from a database, and have
the format: @"Jones, A."
After some searching, I came up with t
I have found various references on this list and on the web about the
impossibility to hook up an *editable* single-column NSTableView to an
NSMutableArray of strings via bindings - and about some clever ways to work
around this limitation. These workarounds may work in principle, but fail in a
Batholdy wrote:
> Hi,
>
> I have a plist with an array of dictionaries.
> Now every of these dictionaries has a key 'ID' with an integer.
>
> Now how I can get only one dictionary element out of this array where key is
Hi,
I have a plist with an array of dictionaries.
Now every of these dictionaries has a key 'ID' with an integer.
Now how I can get only one dictionary element out of this array where key is
equal to x?
thanks for any advice!
___
Cocoa-d
Thanks for the reply, I'm a newbie and I'm still trying to figure out how are
things done in Cocoa.
I have another related question I'd like to ask you guys, cause I've searched
through documentation and tutorials but I cannot find the exact answer.
I'm trying to implement Model-Controller-Vie
A couple more things I've thought of:
- There is such a thing as a grayscale image that uses floats instead of
bytes for values. You may not even need to do a conversion.
- You may even be able to wrap your buffer up in an image rep without
copying it.
I don't use NSImage; my custom image views
Martin,
Have you looked at the API for CGImage? If not, this may be helpful as well.
regards,
douglas
On Dec 17, 2009, at 9:25 AM, Martin Beroiz wrote:
>
> On Dec 17, 2009, at 6:17 AM, Graham Cox wrote:
>
>>
>> On 17/12/2009, at 5:32 AM, Martin Beroiz wrote:
>>
>>> Can anyone please give
> Thanks, I'm trying that already. I don't need high performance right now, but
> just out of curiosity, what would I use if I wanted ultra high performance?
You would use the methods of NSBitmapImageRep that allow you to get/set the
entire image buffer at once.
--
Scott Ribe
scott_r...@killerby
On Dec 17, 2009, at 6:17 AM, Graham Cox wrote:
>
> On 17/12/2009, at 5:32 AM, Martin Beroiz wrote:
>
>> Can anyone please give me any hint on what would be the best approach to
>> this problem? or may be point me some relevant documentation I might read? I
>> know nothing about bitmap image r
On 17/12/2009, at 5:32 AM, Martin Beroiz wrote:
> Can anyone please give me any hint on what would be the best approach to this
> problem? or may be point me some relevant documentation I might read? I know
> nothing about bitmap image representation, so any pointer on that would
> appreciated
Hello,
I'm new in cocoa, and I want to accomplish something in a program i'm
developing.
I have an array of floats, that is basically a matrix, and I want to display it
on a view as a 2D grayscale image, with each pixel in a gray tone proportional
the value of that float.
So
On 13 Dec 2009, at 23:50, Keary Suska wrote:
> On Dec 12, 2009, at 10:35 PM, Gerriet M. Denkmann wrote:
>
>> Well, not quite.
>> As I stated in some previous post in this thread, the NSDictionaryController
>> (bound to "currentDictionary") fills an editable NSTableView.
>> And if the user edits
On Dec 13, 2009, at 9:50 AM, Keary Suska wrote:
>> Well, not quite.
>> As I stated in some previous post in this thread, the NSDictionaryController
>> (bound to "currentDictionary") fills an editable NSTableView.
>> And if the user edits some key or value in this NSTableView the
>> NSDictionaryC
On Dec 12, 2009, at 10:35 PM, Gerriet M. Denkmann wrote:
> Well, not quite.
> As I stated in some previous post in this thread, the NSDictionaryController
> (bound to "currentDictionary") fills an editable NSTableView.
> And if the user edits some key or value in this NSTableView the
> NSDiction
On 12 Dec 2009, at 23:48, Keary Suska wrote:
>
> On Dec 11, 2009, at 10:36 PM, Gerriet M. Denkmann wrote:
>
>> realContent (which contains the NSDictionary).
>>
>> And now I can bind the content of the NSDictionaryController to
>> NSArrayController selection.realContent and everything works p
On Dec 11, 2009, at 10:36 PM, Gerriet M. Denkmann wrote:
> realContent (which contains the NSDictionary).
>
> And now I can bind the content of the NSDictionaryController to
> NSArrayController selection.realContent and everything works perfectly -
> changes done in the TableView of my Diction
On 11 Dec 2009, at 22:54, Keary Suska wrote:
> On Dec 11, 2009, at 12:45 AM, Gerriet M. Denkmann wrote:
>
>> I have a window with an NSTableView which is bound to an NSArrayController
>> which has as content an NSMutableArray called "theArrayOfDictionaries".
>> Works fine.
>>
>> "theArrayOfDic
On Dec 11, 2009, at 12:45 AM, Gerriet M. Denkmann wrote:
> I have a window with an NSTableView which is bound to an NSArrayController
> which has as content an NSMutableArray called "theArrayOfDictionaries".
> Works fine.
>
> "theArrayOfDictionaries" contains NSMutableDictionaries.
> So I added
I have a window with an NSTableView which is bound to an NSArrayController
which has as content an NSMutableArray called "theArrayOfDictionaries".
Works fine.
"theArrayOfDictionaries" contains NSMutableDictionaries.
So I added another NSTableView to my window, bound to an
NSDictionaryController,
On Dec 5, 2009, at 4:10 PM, R T wrote:
> I am trying to create an array of CGImageRefs that I will use to create
> CGLayers.
> myCGImageRefImage is the CGImageRef of the key image.
> Each loop, I'm trying to reload imgForLayer with this key image.
> The line...imgForLayer
I am trying to create an array of CGImageRefs that I will use to create
CGLayers.
myCGImageRefImage is the CGImageRef of the key image.
Each loop, I'm trying to reload imgForLayer with this key image.
The line...imgForLayer = CGImageCreateCopy(myCGImageRefImage) ...doesn't work
at a
On Nov 27, 2009, at 7:48 AM, Alastair Houghton wrote:
> You *can* have non-constant elements in struct initialisers in C, *but* only
> in a context where there is code that will execute at runtime.
C++ eliminates most of these restrictions, btw. And you can make your code C++
simply by changin
On 27 Nov 2009, at 13:30, Jeremy Pereira wrote:
> You can't have non constant elements in struct initialisers, testy is not a
> constant. The error message spells out exactly what the issue is.
You *can* have non-constant elements in struct initialisers in C, *but* only in
a context where ther
On 27 Nov 2009, at 11:35, John Love wrote:
>
> I get "Initializer element is not constant. This pertains to the NSString*
> because if I directly substitute the following, no compile error happens:
> YearAmt gTest[] = {{@"testy", 10}
>
> What fundamental pertaining to C or C++ am I not getting?
On 27/11/2009, at 10:35 PM, John Love wrote:
> NSString *testy = @"testy";
> YearAmt gTest[] = {{testy, 10} /*, + others */};
>
> I get "Initializer element is not constant. This pertains to the NSString*
> because if I directly substitute the following, no compile error happens:
> YearAmt gTe
In my .h file, I have:
typedef struct YearAmt {
NSString *year;
int amount;
} YearAmt;
extern NSString *testy;
extern YearAmt gTest[];
In the corresponding .m file:
NSString *testy = @"testy";
YearAmt gTest[] = {{testy, 10} /*, + others */};
I get "Initializer element i
Kyle, please note that question was "Can I use the same method for
*UIImage*or NSImage also?
"
John, you are right.
Regards,
Parag
On Tue, Aug 11, 2009 at 1:13 AM, John Baldwin wrote:
> I took this to mean that NSImage conforms to NSCoding and therefore can be
> archived, whereas UIImage does no
I took this to mean that NSImage conforms to NSCoding and therefore
can be archived, whereas UIImage does not conform and requires this
extra step to convert the image to an NSData object, which can be
archived.
John
On Sunday Aug 9 4:10 PM, at 4:10 PM, Kyle Sluder wrote:
On Aug 9, 2009,
On Aug 9, 2009, at 4:39 AM, parag vibhute
wrote:
Yes, you can. Only thing is you need to convert UIImage object to
NSData
object. There are two C APIs
Good to know for the iPhone crowd, but the question was about NSImage,
which is a Mac class.
--Kyle Sluder
___
ot;. Finally, put arrayData into the
>>> attribute.
>>>
>>> Shlok Datye
>>> Coding Turtle
>>> http://codingturtle.com
>>>
>>>
>>> On 09.08.2009, at 09:48, M.S. Hrishikesh wrote:
>>>
>>> I created an Entity called
create an attribute to hold an
array of strings? I know how to create an Attribute to hold a
single string but I need to hold an array of strings.
One way is to create another Entity called PlaceName. PlaceName
will have an attribute of type String. I will then make a to-many
relationship from M
". Finally, put
arrayData into the attribute.
Shlok Datye
Coding Turtle
http://codingturtle.com
On 09.08.2009, at 09:48, M.S. Hrishikesh wrote:
I created an Entity called MyPlaces. I want to store a number of
strings inside MyPlaces. How do I create an attribute to hold an
array of st
.com
On 09.08.2009, at 09:48, M.S. Hrishikesh wrote:
I created an Entity called MyPlaces. I want to store a number of
strings inside MyPlaces. How do I create an attribute to hold an
array of strings? I know how to create an Attribute to hold a single
string but I need to hold an array of s
I created an Entity called MyPlaces. I want to store a number of strings
inside MyPlaces. How do I create an attribute to hold an array of
strings? I know how to create an Attribute to hold a single string but I
need to hold an array of strings.
One way is to create another Entity called
On Jul 29, 2009, at 19:58, Graham Cox wrote:
I'm not sure I've fully followed your question, since I'm not as up
with bindings as you are, but I'm just wondering: have you
overlooked the fact that @"self" is a valid keypath or keypath
component? If the array holds strings and you are bindin
(Registering them as defaults
doesn't seem to be working for me.)
You can't do this with an array of NSStrings, you have to work with
strings encapsulated as properties of an object, such as an
NSDictionary. So you need an array of dictionaries which contain a
string object for a pa
On 30/07/2009, at 8:15 AM, A B wrote:
Without those, what keypath do I use in the NSTableView I have set
up to facilitate manipulation of that list?
I'm not sure I've fully followed your question, since I'm not as up
with bindings as you are, but I'm just wondering: have you overlooked
m as defaults doesn't seem to be working for me.)
So to reiterate my questions more succinctly: How can you bind a table view to
an array of NSStrings and how can you store said array in an application's
preferences?
Any pointers or advice that you can offer would be VERY much appr
Jeff Decker wrote:
It turns out that the instance of my PolygonShape class in my
PolygonView class does not have any information attached to it.
Did you ever do anything to attach information to it?
Did you assign the variable a value?
I am not sure how to connect the PolygonShape instance
Thank you for your response. Your reply prompted me to explore where
else my problem might lay if it is not in the unpacking of CGPoint.
It turns out that the instance of my PolygonShape class in my
PolygonView class does not have any information attached to it. I am
not sure how to conne
On May 22, 2009, at 12:45 PM, Jeff Decker wrote:
Thank you for your help. I have a mutable array filled with
NSValues which are CGPoints. I want to unpack them one by one while
adding them to a CGContextAddLineToPoint rect. Here is my terrible
attempt (most of the code is from the Stanf
Hello,
Thank you for your help. I have a mutable array filled with NSValues
which are CGPoints. I want to unpack them one by one while adding
them to a CGContextAddLineToPoint rect. Here is my terrible attempt
(most of the code is from the Stanford class on iTunes - which I'm
really en
Dear all,
If have seen lots of examples in which a NSTableView is bound to an
NSArrayController which is bound to an array of entity objects,
having various properties. However I am now trying to bind a table
column to an array of strings and I don't seem to get this working.
The strin
On Nov 16, 2008, at 1:45 PM, Chris Suter wrote:
The only trick I can think of is to use "string" as the model key and
then, because NSString doesn't have a "string" method, you need to add
a category method to NSString:
- (NSString *)string
{
return self;
}
I don't know bindings, but it might
On Mon, Nov 17, 2008 at 4:45 AM, Meik Schuetz <[EMAIL PROTECTED]> wrote:
> Dear all,
> If have seen lots of examples in which a NSTableView is bound to an
> NSArrayController which is bound to an array of entity objects, having
> various properties. However I am now trying to b
Dear all,
If have seen lots of examples in which a NSTableView is bound to an
NSArrayController which is bound to an array of entity objects, having
various properties. However I am now trying to bind a table column to
an array of strings and I don't seem to get this working. The s
Hi,
I'm working on an autocompletion system such as with mail To: Cc:
fields etc.
I have an array of dictionaries and I want the autocomplete to match
to the key "description"
This code below works great for an array of strings:
NSArray *matchingName
chingNames = [[namesArray valueForKey:@"description"]
filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"SELF
beginswith[cd] %@", substring]];
Jason
On 23/10/2008, at 19:06 , Jason Wiggins wrote:
Hi,
I'm working on an autocompletion system such as with mail To:
61 matches
Mail list logo