NSOutlineView

2008-08-18 Thread mahaboob
Hi all I'm new to cocoa. I want to display the outline view item by a disclosure triangle, then one checkbox, then text field to display the name of the nodes. I didn't find any documentation regarding this. How can I do this ? Thanks in advance. ___

Re: Binding NSButton state to an NSMutableArray inside an NSMutableArray

2008-08-18 Thread Negm-Awad Amin
Hi you did a part of the work. Using a second array controller is correct, because you have a second array. What you need is a UI, that depends on the number and content of the items contained in the second array. There are two views, that provide this: NSTableView and – I think this is

Re: CF Network memory leak? Or false positive in Leaks?

2008-08-18 Thread Jason Coco
On Aug 17, 2008, at 22:40 , Lawrence Johnston wrote: Hey everybody, I've got a situation I'm kind of puzzling over. If I run my program though leaks, I'm getting a leak at a certain point, but where it's coming from is really confusing me. I've pulled the urlRequest entirely out into a

Re: NSOutlineView

2008-08-18 Thread Negm-Awad Amin
Hi, do you want to display all three items (triangle, icon, text) in one column? Than you need an ImageAndTextCell. Browse your examples folder to get it. Amin Am Mo,18.08.2008 um 08:38 schrieb [EMAIL PROTECTED]: Hi all I'm new to cocoa. I want to display the outline view item by a

Re: Changing NSTextFieldCells' editing appearance?

2008-08-18 Thread Negm-Awad Amin
Am Fr,15.08.2008 um 19:41 schrieb [EMAIL PROTECTED]: -setBackgroundColor: didn't work? Nope, it didn't. But even if it would've, the background would have been visible at all times. I'm sorry if I didn't write clearly enough, No, I speak english badly enough to misunderstand this. :-)

Re: NSUInteger hash

2008-08-18 Thread Negm-Awad Amin
Hi Steve, Am So,17.08.2008 um 18:43 schrieb Steve Wart: Hi Aaron, That's always a good question to ask. I'm porting a Smalltalk/OpenGL maze application I wrote a few years ago to Cocoa. The maze is initialized by creating a 2D matrix of Room objects which are separated by Wall objects.

Right place to unobserve notifications in a document

2008-08-18 Thread Negm-Awad Amin
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 (fuunctional overhead in -dealloc, garbage collection …). But I read in the

Hex representation of NSString

2008-08-18 Thread Robert Černý
Hi,I'm trying to find a way how to get hex representation of NSString. I know I can convert NSString to NSData but I would like to rather not to do it. Or am I missing anything obvious? Thanks Robert ___ Cocoa-dev mailing list

Re: Hex representation of NSString

2008-08-18 Thread Negm-Awad Amin
Am Mo,18.08.2008 um 12:21 schrieb Robert Černý: Hi,I'm trying to find a way how to get hex representation of NSString. I know I can convert NSString to NSData but I would like to rather not to do it. Or am I missing anything obvious? Maybe: Do it this way. Why don't you like it?

Re: Hex representation of NSString

2008-08-18 Thread Robert Černý
I don't like it because the string will be converted. I'm interested in exact values and even allowLossyConversion:NO doesn't guarantee it. Or am I wrong? Robert 2008/8/18 Negm-Awad Amin [EMAIL PROTECTED] Am Mo,18.08.2008 um 12:21 schrieb Robert Černý: Hi,I'm trying to find a way how to get

Re: Problem redirecting NSLog() output to stderr

2008-08-18 Thread [EMAIL PROTECTED]
Thanks for the suggestions Mike. I had an intuition that my core Unix knowledge was wanting here. It turns out that a call to ftruncate(STDERR_FILENO, 0) does indeed do the job. Jonathan You can't detect that the stderr stream is no longer valid in these cases because, in fact, it *is*

Re: Hex representation of NSString

2008-08-18 Thread Negm-Awad Amin
Am Mo,18.08.2008 um 12:40 schrieb Robert Černý: I don't like it because the string will be converted. I'm interested in exact values Oh, may I ask why? The string class encapsulates its representation. Anyway, if you want to look inside the instance, you probably have to subclass it or

Re: Hex representation of NSString

2008-08-18 Thread 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 converted through MacOS Roman encoding even the visual

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

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

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

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

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 pasted into

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 java

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

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: 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

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 weird problems with

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

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: 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. Doing

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:

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

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:

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

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..

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 '-

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 printf

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

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

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 +

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 NDA devices 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

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

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 little

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

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 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 find

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 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),

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 MyDocument.h

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

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: 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

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

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

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

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: 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: 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

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 avoid

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

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

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 =

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

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

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 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: 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: 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

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

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

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

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

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

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

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;

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, I don't see

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
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, this is indeed a

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

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

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.

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

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

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

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 is

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's the

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 if (

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,

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

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

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

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

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 -

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. UTF-8 is just a

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 is

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 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,

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

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

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

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

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

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

  1   2   >