Re: Cocoa Document-Based App v. Windows MDI App

2009-07-26 Thread Jeff Biggus
On Jul 27, 2009, at 1:24 AM, Andrew Farmer wrote: Check out PSMTabBar. Turns a standard NSTabView into a "Safari- style" tab view, with tabs on any side you want - including all the tricky functionality like draggable tabs. Wow, that's great. In reference to what to say to the Windows prog

Re: Views in CDBA's

2009-07-26 Thread Kyle Sluder
On Jul 26, 2009, at 10:44 PM, David Blanton wrote: I dragged a Scroll View from the LIbrary Objects Tab to the Window defined in MyDocument.xib. All of my content to be displayed here will be bit maps. Well that's a bit of a tautology considering it's all going to be rendered into the

Re: Cocoa Document-Based App v. Windows MDI App

2009-07-26 Thread Andy Lee
On Jul 27, 2009, at 2:22 AM, Andy Lee wrote: I guess I'd ask the question we often ask about coding questions: What are you really trying to do? It sounds like the problem is that Windows users accustomed to MDI get visually confused by multiple windows from different apps overlapping each

Re: Cocoa Document-Based App v. Windows MDI App

2009-07-26 Thread Andy Lee
On Jul 27, 2009, at 12:50 AM, David Blanton wrote: I think I'll use: The Mac frameworks just don't support that approach. Sorry. I could re-implement MDI on the Mac, but it would be about a man-year's work. Do you want me to do that?" Personally, I wouldn't tempt fate. What if they say

Re: How to display the information in the columns of the table view?

2009-07-26 Thread Bright
Hi Graham and Others, I am sorry for my doing. I am a new learning for cocoa. And the time using the Cocoa-dev mailist for short time. So I am not familiar with the rules of the mailist very much. At the same time, English is not my mother language. So sometimes I do not know how to express

Re: Views in CDBA's

2009-07-26 Thread Graham Cox
On 27/07/2009, at 3:44 PM, David Blanton wrote: So .. do I 1. make a view, store in this nib. 2. Render my bit map to this view. 3. Set the document view of the scroll view to this view. Yes, that should work. But there is an easier way. If you drag in a "custom view", set its class t

Re: Cocoa Document-Based App v. Windows MDI App

2009-07-26 Thread Andrew Farmer
On 26 Jul 2009, at 22:57, Jeff Biggus wrote: If you want it to look like Safari tabs across the top you'll just have to do a little work to make that top "bar" view behave how you want. Side tabs are much easier to get up and running, and are often a better solution GUI-wise, depending on yo

Re: Cocoa Document-Based App v. Windows MDI App

2009-07-26 Thread Andy Lee
On Jul 26, 2009, at 11:46 PM, David Blanton wrote: I am the only Mac programmer where I work; the rest being windows. I am constantly challenged to make Mac programs look like windows to some extent. I guess I'd ask the question we often ask about coding questions: What are you really tr

Re: Document-Based Application

2009-07-26 Thread Jeffrey Oleander
> On Mon, 2009/07/27, Graham Cox wrote: > From: Graham Cox > Subject: Re: Document-Based Application > To: "David Blanton" > Cc: "cocoa-dev" > Date: Monday, 2009 July 27, 00:10 >> On 2009/07/27, at 2:09 PM, Quincey Morris wrote: >>> On 2009 Jul 26, at 20:39, David Blanton wrote: >>> I have 22

Re: Cocoa Document-Based App v. Windows MDI App

2009-07-26 Thread Jeff Biggus
On Jul 26, 2009, at 10:46 PM, David Blanton wrote: I am the only Mac programmer where I work; the rest being windows. I am constantly challenged to make Mac programs look like windows to some extent. Windows has an architecture called Multiple Document Interface. Each doc opened is dis

Views in CDBA's

2009-07-26 Thread David Blanton
CDBA - Cocoa Document-Based Application. I dragged a Scroll View from the LIbrary Objects Tab to the Window defined in MyDocument.xib. All of my content to be displayed here will be bit maps. So .. do I 1. make a view, store in this nib. 2. Render my bit map to this view. 3. Set the docu

Re: How to display the information in the columns of the table view?

2009-07-26 Thread Graham Cox
On 25/07/2009, at 11:56 PM, Bright wrote: Hi all, In my application, I want to drag the file into the table view. At the same time, display the basic information in the columns of the table view. Now, I got the basic information of the file and saved it in a NSDictionary object.

Re:How to display the file's basic information in the columns of the tableview

2009-07-26 Thread Bright
>Hi > In the "- (BOOL)tableView: acceptDrop: row: dropOperation:" method, I tried > to insert the information Dictionary into the Array use the code > "[tableRecordsArray insertObject:infoDictionary atIndex:row+i];". >But when I drop the file into the table view, the app exited immediately

Re: How to display the file's basic information in the columns of

2009-07-26 Thread Bright
>> But when I drop the file into the table view, the app exited immediately. > >Find the crash report and look at it; if you don't figure it out from that, >send another message here with the crash report. Hi Sorry, I can not figure out the crash report. Could you tell me how to find the

Re: Cocoa Document-Based App v. Windows MDI App

2009-07-26 Thread Graham Cox
On 27/07/2009, at 1:46 PM, David Blanton wrote: I am the only Mac programmer where I work; the rest being windows. I am constantly challenged to make Mac programs look like windows to some extent. Windows has an architecture called Multiple Document Interface. Each doc opened is displ

Re: Document-Based Application

2009-07-26 Thread Graham Cox
On 27/07/2009, at 2:09 PM, Quincey Morris wrote: On Jul 26, 2009, at 20:39, David Blanton wrote: I have 22 file types, each with its own C++ methods for extracting its data. Now, I could use just one subclass of NSDocument and in the - (BOOL)readFromData:(NSData *)data ofType:(NSString *)

Re: When is an NSTextField editor created?

2009-07-26 Thread Kyle Sluder
On Jul 26, 2009, at 9:05 PM, Jean-Nicolas Jolivet > wrote: Am I missing something or is it really that complex to change an NSTextField's caret color? Read this: http://developer.apple.com/documentation/Cocoa/Conceptual/TextEditing/Tasks/FieldEditor.html --Kyle Sluder

Re: When is an NSTextField editor created?

2009-07-26 Thread Adam R. Maxwell
On Jul 26, 2009, at 9:05 PM, Jean-Nicolas Jolivet wrote: I'm working on an NSTextField subclass and I'm trying to find out when an NSTextField's editor (i.e. its "currentEditor") is created so I can set its caret color using the following:[[self currentEditor] setInsertionPointColor:]; Pr

Re: Cocoa Document-Based App v. Windows MDI App

2009-07-26 Thread David Blanton
I think I'll use: The Mac frameworks just don't support that approach. Sorry. I could re- implement MDI on the Mac, but it would be about a man-year's work. Do you want me to do that?" Thanks for a few chuckles as well! On Jul 26, 2009, at 10:20 PM, Quincey Morris wrote: On Jul 26, 2009,

Re: CoreData many-to-many Relationship Question

2009-07-26 Thread Bryan Henry
Yes, as long as you object graphic consistency for you. You should look at the Core Data Programming Guide, which this excerpt is from: "Since Core Data takes care of the object graph consistency maintenance for you, you only need to change one end of a relationship and all other aspects ar

Re: Document-Based Application

2009-07-26 Thread David Blanton
I agree that for house keeping not having 22 subclasses would be easy. There is something about OOP and case statements to decide how to deal with data ... it just seems more OOPish if the 'system' (in this case Cocoa Document-Based App (can I say cdba)) picks for me based on a simple entry

Re: mouse entered/exited in nscollectionviewitem's view

2009-07-26 Thread Austin Grigg
I'm having a similar problem with my NSCollectionView and I was wondering what you did with copyWithZone to fix your problem. I'm trying to allow the user to option-click and have my sub-classed view in my NSCollectionView item show an NSTextView and then when they finish editing, hide the

When is an NSTextField editor created?

2009-07-26 Thread Jean-Nicolas Jolivet
I'm working on an NSTextField subclass and I'm trying to find out when an NSTextField's editor (i.e. its "currentEditor") is created so I can set its caret color using the following:[[self currentEditor] setInsertionPointColor:]; Problem is, each notification/event I try to override is either too

NSRuleEditor as a data structure editor

2009-07-26 Thread Paul Thomas
I may have bitten off more than I can chew, but I'm trying to use NSRuleEditor as a component to define and edit a Foundation data structure (general purpose tree of NSArray, NSDictionary, NSNumber etc.). This might be re-purposing the class a little and it certainly has little to do with p

Ordered Arrays for Core Data managed objects

2009-07-26 Thread knicker kicker
First of all, I am clear about the rationale behind apple not providing ordered arrays for core data objects. However, there *are* situations when you need one. The common solution (adding a order-by attribute to the objects you intend to store) was too intrusive for my case. After long hours of go

CoreData many-to-many Relationship Question

2009-07-26 Thread Jean-Nicolas Jolivet
I'm using a many-to-many relationship with CoreData and I was wondering if I have to set or unset the relationshop both ways? For example, let's say I have a many-to-many relationship between an Employee entity and a Manager entity...if I do the following: [anEmployee addManagersObject:aManager];

Re: Cocoa Document-Based App v. Windows MDI App

2009-07-26 Thread Quincey Morris
On Jul 26, 2009, at 20:46, David Blanton wrote: I am the only Mac programmer where I work; the rest being windows. I am constantly challenged to make Mac programs look like windows to some extent. Windows has an architecture called Multiple Document Interface. Each doc opened is displa

Re: Document-Based Application

2009-07-26 Thread Quincey Morris
On Jul 26, 2009, at 20:39, David Blanton wrote: I have 22 file types, each with its own C++ methods for extracting its data. Now, I could use just one subclass of NSDocument and in the - (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error:(NSError **)outError method do a

Cocoa Document-Based App v. Windows MDI App

2009-07-26 Thread David Blanton
I am the only Mac programmer where I work; the rest being windows. I am constantly challenged to make Mac programs look like windows to some extent. Windows has an architecture called Multiple Document Interface. Each doc opened is displayed in the same window 'frame' with a row of tab

Re: Document-Based Application

2009-07-26 Thread David Blanton
I am seeing that now with a sample app I am working with. I have 22 file types, each with its own C++ methods for extracting its data. Now, I could use just one subclass of NSDocument and in the - (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error: (NSError **)outError me

Re: Document-Based Application

2009-07-26 Thread David LeBer
On 26-Jul-09, at 10:50 PM, David Blanton wrote: Should Document-Based Applications only be used for apps whose main data type is text? If an apps main data type comes from a number of different file formats and is represented as a bitmap would a Document-Based Application be a choice?

Re: NSString -componentsSeparatedByString: line break

2009-07-26 Thread Rob Keniger
On 27/07/2009, at 12:23 PM, Adam R. Maxwell wrote: On Jul 26, 2009, at 7:11 PM, Greg Guerin wrote: Chase Meadors wrote: If the length of this mystery string is 1 and it's not a space, what is it??? Use -characterAtIndex:0 and print the returned unichar using the "%x" format. Another

Document-Based Application

2009-07-26 Thread David Blanton
Should Document-Based Applications only be used for apps whose main data type is text? If an apps main data type comes from a number of different file formats and is represented as a bitmap would a Document-Based Application be a choice? Just askin'. db _

Re: NSString -componentsSeparatedByString: line break

2009-07-26 Thread Adam R. Maxwell
On Jul 26, 2009, at 7:11 PM, Greg Guerin wrote: Chase Meadors wrote: If the length of this mystery string is 1 and it's not a space, what is it??? Use -characterAtIndex:0 and print the returned unichar using the "%x" format. Another sometimes-handy trick is to create a mutable copy and

Re: NSString -componentsSeparatedByString: line break

2009-07-26 Thread Greg Guerin
Chase Meadors wrote: If the length of this mystery string is 1 and it's not a space, what is it??? Use -characterAtIndex:0 and print the returned unichar using the "%x" format. -- GG ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Pl

NSCoder Chicago Reminder Monday Night

2009-07-26 Thread Bob Frank
Reminder: Tomorrow Monday July 27th is NSCoder Chicago at the 4th Floor Michigan Ave. Apple store 6:00 - 9:00 with drinking after. Hope to see you there. Future dates of interest: August 11th 7:00 - 8:00: CocoaHeads / CAWUG Apple Store 2nd floor August 31st 6:00 - 9:00: NSCoder

NSString -componentsSeparatedByString: line break

2009-07-26 Thread Chase Meadors
Say I have a string that looks like this Hello. How are you? This is the second line. Fourth line. I'm trying to get each line of the reciever by calling [string componentsSeparatedByString:@"\n"]; This works fine, but assuming the string is actually laid out like this: Hello. How

Re: Passing data between NSOperation and main thread

2009-07-26 Thread Greg Guerin
Meik Schuetz wrote: I am just starting to test my little application for leaks using Instruments. I have got a NSOperation which is doing some JSON communication stuff with my server. The NSOperation is sending an NSDictionary object back to the main thread (using a delegate and performSe

Re: mouse entered/exited in nscollectionviewitem's view

2009-07-26 Thread Mac First
On Jul 25, 2009, at 9:42 AM, Benjámin Salánki wrote: hm, a quick answer to my own question: inserting [self performSelector:@selector(updateTrackingAreas) withObject:nil afterDelay:0.01]; into scrollWheel: seems to fix my problem. I missed the rest of the thread, so may be out of school

Re: NSDictionary crash

2009-07-26 Thread Aaron Burghardt
On Jul 26, 2009, at 6:50 PM, slasktrattena...@gmail.com wrote: On Sun, Jul 26, 2009 at 8:04 PM, Aaron Burghardt wrote: Interesting and not surprising. What I was suggesting, though, is that the amount of time needed to read the data is probably small compared to the time spent parsing the

Re: I need a milder application badge (solution #2)

2009-07-26 Thread Jay Reynolds Freeman
Well, with great thanks to everybody, I think I now have a relatively clean implementation that does what I want. There was enough interest that I think I will present what I have done, but in order not to waste bandwidth here I have put on my website both the interface and implementation

Re: Rotating image

2009-07-26 Thread David Duncan
On Jul 26, 2009, at 1:00 AM, Agha Khan wrote: HI: I have an image which works fine. UIImage *img = [UIImage imageNamed:@"background.png"]; [img drawAtPoint:CGPointMake(0,0)]; [img release]; Now suppose I want to rotate that image at 90 degree. Is there an easy way to accomplish this task?

Re: Display csv in a tableView with bindings

2009-07-26 Thread Aaron Burghardt
On Jul 26, 2009, at 5:38 PM, I. Savant wrote: On Jul 26, 2009, at 3:52 PM, Aaron Burghardt wrote: Not necessarily. If the keys are NSStrings, then they are copied when added to the dictionary, but a copy of an immutable string is optimized to just retain it, so the data isn't duplicated (

Re: NSDictionary crash

2009-07-26 Thread slasktrattena...@gmail.com
On Sun, Jul 26, 2009 at 8:04 PM, Aaron Burghardt wrote: > Interesting and not surprising. What I was suggesting, though, is that the > amount of time needed to read the data is probably small compared to the > time spent parsing the data into a plist. Good point. So I ran a second test. Turns out

Re: Display csv in a tableView with bindings

2009-07-26 Thread Adam R. Maxwell
On Jul 26, 2009, at 3:04 PM, Kyle Sluder wrote: On Jul 26, 2009, at 2:52 PM, "Adam R. Maxwell" wrote: "CFString objects perform other “tricks” to conserve memory, such as incrementing the reference count when a CFString is copied." Not every NSString is necessarily a CFString. They're t

Re: Display csv in a tableView with bindings

2009-07-26 Thread I. Savant
On Jul 26, 2009, at 6:09 PM, Adam R. Maxwell wrote: Can you go into a bit more detail with regard to the setting up the bindings? do I bind the tableView column to an arrayController which handles the rows? what model key path? Personally, I recommend that you avoid bindings like the plague

Re: Display csv in a tableView with bindings

2009-07-26 Thread I. Savant
On Jul 26, 2009, at 5:53 PM, gumbo...@mac.com wrote: Thanks People, This is excellent advice and very helpful. The main purpose of the app was to load the CSV (exported from Numbers) and turn the data into an HTML table with some hard coded CSS hooks. This works well now, but the format re

Re: Display csv in a tableView with bindings

2009-07-26 Thread I. Savant
On Jul 26, 2009, at 6:05 PM, Adam R. Maxwell wrote: Good point. 8--10 displayed in the table (typically), but each item has an arbitrary number of values (typically < 20, though). Users can also display an arbitrary number of columns, so there are lots of fun performance problems to find

Re: Display csv in a tableView with bindings

2009-07-26 Thread Adam R. Maxwell
On Jul 26, 2009, at 2:53 PM, gumbo...@mac.com wrote: Can you go into a bit more detail with regard to the setting up the bindings? do I bind the tableView column to an arrayController which handles the rows? what model key path? Personally, I recommend that you avoid bindings like the plagu

Re: Display csv in a tableView with bindings

2009-07-26 Thread Adam R. Maxwell
On Jul 26, 2009, at 2:58 PM, I. Savant wrote: We have an application that keeps an array of bibliographic references, where each is an NSMutableDictionary with other properties. The largest file I recall throwing at it is ~20K items, and the main problem at that point was a beachball when

[moderator] Re: Using Snow Leopard for development (was: NSString Retain Count of 2147483647)

2009-07-26 Thread Scott Anguish
On 2009-07-26, at 2:45 PM, Bill Bumgarner wrote: On Jul 26, 2009, at 2:41 PM, I. Savant wrote: Hamish Allan wrote: > First, I partition my hard drive into three partitions: Come on, guys, this is obviously off-topic for COCOA-DEV. Not really. Being able to install multiple versions or

Re: Display csv in a tableView with bindings

2009-07-26 Thread Kyle Sluder
On Jul 26, 2009, at 2:52 PM, "Adam R. Maxwell" wrote: "CFString objects perform other “tricks” to conserve memory, such as incrementing the reference count when a CFString is copied." Not every NSString is necessarily a CFString. They're toll-free bridged, but that just means the CF implem

Re: Problems with japanese characters

2009-07-26 Thread Development
On Jul 26, 2009, at 2:45 PM, Greg Guerin wrote: Development wrote: I send the data with UTF8 encoding and this is what it sends: Êó•Êú¨ which makes no sense. this comes from NSLog(@"%s", [[location objectForKey:@"Country]UTF8String]); It does make sense if %s is ignorant of character encod

Re: Display csv in a tableView with bindings

2009-07-26 Thread I. Savant
On Jul 26, 2009, at 5:52 PM, Adam R. Maxwell wrote: "CFString objects perform other “tricks” to conserve memory, such as incrementing the reference count when a CFString is copied." http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFStrings/Articles/StringStorage.html#//appl

Re: Display csv in a tableView with bindings

2009-07-26 Thread gumboots
Thanks People, This is excellent advice and very helpful. The main purpose of the app was to load the CSV (exported from Numbers) and turn the data into an HTML table with some hard coded CSS hooks. This works well now, but the format required from the CSV is not very flexible. So I thought

Re: Display csv in a tableView with bindings

2009-07-26 Thread Adam R. Maxwell
On Jul 26, 2009, at 2:38 PM, I. Savant wrote: On Jul 26, 2009, at 3:52 PM, Aaron Burghardt wrote: Not necessarily. If the keys are NSStrings, then they are copied when added to the dictionary, but a copy of an immutable string is optimized to just retain it, so the data isn't duplicated (

Re: Using Snow Leopard for development (was: NSString Retain Count of 2147483647)

2009-07-26 Thread Greg Guerin
I. Savant wrote: Hamish Allan wrote: > First, I partition my hard drive into three partitions: Come on, guys, this is obviously off-topic for COCOA-DEV. It was my mistake, not Hamish Allan's. I sent my reply to the wrong list. It should have gone to xcode-users. I was reluctant to

Re: Using Snow Leopard for development (was: NSString Retain Count of 2147483647)

2009-07-26 Thread Bill Bumgarner
On Jul 26, 2009, at 2:41 PM, I. Savant wrote: Hamish Allan wrote: > First, I partition my hard drive into three partitions: Come on, guys, this is obviously off-topic for COCOA-DEV. Not really. Being able to install multiple versions or configurations of the OS is rather important for

Re: Problems with japanese characters

2009-07-26 Thread Greg Guerin
Development wrote: I send the data with UTF8 encoding and this is what it sends: Êó•Êú¨ which makes no sense. this comes from NSLog(@"%s", [[location objectForKey:@"Country]UTF8String]); It does make sense if %s is ignorant of character encodings, and NSLog isn't decoding it as utf8. For e

Re: Using Snow Leopard for development (was: NSString Retain Count of 2147483647)

2009-07-26 Thread I. Savant
Hamish Allan wrote: > First, I partition my hard drive into three partitions: Come on, guys, this is obviously off-topic for COCOA-DEV. -- I.S. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mode

Re: Display csv in a tableView with bindings

2009-07-26 Thread I. Savant
On Jul 26, 2009, at 3:52 PM, Aaron Burghardt wrote: Not necessarily. If the keys are NSStrings, then they are copied when added to the dictionary, but a copy of an immutable string is optimized to just retain it, so the data isn't duplicated (assuming all rows have the same columns in the

Re: Display csv in a tableView with bindings

2009-07-26 Thread I. Savant
On Sunday, July 26, 2009, Aaron Burghardt wrote: > Not necessarily.  If the keys are NSStrings, then they are copied when added > to the dictionary, but a copy of an immutable string is optimized to just > retain it, so the data isn't duplicated (assuming all rows have the same > columns in th

Problems with japanese characters

2009-07-26 Thread Development
Ok. I've googled it and it would seem that 日本 is how you represent japan in japanese. The app I need requires this data. I have to send it to a server and store it and am doing so in UTF8 I send the data with UTF8 encoding and this is what it sends: Êó•Êú¨ which makes no sense. this comes fro

Re: Using Snow Leopard for development (was: NSString Retain Count of 2147483647)

2009-07-26 Thread Greg Guerin
Hamish Allan wrote: > First, I partition my hard drive into three partitions: > Beta > Production > Data I'm just about to proceed with a multi-partition installation like this, but I'm wondering about how it will interact with Time Machine. Can I use the same TM volume for both Beta and Produc

Re: Display csv in a tableView with bindings

2009-07-26 Thread Aaron Burghardt
On Jul 26, 2009, at 10:53 AM, I. Savant wrote: On Jul 26, 2009, at 6:32 AM, Aaron Burghardt wrote: Neither, you want an array of dictionaries where each row of CSV is a dictionary in which the values keyed to column names and each row of CSV is one dictionary object in the array. This i

Re: NSScrollView Not Updating

2009-07-26 Thread Pierce Freeman
Thanks Dave, it works great now. On 7/26/09 9:34 AM, "Dave Keck" wrote: >> seems to come down.  Is there some way to stop this from happening, in other >> words, is there a way to "nail" an element in place. > > As Kyle suggested: > http://devworld.apple.com/documentation/Cocoa/Conceptual/Coco

Re: NSScrollView Not Updating

2009-07-26 Thread Dave Keck
> seems to come down.  Is there some way to stop this from happening, in other > words, is there a way to "nail" an element in place. As Kyle suggested: http://devworld.apple.com/documentation/Cocoa/Conceptual/CocoaViewsGuide/WorkingWithAViewHierarchy/WorkingWithAViewHierarchy.html "Repositioning

Re: NSScrollView Not Updating

2009-07-26 Thread Pierce Freeman
> If you can't answer this question, you need to cover some basic > fundamentals. "Did you override -drawRect:" is a very simple question > that you can answer by simply looking at what code you've written. I kind of figured that I didn't do it, as I didn't write any code that would have caused t

Re: NSDictionary crash

2009-07-26 Thread slasktrattena...@gmail.com
On Sun, Jul 26, 2009 at 3:58 AM, Aaron Burghardt wrote: > Why use Core Foundation?  How about (written in Mail): Thanks for your reply. I ran a test, and it seems CF is slightly faster: 2009-07-26 18:11:52.545 tst[31180:813] CF: Read 4611 tracks in 0.505728 seconds 2009-07-26 18:11:53.585 tst[311

Re: How do I extract the int value from an xml node/element?

2009-07-26 Thread Rick Schmidt
Thanks everybody I think I have it all figured out now. Rick On Sun, Jul 26, 2009 at 10:58 AM, Scott Andrew wrote: > Hit send too soon . For the mac there are ways to get integer values out of > the NSElement. I believe TouchXML has the same mechanism, it is a wrapper > around libXML2 that mimics

Re: Expanding NSScrollView

2009-07-26 Thread Andrew Shamel
Thanks so much for your help! I got this to work beautifully, the only problem is that I can't now get the scrollview (or its enclosing view, etc.) to shrink back when the text/rows get shorter, since the frame of the documentView does not seem to get smaller as the text recedes (I haven't

Re: Display csv in a tableView with bindings

2009-07-26 Thread I. Savant
On Jul 26, 2009, at 12:04 PM, Scott Andrew wrote: If x number of objects in your CSV file represent an object, then parse it by hand and put the data into an object that it represents. This assumes your CSV will always represent a certain data type. That's a pretty big assumption for a da

Re: Display csv in a tableView with bindings

2009-07-26 Thread Scott Andrew
If x number of objects in your CSV file represent an object, then parse it by hand and put the data into an object that it represents. For example: Scott Andrew, 40, Computer Programmer These might get parsed into a contact class that has properties name, age, profession. Then the binding

Re: How do I extract the int value from an xml node/element?

2009-07-26 Thread Scott Andrew
Hit send too soon . For the mac there are ways to get integer values out of the NSElement. I believe TouchXML has the same mechanism, it is a wrapper around libXML2 that mimics NSXML classes on the Mac. If using NSXMLParser you'll need to keep track of where you are at in the file and conve

Re: How do I extract the int value from an xml node/element?

2009-07-26 Thread Scott Andrew
If this is on a Mac read the documentation for NSXMLDocument. If this is the iPhone check out TouchXML (http://code.google.com/p/touchcode/wiki/TouchXML ). Both have a low level XML parser as well. Scott On Jul 25, 2009, at 11:05 PM, Rick Schmidt wrote: Hi I am trying to extract the value in

Re: Display csv in a tableView with bindings

2009-07-26 Thread I. Savant
On Jul 26, 2009, at 6:32 AM, Aaron Burghardt wrote: Neither, you want an array of dictionaries where each row of CSV is a dictionary in which the values keyed to column names and each row of CSV is one dictionary object in the array. This is a bit more complicated than that, actually.

Re: My app controller knows it orientation view but sub-views don't

2009-07-26 Thread Luke the Hiesterman
To everyone this time Are you defining this method in your views or your UIViewControllers? That method is defined in UIViewController and will only work with its subclasses. Luke On Jul 26, 2009, at 5:30 AM, Agha Khan wrote: HI My app controller knows it orientation view but sub-vie

My app controller knows it orientation view but sub-views don't

2009-07-26 Thread Agha Khan
HI My app controller knows it orientation view but sub-views don't and even in sub-views I will not hit the code at - (void)willAnimateSecondHalfOfRotationFromInterfaceOrientation: (UIInterfaceOrientation)fromInterfaceOrientation duration: (NSTimeInterval)duration But how I know about orie

Re: Rotating image

2009-07-26 Thread Jerry Krinock
On 2009 Jul 26, at 01:00, Agha Khan wrote: Now suppose I want to rotate that image at 90 degree. Is there an easy way to accomplish this task? Easy, yes. (Just copy Steve Christensen's code ... it works) http://www.cocoabuilder.com/archive/message/cocoa/2009/3/1/231362 Here's the header

Re: NSButton setImage in runtime : where is template image?

2009-07-26 Thread Alexander Bokovikov
On 26.07.2009, at 16:31, Brandon Walkin wrote: There's a typo in your image names. Use NSGoLeftTemplate and NSGoRightTemplate ("Go" instead of "Co"). I'm so sorry! I was just blind and used Cmd+C too often... sorry. Thanks. ___ Cocoa-dev mai

Passing data between NSOperation and main thread

2009-07-26 Thread Meik Schuetz
Dear all, I am just starting to test my little application for leaks using Instruments. I have got a NSOperation which is doing some JSON communication stuff with my server. The NSOperation is sending an NSDictionary object back to the main thread (using a delegate and performSelectorOnM

Re: Display csv in a tableView with bindings

2009-07-26 Thread Aaron Burghardt
On Jul 24, 2009, at 8:11 PM, gumbo...@mac.com wrote: I need some direction please. I would like to load a csv file and display the contents in an NSTableView. What is the best way to achieve this with bindings? Should the model store the data in an array of arrays (rows and columns) or a

Re: NSButton setImage in runtime : where is template image?

2009-07-26 Thread Brandon Walkin
There's a typo in your image names. Use NSGoLeftTemplate and NSGoRightTemplate ("Go" instead of "Co"). On 2009-07-26, at 6:08 AM, Alexander Bokovikov wrote: Hi, All, I'm trying to create a simple switch button, showing something like "Show blablabla >" / "< Hide blablabla" depending on the

NSButton setImage in runtime : where is template image?

2009-07-26 Thread Alexander Bokovikov
Hi, All, I'm trying to create a simple switch button, showing something like "Show blablabla >" / "< Hide blablabla" depending on the state of "blablabla". I've found that it would be most suitable to use rounded textrured button and change its title, image and image position in the onCli

Re: [iPhone] Why can't a UITextField be its own delegate?

2009-07-26 Thread Peter Blazejewicz
Hi WT, have you tried - to avoid everything discussed in thread - to use implementation like below one? For what you want it could be more proper avoiding discussed issues and at the same time it hides everything into your subclass (wrapped delegate class details are hidden into module): #import

Re: How do I extract the int value from an xml node/element?

2009-07-26 Thread Quincey Morris
On Jul 25, 2009, at 23:05, Rick Schmidt wrote: Hi I am trying to extract the value in an XML node/element as an int. Here is a snip of what the xml looks like. 1 1 gi|229264291|gb|CP001598.1| Bacillus anthracis str. A0248, complete genomeHit_

Rotating image

2009-07-26 Thread Agha Khan
HI: I have an image which works fine. UIImage *img = [UIImage imageNamed:@"background.png"]; [img drawAtPoint:CGPointMake(0,0)]; [img release]; Now suppose I want to rotate that image at 90 degree. Is there an easy way to accomplish this task? Best regards Agha __

Re: How do I extract the int value from an xml node/element?

2009-07-26 Thread Roland King
-(NSInteger)integerValue is a method of NSString On Jul 26, 2009, at 2:05 PM, Rick Schmidt wrote: Hi I am trying to extract the value in an XML node/element as an int. Here is a snip of what the xml looks like. 1 1 gi|229264291|gb|CP001598