FileWrapper iCloud

2012-11-10 Thread Brad Stone
Does fileWrapper functionality make it easier or harder or is completely 
irrelevant for iCloud document functionality?  My app used to need the 
fileWrapper functionality and it's still in there but I don't need it anymore 
and I want to remove it all.  Would it help me keep it?

Thanks
___

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

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: FileWrapper iCloud

2012-11-10 Thread Luke Hiesterman
File wrappers don't make it inherently easier or harder to deal with iCloud. 
File packages (which you would use file wrappers to represent) can be elegant 
means of wrapping up document data because it allows for easy separation of 
distinct components, and are usually recommended if they at all make sense for 
your application.

There's some discussion about when it makes sense to use file packages in the 
WWDC session:

http://developer.apple.com/itunes/?destination=adc.apple.com.16351493766

Luke

On Nov 10, 2012, at 9:00 AM, Brad Stone 
cocoa-...@softraph.commailto:cocoa-...@softraph.com wrote:

Does fileWrapper functionality make it easier or harder or is completely 
irrelevant for iCloud document functionality?  My app used to need the 
fileWrapper functionality and it's still in there but I don't need it anymore 
and I want to remove it all.  Would it help me keep it?

Thanks
___

Cocoa-dev mailing list 
(Cocoa-dev@lists.apple.commailto: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.apple.comhttp://lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/luketheh%40apple.com

This email sent to luket...@apple.commailto:luket...@apple.com
___

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

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: FileWrapper iCloud

2012-11-10 Thread Sean McBride
On Sat, 10 Nov 2012 18:09:58 +, Luke Hiesterman said:

File wrappers don't make it inherently easier or harder to deal with
iCloud. File packages (which you would use file wrappers to represent)
can be elegant means of wrapping up document data because it allows for
easy separation of distinct components, and are usually recommended if
they at all make sense for your application.

Unless you use NSPersistentDocument, which still, after all these years, and 
even after the addition of 'external storage' support in 10.7, doesn't support 
file wrappers. :(

Cheers,

-- 

Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com 
Mac Software Developer  Montréal, Québec, Canada



___

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

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Templates for program output

2012-11-10 Thread Ben Gollmer
On Nov 10, 2012, at 1:50 AM, Martin Hewitson martin.hewit...@aei.mpg.de wrote:

 Dear list,
 
 I have an app which is used for compiling agendas. The output is an html page 
 with the agenda formatted in tables, etc. Currently I just build an NSString 
 containing all the html. Clearly this is limited.
 
 I'd like to extend the app to have templates to allow for different agenda 
 layouts. Currently I'm thinking of some sort of html template with tags in 
 there which I can replace with new html code when building the agenda. My 
 problem is that I don't see how to handle loops. I want these templates to be 
 creatable by the user (if they wish) so there needs to be a way to loop over 
 elements of the agenda and format the result (the user may make a table, or 
 just a list, or whatever they want). 
 
 Does anyone know of a way to do this, or a better way to approach this 
 problem? I started thinking about trying to write a DSL and use maybe 
 parsekit to handle that. But I've never done that before and it looks a 
 little daunting.


Try GRMustache (https://github.com/groue/GRMustache).

-- 
Ben

___

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

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: FileWrapper iCloud

2012-11-10 Thread Gordon Apple
I don¹t know about iCloud, but I finally got file wrappers working for my
NSPersistentDocument subclass.  It wasn¹t easy.  I use a separate folder for
stored files, sibling to my coreData storage, in the same package.  I based
it losely on the NSPersistentDocumentFileWrappers sample, then let my ³File²
entity objects handle the creation and use of the folder.  For ³saveAs² I
had it copy the folder (if it exists) to the new location after it did the
coreData and file package stuff.


On 11/10/12 2:00 PM, cocoa-dev-requ...@lists.apple.com
cocoa-dev-requ...@lists.apple.com wrote:

 On Sat, 10 Nov 2012 18:09:58 +, Luke Hiesterman said: File wrappers don't
 make it inherently easier or harder to deal with iCloud. File packages (which
 you would use file wrappers to represent) can be elegant means of wrapping up
 document data because it allows for easy separation of distinct components,
 and are usually recommended if they at all make sense for your application.
 Unless you use NSPersistentDocument, which still, after all these years, and
 even after the addition of 'external storage' support in 10.7, doesn't support
 file wrappers. :(


___

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

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Templates for program output

2012-11-10 Thread Martin Hewitson
Ah, that set me off on the right track. I then also came across 
MGTemplateEngine, which seems to be just what I want (I need loops and logic).

Thanks!

Martin

On 10, Nov, 2012, at 09:02 PM, Ben Gollmer bgoll...@tcnetworks.com wrote:

 On Nov 10, 2012, at 1:50 AM, Martin Hewitson martin.hewit...@aei.mpg.de 
 wrote:
 
 Dear list,
 
 I have an app which is used for compiling agendas. The output is an html 
 page with the agenda formatted in tables, etc. Currently I just build an 
 NSString containing all the html. Clearly this is limited.
 
 I'd like to extend the app to have templates to allow for different agenda 
 layouts. Currently I'm thinking of some sort of html template with tags in 
 there which I can replace with new html code when building the agenda. My 
 problem is that I don't see how to handle loops. I want these templates to 
 be creatable by the user (if they wish) so there needs to be a way to loop 
 over elements of the agenda and format the result (the user may make a 
 table, or just a list, or whatever they want). 
 
 Does anyone know of a way to do this, or a better way to approach this 
 problem? I started thinking about trying to write a DSL and use maybe 
 parsekit to handle that. But I've never done that before and it looks a 
 little daunting.
 
 
 Try GRMustache (https://github.com/groue/GRMustache).
 
 -- 
 Ben


Martin Hewitson
Albert-Einstein-Institut
Max-Planck-Institut fuer 
Gravitationsphysik und Universitaet Hannover
Callinstr. 38, 30167 Hannover, Germany
Tel: +49-511-762-17121, Fax: +49-511-762-5861
E-Mail: martin.hewit...@aei.mpg.de
WWW: http://www.aei.mpg.de/~hewitson







___

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

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com