Deploying project as backward compatible

2008-08-18 Thread mahaboob
Hi all, I'm using xcode 3.1. I deployed my project by changing the build configuration to Release. Now this application is working on Leopard. When I try to open the application in Tiger by double clicking it, the application icon appeared in the dock for a moment and suddenly disappeared. The ap

Re: Question about respondsToSelector

2008-08-18 Thread Negm-Awad Amin
Am Mo,18.08.2008 um 20:17 schrieb Carmen Cerino Jr.: Does the id type have enough information for the respondsToSelector method to work. I have a class with an ivar of type id, and when I invoke the respondsToSelector method it fails when it should succeed. I am assuming it should work fin

Re: Right place to unobserve notifications in a document

2008-08-18 Thread Negm-Awad Amin
Am Mo,18.08.2008 um 20:14 schrieb Andy Lee: On Aug 18, 2008, at 12:49 PM, Negm-Awad Amin wrote: Am Mo,18.08.2008 um 18:18 schrieb Andy Lee: -- but in this case I think -dealloc is not only okay, but sometimes the only correct place to unregister a notification. Suppose an invariant of you

Re: NSView confusion

2008-08-18 Thread Graham Cox
On 19 Aug 2008, at 9:02 am, Charlie Dickman wrote: Also, how does one synchronize events with the update of the various views? I can instruct each view what to draw and it draws it just fine (I use lockFocus, etc. when drawing is external to drawRect) and the updated view is seen _eventual

Re: Shared NSTextView

2008-08-18 Thread Graham Cox
On 19 Aug 2008, at 3:23 pm, chaitanya pandit wrote: But as in your case you will have to use a separate set of above classes for each textView, that means you cannot share the layout manager as it belongs to a single textStorage. Not strictly true, because while the LM is associated with

Re: Shared NSTextView

2008-08-18 Thread chaitanya pandit
You can share an instance of NSTextStorage and NSLayoutManager with multiple NstextContainer+NSTextViews only if you are displaying same text in all those textViews. But as in your case you will have to use a separate set of above classes for each textView, that means you cannot share the la

Re: Shared NSTextView

2008-08-18 Thread Graham Cox
You can share a few things. The NSTextView can be shared since presumably it will only be possible to edit one object at a time (otherwise it's going to get a bit confusing for the poor old user). You could also use NSWindow's field editor for this, which is what text fields in dialogs use.

Re: NSView confusion

2008-08-18 Thread Andy Lee
On Aug 18, 2008, at 7:02 PM, Charlie Dickman wrote: I import the appropriate .h files and invoke the method via [view method... and the compiler reports that no such method can be found. Yet if I invoke the method via [view performSelector:... at execution time it works just fine. When you

Re: How to write a string to a file

2008-08-18 Thread Andy Lee
On Aug 18, 2008, at 11:28 PM, David wrote: Thanks for the quick responses. Why isn't this already in NSString?I found an old reference saying to use [filehandle writeData:[nsstring dataUsingEncoding:...]] This seems obtuse. I have been using Cocoa for 6 months and it is not seeming any more con

NSView confusion

2008-08-18 Thread Charlie Dickman
I have tried everything I can think of and have tried the documentation I can find and I still can not figure out what is going on or what to do about it. I have an app that contains multiple NSView's which are all visible at the same time. They are all sub-classes of NSView but not of any

Shared NSTextView

2008-08-18 Thread Oleg Krupnov
I am developing a custom view, sort of a simple graphic editor, where the user can draw graphic boxes of different size. Each box should display its own attributed string bounded by its own size, and when the user double-clicks any box, he becomes able to edit the box's text in-place. I have read

Re: How to write a string to a file

2008-08-18 Thread Ken Thomases
On Aug 18, 2008, at 10:28 PM, David wrote: Why isn't this already in NSString? I would sooner suggest removing -writeToFile:... from NSString than adding -appendToFile:. At some point you get a many-to-many explosion of combinations (NString, NSData, NSArray, NSDictionary, NSValue, NSNum

Re: How to write a string to a file

2008-08-18 Thread Alex Kac
On Aug 18, 2008, at 10:59 PM, David <[EMAIL PROTECTED]> wrote: Thanks for the quick responses. Why isn't this already in NSString?I found an old reference saying to use [filehandle writeData:[nsstring dataUsingEncoding:...]] This seems obtuse. I have been using Cocoa for 6 months and it is not

Re: How to write a string to a file

2008-08-18 Thread Michael Ash
On Mon, Aug 18, 2008 at 11:28 PM, David <[EMAIL PROTECTED]> wrote: > Thanks for the quick responses. Why isn't this already in NSString?I found > an old reference saying to use [filehandle writeData:[nsstring > dataUsingEncoding:...]] > This seems obtuse. I have been using Cocoa for 6 months and it

Re: Using Flex/Lex in a Cocoa project

2008-08-18 Thread Michael Ash
On Mon, Aug 18, 2008 at 4:55 PM, Ricky Sharp <[EMAIL PROTECTED]> wrote: > > On Aug 18, 2008, at 3:40 PM, mm w wrote: > >> to avoid the splitting problem >> >> (c < 128) ? "%c" : "\\u%04x", c); > > I'm not sure what this solves. > > Per Michael's e-mail below, this is indeed a difficult problem. UT

Re: Removing Observers

2008-08-18 Thread Rob Keniger
On 19/08/2008, at 10:16 AM, Graham Cox wrote: The point is that observees should not know or care about their observers. Once you stop trying to let observees control their observers your problems will ease considerably. Instead, observers are entirely responsible for their own actions - o

Re: How to write a string to a file

2008-08-18 Thread David
Thanks for the quick responses. Why isn't this already in NSString?I found an old reference saying to use [filehandle writeData:[nsstring dataUsingEncoding:...]] This seems obtuse. I have been using Cocoa for 6 months and it is not seeming any more consistent nor powerful than when I started. I fi

Re: How to write a string to a file

2008-08-18 Thread Ken Thomases
On Aug 18, 2008, at 10:00 PM, David wrote: I know it sounds like a basic question, but I've looked and it doesn't seem as obvious to me as it should. I want to write out data to a file to describe my tree structure. I'd like to have a method which appends a string to the end of a text file.

Re: How to write a string to a file

2008-08-18 Thread Adam R. Maxwell
On Aug 18, 2008, at 8:00 PM, David wrote: I know it sounds like a basic question, but I've looked and it doesn't seem as obvious to me as it should. I want to write out data to a file to describe my tree structure. I'd like to have a method which appends a string to the end of a text file.

How to write a string to a file

2008-08-18 Thread David
I know it sounds like a basic question, but I've looked and it doesn't seem as obvious to me as it should. I want to write out data to a file to describe my tree structure. I'd like to have a method which appends a string to the end of a text file. I don't really want to store everything in memor

Re: Using Flex/Lex in a Cocoa project

2008-08-18 Thread Graham Cox
On 19 Aug 2008, at 11:53 am, John Joyce wrote: I wonder if it wouldn't make sense to just start trying to build some new form of flex in Objective-C... so that it uses NSString and NSMutable string ? I'm looking at the Flex source code now... in true GNU fashion, it is well documented, but

Re: Using Flex/Lex in a Cocoa project

2008-08-18 Thread John Joyce
On Aug 18, 2008, at 8:12 PM, Ricky Sharp wrote: On Aug 18, 2008, at 8:01 PM, John Joyce wrote: On Aug 18, 2008, at 7:01 PM, [EMAIL PROTECTED] wrote: to avoid the splitting problem (c < 128) ? "%c" : "\\u%04x", c); Not quite sure what this is doing. I see it's checking for ASCII range i

Re: Using Flex/Lex in a Cocoa project

2008-08-18 Thread Ricky Sharp
On Aug 18, 2008, at 8:01 PM, John Joyce wrote: On Aug 18, 2008, at 7:01 PM, [EMAIL PROTECTED] wrote: to avoid the splitting problem (c < 128) ? "%c" : "\\u%04x", c); Not quite sure what this is doing. I see it's checking for ASCII range if ( c < 128 ) The conditional is obvious, but what'

Re: Using Flex/Lex in a Cocoa project

2008-08-18 Thread John Joyce
On Aug 18, 2008, at 7:01 PM, [EMAIL PROTECTED] wrote: to avoid the splitting problem (c < 128) ? "%c" : "\\u%04x", c); Not quite sure what this is doing. I see it's checking for ASCII range if ( c < 128 ) The conditional is obvious, but what's the other doing exactly? returning a char if it

Re: Removing Observers

2008-08-18 Thread Graham Cox
On 19 Aug 2008, at 4:23 am, Ryan Brown wrote: What is the best way to remove a KVO observer if you aren't sure if the object already has an observer registered? The right answer is to avoid this unsureness (is that a word?). When I first started using KVO I too thought you could unregister

Re: Including frameworks in your app bundle

2008-08-18 Thread Jason Coco
On Aug 18, 2008, at 19:59 , Nick Pilch wrote: I've been searching, but I can't find the documentation explaining how to include frameworks in your app bundle (third-party frameworks, for example), so that your user does not have to install these frameworks. Could someone point me at the co

Re: Including frameworks in your app bundle

2008-08-18 Thread mm w
example FRAMEWORK = MyFoo PREFIX = @executable_path/../Frameworks gcc -Wl,-single_module \ $(OBJS) \ $(LDFLAGS) \ -compatibility_version 1.0.0 \ -current_version 1.0.0 \ -install_name $(PREFIX)/$(FRAMEWORK).framework/Versions/$(VERSION)/$(FRAMEWORK) \ -dynamiclib \ -o $(FRAMEWORK) export your -

Including frameworks in your app bundle

2008-08-18 Thread Nick Pilch
I've been searching, but I can't find the documentation explaining how to include frameworks in your app bundle (third-party frameworks, for example), so that your user does not have to install these frameworks. Could someone point me at the correct documentation/build settings? Thanks. _

Seeking Developer in San Carlos CA

2008-08-18 Thread Tracy Lakin
Hi, We're looking for an OS X software engineer. Luidia is in San Carlos California. We make interactive display systems. We are profitable, small and fun. Cool hardware, interesting software. Mostly Cocoa and Obj-C, with some Carbon and C++ mixed in. Check out our website, and the job descri

MultiTouch.framework Beta Program

2008-08-18 Thread Stefan Hafeneger
Hi everyone, Maybe some of you have already seen our video (http://www.youtube.com/watch?v=skZCBvWVu8A ) on YouTube. In this video we use an iPhone as mobile substitution for a multi-touch table, so you can develop and test multi-touch applications at any location. On the desktop side we use

Re: Using Flex/Lex in a Cocoa project

2008-08-18 Thread mm w
if you knew flex you could understand On Mon, Aug 18, 2008 at 1:55 PM, Ricky Sharp <[EMAIL PROTECTED]> wrote: > > On Aug 18, 2008, at 3:40 PM, mm w wrote: > >> to avoid the splitting problem >> >> (c < 128) ? "%c" : "\\u%04x", c); > > I'm not sure what this solves. > > Per Michael's e-mail below,

Re: Using Flex/Lex in a Cocoa project

2008-08-18 Thread Ricky Sharp
On Aug 18, 2008, at 3:40 PM, mm w wrote: to avoid the splitting problem (c < 128) ? "%c" : "\\u%04x", c); I'm not sure what this solves. Per Michael's e-mail below, this is indeed a difficult problem. UTF-8 is just a particular scheme to store Unicode strings. Operating on individual

Re: Using Flex/Lex in a Cocoa project

2008-08-18 Thread mm w
to avoid the splitting problem (c < 128) ? "%c" : "\\u%04x", c); On Sat, Aug 16, 2008 at 7:43 AM, Michael Ash <[EMAIL PROTECTED]> wrote: > On Fri, Aug 15, 2008 at 10:53 PM, John Joyce > <[EMAIL PROTECTED]> wrote: >> Right now, I'm toying with using Flex/Lex in a Cocoa project. >> Unfortunately

Re: Question about respondsToSelector

2008-08-18 Thread Andy Lee
Also: note that method names are case-sensitive, so @selector(doSomething) is not the same as @selector(doSomeThing). Also, if the method you are referring to takes an argument, make sure you aren't forgetting the colon at the end. The name of the method contains all its colons; @selector(

Re: Question about respondsToSelector

2008-08-18 Thread Andy Lee
On Aug 18, 2008, at 2:17 PM, Carmen Cerino Jr. wrote: Does the id type have enough information for the respondsToSelector method to work. It's not whether the id type has information. It's whether the object itself is able to respond to a message, and that depends on what class the object

Re: Question about respondsToSelector

2008-08-18 Thread j o a r
On Aug 18, 2008, at 11:17 AM, Carmen Cerino Jr. wrote: Does the id type have enough information for the respondsToSelector method to work. I have a class with an ivar of type id, and when I invoke the respondsToSelector method it fails when it should succeed. I am assuming it should work f

Re: Question about respondsToSelector

2008-08-18 Thread Chris Hanson
On Aug 18, 2008, at 11:17 AM, Carmen Cerino Jr. wrote: Does the id type have enough information for the respondsToSelector method to work. I have a class with an ivar of type id, and when I invoke the respondsToSelector method it fails when it should succeed. I am assuming it should work fi

Re: Problem with fileAttributesAtPath

2008-08-18 Thread Randall Meadows
On Aug 18, 2008, at 1:24 PM, Nicolas Goles wrote: Hi guys, I am trying to get fileAttributesAtPath using this code: (files contains the path to the directory that was enumerated ) while(object = [dirEnumerator nextObject]) { //First We craft the whole path for a sing

Re: Question about respondsToSelector

2008-08-18 Thread Ricky Sharp
On Aug 18, 2008, at 1:17 PM, Carmen Cerino Jr. wrote: Does the id type have enough information for the respondsToSelector method to work. I have a class with an ivar of type id, and when I invoke the respondsToSelector method it fails when it should succeed. I am assuming it should work fi

Question about respondsToSelector

2008-08-18 Thread Carmen Cerino Jr.
Does the id type have enough information for the respondsToSelector method to work. I have a class with an ivar of type id, and when I invoke the respondsToSelector method it fails when it should succeed. I am assuming it should work fine, because if I skip checking with the respondsToSelec

Re: Audio Queue Services example?

2008-08-18 Thread Robert Martin
You may get better responses from the coreaudio-api list On Aug 18, 2008, at 1:06 PM, John Zorko wrote: I need to play an MP3 stream from a server in ObjC, so i'm looking at the Audio Queue services API. I see examples of streaming from a file, but I don't know how to feed the queue when

Re: CATiledLayer documentation

2008-08-18 Thread Bill Dudney
Hi Pierre, The sample code from the book is concerned with the bounding box and the zoom level. As David discussed in his response (he was instrumental in me getting my head wrapped around the tiled layer, thx David!). You can get the code even if you don't have the book (just go to the

Re: NSString Question

2008-08-18 Thread Jason Coco
On Aug 18, 2008, at 15:49 , Ken Thomases wrote: On Aug 18, 2008, at 12:28 PM, Jason Coco wrote: [[thePropertiesInfoPtr->mNameString alloc] initWithCharacters:myStringBufferPtr length:myStringSize]; Um, that's nonsensical. I think you meant: thePropertiesInfoPtr->mNameString = [[NSString

Re: Problem with fileAttributesAtPath

2008-08-18 Thread Ken Thomases
On Aug 18, 2008, at 2:24 PM, Nicolas Goles wrote: //Try to obtain fileAttributes NSDictionary *fileAttributes = [manager fileAttributesAtPath:fullPath traverseLink:NO]; The thing is that my fileAttributes it's always = nil so I always get "it's nill" on the console.

Re: NSString Question

2008-08-18 Thread Ken Thomases
On Aug 18, 2008, at 12:28 PM, Jason Coco wrote: [[thePropertiesInfoPtr->mNameString alloc] initWithCharacters:myStringBufferPtr length:myStringSize]; Um, that's nonsensical. I think you meant: thePropertiesInfoPtr->mNameString = [[NSString alloc] initWithCharacters:myStringBufferPtr lengt

Re: Problem with fileAttributesAtPath

2008-08-18 Thread Charles Steinman
--- On Mon, 8/18/08, Nicolas Goles <[EMAIL PROTECTED]> wrote: > NSDictionary *fileAttributes = [manager > fileAttributesAtPath:fullPath traverseLink:NO]; > > if( fileAttributes != nil) > { > > NSString *filetype = [fileAttributes > objectForKey

Re: Problem with fileAttributesAtPath

2008-08-18 Thread Jason Coco
If you're using 10.5 you can try the method: -(NSDictionary *)attributesOfItemAtPath:(NSString *)path error: (NSError **)error This way you will get a description of what is failing from the NSError object. You can use it like this: NSError *theError; NSDictionary *fileAttributes = [manage

Problem with fileAttributesAtPath

2008-08-18 Thread Nicolas Goles
Hi guys, I am trying to get fileAttributesAtPath using this code: (files contains the path to the directory that was enumerated ) while(object = [dirEnumerator nextObject]) { //First We craft the whole path for a single object NSString *fullPath = [files s

Re: ScriptingBrige InDesign

2008-08-18 Thread has
Herr Verdieck G?tz wrote: I try to use the scriptingBridge feature with InDesign CS3. My guiding line is the ReadMe.txt file in the SBSendEmail project example. The Adobe InDesign CS3.h file will be generated, but when I import this file I get about 800 errors like: error: duplicate declaration

Re: CATiledLayer documentation

2008-08-18 Thread David Duncan
On Aug 18, 2008, at 10:54 AM, Houdah - ML Pierre Bernard wrote: Unfortunately, the sample code left me confused. Seems to me that your drawing method always does the same thing. I find no notion of tiling. Obviously there is: when I set a breakpoint on the drawing method I can clearly see t

Re: NSString Question

2008-08-18 Thread Shawn Erickson
On Mon, Aug 18, 2008 at 7:54 AM, Dave <[EMAIL PROTECTED]> wrote: > myOSStatus = [self ReadUInt32LEFromPosition: myCurrentFilePosition + 28 > IntPtr:&myBufferSize]; > myOSStatus = [self ReadFromPosition: myCurrentFilePosition + 40 ForSize: > myBufferSize BufferPtr:myStringBufferPtr]; Best to avoi

Removing Observers

2008-08-18 Thread Ryan Brown
What is the best way to remove a KVO observer if you aren't sure if the object already has an observer registered? Currently I'm catching the exception raised for an unregistered observer using something like: @try { [object removeObserver:observerObject forKeyPath:keyPath]; } @catch(NSExcept

Re: Right place to unobserve notifications in a document

2008-08-18 Thread Andy Lee
On Aug 18, 2008, at 12:49 PM, Negm-Awad Amin wrote: Am Mo,18.08.2008 um 18:18 schrieb Andy Lee: -- but in this case I think -dealloc is not only okay, but sometimes the only correct place to unregister a notification. Suppose an invariant of your design is that an object should receive not

Re: Clearing a Memory Buffer?

2008-08-18 Thread j o a r
On Aug 18, 2008, at 6:19 AM, Dave wrote: I'm fairly new to Cocoa and was wondering if there are OS functions to Copy and Clear/Fill Memory available? In addition to the lower level C API:s that have been mentioned so far, there is also the object oriented Cocoa NSData + NSMutableData AP

Re: CATiledLayer documentation

2008-08-18 Thread Houdah - ML Pierre Bernard
Hi Bill! I had indeed found your sample code. Which actually happens to be the only sample code I could find. Unfortunately, the sample code left me confused. Seems to me that your drawing method always does the same thing. I find no notion of tiling. Obviously there is: when I set a brea

Re: Clearing a Memory Buffer?

2008-08-18 Thread Gregory Weston
Dave wrote: I'm fairly new to Cocoa and was wondering if there are OS functions to Copy and Clear/Fill Memory available? I've tried searching for obvious names like MemoryZero, ZeroMemory, CopyMemory etc. but can't seem to find anything. If you want to fill an existing buffer with a specific

Re: document based app, custom ibaction

2008-08-18 Thread Bart Beulen
I've connected a simple button to the First Responder. I was able to select the action that I've created in my MyDocument class. When I run the program and press the button nothing happens. The function was only containing an NSLog statement to check if it worked. Am I missing anything?

Re: NSString Question

2008-08-18 Thread Jason Coco
On Aug 18, 2008, at 10:54 , Dave wrote: Hi, I'm tring to create an NSString object from data contained within a file. The following code attempts to do this. The data is read from the file OK and all the size information etc. is OK. Here is a code snippet: myOSStatus = [self ReadUInt32L

Re: NSString Question

2008-08-18 Thread Andy Lee
On Aug 18, 2008, at 10:54 AM, Dave wrote: thePropertiesInfoPtr pointer to a C Structure that contains the following member: NSString* mNameString; As a general note, by mixing structs and objects you're opening the door to nasty memory management bugs. I'd recommend going with obj

Re: NSString Question

2008-08-18 Thread Andy Lee
You haven't mentioned whether you're deliberately avoiding NSFileHandle for some reason. Are you aware of it? It has methods to seek and read. You can get the bytes from the resulting NSData object. On Aug 18, 2008, at 10:54 AM, Dave wrote: [thePropertiesInfoPtr->mNameString initWithCharac

Re: Right place to unobserve notifications in a document

2008-08-18 Thread Negm-Awad Amin
Am Mo,18.08.2008 um 18:57 schrieb Michael Ash: On Mon, Aug 18, 2008 at 11:51 AM, Negm-Awad Amin <[EMAIL PROTECTED] > wrote: But anyway I do not think, that doing something else then memory management in -dealloc is good design. Normally I unregister observation in delegate methods like -ap

Re: CATiledLayer documentation

2008-08-18 Thread Bill Dudney
Hi, I have an example on my blog of using the CATiledLayer with a big pdf file and the CA book (I am the author) has an example of using image tiles. http://www.pragprog.com/titles/bdcora http://bill.dudney.net/roller/objc Good luck, -bd- On Aug 18, 2008, at 10:37 AM, Houdah - ML Pierre

Re: Hex representation of NSString

2008-08-18 Thread Charles Srstka
On Aug 18, 2008, at 6:18 AM, Robert Černý wrote: Actually,I'm trying to debug some weird problems with clipboard. My problem is that data copied into clipboard from legacy java application doesn't match data pasted into Cocoa application. I've got data with accented characters which gets con

Re: document based app, custom ibaction

2008-08-18 Thread Sherm Pendley
On Mon, Aug 18, 2008 at 9:52 AM, Bart Beulen <[EMAIL PROTECTED]> wrote: > > However I would like to add a button in my document which is connected to > some code, to process the data in the array (etc count up data in columns). > I was trying to do this by adding an IBAction function to the MyDocum

Re: Clearing a Memory Buffer?

2008-08-18 Thread Jason Coco
On Aug 18, 2008, at 09:19 , Dave wrote: Hi All, I'm fairly new to Cocoa and was wondering if there are OS functions to Copy and Clear/Fill Memory available? I've tried searching for obvious names like MemoryZero, ZeroMemory, CopyMemory etc. but can't seem to find anything. bzero(3), bc

Re: Clearing a Memory Buffer?

2008-08-18 Thread Andy Lee
Since Objective-C is a superset of C, you can use standard C libraries. My knowledge of those libraries is weak, but "apropos zero memory" in the Terminal turned up a bunch of stuff including bzero, memset, and calloc. I see in Foundation there is an NSZoneCalloc() function and a bunch of

Re: Clearing a Memory Buffer?

2008-08-18 Thread Sherm Pendley
On Mon, Aug 18, 2008 at 9:19 AM, Dave <[EMAIL PROTECTED]> wrote: > Hi All, > > I'm fairly new to Cocoa and was wondering if there are OS functions to Copy > and Clear/Fill Memory available? > > I've tried searching for obvious names like MemoryZero, ZeroMemory, > CopyMemory etc. but can't seem to f

Audio Queue Services example?

2008-08-18 Thread John Zorko
Hello, all ... I need to play an MP3 stream from a server in ObjC, so i'm looking at the Audio Queue services API. I see examples of streaming from a file, but I don't know how to feed the queue when i'm streaming from a TCP port. Can someone point me to an example / tell me what API to

Re: Clearing a Memory Buffer?

2008-08-18 Thread Jean-Daniel Dupas
Le 18 août 08 à 15:19, Dave a écrit : Hi All, I'm fairly new to Cocoa and was wondering if there are OS functions to Copy and Clear/Fill Memory available? I've tried searching for obvious names like MemoryZero, ZeroMemory, CopyMemory etc. but can't seem to find anything. Thanks a lot A

Re: Right place to unobserve notifications in a document

2008-08-18 Thread Michael Ash
On Mon, Aug 18, 2008 at 11:51 AM, Negm-Awad Amin <[EMAIL PROTECTED]> wrote: > But anyway I do not think, that doing something else then memory management > in -dealloc is good design. Normally I unregister observation in delegate > methods like -applicationWillTerminate:. I think you may be a litt

Re: Right place to unobserve notifications in a document

2008-08-18 Thread Negm-Awad Amin
Am Mo,18.08.2008 um 18:18 schrieb Andy Lee: On Aug 18, 2008, at 11:51 AM, Negm-Awad Amin wrote: But anyway I do not think, that doing something else then memory management in -dealloc is good design. Normally I unregister observation in delegate methods like -applicationWillTerminate:. I

Address Book: updating a person's phone number info...

2008-08-18 Thread Lee, Frederick
Environment: Xcode 3.1 OS: Leopard (10.5.4+) Generic Environment: MacBook Pro & Greetings: I'm partially clear about access/updating the Address Book using the C interfaces. However, I'm slamming into the wall with confusion on updating a multi-value item like a phone number.

NSString Question

2008-08-18 Thread Dave
Hi, I'm tring to create an NSString object from data contained within a file. The following code attempts to do this. The data is read from the file OK and all the size information etc. is OK. Here is a code snippet: myOSStatus = [self ReadUInt32LEFromPosition: myCurrentFilePosition + 28

document based app, custom ibaction

2008-08-18 Thread Bart Beulen
Hi, I'm quite new to cocoa developing, but things start to work out finally. At the moment I'm working at a document based app (first time). It is based on an arraycontroller in combination with a tableview I am able to use buttons to add and delete entries. However I would like to ad

Clearing a Memory Buffer?

2008-08-18 Thread Dave
Hi All, I'm fairly new to Cocoa and was wondering if there are OS functions to Copy and Clear/Fill Memory available? I've tried searching for obvious names like MemoryZero, ZeroMemory, CopyMemory etc. but can't seem to find anything. Thanks a lot All the Best Dave __

Re: Hex representation of NSString

2008-08-18 Thread Chris Blättermann
Hi there! Just subscribed to this list. @Robert: Do you mean by hex representation this: hello -> 0x68 0x61 0x6C 0x6C 0x6F ? Then I suggest you use the C language to do it, just "convert" a string to an array of characters by [yourstring UTF8String] And loop through the result and printf

Re: Hex representation of NSString

2008-08-18 Thread Chris Blättermann
Hi there! Just subscribed to this list. @Robert: Do you mean by hex representation this: hello -> 0x68 0x61 0x6C 0x6C 0x6F ? Then i suggest you use the C language to do it, just "convert" a string to an array of characters by [yourstring UTF8String] And loop through the result and print

ScriptingBrige InDesign

2008-08-18 Thread Herr Verdieck Götz
Hi, I try to use the scriptingBridge feature with InDesign CS3. My guiding line is the ReadMe.txt file in the SBSendEmail project example. The Adobe InDesign CS3.h file will be generated, but when I import this file I get about 800 errors like: error: duplicate declaration of method '- che

Re: Changing NSTextFieldCells' editing appearance?

2008-08-18 Thread Tim Andersson
18 aug 2008 kl. 18.30 skrev Brandon Walkin: The black color you're seeing when editing is the -backgroundColor of the table view. Just override that method and return a more appropriate color. Oh, I see. Now all I have to do is get rid of the white border that appears around the cell..

Re: Changing NSTextFieldCells' editing appearance?

2008-08-18 Thread Tim Andersson
18 aug 2008 kl. 17.20 skrev Negm-Awad Amin: Yes, it did. Probably the table view will set some attributes from its own state instead of respecting your cell. For example a table view has a background and the cell has. I never had that problem, but to solve this, you maybe should overwrit

CATiledLayer documentation

2008-08-18 Thread Houdah - ML Pierre Bernard
Hi! I would like to create a map view using several tile images: the map is made of tiles; tiles are available for various zoom levels. Seems like CATiledLayer seems the right thing to use. Problem is that I can't seem to find any documentation beyond a rehash of the header file. Is the

Re: Changing NSTextFieldCells' editing appearance?

2008-08-18 Thread Brandon Walkin
The black color you're seeing when editing is the -backgroundColor of the table view. Just override that method and return a more appropriate color. On 18-Aug-08, at 11:00 AM, Tim Andersson wrote: I'm using the NSTextFieldCell in a NSTableView. When using a NSTextField without a border and

Re: arch: posix_spawnp: /Developer/Tools/otest: Bad CPU type in executable

2008-08-18 Thread Nick Pilch
Upgrading to Xcode 3.1 solved the problem. On Aug 15, 2008, at 1:01 PM, Nick Pilch wrote: Hi. I'm trying to put the infrastructure into my project for running unit tests and I'm stuck. The tests don't seem to execute. I've set things up as described here for independent tests: http://develop

Re: Right place to unobserve notifications in a document

2008-08-18 Thread Andy Lee
On Aug 18, 2008, at 11:51 AM, Negm-Awad Amin wrote: But anyway I do not think, that doing something else then memory management in -dealloc is good design. Normally I unregister observation in delegate methods like -applicationWillTerminate:. I understand your concern -- you meant "functiona

Re: Hex representation of NSString

2008-08-18 Thread Jason Coco
On Aug 18, 2008, at 11:38 , Clark Cox wrote: On Mon, Aug 18, 2008 at 7:38 AM, Jason Coco <[EMAIL PROTECTED]> wrote: On Aug 18, 2008, at 10:18 , Clark Cox wrote: On Mon, Aug 18, 2008 at 5:38 AM, Jason Coco <[EMAIL PROTECTED]> wrote: On Aug 18, 2008, at 07:18 , Robert Černý wrote: Actual

Re: Right place to unobserve notifications in a document

2008-08-18 Thread Negm-Awad Amin
Am Mo,18.08.2008 um 17:37 schrieb Michael Ash: On Mon, Aug 18, 2008 at 5:59 AM, Negm-Awad Amin <[EMAIL PROTECTED] > wrote: Hi, for some teaching reasons I have a document class, which observes a notification. Of course I have to unobserve this notification, when the document is closed. Doin

Re: Hiding NSTableColumn causes other columns to shrink

2008-08-18 Thread Corbin Dunn
On Aug 16, 2008, at 6:59 PM, Markus Spoettl wrote: Hi List, it appears it's time for a stupid question again. I'm experiencing some odd behavior of NSOutlineView (probably NSTableView as well) when hiding and showing table columns dynamically. I have an outline with a number of columns,

Re: Table column header not highlighted at first

2008-08-18 Thread Corbin Dunn
On Aug 16, 2008, at 6:26 AM, Graham Cox wrote: On 16 Aug 2008, at 1:36 am, Graham Cox wrote: I need to figure out why the second table works even though I'm not doing anything special (and none of the autosave stuff you mentioned either). OK, very simple: it was set in the nib. I didn'

Re: Hex representation of NSString

2008-08-18 Thread Clark Cox
On Mon, Aug 18, 2008 at 7:38 AM, Jason Coco <[EMAIL PROTECTED]> wrote: > > On Aug 18, 2008, at 10:18 , Clark Cox wrote: > >> On Mon, Aug 18, 2008 at 5:38 AM, Jason Coco <[EMAIL PROTECTED]> wrote: >>> >>> On Aug 18, 2008, at 07:18 , Robert Černý wrote: >>> Actually,I'm trying to debug some weir

Re: Right place to unobserve notifications in a document

2008-08-18 Thread Michael Ash
On Mon, Aug 18, 2008 at 5:59 AM, Negm-Awad Amin <[EMAIL PROTECTED]> wrote: > Hi, > > for some teaching reasons I have a document class, which observes a > notification. Of course I have to unobserve this notification, when the > document is closed. Doing this in -dealloc is no good design (fuunctio

Re: What is Core Foundation, and other terminology/history questions.

2008-08-18 Thread Erik Buck
Disclaimer: I am a Cocoa programmer with very little real life Carbon experience, so I apologize in advance if I have inadvertently slighted Carbon. According to folks inside Apple, the NeXT frameworks going back all the way to NeXTstep 0.8 in 1988 had an underlying mostly private C impleme

Re: NSCalendarDate to be deprecated

2008-08-18 Thread David Riggle
I wish NSCalendarDate could be fixed instead of discarded. I find it a convenient class, and it is heavily used in the standard sync schemas. If it must go, I hope somebody comes up with an open source replacement for it. :) Dave ___ Cocoa-dev ma

Re: Changing NSTextFieldCells' editing appearance?

2008-08-18 Thread Negm-Awad Amin
Am Mo,18.08.2008 um 17:00 schrieb Tim Andersson: 18 aug 2008 kl. 10.15 skrev Negm-Awad Amin: No, I speak english badly enough to misunderstand this. :-) I'm sorry if I made it sound like a "insult" - That wasn't my intention. No, my fault. The behaviour of an NSTextField depends on

Re: Changing NSTextFieldCells' editing appearance?

2008-08-18 Thread Tim Andersson
18 aug 2008 kl. 10.15 skrev Negm-Awad Amin: No, I speak english badly enough to misunderstand this. :-) I'm sorry if I made it sound like a "insult" - That wasn't my intention. The behaviour of an NSTextField depends on the behaviour of an NSTextFieldCell. Most of the behaviour of an NSTe

Re: Hex representation of NSString

2008-08-18 Thread Jason Coco
On Aug 18, 2008, at 10:18 , Clark Cox wrote: On Mon, Aug 18, 2008 at 5:38 AM, Jason Coco <[EMAIL PROTECTED]> wrote: On Aug 18, 2008, at 07:18 , Robert Černý wrote: Actually,I'm trying to debug some weird problems with clipboard. My problem is that data copied into clipboard from legacy jav

Re: Hex representation of NSString

2008-08-18 Thread Clark Cox
On Mon, Aug 18, 2008 at 5:38 AM, Jason Coco <[EMAIL PROTECTED]> wrote: > > On Aug 18, 2008, at 07:18 , Robert Černý wrote: > >> Actually,I'm trying to debug some weird problems with clipboard. My >> problem >> is that data copied into clipboard from legacy java application doesn't >> match data pas

Re: NSCalendarDate to be deprecated

2008-08-18 Thread Eliza Block
You could do this: int dayOfYearForDate(NSDate *_date) { NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIndentifier:NSGregorianCalendar]]; int day = [calendar ordinalityOfUnit:NSDayCalendarUnit inUnit:NSYearCalendarUnit forDate:_date]; return day; } I've never benchm

Re: Hex representation of NSString

2008-08-18 Thread Jason Coco
On Aug 18, 2008, at 07:18 , Robert Černý wrote: Actually,I'm trying to debug some weird problems with clipboard. My problem is that data copied into clipboard from legacy java application doesn't match data pasted into Cocoa application. I've got data with accented characters which gets con

NSCalendarDate to be deprecated

2008-08-18 Thread Tom Bernard
My application needs to obtain the day of year for a given date. In the past, this was easily done with an NSCalendarDate. // NSCalendarDate faces deprecation int dayOfYearForDate1(NSDate *_date) { NSTimeZone *gmtTimeZone = [NSTimeZone timeZoneForSecondsFromGMT:0]; NSCalendarDate *calendar

Re: Hex representation of NSString

2008-08-18 Thread Negm-Awad Amin
Am Mo,18.08.2008 um 13:18 schrieb Robert Černý: Actually, I'm trying to debug some weird problems with clipboard. My problem is that data copied into clipboard from legacy java application doesn't match data pasted into Cocoa application. I've got data with accented characters which gets

  1   2   >