====== Cocoa Pages ====== This page contains some Cocoa samples projects, written in Objective-C and built with XCode. No support is provided, I assume you are a developper and you known how using it. You can freely use this code and add it in your projects, if you find it useful. ====== Author ====== Pierre Molinaro . Pierre Molinaro is a member of the [[http://www.irccyn.ec-nantes.fr/irccyn/d/fr/equipes/TempsReel|Real-Time Sytems group]] from the [[http://www.irccyn.ec-nantes.fr/|IRCCyN Laboratory]] in Nantes, France. IRCCyN is an Unité Mixte de Recherche of [[http://www.cnrs.fr/|CNRS]]. Other softwares from the Real-Time Systems group can be found [[http://www.rts-software.org/|here]]. ====== Sample Projects ====== ===== documentAsPackage (january 15th, 2006) ===== This project shows how to override ''NSDocument'' class so that a document is a package : redefine ''-fileWrapperOfType:error:'' and ''-readFromFileWrapper:ofType:error:'' methods. The documents by the application defined by this project consists of two texts; the document package contains a ''firstText'' directory, that includes the ''TXT.rtfd'' file, and the ''secondText'' file : {{documentaspackage.png}} The [[http://cocoapages.rts-software.org/data/media/documentaspackageui.png|document user interface]] uses two text views for handling the two texts. The archive containing the project can be downloaded {{documentpackagesample.zip|here}} (built with XCode 2.4.1). ===== setRuleThickness (january 5th, 2006) ===== I had of lot of difficulties in using ''-setRuleThickness:'' method of the ''NSRulerView'' class (Mac OS 4.X). At last, I discovered the ruler is not displayed correctly if the float argument has not an integer value. Si I built a small application that hilites this feature (bug ?). This is an [[http://cocoapages.rts-software.org/data/media/setrulerthickness.png|window capture]]. This project can be downloaded {{problem_setrulethickness.zip|here}} (built with XCode 2.4.1).