Well they aren't strings, they are some kind of opaque type which
represents a group. So you can't find it using CFArrayContainsValue with
a String. The name is a property of the Group object which is returned.
You'll have to iterate the array, get the property for each group which
is the name
Hi Roland, Luke...
Thank you for your pointers...
the following finally works...
ABRecordRef group = CFArrayGetValueAtIndex(grpval, i);
NSString *groupName = (NSString *)ABRecordCopyCompositeName(group);
Thank you for your pointers and help...sincerely appreciated!
James
_
no problem. Don't forget about the ownership of that groupName string,
the ABRecordCopyCompositeName() returns, it's a copy, you have to
CFRelease it or release the NSString.
Personally I'd have used the ABRecordCopyValue() method myself with the
kABGroupNameProperty because it's more explicit
On Jul 13, 2009, at 1:22 AM, Jeff Laing wrote:
{
Object *o = [Object new];
NSString *s = o.somevalue; // gets o's instance variable (without
retain)
[o release]; // o's instance variable is released
NSLog(@"Crash: %@",s)// accesses dead s
On 13/07/2009, at 13:55 , Wade Tregaskis wrote:
I know you guys probably know this, but to be technically accurate,
there is no guarantee the return value of stringByAppendingString
returns an autoreleased string.
While your point is true, it's not actually a rebuttal - you can
assume obj
Hi all,
Thanks for the response to this question. After a bit of digging in
Interface Builder I realised that the basic bindings for Next and
Previous buttons are there, as well as the actions in the
NSArrayController. I'm not sure whether this is what the reply below
was trying to tell m
Hey Greg
> You're not following the pattern laid out in the Overview setion of the
> NSCondition class reference. In particular, you don't have a boolean
> predicate, and you're not doing the task's work between the bounds of lock
> and unlock.
Hm ... but if I surround my task's work with lock/u
On Jul 13, 2009, at 5:37 AM, Ian Piper wrote:
Thanks for the response to this question. After a bit of digging in
Interface Builder I realised that the basic bindings for Next and
Previous buttons are there, as well as the actions in the
NSArrayController. I'm not sure whether this is what
I am trying to resize a window with an animation using the
NSAnimatablePropertyContainer animator proxy mechanism. The views have
the "Wants CA Layer" option set in IB.
I use this code:
NSRect frame = window.frame;
frame.size.height += delta;
frame.origin.y -= delta
If I set an NSError in the method readFromURL of my NSDocument, I
am not able to overwrite the NSLocalizedDescriptionKey.
...
Unfortunately only the strings of the keys
NSLocalizedFailureReasonErrorKey and
NSLocalizedRecoverySuggestionErrorKey are displayed together with a
standard err
On Monday, July 13, 2009, David Blanton wrote:
>
> Is it not the case that the UTI is defined in the info.plist
> CFBundleDocumentTypes? (which I have done).
Nope, CFBundleDocumentTypes associates your type to the plugin. You
should use UTExportedTypes or UTImportedTypes
look for "declaring U
Debajit,
Right-click (set it up so you can use two fingers on the touch pad) directly
on the symbol, then select ³Jump to Definition² from the popup menu. There
is no faster way to do this (that I know of).
--
Michael Domino
michael.dom...@identityfinder.com
If I set an NSError in the method readFromURL of my NSDocument, I
am not able to overwrite the NSLocalizedDescriptionKey.
Amazing how this works out sometimes - I *just* ran into this
yesterday for the first time.
Thanks for your answer, but is this behaviour somewhere documented?
On Jul 13, 2009, at 9:41 AM, Michael Domino wrote:
Right-click (set it up so you can use two fingers on the touch pad)
directly
on the symbol, then select “Jump to Definition” from the popup menu.
There
is no faster way to do this (that I know of).
That's not quite what was asked, but a
On Jul 13, 2009, at 7:08 AM, Marc Liyanage wrote:
It also works if I don’t enable the CA layer backing in IB, but I
need that because I am going to fade a subview at the same time as I
resize the window. Without CA layers I can only hide and show the
subview with a hard transition, but I wa
Torsten Curdt wrote:
Hm ... but if I surround my task's work with lock/unlock wouldn't this
block the calling thread until the worker thread has done it's work?
Follow the existing example from "Threading Programming Guide", under
the "Using Conditions" section. It's simple and clear. If
I've subclassed an NSMutableArray, and I want it to be initialised
with some objects already in place. So I did this:
- (id) init
{
self = [super init];
if (self != nil) {
for( int i = 0; i < 3; i++ )
[self addObject:[[[my
Thanks Julien, I knew there was something I was misinterpreting,
always is!
On Jul 13, 2009, at 7:38 AM, Julien Jalon wrote:
On Monday, July 13, 2009, David Blanton wrote:
Is it not the case that the UTI is defined in the info.plist
CFBundleDocumentTypes? (which I have done).
Nope, C
Hi all...
I am new to network programming...so please bear with me...
I am trying to program the following functionalities into my app.
1. When my app is running...it can RECEIVE network data from ANOTHER
iPHONE through the network.
2. When my app is running...it can RECEIVE network data to A
On Jul 13, 2009, at 11:44 AM, DKJ wrote:
I've subclassed an NSMutableArray, and I want it to be initialised
with some objects already in place. So I did this:
...
I suspect I'm missing something simple here.
Yes:
http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/n
You should look at GameKit.framework - this new API in iPhone OS 3.0
allows simple setup of bluetooth connections between devices for data
send/receive.
http://developer.apple.com/iphone/library/navigation/Frameworks/CocoaTouch/GameKit/index.html
Luke
On Jul 13, 2009, at 8:47 AM, James Lin
NSMutableArray (and most/all of the collection classes) is an abstract
class that can't be usefully sub-classed. The object returned by
[NSMutableArray array] is actually a subclass of NSMutableArray. Your
best approach is probably to check out categories which can be used to
add methods
On Jul 13, 2009, at 11:47 AM, James Lin wrote:
2. When my app is running...it can RECEIVE network data to ANOTHER
IPHONE through the network.
I'm going to assume this is a typo, otherwise you're going to have
a difficult time achieving this goal. :-)
Can you please point me in the right
On Jul 13, 2009, at 11:51 AM, Luke the Hiesterman wrote:
You should look at GameKit.framework - this new API in iPhone OS 3.0
allows simple setup of bluetooth connections between devices for
data send/receive.
Ah, you're right, it's GameKit that has the easy peer-to-peer
connectivity go
What's wrong with [[NSMutableArray arrayWithObject:[[MyClass alloc]
init]]; ?
The array retains it, so [NSMutableArray arrayWithObject:[[[MyClass
alloc] init] autorelease]]; would be better.
HTH
Gideon
___
Cocoa-dev mailing list (Cocoa-dev@l
On Jul 13, 2009, at 12:02 PM, Gideon King wrote:
The array retains it, so [NSMutableArray arrayWithObject:[[[MyClass
alloc] init] autorelease]]; would be better.
Yes, I saw that after I'd sent it but didn't think it worth another
e-mail. It's fine if you're using GC . :-D
--
I.S.
I did a quick scan of the GameKit programming guide...
Just to be sure...does it only work with bluetooth?
What if i need connection over the internet?
The game kit guide says "It does notcover the design and
implementation of networked games or applications."...
Thank you again...
James
O
GKSession, the connectivity layer, only works with bluetooth. The
framework also includes GKVoiceChat which does work over the internet.
Luke
On Jul 13, 2009, at 9:06 AM, James Lin wrote:
I did a quick scan of the GameKit programming guide...
Just to be sure...does it only work with bluetoo
yes this really was rather too vague a question and if you don't have
some of the basics of networking understood you're going to have a
tough time. There are classes in the OS to deal with various types of
network transfer, most of the NS* ones are reasonably high level, at
the very bottom
the usage scenario...
I want my app to obtain another iPhone(also running my app)'s IP
address from a server.
After that, my app on my iPhone can send data to the other iPhone.
This means my app on another iPhone has to be waiting for this network
traffic to arrive.
How can this be done?
On Jul 13, 2009, at 10:06 AM, James Lin wrote:
What if i need connection over the internet?
The game kit guide says "It does notcover the design and
implementation of networked games or applications."...
I suggest you pick up a book on socket programming. I first learned it
by reading "T
On Jul 13, 2009, at 11:22 AM, James Lin wrote:
the usage scenario...
I want my app to obtain another iPhone(also running my app)'s IP
address from a server.
After that, my app on my iPhone can send data to the other iPhone.
This means my app on another iPhone has to be waiting for this
ne
ok for that kind of generic data transfer I'd say the CFNetwork stuff
is what you need, that's pretty low-level. There's NSStream too, but
read the notes about the lack of NSHost stuff in iPhone. Effectively
what you're aiming for here is to make a socket connection between the
two and set
On Jul 13, 2009, at 08:49, I. Savant wrote:
Subclassing is fraught with many angry, fire-breathing, treasure-
grubbing dragons and as such is *not* recommended.
On Jul 13, 2009, at 08:51, David W. Berry wrote:
NSMutableArray (and most/all of the collection classes) is an
abstract class that
On Jul 13, 2009, at 06:52, I. Savant wrote:
"If not successful, the method returns nil after setting outError to
point to an NSError that encapsulates the reason why the document
could not be instantiated."
Operative word being "an" NSError. Funny enough, it ignores your
reason and never
On Jul 13, 2009, at 12:41 PM, Quincey Morris wrote:
What you *don't* get for free from subclassing is an internal
storage mechanism -- you have to invent that for yourself (usually
by putting a real NSArray instance variable in your subclass :) ).
You also need a pretty clear understanding
I'm working on an application which is nearing completion, but I'm
getting these strange crashes that look to be deep in the cocoa
framework. The thing is, I can't seem to diagnose these crashes, and
I can't imagine that such bugs exist in the framework such that they
pull down my applicat
If you do not receive any reply to your questions, it is likely due to
these things:
1) "Be sensitive in choosing where you ask your question. You are
likely to be ignored, or written off as a loser, if you: ... • cross-
post to too many different newsgroups"
2) "When selecting a Web forum
On Jul 13, 2009, at 12:52 PM, Quincey Morris wrote:
As the OP demonstrated (and I didn't realize this before he did),
NSDocumentController apparently *will* display the failure reason
("The document X could not be opened. B."). So you have a way of
customizing the alert, so long as you don'
Thanks Matt. You were absolutely correct; the problems I have were in
-drawRect:. I'm still trying to track down a problem though, and I'm
not sure where it is. I've actually cut it down to some fairly simple
code. Here it is:
-(NSRect)rectForPage:(NSInteger)pageNumber
{
// Note
On Jul 12, 2009, at 2:17 PM, David W. Berry wrote:
So the jist of it is that I create a subclass of CAKeyframeAnimation
that has a sequence of images in it's values property and a sequence
of frame durations in the keyTimes property. I can then add the
animation to a layer to display and t
Thanks Rob,That's a good workaround!
But, this will not fit into our requirements of our application.
As per our requirement, we cannot hide the dock icon.
In order to go with your solution, we might have to maintain
a daemon process which does just screen capture and
gives the captured image to
Is there any way to get the IMEI code programatically? Or does a
device token the only unique identifier able to be generated.
Sent from my iPhone
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderato
On Jul 13, 2009, at 09:56, K.Darcy Otto wrote:
I'm working on an application which is nearing completion, but I'm
getting these strange crashes that look to be deep in the cocoa
framework. The thing is, I can't seem to diagnose these crashes,
and I can't imagine that such bugs exist in the
On Mon, Jul 13, 2009 at 12:53 PM, I. Savant wrote:
> On Jul 13, 2009, at 12:41 PM, Quincey Morris wrote:
>
>> What you *don't* get for free from subclassing is an internal storage
>> mechanism -- you have to invent that for yourself (usually by putting a real
>> NSArray instance variable in your su
NSFont *font = [NSFont fontWithName:@"Lucida Grande" size:fontSize];
One thing to note here.
"Lucida Grande" is not a valid font name.
The valid name for the font is "LucidaGrande" without the space.
The font system does return the font you intended (matching against
the familyname), but it's
Here is my info.plist I am trying to get a callback for files ending
in .pes
My code still does not break. The breakpoint is orange outlined in
blue (?)
Please shed some light ...
http://www.apple.com/DTDs/PropertyList-1.0.dtd
">
CFBundleDevelopmentRegion
Englis
HoudahStudy 2.0 (aka Ebbinghaus).
Study card software.
Late alpha / early beta. CoreData, CoreAnimation, GC, properties, …
Ebbinghaus 1.0 was freeware
2.0 is a complete rewrite. Not yet released.
Inquire via email to pierre.bern...@houdah.com
Current build available upon
request
2009/7/12, Conrad Taylor :
> Hi, please this is the cocoa-dev mailing list and this thread belongs in the
> iPhone Developer Forums.
> Thanks,
>
> -Conrad
I'm sorry about that. But the iPhone Developer Forums is a closed
forum for the paid iPhone Developers Program. I don't have access
there yet (
You can get the unique device identifier (UDID) for a device, which is
a hash of different hardware identifiers (like the serial number) -
look at UIDevice. Its not really clear for what purposes you need the
identifier for, though, so whether or not you really need that or
something else i
Did someone already open an documentation bug at apple regarding this
issue?
"If not successful, the method returns nil after setting outError
to point to an NSError that encapsulates the reason why the
document could not be instantiated."
Operative word being "an" NSError. Funny enough
The work-around did, indeed, solve the problem I was having with the
sequence, they now play correctly from start to stop.
If I might prevail upon you with another question, the goal is to
trigger a short animation, leaving the last animation frame displayed
as a lasting part of the image,
On Jul 13, 2009, at 3:42 PM, David W. Berry wrote:
If I might prevail upon you with another question, the goal is to
trigger a short animation, leaving the last animation frame
displayed as a lasting part of the image, right now I have a flicker
as the animation is removed and then the unde
I'm using this basic code to play a sound and it frequently skips at the
end, sounded like a cd skipping. I'm playing .caf files at 22500 Hz.
Does anyone any experience with this?
Thanks!
int soundNum= arc4random() % [soundsArray count];
AVAudioPlayer *sound= [soundsArray objectAtI
Please file a bug. Attach a sample app with your audio.
Thanks,
Luke
On Jul 13, 2009, at 3:54 PM, Miles wrote:
I'm using this basic code to play a sound and it frequently skips at
the
end, sounded like a cd skipping. I'm playing .caf files at 22500 Hz.
Does anyone any experience with this?
T
> be made to behave correctly anyway. For example, you'd never do a
> thing like this:
>
> {
> NSData *data = [[NSData alloc] initWithBytes:foo length:bar];
> const char *bytes = [data bytes];
> [data release];
> CrashByDoingSomethingWithBytes(bytes);
> }
>
> Why should this s
On Mon, 13 Jul 2009 10:07:17 -0700, "K. Darcy Otto" said:
>Now, this should simply print a line of integers down the left side of
>the page. It does this for two pages - works perfectly - with lines 0
>to 50 on the first page, and 51 to 100 on the second page, divided
>correctly so there is no s
I've defined my own MyClass and made it conform to the NSCoding
protocol by adding methods like this:
- (void)encodeWithCoder:(NSCoder *)encoder
{
[encoder encodeInt:index forKey:@"index"];
}
- (id)initWithCoder:(NSCoder *)decoder
{
self = [super init];
index = [decoder decodeIntForK
Hey dkj -
The method -[NSArray writeToFile: atomically:] uses property list
serialization, and property lists support a fixed set of types. You
want to serialize your NSArray with an NSCoder, like NSKeyedArchiver,
and then read it back in with NSKeyedUnarchiver.
Take a look at these two m
On Jul 13, 2009, at 1:02 PM, David Blanton wrote:
Here is my info.plist I am trying to get a callback for files
ending in .pes
UTExportedTypeDeclarations
UTTypeIdentifier
com.britonleap.pes
{
NSData *data = [[NSData alloc] initWithBytes:foo length:bar];
const char *bytes = [data bytes];
[data release];
CrashByDoingSomethingWithBytes(bytes);
}
Why should this sort of thing be expected to work, just because the
property in question happens to be an object?
A facetiou
On Jul 13, 2009, at 7:42 PM, Wade Tregaskis wrote:
There's also a high cost, in CPU cycles and memory, to retain/
[auto]release in such an excessively defensive way. And have fun
using Object Alloc to find real problems once you've added these
superfluous retain/release/autoreleases to ever
There's also a high cost, in CPU cycles and memory, to retain/
[auto]release in such an excessively defensive way. And have fun
using Object Alloc to find real problems once you've added these
superfluous retain/release/autoreleases to every return value in
your entire program.
But wouldn
Have a look at the Witap code sample. It finds other iPhones over
Bonjour and connects sets up a socket connection (I believe it uses
CFNetwork, but I don't have it handy right now). If you need more
info, look at the CFNetwork programming guide - CFNetwork isn't that
bad, and the guide con
Maybe I should reformulate my question.
I want the Finder to call my QLGenerator whenever it sees a file of
type '.pes'.
Can someone show me the required info.plist entries?
This does not get my generator called:
UTExportedTypeDeclarations
UTTypeIdentifier
com.pes.br
On 14/07/2009, at 11:34 AM, David Blanton wrote:
Furthermore why so convoluted and difficult? I should be able to say
call me for files of type'.pes' and be done with it.
Any help is appreciated.
The system has to consider the more general situation - what if the
type were '.txt'?
App
On Jul 13, 2009, at 6:34 PM, David Blanton wrote:
Maybe I should reformulate my question.
I want the Finder to call my QLGenerator whenever it sees a file of
type '.pes'.
Can someone show me the required info.plist entries?
You need to do two things:
1) declare your type to map .pes f
These are not my files. just know (intellectual property) how to read
and write them. There are approx 18 formats that will ultimately be
supported by by generator.
On Jul 13, 2009, at 7:48 PM, Graham Cox wrote:
On 14/07/2009, at 11:34 AM, David Blanton wrote:
Furthermore why so convol
I'm not sure how to begin this, so I'll start off with what I have.
What I have:
Device A and Device B.
Device A is connected to the internet (at address The Address, and has
port The Port routed to it for instance)
Device B is also connected to the internet, but is not on the same
loca
Ok Adam.
I took your example and got this:
http://highrolls.net/Samples/Info.plist
Please comment, as my qlgen is not called.
And I did mdls and got this:
http://highrolls.net/Samples/mdls.txt
which shows a different kMDItemContentType.
Am I even getting close?
On Jul 13, 2009, at 7:50 P
On 14/07/2009, at 7:34 , Jeff Laing wrote:
Thus, apparentl doing
NSString *s = someobject.somevar;
is essentially against the rules. You should always use
NSString *s = [[someobject.somevar {retain|copy}] autorelease];
No, this is unnecessary. You do not need to do this unl
Arrggg!
Had a misspelling in my -t parameters - break point being hit!
Now to add more than on file type.
Thanks a bunch to all but "I'll be back!"
db
On Jul 13, 2009, at 7:50 PM, Adam R. Maxwell wrote:
On Jul 13, 2009, at 6:34 PM, David Blanton wrote:
Maybe I should reformula
On 13/07/2009, at 19:08 , Marc Liyanage wrote:
I am trying to resize a window with an animation using the
NSAnimatablePropertyContainer animator proxy mechanism. The views
have the "Wants CA Layer" option set in IB.
Its ridiculously painful isn't it?
One thing that may trip you up is auto r
id obj = [dict objectForKey:@"whatever"];
[dict release];
NSLog( @"this will crash %@", id );
And if you extrapolate this example further to the case where [dict
release] is called on another thread, you're in a real pickle.
Ideally, objectForKey: would retain]autorelease].
This multithre
On Mon, 13 Jul 2009 22:49:28 +0200, Houdah - ML Pierre Bernard
said:
>HoudahStudy 2.0 (aka Ebbinghaus).
>Study card software.
>Late alpha / early beta. CoreData, CoreAnimation, GC, properties,
>
>Ebbinghaus 1.0 was freeware
>2.0 is a complete rewrite. Not yet released.
>
>Inquire via email to pi
On 14/07/2009, at 1:48 PM, Matt Neuburg wrote:
HoudahStudy 2.0 (aka Ebbinghaus).
Study card software.
Late alpha / early beta. CoreData, CoreAnimation, GC, properties, ∑
Ebbinghaus 1.0 was freeware
2.0 is a complete rewrite. Not yet released.
Inquire via email to pierre.bern...@houdah.com
Cur
Hi,
I am busy writing my first app using objective-c, cocoa, xcode, etc.
It is basically an app that will allow the user to compile meta data
from several sources, select the bits he wants, and then write that
meta data to the movie file. Think MetaX with more sources.
My main overall probl
Thank you Roland, and Luke!
I got it...thank you for your pointers!
ABRecordRef group = CFArrayGetValueAtIndex(grpval, i);
NSString *groupName = (NSString *)ABRecordCopyCompositeName(group);
This works, finally...
Thank you again!
James
On 2009/7/13, at 下午 3:18, Roland King wrote:
Well they
Hi, I'm having some confusion here over displaying raw binary data.
I have my NSMutableData object that I'm getting the bytes from. As I
understand it, there are different ways to get the bytes.
The -getBytes:range: method
NSRange r = NSMakeRange(x, y);
char buf[y];
[data getBytes:&buf lengt
On 13 Jul 2009, at 22:02, Chase Meadors wrote:
Hi, I'm having some confusion here over displaying raw binary data.
I have my NSMutableData object that I'm getting the bytes from. As I
understand it, there are different ways to get the bytes.
The -getBytes:range: method
NSRange r = NSMakeRan
On 14/07/2009, at 3:02 PM, Chase Meadors wrote:
for (int i = 0; i < aNumber; i ++) {
NSLog(@"%02X", buf[i]);
}
This is what's really bothering me because I'll get normal bytes,
like 2E 00 AA, but sometimes, seemingly randomly, there are six
leading F's. Something like:
0E
00
This type of announcement is NOT appropriate for this list.
moderator
On 2009-07-13, at 4:49 PM, Houdah - ML Pierre Bernard wrote:
HoudahStudy 2.0 (aka Ebbinghaus).
Study card software.
Late alpha / early beta. CoreData, CoreAnimation, GC, properties, …
Ebbinghaus 1.0 was freeware
2.0 is a c
Hi all...
Continuing on with my network between 2 iPhone quest...
Thanks to Luke who made me aware of Game Kit and GKVoiceChat.
As I am new to network programming, I need you to help me make sense
of the documentation.
If I am reading the GKVoiceChat documentation correctly...GKVoiceChat
no you're not reading it correctly. You appear, if I'm reading your mail
properly, to think that the GKVoiceChatService exists and makes a
connection for you and you can call the
voiceChatService:sendData:toParticipantID:
and at the other end the
receivedData:fromParticipantID:
will be calle
This is just a quick question for anyone who may know (or, at least I
hope it's quick)
If I declare a port:
port = [ [NSSocketPort alloc] initRemoteWithTCPPort:portNumber
host:hostName ] ;
And use it with an NSConnection, it works.
If I use that same port in any other way (such as NSFile
85 matches
Mail list logo