Although everything in Squeak is open, I find it quite hard sometimes to track down what is calling what. It would be great if I could open up a window to see which object is being called when I e.g. right click on the surface and bring up the World menu etc. Is there some way to turn on the debugger and just let it run, or something like that? thanks Andy B _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
[hidden email] wrote:
> > Although everything in Squeak is open, I find it quite hard sometimes to > track down what is calling what. It would be great if I could open up a > window to see which object is being called when I e.g. right click on > the surface and bring up the World menu etc. > > Is there some way to turn on the debugger and just let it run, or > something like that? Debugging the UI is tricky, because the debugger uses the UI. But you can see what methods get called using the profiler. For instance, you can do this in a Workspace to debug the Morphic UI for 4 seconds (4000 msec): now := Time millisecondClockValue. TimeProfileBrowser spyOn: [ [ Time millisecondClockValue - now > 4000 ] whileFalse: [ World doOneCycleNow ] ] After 4 seconds, you will see a TimeProfileBrowser pop up that will show what messages were called, and how many times. This works by interrupting the execution of the block given to spyOn: every millisecond or so, so it can miss methods that don't get called very often or are very fast. You can also use the simulator to run code; this is much slower, but won't miss anything. Note that some primitives (for instance, in the BalloonEngine) won't simulate properly. now := Time millisecondClockValue. MessageTally tallySends: [ [ Time millisecondClockValue - now > 20000 ] whileFalse: [ World doOneCycleNow ] ] -- Ned Konz [hidden email] http://bike-nomad.com _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Has anyone hooked up the OpenGL libraries in Squeak on
the FreeBSD platform? Squeak runs great on FreeBSD. I'm running the 3.7 VM from the FreeBSD ports collection right now. Problem is, I'm trying to run Croquet, which tries to make OpenGL calls. Squeak tries to use GLUnixX11LE calls on my i386 box, but an automatically generated method tries to hook up to "opengl32.dll", which is a Windows sort of thing which doesn't exist on a FreeBSD box. Automatically generated methods give me the heeb-jeebs. How can I get the Squeak VM hooked up correctly to /usr/X11R6/lib/libGL.*? Mike O'Brien _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Am Jan 19, 2007 um 0:47 schrieb Mike O'Brien:
> Has anyone hooked up the OpenGL libraries in Squeak on > the FreeBSD platform? Squeak runs great on FreeBSD. I'm > running the 3.7 VM from the FreeBSD ports collection right > now. Problem is, I'm trying to run Croquet, which tries > to make OpenGL calls. Squeak tries to use GLUnixX11LE > calls on my i386 box, but an automatically generated method > tries to hook up to "opengl32.dll", which is a Windows > sort of thing which doesn't exist on a FreeBSD box. Actually, no - it's just that the source code does not match what gets executed. When starting up, the setup code patches the correct library name into all the glue code methods (see OpenGL>>privateInstallLibrary:). Actually, after running OpenGL once, switch to decompiled code in the browser and you should see the correct name there. This is confusing to a lot of newcomers (actually, I suspect most of the seasoned folks never looked at that stuff either), so you might lobby for getting the source code changed to make this more obvious - it works, so hasn't been touched in years. > Automatically generated methods give me the heeb-jeebs. > How can I get the Squeak VM hooked up correctly to > /usr/X11R6/lib/libGL.*? Most probably you just have to put in the actual library name. See method #openGLLibraryName - this might return an invalid library for your system. Per default we just return 'GL' on unixish systems, which the module loader expands into various names like 'libGL.so'. However, on Linux there most often is no 'libGL.so', but only 'libGL.so.1', so the library would not be found. Therefore, a special case is in there that returns 'libGL.so.1' on Linux. I'm not sure what the library is named on FreeBSD, but you only have to patch this in a single place, namely #openGLLibraryName. HTH, - Bert - _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Free forum by Nabble | Edit this page |