ftp.nice.ch/peanuts/GeneralData/Usenet/news/1989/CSN-89.tar.gz#/comp-sys-next/1989/Jul/A-couple-of-questions-on-IB-use

This is A-couple-of-questions-on-IB-use in view mode; [Up]


Date: Sun 27-Jul-1989 15:19:09 From: Unknown Subject: A couple of questions on IB use I've got a couple of problems with the Interface Builder. Please bear in mind at the outset that I'm a fairly end-userish type of person (at least on the NeXT). I find the online docs on the IB *very* insufficient and one of our local Chem. profs has hoarded up the technical docs. So I apologize in advance if these are ignorant questions with simple answers. First question (simple): I'd like to be able to create my own icons for applications. I've made the .tiff file for the icon, but when I specify the filename in the project window of IB, it still uses that same ol' ugly default icon. Is this one of the features that doesn't work yet? Is there a way around it? Second question (more complicated): I've got a Unix program that converts .GIF files to PostScript files. Using it from the shell is easy ("gif2ps infile.gif > outfile.ps") and works pretty well. But I'd like, if possible, to slap a NeXT interface on it. Should be simple, right? Wrong! I'm using Yap as a 'model' of what I'd like it to come out like (I'd like it to run just like Yap, only convert the file before opening it). I thought it would just be a matter of linking an extra command or two into the code. No such luck. Now I'm hopelessly lost in a maze of IB spaghetti. And I thought ResEdit was a pain! Anyway, if some kind soul out there with a little spare time could type in some guidelines, procedures or suggestions, I would be eternally grateful. It seems like it should be so simple if I could just figure out what I'm doing wrong. Thanks in advance, Bryan +--------------------------------+--------------------------------------------+ | Bryan Whitehead | The currents rage so deep inside us | | from deep in the heart | This is the age of Video Violence | | of Darkest Kansas... | No age of reason landing upon us | | KU Academic Computing | This is the age of Video Violence | | Lawrence, Ks. | - Lou Reed | +--------------------------------+--------------------------------------------+ "Television is the retina of the mind's eye" - Professor Brian O'Blivion >From: bruceh@zygot.UUCP (Bruce Henderson)
Date: Sun 29-Jul-1989 17:26:10 From: Unknown Subject: Re: A couple of questions on IB use In article <6768@kuhub.cc.ukans.edu> BRYAN@kuhub.cc.ukans.edu writes: >I'd like to be able to create my own icons for applications. I've made >the .tiff file for the icon, but when I specify the filename in the >project window of IB, it still uses that same ol' ugly default icon. >Is this one of the features that doesn't work yet? Is there a way around >it? First make sure your icon is legal --- does it show up in the Project window when you type it's name in or not? If not, then the icon is probably not the correct type. It needs to be 48x48, with alpha. (Best way to start on a new icon is probably to load one from one of the examples apps in /NextDeveloper/Examples...) Assuming IB likes your icon, then there is probably a missing step in what you are doing. Here's what needs to be done once you have your executable: 1. Put the executable in ~/Apps or /LocalApps. 2. Select the "Find Tools" command from the "Utilities" menu. Workspace Manager looks at the above two directories (and three more, /NextDeveloper/Apps, /NextDeveloper/Demos, and /NextApps) at login time and reads all the icon information from the executables in these directories. This allows it to cache information about what icons are used for what files and what apps deal with what documents. Because this caching is done at login-time, Workspace will not recognize and display your icon if you just drop your app in one of the above directories. You can force Workspace to rescan all the executables in its path with #2 above or by simply logging out and back in. While developing an app, you can simply put any old version of the app (even if it's broken) in your ~/Apps directory. Then the latest version of the app in your development directory will show the correct icon and you will be able to execute the app by double-clicking on it. This works because once Workspace caches the icon information, it uses it in displaying the icons of files in any directory, not just the above five. >Second question (more complicated): >I've got a Unix program that converts .GIF files to PostScript files. >Using it from the shell is easy ("gif2ps infile.gif > outfile.ps") and >works pretty well. But I'd like, if possible, to slap a NeXT interface >on it. Should be simple, right? Wrong! I'm using Yap as a 'model' of >what I'd like it to come out like (I'd like it to run just like Yap, only >convert the file before opening it). I thought it would just be a matter >of linking an extra command or two into the code. No such luck. Hmm, sounds like you might be able to get away with a system() call right after you get the file name from the open panel. Where Yap gets its file name from the user, check to see if the extension is ".gif". If it is, create a string "gif2ps filename.gif > filename.ps", system() it, and open filename.ps. I suppose the ps version can be written to /tmp, to avoid cluttering the directory with .ps versions of .gif files. The above would probably be the simplest solution but perhaps not the most efficient or elegant... Ali Ozer, NeXT Developer Support aozer@NeXT.com >From: jpd00964@uxa.cso.uiuc.edu

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Marcel Waldvogel and Netfuture.ch.