Re: memory allocation different in simulator and on the iPhone

2009-07-28 Thread Sven
UIImage* image = [UIImage imageNamed:fileName]; Loading an image with imageNamed causes the image to be cached in memory as per the documentation. I suggest using one of the alternatives to load your images and see how that affects memory usage ./Sven 2009/7/24 Dragos Ionel > You are right, I

NSCollectionView, Draggable View & Selection

2009-07-28 Thread Arthur Carli
Hi all, I've been playing with the NSCollectionView control for some time now, and I'm stuck with this problem : So I've a collection view, with a prototype view. I wanted the prototype view to be dragable, so I've subclassed the NSView prototype and implemented mouseDown: and mouseDragged:. All wo

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

2009-07-28 Thread Simon Hickmott
I don't really agree, as others have suggested, that this is a hammering a Mac-shaped peg into a Windows-shaped hole problem we're dealing with here. There are many successful Mac applications which use a tabbed view to consolidate multiple documents: TextMate comes immediately to mind — yo

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

2009-07-28 Thread Rippit the Ogg Frog
The prevalence of MDI interfaces on Windows is one of the primary reasons I stick with the Mac, both as a user and as a developer. That is, it's not just that I prefer to use the Mac-standard user interface myself, but I also don't want to have to subject my users to user interfaces that I wou

NSTextView - NSAttributedString paragraph style attributes

2009-07-28 Thread listsapple
Adding an NSParagraphStyle to an NSMutableAttributedString then stuffing the string into an NSTextView crashes my app. Anyone know if NSParagraphStyles are supported in NSTextView? Bernie ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

where can I download xcode 3.2

2009-07-28 Thread YongLi
I have installed the snow leopardbut i can't find the download link of xcode 3.2 -- Name: Yong Li E-mail: liyon...@gmail.com Address: Room 3-523, FIT Building, Tsinghua University, Beijing, China. 100084. ___ Cocoa-dev mailing list (Cocoa-dev@lists.app

Checks required for multiple asynchronous NSURLConnections?

2009-07-28 Thread Debajit Adhikary
I have multiple asynchronous HTTP requests being made at the same time. All these use the same NSURLConnection delegate functions. (The receivedData object is different for each connection though—this is done using a dictionary with the key as the connection itself. In the delegate, I parse the rec

Re: where can I download xcode 3.2

2009-07-28 Thread Kyle Sluder
On Jul 27, 2009, at 10:38 AM, YongLi wrote: I have installed the snow leopardbut i can't find the download link of xcode 3.2 1. This is cocoa-dev. This list exists for the discussion of Cocoa, not for downloading seeds or other non-Cocoa topics. 2. Snow Leopard and the developer tools are

Re: Checks required for multiple asynchronous NSURLConnections?

2009-07-28 Thread Jean-Daniel Dupas
Le 28 juil. 09 à 09:07, Debajit Adhikary a écrit : I have multiple asynchronous HTTP requests being made at the same time. All these use the same NSURLConnection delegate functions. (The receivedData object is different for each connection though—this is done using a dictionary with the key

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

2009-07-28 Thread Graham Cox
But a tabbed interface is quite different from MDI, even if to some extent it's solving a similar problem. Maybe a tabbed interface can be considered a "Mac solution" to the MDI problem, but I would suggest it only works sometimes. Xcode is a good example of something that would probably be

Re: Checks required for multiple asynchronous NSURLConnections?

2009-07-28 Thread Kyle Sluder
On Jul 28, 2009, at 12:07 AM, Debajit Adhikary wrote: - Is it possible that more than two connections will use the delegate at the same time? (I would think so) Asynchronous does not always mean your callbacks are invoked on another thread -- or that threads are even involved at all

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

2009-07-28 Thread Andy Lee
A tabbed view is not MDI, at least not the MDI I recall from many years ago. Also, David didn't only ask about addressing the same issues as MDI (roughly speaking: single window, multiple documents), he asked about *looking* like Windows. He did ask about tabs, but if that's *all* he was

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

2009-07-28 Thread Andy Lee
On Jul 28, 2009, at 3:29 AM, Graham Cox wrote: MDI is a solution to a problem of Windows' own making, where window == process. As we are not stuck with that false equality, we have no need to make an MDI interface on the platform to solve the problem that a single process has multiple windo

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

2009-07-28 Thread Kyle Sluder
On Jul 28, 2009, at 12:29 AM, Graham Cox wrote: MDI is a solution to a problem of Windows' own making, where window == process. Please don't spread misinformation about Windows, it makes us look bad. Windows' concept of a window is very different from our concept thereof. Nothing restrict

Re: NSString and regular expressions

2009-07-28 Thread Alastair Houghton
On 28 Jul 2009, at 02:02, Rob Keniger wrote: On 28/07/2009, at 10:38 AM, Dave DeLong wrote: RegexKit. Without a doubt. http://regexkit.sourceforge.net I use it in about 75% of my projects. RegexKit is very nice and extremely comprehensive, but it has quite a large footprint and is proba

Re: NSTextView - NSAttributedString paragraph style attributes

2009-07-28 Thread Alastair Houghton
On 27 Jul 2009, at 17:32, listsapple wrote: Adding an NSParagraphStyle to an NSMutableAttributedString then stuffing the string into an NSTextView crashes my app. Anyone know if NSParagraphStyles are supported in NSTextView? They most certainly are. (FWIW, it isn't really a case of them "b

Re: NSString and regular expressions

2009-07-28 Thread jonat...@mugginsoft.com
On 28 Jul 2009, at 10:26, Alastair Houghton wrote: On 28 Jul 2009, at 02:02, Rob Keniger wrote: On 28/07/2009, at 10:38 AM, Dave DeLong wrote: RegexKit. Without a doubt. http://regexkit.sourceforge.net I use it in about 75% of my projects. RegexKit is very nice and extremely comprehens

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

2009-07-28 Thread Alastair Houghton
On 28 Jul 2009, at 09:09, Kyle Sluder wrote: On Jul 28, 2009, at 12:29 AM, Graham Cox wrote: MDI is a solution to a problem of Windows' own making, where window == process. Please don't spread misinformation about Windows, it makes us look bad. Windows' concept of a window is very differ

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

2009-07-28 Thread Jean-Daniel Dupas
Le 28 juil. 09 à 11:53, Alastair Houghton a écrit : On 28 Jul 2009, at 09:09, Kyle Sluder wrote: On Jul 28, 2009, at 12:29 AM, Graham Cox wrote: MDI is a solution to a problem of Windows' own making, where window == process. Please don't spread misinformation about Windows, it makes us

Building iPhone application as backward compatible

2009-07-28 Thread Mahaboob
I developed an iPhone application using iPhone OS 3.0 and build it against iPhone OS 2.2. The application uses MessageUI.Framework It is tested in simulator 3.0. Then from simulator,I changed the Hardware version to 2.2 and is working fine. My iPhone is having the OS version 2.2. Now I need to test

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

2009-07-28 Thread Graham Cox
On 28/07/2009, at 6:09 PM, Kyle Sluder wrote: Please don't spread misinformation about Windows, it makes us look bad. Windows' concept of a window is very different from our concept thereof. Nothing restricts Windows apps to one window or enforces a window = process equality. Well, OK,

Re: NSTableView cell editing begin / end notifications?

2009-07-28 Thread Alexander Bokovikov
Hi, All, As soon as I have no replies, I will try to reduce my problem scope... As far as I can see now, there are no suitable messages/notifications in standard Cocoa classes, which could serve, as notifiers of the cell editor session start/stop. I've found a code snipped, showing, how to

NSPopUpButtonCell needs Extra Oomph to -display

2009-07-28 Thread Jerry Krinock
One of the columns in my NSTableView has its cell set to an NSPopUpButtonCell. This is all built very conventionally, in Interface Builder. I have bound to Content, Content Values and Selected Object, and it all functions correctly. Except, and this started a couple weeks ago during devel

Re: NSTextView - NSAttributedString paragraph style attributes

2009-07-28 Thread listsapple
Alastair Houghton wrote: On 27 Jul 2009, at 17:32, listsapple wrote: Adding an NSParagraphStyle to an NSMutableAttributedString then stuffing the string into an NSTextView crashes my app. Anyone know if NSParagraphStyles are supported in NSTextView? They most certainly are. (FWIW, it is

Dynamic UI with scroll view

2009-07-28 Thread Erik Buck
NSLog(@"%@", [scrollView documentView]); //outputs (null) What does NSLog(@"%@", scrollView ); tell you ? // the following is a memory leak if you are not using garbage collection [scrollView setDocumentView:[[NSView alloc]  initWithFrame:NSMakeRect(0, 0, 500, 500)]]; Try [scrollView setDocume

Re: Dynamic UI with scroll view

2009-07-28 Thread Fritz Anderson
On 27 Jul 2009, at 7:23 PM, Chase Meadors wrote: NSLog(@"%@", [scrollView documentView]); //outputs (null) [scrollView setDocumentView:[[NSView alloc] initWithFrame:NSMakeRect(0, 0, 500, 500)]]; NSLog(@"%@", [scrollView documentView]); //outputs (null) again Have you verified that scrollV

Panning a View

2009-07-28 Thread David Blanton
I am putting my proprietary image content in a view in a document application. I want to pan around the view with scrollers or a hand. How do I adjust the view so the scrollers get updated allowing me to pan around? (I'll deal with the hand later.) db

Re: NSWindow reference remains null after window did load

2009-07-28 Thread Daniel Child
Sorry, I misled you. There is a controller object and File's owner. File's owner's class is set to the window controller subclass. The window outlets for both of the win controller and file's owner point to the window itself. Which brings up another question: do I need the "object" (blue cu

Re: NSWindow reference remains null after window did load

2009-07-28 Thread Dave Carrigan
On Jul 28, 2009, at 8:31 AM, Daniel Child wrote: Which brings up another question: do I need the "object" (blue cube) at all in the nib if the file's owner is of the same class and presumably represents the same object. Are they redundant? They are completely different things. The blue cu

Re: NSWindow reference remains null after window did load

2009-07-28 Thread Daniel Child
That would have been a good guess, but that's not it. Visible at launch is checked (ON). On Jul 28, 2009, at 3:13 AM, cocoa-dev-requ...@lists.apple.com wrote: This came up in another chat I had today. In that case, the window was not set to be visible at launch, so the system deferred actual

Re: NSWindow reference remains null after window did load

2009-07-28 Thread Graham Cox
On 29/07/2009, at 1:31 AM, Daniel Child wrote: Which brings up another question: do I need the "object" (blue cube) at all in the nib if the file's owner is of the same class and presumably represents the same object. Are they redundant? Not only are they redundant, this is almost certainl

Re: NSWindow reference remains null after window did load

2009-07-28 Thread Graham Cox
On 29/07/2009, at 1:39 AM, Daniel Child wrote: Visible at launch is checked (ON) Which is almost never what you want. Windows should generally be loaded on demand by the app under the direction of their window controller. A window visible at launch won't necessarily even have a control

Re: Panning a View

2009-07-28 Thread David Blanton
Is this the correct approach: In the MyDocument.xib add a scroll view to the window. At some place in the app instance a view and set this view as the document view of the scroll view. Draw into this view. Scrollers will update etc. Grok? db On Jul 28, 2009, at 9:10 AM, David Blanton w

Re: Panning a View

2009-07-28 Thread Graham Cox
On 29/07/2009, at 1:56 AM, David Blanton wrote: Is this the correct approach: In the MyDocument.xib add a scroll view to the window. At some place in the app instance a view and set this view as the document view of the scroll view. Draw into this view. Scrollers will update etc. Add

Re: NSTableView cell editing begin / end notifications?

2009-07-28 Thread Alexander Bokovikov
Hi, All, I'm sorry for flood, it's all is pretty new for me, therefore I do too many mistakes... Here is, what I'm trying to do: - (id) windowWillReturnFieldEditor:(NSWindow *)sender toObject: (id)anObject { MyTitleEditor *ed; if ([anObject isKindOfClass:[NSTextFie

Making NSTextView not wrap lines

2009-07-28 Thread Peter Mulholland
Hello cocoa-dev, Basically, i'm trying to do a little debug console. I'm using the NSTextView in NSScrollView from Interface Builder. I've got a Print member in my window's controller class which basically does: [TextView setString:[[TextView string] stringByAppendingString:newString]]; What I

Re: Making NSTextView not wrap lines

2009-07-28 Thread Graham Cox
On 29/07/2009, at 2:11 AM, Peter Mulholland wrote: Hello cocoa-dev, Basically, i'm trying to do a little debug console. I'm using the NSTextView in NSScrollView from Interface Builder. I've got a Print member in my window's controller class which basically does: [TextView setString:[[T

Anyone Using ZeroC's Internet Communications Engine (ICE)?

2009-07-28 Thread Brad Gibbs
Is anyone here using ZeroC's Internet Communications Engine? I found it in Apple's Developer Downloads section. Looks like a worthy replacement for DO and they've recently added support for iPhone OS. Just wondering whether it's worth looking into further for an app I'm working on that r

clicking between tokens

2009-07-28 Thread Andy Lee
This takes a few seconds to recreate in IB. I create a standard NSTokenField in IB with two adjacent rounded tokens in it. Running the UI, I find it's much too hard to click between the tokens. I should be able to click halfway between them, but this selects the token on the right. To place

Re: Building iPhone application as backward compatible

2009-07-28 Thread Clark Cox
On Tue, Jul 28, 2009 at 3:24 AM, Mahaboob wrote: > I developed an iPhone application using iPhone OS 3.0 and build it against > iPhone OS 2.2. The application uses MessageUI.Framework It is tested in > simulator 3.0. Then from simulator,I changed the Hardware version to 2.2 and > is working fine. M

Re: Panning a View

2009-07-28 Thread David Blanton
That was the right approach ... one twist, I set the view frame when drawRect is called to the size of my image. Works great. Thanks! On Jul 28, 2009, at 10:01 AM, Graham Cox wrote: On 29/07/2009, at 1:56 AM, David Blanton wrote: Is this the correct approach: In the MyDocument.xib add a

Re: nil there not here

2009-07-28 Thread David Duncan
On Jul 27, 2009, at 2:44 PM, David Blanton wrote: context = CGBitmapContextCreate (bitmap.m_array, bitmap.m_pixelsx, bitmap.m_pixelsy, 8, bitmap.m_pixelsx * 4, colorSpace, kCGImageAlphaNoneSkipFirst|kCGBitmapByteOrder32Host); CGImageRelease(_myDocumentView->_cgImageRef); _

Re: Panning a View

2009-07-28 Thread Kyle Sluder
On Tue, Jul 28, 2009 at 10:23 AM, David Blanton wrote: > That was the right approach ... one twist, I set the view frame when > drawRect is called to the size of my image. No, you must not do this. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@li

App Delegate in Document App

2009-07-28 Thread David Blanton
In MyDocument.xib I added an object and set its class to AppDelegate, a subclass of NSObject, in my project. I connected the Application delegate outlet to this object. I implemented - (BOOL)applicationShouldOpenUntitledFile:(NSApplication *)sender { return NO; } in AppDelegate but it i

Re: Panning a View

2009-07-28 Thread David Blanton
Ok, why not? It 'appears' to work properly. I only do it so the untitled file window that appears at startup (which I cannot get rid of, see my next post) looks goofy with scroll bar thumbs and no content. On Jul 28, 2009, at 11:47 AM, Kyle Sluder wrote: On Tue, Jul 28, 2009 at 10:23 AM

Re: Panning a View

2009-07-28 Thread Kyle Sluder
On Tue, Jul 28, 2009 at 10:52 AM, David Blanton wrote: > Ok, why not?  It 'appears' to work properly. http://www.cocoabuilder.com/archive/message/cocoa/2008/1/29/197499 >  I only do it so the untitled file window that appears at startup (which I > cannot get rid of, see my next post) looks goofy

Re: App Delegate in Document App

2009-07-28 Thread Fritz Anderson
On 28 Jul 2009, at 12:46 PM, David Blanton wrote: In MyDocument.xib I added an object and set its class to AppDelegate, a subclass of NSObject, in my project. I connected the Application delegate outlet to this object. ... Is this the correct manner to set the application delegate? No. A

Re: NSWindow reference remains null after window did load

2009-07-28 Thread Daniel Child
I decided the nib was maybe corrupt from my having dragged things from another project onto it. So I started with a fresh xib, got rid of the redundant object (as pointed out by Graham Cox and yourself) and voila: I have references to the tableview and the window. But it's still not working

Re: NSWindow reference remains null after window did load

2009-07-28 Thread Daniel Child
Thanks for confirming this. On Jul 28, 2009, at 11:43 AM, Graham Cox wrote: Not only are they redundant, this is almost certainly your bug. Objects in a nib are real objects. Therefore you have two of them, both of the same class. Normally File's Owner is the window controller and this is

Re: Panning a View

2009-07-28 Thread I. Savant
On Jul 28, 2009, at 1:56 PM, Kyle Sluder wrote: No, you must not do this. ... So why would you think to do it in -drawRect:? Do it in -awakeFromNib, or -[NSWindowController windowDidLoad], or -[NSDocument windowControllerDidLoadNib:]. These are the places to do post-nib loading setup. I

Re: NSWindow reference remains null after window did load

2009-07-28 Thread Daniel Child
Actually, once I have init'd the window controller and set up the model data, I call showWindow on the controller. Unchecking visible at launch doesn't seem to make any difference. On Jul 28, 2009, at 11:47 AM, Graham Cox wrote: Visible at launch is checked (ON) Which is almost never wha

Re: Panning a View

2009-07-28 Thread Erik Buck
That was the right approach ... one twist, I set the view frame when  drawRect is called to the size of my image. Don't do that.  Do read the documentation.  The only thing you should do in -drawRect: is draw.  In particular, changing the frame inside drawRect: will invalidate all or part of th

Re: NSWindow reference remains null after window did load

2009-07-28 Thread Andy Lee
On Jul 28, 2009, at 2:04 PM, Daniel Child wrote: The only datasource method to get called is numberOfRowsInTableView. What number is it returning? --Andy ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

Re: Panning a View

2009-07-28 Thread David Blanton
I am changing now ... thanks! On Jul 28, 2009, at 12:10 PM, Erik Buck wrote: That was the right approach ... one twist, I set the view frame when drawRect is called to the size of my image. Don't do that. Do read the documentation. The only thing you should do in -drawRect: is draw. In pa

Re: App Delegate in Document App

2009-07-28 Thread David Blanton
Done. Works. Thx. On Jul 28, 2009, at 12:03 PM, Fritz Anderson wrote: On 28 Jul 2009, at 12:46 PM, David Blanton wrote: In MyDocument.xib I added an object and set its class to AppDelegate, a subclass of NSObject, in my project. I connected the Application delegate outlet to this object.

Re: NSWindow reference remains null after window did load

2009-07-28 Thread Quincey Morris
On Jul 28, 2009, at 11:04, Daniel Child wrote: The only datasource method to get called is numberOfRowsInTableView. The others do not get called. I rechecked syntax (even tried copying method sig from another project that works), rechecked connections for the outlets (File's Owner to the ta

Re: App Delegate in Document App

2009-07-28 Thread Paul Franz
You should do it in the MainMenu.xib file. Paul Franz On Tue, Jul 28, 2009 at 1:46 PM, David Blanton wrote: > In MyDocument.xib I added an object and set its class to AppDelegate, a > subclass of NSObject, in my project. I connected the Application delegate > outlet to this object. > > I implem

Re: iTunes DB Change Notifications?

2009-07-28 Thread Scott Ribe
> Isn't this an extremely expensive operation? I strongly suspect that Apple's intent was to support infrequent operations, such as non-iTunes software synching to non-iPod devices. -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567 voice __

Re: NSTableView cell editing begin / end notifications - solved (?)

2009-07-28 Thread Alexander Bokovikov
Hi, All, To whom is may be interesting: As I wrote initially, my problem is that the table is updated on a timer, so cell editor was cancelled automatically, as the timer fires. First I started to seek for a solution to learn about cell editor appearing / hiding events. And that was very h

How do I insure that my NSDocument subclass is not initialized before I open a document?

2009-07-28 Thread Korei Klein
I have a subclass of NSDocument which is initialized whenever I open a new document and when my application is first started. How do I change the application such that my subclass is not initialized when I start the application? ___ Cocoa-dev mailing

Something is wrong

2009-07-28 Thread Agha Khan
Hi: UIButton* pSomeBtn = [UIButton buttonWithType:UIButtonTypeInfoDark]; CGRect SomeBtnFrame = pSomeBtn.frame; I am new to Objective-C But I took granted and used -> for pointers. Why this is working? It should be CGRect SomeBtnFrame = pSomeBtn->frame; But many places it did not complain. No

Re: Something is wrong

2009-07-28 Thread Kyle Sluder
On Tue, Jul 28, 2009 at 12:44 PM, Agha Khan wrote: > UIButton* pSomeBtn   = [UIButton buttonWithType:UIButtonTypeInfoDark]; > CGRect SomeBtnFrame  = pSomeBtn.frame; > Why this is working? This is known as "dot syntax". Read the Objective-C 2.0 Language Reference: http://developer.apple.com/iphon

Re: How do I insure that my NSDocument subclass is not initialized before I open a document?

2009-07-28 Thread Kyle Sluder
On Tue, Jul 28, 2009 at 12:41 PM, Korei Klein wrote: > I have a subclass of NSDocument which is initialized whenever I open a new > document and when my application is first started. > How do I change the application such that my subclass is not initialized > when I start the application? This is

Re: How do I insure that my NSDocument subclass is not initialized before I open a document?

2009-07-28 Thread Chase Meadors
In MainMenu.xib, add an app delegate object and override: - (BOOL)applicationShouldOpenUntitledFile:(NSApplication *)sender { return NO; } On Jul 28, 2009, at 2:41 PM, Korei Klein wrote: I have a subclass of NSDocument which is initialized whenever I open a new document and when my

Re: NSWindow reference remains null after window did load

2009-07-28 Thread Daniel Child
The correct number, a value obtained from the model. On Jul 28, 2009, at 3:02 PM, cocoa-dev-requ...@lists.apple.com wrote: The only datasource method to get called is numberOfRowsInTableView. What number is it returning? --Andy ___ Cocoa-dev mai

NSRulerView

2009-07-28 Thread David Blanton
Any insight on why this does not change the ruler measurement units: [[[NSRulerView alloc] initWithScrollView:_scrollView orientation:NSHorizontalRuler] setMeasurementUnits:@"Centimeters"]; TIA! db ___ Cocoa-dev mailing list (Cocoa-dev@lists.appl

Re: Something is wrong

2009-07-28 Thread WT
On Jul 28, 2009, at 9:44 PM, Agha Khan wrote: Hi: UIButton* pSomeBtn = [UIButton buttonWithType:UIButtonTypeInfoDark]; CGRect SomeBtnFrame = pSomeBtn.frame; I am new to Objective-C But I took granted and used -> for pointers. Why this is working? It should be CGRect SomeBtnFrame = pSomeBtn-

cocoa sheet allowing interaction with attached window?

2009-07-28 Thread John Mikros
Hello all, I'm seeing an odd behavior where I have a sheet attached to a window, but I'm able to interact with the main window underneath, as long as that interaction involves a right-click. Left clicks are properly blocked (other than to resize the window, etc) Thus, I'm able to bring u

Spacing buttons in UIToolbar

2009-07-28 Thread DKJ
I'm using the setToolbarItems:animated: of a UITableViewController to place buttons on the toolbar. If I was using IB, I could space the buttons evenly simply by inserting some flexible-space ones between them. Is there an easy way to do this in code? Or do I need to calculate widths for so

Override Font Tool and Colors Tool

2009-07-28 Thread David Blanton
My application deals with embroidery. To be Mac I want to use the tool bar with the fonts and colors tools. Because fonts and colors mean something different in this environment is it de rigueur to override these with my specific panels? I don't want the UI Fuzz after me! db _

Re: Copying Managed Objects from App to Doc MOContext

2009-07-28 Thread Jerry Krinock
Last December I asked a question here regarding how I should copy attributes from an existing managed object to a new managed object, when it is necessary to create this new object in a different managed object context. I noted that getting an "attributes dictionary" from the existing mana

Re: Copying Managed Objects from App to Doc MOContext

2009-07-28 Thread Ben Trumbull
On Jul 28, 2009, at 3:59 PM, Jerry Krinock wrote: Last December I asked a question here regarding how I should copy attributes from an existing managed object to a new managed object, when it is necessary to create this new object in a different managed object context. I noted that gettin

Re: Spacing buttons in UIToolbar

2009-07-28 Thread WT
On Jul 29, 2009, at 12:48 AM, DKJ wrote: I'm using the setToolbarItems:animated: of a UITableViewController to place buttons on the toolbar. If I was using IB, I could space the buttons evenly simply by inserting some flexible-space ones between them. Is there an easy way to do this in code

Fun (or not) with NSArrayControllers and CoreData.

2009-07-28 Thread Daniel DeCovnick
My entities and relationships are set up as follows Folder<<-- children--parent-->Folder and Folder<--folder--jobs-->>Job. My nib has a tree controller for the Folders. This part works fine. If I create an Array Controller for the Jobs (JobsArrayController), and set the Content Set to Folder

NSOpenPanel Exception/Bug

2009-07-28 Thread Seth Willits
I have an exception being thrown when an open panel is open. I can't reproduce it yet, but I really don't see what the problem is either. I think I'm just triggering a bug in NSOpenPanel. Here's the exception: *** -[NSCFArray objectAtIndex:]: index (-1( or possibly larger)) beyond bound

Use of cells with custom controls

2009-07-28 Thread Chase Meadors
I'm making my own class that will input a variety of data in different formats, and NSTableView really seems clunky and unsuited for my purposes. I'm trying to make a custom control, but I don't quite understand what I need to do to use cells in it. In drawRect, I can just draw the cells I

Re: Fun (or not) with NSArrayControllers and CoreData.

2009-07-28 Thread Quincey Morris
On Jul 28, 2009, at 16:44, Daniel DeCovnick wrote: -(NSSet *)allDescendentsJobs { ... } But I can't bind JobsArrayController's content set to this because "entity Folder does not support Key Value Coding for property 'allDescendentsJobs'" because, as I understand it, it's read-only*

Re: Copying Managed Objects from App to Doc MOContext

2009-07-28 Thread Jerry Krinock
On 2009 Jul 28, at 16:07, Ben Trumbull wrote: Accessor methods don't accept NSNull in place of NSString. Yes. I think I understand this now -- I was having trouble with your terms "copy/snapshot" and "restore". Accessor methods don't accept NSNull...the swapping has to happen in your c

Re: NSWindow reference remains null after window did load

2009-07-28 Thread Andy Lee
Just to be sure -- your method is numberOfRowsInTableView:, not numberOfRowsInTableView, right? You mentioned you'd tried copying working method declarations, so I suspect that's not the problem, but I figured I'd double-check just in case *you* were calling it somewhere you'd forgotten about

Re: Use of cells with custom controls

2009-07-28 Thread I. Savant
On Jul 28, 2009, at 8:10 PM, Chase Meadors wrote: I'm making my own class that will input a variety of data in different formats, and NSTableView really seems clunky and unsuited for my purposes. In what way? What are you trying to do? I'm trying to make a custom control, but I don't qu

NSSplitView autosave troubles

2009-07-28 Thread Benjámin Salánki
Dear list, please help me, because this is driving me crazy. I have a simple window set up in IB which contains only an autosized NSSplitView as its content. I add an autosave name for the splitview in IB. Go to Xcode, build and run, everything's fine. Quit the app, relaunch, and my window

Re: Copying Managed Objects from App to Doc MOContext

2009-07-28 Thread Ben Trumbull
On Jul 28, 2009, at 5:36 PM, Jerry Krinock wrote: But for restoring previous state over an existing object, that's undesirable. There are other more complicated approaches, but ultimately handling NSNull in your restore code is the least bad approach. In what practical situation would

Re: NSRulerView

2009-07-28 Thread Graham Cox
On 29/07/2009, at 7:58 AM, David Blanton wrote: Any insight on why this does not change the ruler measurement units: [[[NSRulerView alloc] initWithScrollView:_scrollView orientation:NSHorizontalRuler] setMeasurementUnits:@"Centimeters"]; TIA! Yes, because NSRulerView knows nothing of t

Re: NSSplitView autosave troubles

2009-07-28 Thread Graham Cox
On 29/07/2009, at 10:50 AM, Benjámin Salánki wrote: please help me, because this is driving me crazy. I have a simple window set up in IB which contains only an autosized NSSplitView as its content. I add an autosave name for the splitview in IB. Go to Xcode, build and run, everything's

Re: NSSplitView autosave troubles

2009-07-28 Thread Benjámin Salánki
Yes I have tried that, to no avail. Sent from my iPhone On 2009.07.29., at 3:46, Graham Cox wrote: On 29/07/2009, at 10:50 AM, Benjámin Salánki wrote: please help me, because this is driving me crazy. I have a simple window set up in IB which contains only an autosized NSSplitView as it

Re: Override Font Tool and Colors Tool

2009-07-28 Thread Graham Cox
On 29/07/2009, at 8:51 AM, David Blanton wrote: My application deals with embroidery. To be Mac I want to use the tool bar with the fonts and colors tools. Because fonts and colors mean something different in this environment is it de rigueur to override these with my specific panels?

Re: NSRulerView

2009-07-28 Thread Andy Lee
On Jul 28, 2009, at 9:42 PM, Graham Cox wrote: You know, you could do worse than to spend a few hours actually reading the documentation Or in this case just a few seconds to look at the doc for setMeasurementUnits:. If a method doesn't do what you thought it would do, it makes a lot of

Re: NSRulerView

2009-07-28 Thread Dave Keck
Hmm, us Americans spell it 'centimeter,' and according to the mentioned docs, NSRulerView does too. The docs also say it supports four different units by default (in, cm, pt, pc). Not sure what 'default' means in this case, but I'd assume it means calling +registerUnitWithName:... is redundant for

Re: NSRulerView

2009-07-28 Thread Graham Cox
On 29/07/2009, at 12:09 PM, Dave Keck wrote: Hmm, us Americans spell it 'centimeter,' and according to the mentioned docs, NSRulerView does too. The docs also say it supports four different units by default (in, cm, pt, pc). Not sure what 'default' means in this case, but I'd assume it means ca

Re: Override Font Tool and Colors Tool

2009-07-28 Thread David Blanton
Color to us is thread brands and how to match a design done with one brand to other brands ... so our picker is a choice of threads with as close as possible matching to the original Fonts have to be digitized so they can be sewn ergo or font panel only includes our collection of digitized

Re: Override Font Tool and Colors Tool

2009-07-28 Thread Graham Cox
On 29/07/2009, at 12:29 PM, David Blanton wrote: Color to us is thread brands and how to match a design done with one brand to other brands ... so our picker is a choice of threads with as close as possible matching to the original So NSColorPicker is the way to go. This is exactly what P

Re: NSRulerView

2009-07-28 Thread David Blanton
Yeah, it is not clear ... I'll dig some more thanks anyway! On Jul 28, 2009, at 8:26 PM, Graham Cox wrote: On 29/07/2009, at 12:09 PM, Dave Keck wrote: Hmm, us Americans spell it 'centimeter,' and according to the mentioned docs, NSRulerView does too. The docs also say it supports four

Re: Override Font Tool and Colors Tool

2009-07-28 Thread Graham Cox
On 29/07/2009, at 12:29 PM, David Blanton wrote: Color to us is thread brands and how to match a design done with one brand to other brands ... so our picker is a choice of threads with as close as possible matching to the original Also, you could create a custom colorspace class that emb

About Posting

2009-07-28 Thread David Blanton
I do not post until I read the docs, code a sample and observe the results. If the results do not match the docs I ask the question as it is more productive that spelunking Apple documentation for what at times are semantical obscurities. In 1985 I taught myself 6800K assembler so I could

something I can't understand

2009-07-28 Thread Agha Khan
Hi: I have a struct @interface PngButton : UIButton { @public bool OffPos; CGPoint horizontalLoc; CGPoint verticalLoc; } @property (assign) bool OffPos; @property (assign) CGPoint horizontalLoc; @property (assign) CGPoint verticalLoc; @end PngButton* pPngButton = [PngB

Re: About Posting, PS

2009-07-28 Thread David Blanton
I worked for Apple from 1983 (employee number 408) until 1996 in sales, marketing and systems engineering. I 'been there' and still support the platform in the face of constant criticism and belittlement from co-workers. db On Jul 28, 2009, at 8:45 PM, David Blanton wrote: I do not post

Re: something I can't understand

2009-07-28 Thread Kiel Gillard
On 29/07/2009, at 12:52 PM, Agha Khan wrote: Hi: I have a struct @interface PngButton : UIButton { @public bool OffPos; CGPoint horizontalLoc; CGPoint verticalLoc; } @property (assign) bool OffPos; @property (assign) CGPoint horizontalLoc; @property (assign) CGPoint verti

Re: NSRulerView

2009-07-28 Thread Andy Lee
On Jul 28, 2009, at 10:07 PM, Andy Lee wrote: On Jul 28, 2009, at 9:42 PM, Graham Cox wrote: You know, you could do worse than to spend a few hours actually reading the documentation Or in this case just a few seconds to look at the doc for setMeasurementUnits:. If a method doesn't do wha

Re: About Posting

2009-07-28 Thread Kyle Sluder
On Jul 28, 2009, at 7:45 PM, David Blanton wrote: I do not post until I read the docs, code a sample and observe the results. Constructive criticism: it's helpful to mention this in your post because it can reduce the problem space, highlight potentially overlooked issues, or maybe dis

Re: About Posting

2009-07-28 Thread David Blanton
Thank you Kyle et al whose advice has helped me move the ball forward ! I do love code! db On Jul 28, 2009, at 9:38 PM, Kyle Sluder wrote: On Jul 28, 2009, at 7:45 PM, David Blanton wrote: I do not post until I read the docs, code a sample and observe the results. Constructive critic

  1   2   >