Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 13 Jul 2013 13:07:52 -0500 User-Agent: Microsoft-Entourage/11.4.0.080122 Date: Sat, 13 Jul 2013 13:09:25 -0500 Subject: Re: Will there be a CiderXPress? From: Hugh Hood Newsgroups: comp.sys.apple2.programmer Message-ID: Thread-Topic: Will there be a CiderXPress? Thread-Index: Ac5/9Bt5WhzozOvnEeKUzwAFAuvodg== References: Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Lines: 95 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 70.245.196.54 X-Trace: sv3-7g4mr7xkMnt8cW3a/BLu1LdSVCUY8nVNf8sssUIyR4n9JefjjcnmPBreg+W3zAdW0ZI+kTFkKiZLmvf!6Rtr+HNC45N1CR5lCcnl+b9kRdyWCyzLSSgKglv10KWZxie6puUxO3M+mRsg4wI3plPgWyzBGNyx!N6eDbs5BnlrCchGdPpCJ X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 5389 Xref: csiph.com comp.sys.apple2.programmer:740 Mark: I think you've got the makings of a fine project, and hope that you continue to tweak it. Having just finished up beta testing my first 'real' Cocoa project (a Spotlight Importer for AppleWorks AWP files) I can second the 'power of the Internet' you referenced as a vital learning tool. In my younger (read more patient) days, I probably could have sit down with a 700-page text on Cocoa and devoured it cover to cover, but I'm no longer that guy. Heck, I should give the guys on stackoverflow half the credit for my importer, and I never even had to ask a question! Many others had previously gone down the same or similar paths, and the answers poured forth. Maybe your experience is similar to mine, or maybe not. Anyway, as you continue on (CiderXPress does have a nice sound to it), I would ask that you consider preserving (since this is on Mac OS X) the ProDOS file attributes via the tried-and-true Finder attributes of Creator Code and FileType. I know, I know that the Creator Code is deprecated, but it's still available. FileType allows ProDOS File Type and Aux Type to be preserved, and is preferable, I think, to file extensions or xattrs. Sherlock did that (Creator Code/FileType) with ShrinkFitX and it's just swell. Keep us updated. Hugh Hood in article cc6c32fc-2760-45d5-a358-c0619de3894a@googlegroups.com, markpmlim@yahoo.com.sg at markpmlim@yahoo.com.sg wrote on 7/11/13 10:22 PM: > Hi to all, > > Since my lasting posting months back on the use of CiderPress' DiskImg > library, I decided to explore the practicality of using its classes via a > MacOSX GUI program. Starting from almost zero knowledge of Cocoa Programming, > I managed (thanks to the power of the Internet) to "cobble" a program that > implements a sub-class of NSOutlineView with Drag and Drop (DnD) capability. > The most difficult part was coming up with code which implement a UI which > would be similar to that of the MacOSX Finder. > > Honestly speaking, after writing the program, I still have a hazy idea of > Cocoa Programming concepts. And my understanding of CiderPress' DiskImg > classes is not much better. Probably this is due to an inability to perform a > paradigm shift after spending years on procedural programming. > > The program I have written doesn't have the functionalities of the original. > It only utilizes a subset of CiderPress' DiskImg classes and only deals w > ith uncompressed disk images (.2mg, .po, .do, .img & .hdv). It > > The program does two things well. It allows DnD of files and folders to/from > Finder and intra/inter-document DnD. In particular, IIGS resource forks are > preserved when files are dragged to Finder. The use of an OutlineView lends > itself well to the display hierarchical data that can be expanded and > collapsed, in file systems like ProDOS and HFS. > > The program code is messy and I still can't replicate certain aspects of > Finder's ease of use. Memory management leaves a lot to be desired and > accessing the files/folders in the disk images is not optimized. For example, > whenever I need to access a file/folder, I play safe using this code snippet: > > DiskImg *pDiskImg = (DiskImg *)diskImgObject.cppDiskImg; > DiskFS* pDiskFS = pDiskImg->OpenAppropriateDiskFS(); > DIError dierr = pDiskFS->Initialize(pDiskImg, DiskFS::kInitFull); > > // Convert path to a null-terminated ascii string > NSArray *components = [pathToFile componentsSeparatedByString: @"/"]; > NSString *tmpString = [components componentsJoinedByString: @ ":"]; > const char *cstr = [tmpString StringUsingEncoding:NSASCIIStringEncoding]; > A2File *pFile = pDiskFS->GetFileByName(cstr); > > Imagine copying hundreds/thousands of files consisting of tens of MBytes of > data. > > Perhaps a more experienced MacOSX programmer will have a better shot. In the > meantime, I am re-learning Cocoa Programming to get clearer idea of its > concepts. The cocoa docs are written by experts for experts; I am not one of > them. BTW, there is a program called exlibris (with source) on the internet > > https://github.com/dcsch/exlibris > > I had borrowed a number of ideas from it. > > Regards. > > Mark