From: Karl-Heinz W. <kh...@wi...> - 2005-08-25 14:16:09
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 25.08.2005, at 16:07, Jonathan Paisley wrote: > On 25 Aug 2005, at 14:37, Karl-Heinz Wild wrote: > > >> Can someone give me a hint what I should looking for. >> Maybe a flag in the .nib part of the application. >> > > I'm afraid I couldn't find the link to Xcode project in the article > to download to see the original. http://www.macdevcenter.com/mac/2004/10/12/examples/code.zip > Could you explain in more detail what's not working? What I'm > assuming is that when you've selected some files in the dialog box > they don't get added to the table view... Ok. I'll try to explain. In the Window I've created a NSTableView with a bind toe the Controller Outlet - FileTableView => NSTableView( Files ) In the original source I click on the + Button an select one or more files in the dialog. After pressing OK the files will be in the FileTableView. Not so in my rewritten code. I've added some debuging statements and all seem ok, except the files will not be written to the FileTableView. > Perhaps you could post the entire source for the controller class, > or else put a zip file of your project online somewhere and post > the URL here. require 'osx/cocoa' class Controller < OSX::NSObject include OSX ib_outlets :fileTableView, :fileType, :archiveFile, :fileTypeView, :mainWindow def initialize @files = Array.new end def addFile(sender) oPanel = NSOpenPanel.openPanel oPanel.setAllowsMultipleSelection(true) buttonClicked = oPanel.runModal if buttonClicked == NSOKButton files = oPanel.filenames count = files.count for i in 0..count - 1 # puts files.objectAtIndex( i ) @files.push( files.objectAtIndex(i)) end @fileTableView.reloadData end end def removeFile( sender ) puts "removeFile methode" end def browseForArchive( sender ) puts "browseForArchive methode" end def createArchive( sender ) puts "createArchive methode" end def extractArchive( sender ) puts "extractArchive methode" end def numberOfRowsInTableView( afileTable ) @files.length puts "hier" end def tableView_objectValueForTableColumn_row( afileTable, aTableColumn, rowIndex ) @files[ rowIndex ] puts "dort" end end Thanks. Karl-Heinz -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iD8DBQFDDdKck3cK3IljlKMRAoWJAJ9gOH2wDLjlfWaT9YR+6uQVFcCGVwCeLa6d cPcNjoLN8eEn+z58a8NG/7M= =EWTr -----END PGP SIGNATURE----- |