New topic: Custom Window using unified toolbar window
<http://forums.realsoftware.com/viewtopic.php?t=33313> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message brianheibert Post subject: Custom Window using unified toolbar windowPosted: Thu Apr 08, 2010 7:11 pm Joined: Sat Jan 23, 2010 3:03 pm Posts: 140 I am creating a custom window using a old unified toolbar window project by someone on the forums... Here's the problem I am running into... Code:I am getting a NilObject Exception on the the following line... dim f as FolderItem = GetResourceFolder.Child("windowtitle.tif") dim b as binaryStream = f.openAsBinaryFile(false) Code:Sub LoadUnifiedImage() dim f as FolderItem = GetResourceFolder.Child("windowtitle.tif") dim b as binaryStream = f.openAsBinaryFile(false) dim spec as integer = b.handle( binarystream.HandleTypeMacFileSpecPointer ) declare function GetGraphicsImporterForFile lib "QuickTime" ( theFile as integer, byRef gi as integer ) as integer declare function GraphicsImportCreateCGImage lib "QuickTime" ( ci as integer, byRef imageRefOut as integer, flags as integer ) as integer declare function CloseComponent lib "Carbon" ( aComponentInstance as integer ) as integer dim error as integer dim graphicsImporter as integer error = GetGraphicsImporterForFile( spec, graphicsImporter ) dim image as integer error = GraphicsImportCreateCGImage( graphicsImporter, image, 0 ) me.unifiedImage = image call CloseComponent( graphicsImporter ) b.close End Sub Here's where the problem lies Code: dim f as FolderItem = GetResourceFolder.Child("windowtitle.tif") dim b as binaryStream = f.openAsBinaryFile(false) What is wrong with that code? probably isn't finding the file in the Resources folder? I have checked I have the file in the resources folder and it is called windowtitle.tif Maybe I am not locating it right in REALstudio Any ideas on why this isn't working The old program of mine that used this does work in OS X 10.6 I am trying to fix the source code that uses this unified window to work in 10.6, the compiled app works. Brian Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
