Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!ucbvax!agate!shelby!polya!ali From: ali@polya.Stanford.EDU (Ali T. Ozer) Newsgroups: comp.sys.next Subject: Re: help requested with finishing touches on animation program Message-ID: <11342@polya.Stanford.EDU> Date: 17 Aug 89 05:56:30 GMT References: <57670@tut.cis.ohio-state.edu> Sender: Ali T. OzerReply-To: aozer@NeXT.com (Ali Ozer) Organization: . Lines: 54 In article <57670@tut.cis.ohio-state.edu> Mark Jansen writes: >1) I am using the bitmap method composite:toPoint: and trying to seqeuence > thru a series of bitmaps onto a window but I am getting blocking > of those composites into very fast sequences of images that then > hesitate. I would prefer, a smoother animation and am aware of the > animation timer method found in the example BreakApp. BreakApp is smooth because of the call to NXPing(), not because of the timer. PostScript to the server is normally buffered and might be sent in clumps. BreakApp calls NXPing() after every frame is drawn; the pinging assures that all PostScript is sent down to the server. Calling a PS wrap that returns a value (such as PScurrentgray() or PScurrentmouse()) also causes all buffered PostScript to be sent down. >2) I draw to both window directly and to bitmap, yet when I composite from > bitmap to window the y axis is reversed running from the upper > left corner rather then the lower left corner, yet I draw with the > same code. Bitmaps are flipped by default; the origin is at the upper left corner and grows downward. Call setFlip:NO after you create a bitmap if you don't want it flipped. >4) My application has three windows. One of which I want to resize upon > initialization. I have an init() function I call from either a > button press or from my application method new+. Yet their behavior > is very different. When done from new, nothing seems to happen. > What am I doing wrong here? Perhaps the window isn't created yet at [Application new] time? If the window is connected to an outlet it probably isn't; the outlets are assigned during loadNibSection: (or loadNibFile:) time, after all objects are instantiated. If you want to do something to that window at "application init" time, consider doing either when the setXXX: method (to assign the outlet to the window) is called, or give your application's delegate an "appDidInit:" method and do it there. This method gets called after all initialization, right at the beginning of the "run" method. >5) When I was using Interface Builder I found that I needed more or less > outlets and action/target routines after my initial creation of > the project file. I realize that the dreaded UNPARSE button can > only be pressed once but it would seem that there should be ways > to add more outlets and action/targets within IB. Is there? No. However, if you create many new outlets and need to create the setXXX: code, it might be worthwhile to rename the original .h and .m files, unparse the new skeleton .h and .m files, do some cut-n-pasting to bring the new code from the new .h & .m files to the saved ones, and rename the saved ones back. Ali Ozer, NeXT Developer Support aozer@NeXT.com