The caret synbol( ^ ) in bindings
The caret symbol( ^ ) indicates that the value should be taken from the parent component.
In case of personal memory failures...
The caret symbol( ^ ) indicates that the value should be taken from the parent component.
Since Unit Tests are run from the command line( or Ant ) access to Resources of a WebObjects project are no good with ResourceManager. Simple functions to get resources based on the filesystem:
/**
* Returns a path to a resource filename in a folder(s) under the root folder
* */
private String resourceLocationString( String filename, String folder ) {
String urlToFile = getClass().getResource( "/" ).toString();
urlToFile = urlToFile.replace( "bin/", "" );
urlToFile = urlToFile.replace( "file:", "" ); // now we should be at the projects root directory
urlToFile = urlToFile.concat( folder + "/" + filename );
return urlToFile;
}
/**
* Returns data for pdf file
* */
private byte[] bytesForPDFResource( String urlToFile ) throws FileNotFoundException, IOException {
FileInputStream in = new FileInputStream( urlToFile );
byte[] data = new byte[in.available()];
in.read(data);
return data;
}
FileOutputStream fs = new FileOutputStream( ABSOLUTE_PATH_TO_FILE );
fs.write( SOME_DATA );
fs.close();
Need to call simple SQL commands, like getting the next primary key by calling a sequence:
NSArray rawRows = EOUtilities.rawRowsForSQL( EDITING_CONTEXT, MODEL_NAME, SQL_STRING, NSArray.EmptyArray );
NSDictionary rowWithPK = (NSDictionary)rawRows.objectAtIndex( 0);
Object maxPK = rowWithPK.objectForKey( "NR" );
Installined EZDrummer and created a stereo Instrument track in Pro Tools LE 7.1.1 but didn't get no output from the track. I had other audio tracks that worked fine, and creating a stereo audio track got the output from EZDrummer but you need the Instrument track to drop the midi loops onto. After about 2 hours of hacking Pro Tools, reading forms, reading manuals and other desperate measures I noticed that the volume on my Instrument track was turned down and the only thing I needed to do was to crank it up. Since this is not the case with audio tracks tracks I failed to check this...that won't happen again ;)
Keep forgetting how to add a framework:
cd /Libarary/Frameworks
ln -s /Developer/workspace/EkjaFramework/dist/EkjaFramework.framework/ EkjaFramework.framework