Re: Document Based Application

2012-07-08 Thread koko
Quite nice, thanks GG. -koko On Jul 8, 2012, at 3:01 PM, Greg Guerin wrote: > koko wrote: > >> I have 29 file types and wanted to get away from the if or switch to open >> them and let NSDocument pick the right class for me. >> >> As I understand it, an Item in the Document types array of th

Re: Document Based Application

2012-07-08 Thread Greg Guerin
koko wrote: I have 29 file types and wanted to get away from the if or switch to open them and let NSDocument pick the right class for me. As I understand it, an Item in the Document types array of the plist contains and entry for an NSDocument class. And yes, each type has a unique exten

Re: Document Based Application

2012-07-08 Thread koko
multiple). I.e. type phobia has extensions pho, pho12, pho15 all mapped to NSDocument subclass MYPhobia. -koko On Jul 7, 2012, at 7:07 PM, Graham Cox wrote: > > On 08/07/2012, at 8:41 AM, koko wrote: > >> My Document Based Application is to have n document types. >> &g

Re: Document Based Application

2012-07-07 Thread Graham Cox
On 08/07/2012, at 8:41 AM, koko wrote: > My Document Based Application is to have n document types. > > Is it then proper to create n subclasses of NSDocument and the corresponding > plist Document types entries, i.e. Item 0 thru Item n-1 ? You can do it that way, or y

Document Based Application

2012-07-07 Thread koko
My Document Based Application is to have n document types. Is it then proper to create n subclasses of NSDocument and the corresponding plist Document types entries, i.e. Item 0 thru Item n-1 ? Is it true that all n document types will have a common extension but will be identified by the

Re: Adding "Import" to a document based application

2011-10-07 Thread Jeff Smith
No that doesn't sound right. And yes there is a better way. NSOpenPanel. >I want to add "Import" to a document based application but wasn't quite >sure if I was going about it right. > >I was going to override runModalOpenPanel:forTypes to set forTypes

Adding "Import" to a document based application

2011-10-06 Thread Jeff Smith
Hi, I want to add "Import" to a document based application but wasn't quite sure if I was going about it right. I was going to override runModalOpenPanel:forTypes to set forTypes to the import types and invoke URLsFromRunningOpenPanel. A flag would be set so runModalOpe

Core Data Document-Based Application with Global Persistent Store

2010-11-17 Thread Dalmazio Brisinda
I've got a document-based Core Data application which works as is. I would like to add support for a global persistent store to hold a library of items. I've read most of the relevant docs, and understand that I should use configurations in the managed object models. I've defined two configurati

Re: Document-based application issue

2009-12-30 Thread Uli Kusterer
On 29.12.2009, at 19:53, Mac Lancer wrote: >CFBundleTypeExtensions > >aeep >aeew >jpg >jpeg >png >gif >bmp > Don't really have any good ideas, but you

Re: Document-based application issue

2009-12-30 Thread Patrick Mau
s in > custom format. It is a document-based application and it should open files > with aeep/aeew extensions. The problem is that on some Mac computers after > installation aeep/aeew files do not open when the user double-clicks them. > My thought was that the aeep/aeew file extensions

Document-based application issue

2009-12-29 Thread Mac Lancer
Hello, Gentlemen, I’m working on a Cocoa application that is intended to open documents in custom format. It is a document-based application and it should open files with aeep/aeew extensions. The problem is that on some Mac computers after installation aeep/aeew files do not open when the user

Re: Apple MVC and Document Based application confusion.

2009-11-29 Thread Sandro Noël
Thank you all, it cleared things up quite a bit. Best regards. Sandro. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.ap

Re: Apple MVC and Document Based application confusion.

2009-11-29 Thread Graham Cox
On 30/11/2009, at 1:35 PM, Jason Stephenson wrote: > NSDocument doesn't merely represent the document's data as in a "pure" MVC > design, rather it is a controller for the document's data. The subsection of > the Document-Based Applications Overview entitled "The Role of NSDocument" > makes th

Re: Apple MVC and Document Based application confusion.

2009-11-29 Thread Jason Stephenson
Graham Cox wrote: On 30/11/2009, at 12:04 PM, Jason Stephenson wrote: NSDocument and the document-based architecture in Cocoa is a bad example of MVC. As a statement that doesn't really stand up to scrutiny. Sure, you can abuse NSDocument and violate MVC, but as it comes it does not. A docum

Re: Apple MVC and Document Based application confusion.

2009-11-29 Thread Bill Garrison
On Nov 29, 2009, at 6:58 PM, Sandro Noël wrote: From what I read the MyDocument Class is supposed to be a model controller, not the window controller. The MyDocument Class is supposed to be able to host an array of window controllers. NSDocument has the capability to host an array of windo

Re: Apple MVC and Document Based application confusion.

2009-11-29 Thread Chris Hanson
On Nov 29, 2009, at 5:47 PM, Sandro Noël wrote: I have to agree with you here, NSDocument should be just M in the MVC Pattern, but why is XCode evidently binding it as the C also in the template project. Because not every project needs to be picture perfect in its use of various design

Re: Apple MVC and Document Based application confusion.

2009-11-29 Thread Sandro Noël
On 2009-11-29, at 8:18 PM, Graham Cox wrote: > > On 30/11/2009, at 12:04 PM, Jason Stephenson wrote: > >> NSDocument and the document-based architecture in Cocoa is a bad example of >> MVC. > > > As a statement that doesn't really stand up to scrutiny. Sure, you can abuse > NSDocument and vi

Re: Apple MVC and Document Based application confusion.

2009-11-29 Thread Graham Cox
On 30/11/2009, at 12:04 PM, Jason Stephenson wrote: > NSDocument and the document-based architecture in Cocoa is a bad example of > MVC. As a statement that doesn't really stand up to scrutiny. Sure, you can abuse NSDocument and violate MVC, but as it comes it does not. A document might own

Re: Apple MVC and Document Based application confusion.

2009-11-29 Thread Jason Stephenson
Sandro Noël wrote: Hello. I'm reading COCOA Design Patterns from Eric M. Buck & Donald A. Yacktman. and i'm having a hard time applying the principle in my architecture. for example, if i create a new document based application in XCode, the MyDocument xib file binds the window

Apple MVC and Document Based application confusion.

2009-11-29 Thread Sandro Noël
Hello. I'm reading COCOA Design Patterns from Eric M. Buck & Donald A. Yacktman. and i'm having a hard time applying the principle in my architecture. for example, if i create a new document based application in XCode, the MyDocument xib file binds the window outlet to the My

Re: document-based application

2009-09-07 Thread I. Savant
On Sep 7, 2009, at 1:24 AM, Oftenwrong Soong wrote: In my doc-based app, I need to initially display a startup window instead of a new empty document. Its function would be somewhat akin to that of the Template Chooser that comes up when you launch Pages. This might help (it's a little ha

Re: document-based application

2009-09-07 Thread Nathan Day
That is the way I do it, I don't see why it wouldn't work 100% of the time, it would be nice if Apple had a way to insert a template chooser, but I would describe the way you have done it as 'an ugly hack'. On 07/09/2009, at 3:24 PM, Oftenwrong Soong wrote: Hi All, In my doc-based app, I

Re: document-based application

2009-09-07 Thread René v Amerongen
Hi, did you look at cocoadev/forum? If you want actualy the same, there is a disscusion about this. HTH Op 7 sep 2009, om 07:24 heeft Oftenwrong Soong het volgende geschreven: Hi All, In my doc-based app, I need to initially display a startup window instead of a new empty document. Its

document-based application

2009-09-06 Thread Oftenwrong Soong
Hi All, In my doc-based app, I need to initially display a startup window instead of a new empty document. Its function would be somewhat akin to that of the Template Chooser that comes up when you launch Pages. I've scoured the texts about the document architecture but cannot find pointers on

Re: Document-Based Application

2009-07-27 Thread Scott Ribe
Also remember that although "1 class per file" is usual practice, there's nothing in the language that requires it. If the cleanest solution turns out to be 22 very small and somewhat similar classes, put them in 1 file (well ok, 2) instead of spreading them between 22 (well ok, 44) files. -- Sc

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 2

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

Re: Document-Based Application

2009-07-26 Thread David Blanton
-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'. Sure. "Document-Based Application&

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

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'

Unable to save file in Document-Based Application

2009-04-05 Thread cocoa learner
Hi All, I am new to cocoa and GUI programming. I wrote a Document-Based Application. Whose code snippet as follows to write data into a file (this code is taken from Aaron.Hillegass-Cocoa.Programming.for.Mac.OS.X book's Chapter 10 ) - - (NSData *)dataOfType:(NSString *)typeName error:(NS

Fwd: Problem in save and open on Core Data Document Based application

2009-03-10 Thread haresh vavdiya
-- Forwarded message -- From: haresh vavdiya Date: Tue, Mar 10, 2009 at 4:50 PM Subject: Re: Problem in save and open on Core Data Document Based application To: Volker in Lists Hi Volker, Thanks Volker, Ya u r right, i opened from File -> Open and it wo

Re: Problem in save and open on Core Data Document Based application

2009-03-10 Thread Volker in Lists
olker Am 10.03.2009 um 11:39 schrieb haresh vavdiya: Hello, I am learning mac development from Aaron Hillegas 3rd Edition. i have created two Example "CarLot" and "Departments" based on Core -Data document based application. When i created

Problem in save and open on Core Data Document Based application

2009-03-10 Thread haresh vavdiya
Hello, I am learning mac development from Aaron Hillegas 3rd Edition. i have created two Example "CarLot" and "Departments" based on Core -Data document based application. When i created CarLot example that time it can save and open data without

Re: Cocoa Document-based Application Template

2009-02-27 Thread Richard Somers
Thu, Feb 26, 2009 at 11:05 PM, Richard Somers wrote: An application built using the standard unmodified "Cocoa Document- based Application" template produces an error when saving. The error message is "The document "Untitled" could n

Re: Cocoa Document-based Application Template

2009-02-26 Thread Karolis Ramanauskas
; } On Thu, Feb 26, 2009 at 11:05 PM, Richard Somers wrote: > An application built using the standard unmodified "Cocoa Document-based > Application" template produces an error when saving. The error message is > "The document "Untitled" could not be saved as &quo

Cocoa Document-based Application Template

2009-02-26 Thread Richard Somers
An application built using the standard unmodified "Cocoa Document- based Application" template produces an error when saving. The error message is "The document "Untitled" could not be saved as "newname.". This happens on my PPC and Intel machines.

Document based application and drag & drop open

2009-01-21 Thread Domenico Testa
I'm writing a pyobjc document-based cocoa application, but i think my question relates to cocoa framework rather than on programming language, so i post it here. The application is a digital signature client that should be able to sign any file type producing a .p7m file. Apllication will support

Re: Tab-based ("document"-based?) application

2008-06-19 Thread Mattias Arrelid
"documents," per se. Would it be > best to start out with a Document-Based Application or just a regular Cocoa > application? Any tips on doing this? I suggest you read the following article to get some inspiration on the concept of an all-in-one window: http://katidev.com/blog/2008

Tab-based ("document"-based?) application

2008-06-18 Thread Jacob Bandes-Storch
I'm creating an application that will have an arbitrary number of basically identical windows (document-like) which each have tabs (or something of the sort) in them that represent the actual "documents," per se. Would it be best to start out with a Document-Based Applic

Re: checking application is document based application or not

2008-06-10 Thread Jens Alfke
On 10 Jun '08, at 5:07 AM, Apparao Mulpuri wrote: I have applicaton name, path, pid. I want to find out, whether that application is document based application or not?. There isn't really any distinction. "Document based application" is just the name of a project te

checking application is document based application or not

2008-06-10 Thread Apparao Mulpuri
Hi List, I have applicaton name, path, pid. I want to find out, whether that application is document based application or not?. Is there any way to do this? Regards, - Apparao. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: Not showing window at Document-Based application

2008-04-26 Thread Jere Gmail
Thanks. It worked. On Sat, Apr 26, 2008 at 1:34 PM, Jean-Daniel Dupas <[EMAIL PROTECTED]> wrote: > > > Le 26 avr. 08 à 11:57, Jere Gmail a écrit : > > I have created Document-Based application. The problem is that every > time I run the application an empty document is

Re: Not showing window at Document-Based application

2008-04-26 Thread Jean-Daniel Dupas
Le 26 avr. 08 à 11:57, Jere Gmail a écrit : I have created Document-Based application. The problem is that every time I run the application an empty document is created. I don't want this to happen. I want the user to have to open a new one. How can I disable this behaviour? Imple

Re: Not showing window at Document-Based application

2008-04-26 Thread Quincey Morris
On Apr 26, 2008, at 02:57, Jere Gmail wrote: I have created Document-Based application. The problem is that every time I run the application an empty document is created. I don't want this to happen. I want the user to have to open a new one. How can I disable this behaviour? Take a

Not showing window at Document-Based application

2008-04-26 Thread Jere Gmail
I have created Document-Based application. The problem is that every time I run the application an empty document is created. I don't want this to happen. I want the user to have to open a new one. How can I disable this behaviour? -- http://zon7blog.wordpress.com/ And again we

Re: Enabling File Open/Save etc in a non-document-based application

2008-04-16 Thread Rob Keniger
On 17/04/2008, at 1:59 AM, Erik Buck wrote: See the TextEdit example code on you hard disk. The last time I looked, it was not a document based application, Actually, the version of TextEdit that ships with the Leopard developer tools has been updated so it uses NSDocument. Prior

Re: Enabling File Open/Save etc in a non-document-based application

2008-04-16 Thread Scott Ribe
> The File Open (for instance) menu item is already assigned, it sends > openDocument: to FirstResponder. I can see it right there in the > bindings, that menu item is already set up to call something. Yes. But what is the first responder? It is the user interface item which has focus. In many ca

Re: Enabling File Open/Save etc in a non-document-based application

2008-04-16 Thread Quincey Morris
On Apr 16, 2008, at 03:01, Roland King wrote: I think perhaps I'm not being clear in what I'm asking. The File Open (for instance) menu item is already assigned, it sends openDocument: to FirstResponder. I can see it right there in the bindings, that menu item is already set up to call som

Re: Enabling File Open/Save etc in a non-document-based application

2008-04-16 Thread Erik Buck
See the TextEdit example code on you hard disk. The last time I looked, it was not a document based application, and it certainly displays an Open dialog. Or, you can look at the sample in Cocoa Programming which explains in detail how the Cocoa document infrastructure works including a

Re: Enabling File Open/Save etc in a non-document-based application

2008-04-16 Thread Roland King
I think perhaps I'm not being clear in what I'm asking. The File Open (for instance) menu item is already assigned, it sends openDocument: to FirstResponder. I can see it right there in the bindings, that menu item is already set up to call something. Yes I suppose I could write my own enti

Re: Enabling File Open/Save etc in a non-document-based application

2008-04-16 Thread Roland King
but they are already assigned to .. the first responder I think. And they are disabled menu items too .. what enables them? On Apr 16, 2008, at 5:26 PM, Ramón Medrano Llamas wrote: It's easy, you must assign in Interface Builder an action to those menu items that do the tasks you want. 2

Enabling File Open/Save etc in a non-document-based application

2008-04-16 Thread Roland King
First post. I've been dragging my way through the Cocoa documentation and trying some simple apps. I started with non-document apps and of course you still get the File menu, but most of it's disabled. I understand that when you create a document-based app (and I have a lot more reading to