Hello,
My plan is to write a Kaleidoscope application. I made a KaleidoscopeApp class derived from SheduledWindow, set a title and a minimum size and open the window. It works fine and elegant. Smalltalk defineClass: #KaleidoscopeApp superclass: #{UI.ScheduledWindow} indexedType: #none private: false instanceVariableNames: '' classInstanceVariableNames: '' imports: '' category: '' initialize super initialize. label := 'Kaleidoscope'. minimumSize := 100 @ 100. super open. ^self But how can I draw a line on it now? I simply cannot access a valid graphicsContext to use. All examples in the Application Development Guide and in the Visual Works Application Programming Guide works very well in a direct codification in the Transcript. But I can't aceess the graphicsContext from the ScheduledWindow class inerithed from inside the KaleidoscopeApp. Any idea? Thank's. Lorenzo. |
Hi Lorenzo,
please add a view to the window and do your drawing in the window's view. You can add views in the UIPainter, there's a ViewHolder widget that you should use. See the GuiDevGuide for info on how to use the ViewHolder and a Custom View. Kind Regards Karsten Am 03.08.10 18:59, schrieb LBerendsen: > Hello, > > My plan is to write a Kaleidoscope application. I made a KaleidoscopeApp > class derived from SheduledWindow, set a title and a minimum size and open > the window. It works fine and elegant. > > Smalltalk defineClass: #KaleidoscopeApp > superclass: #{UI.ScheduledWindow} > indexedType: #none > private: false > instanceVariableNames: '' > classInstanceVariableNames: '' > imports: '' > category: '' > > initialize > > super initialize. > label := 'Kaleidoscope'. > minimumSize := 100 @ 100. > super open. > ^self > > But how can I draw a line on it now? I simply cannot access a valid > graphicsContext to use. > > All examples in the Application Development Guide and in the Visual Works > Application Programming Guide works very well in a direct codification in > the Transcript. > > But I can't aceess the graphicsContext from the ScheduledWindow class > inerithed from inside the KaleidoscopeApp. > > Any idea? > > Thank's. > Lorenzo. -- Karsten Kusche - Dipl. Inf. - [hidden email] Georg Heeg eK - Köthen Handelsregister: Amtsgericht Dortmund A 12812 _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Hi,
I studied the Examples package and the ScratchWindow
source code.
This is what I discovered:
The ComposingComposite window is a space area that
automatically use the window bounds to size it self.
I didn't understood what the skipNextDamage do, but
makes the difference. Without it, I can't draw anything.
Finnaly, get a valid graphicsContext from active
window.
I don't like this approach, it is not
elegant.
But is a resonable assumption. Running the
initialization method, Kaleidoscope window is the active window.
Regards,
Lorenzo.
From: [hidden email]
Sent: Wednesday, August 04, 2010 3:35 AM
To: [hidden email]
Subject: Re: How to draw from a SheduledWindow inerithed
class? please add a view to the window and do your drawing in the window's view. You can add views in the UIPainter, there's a ViewHolder widget that you should use. See the GuiDevGuide for info on how to use the ViewHolder and a Custom View. Kind Regards Karsten Am 03.08.10 18:59, schrieb LBerendsen: > Hello, > > My plan is to write a Kaleidoscope application. I made a KaleidoscopeApp > class derived from SheduledWindow, set a title and a minimum size and open > the window. It works fine and elegant. > > Smalltalk defineClass: #KaleidoscopeApp > superclass: #{UI.ScheduledWindow} > indexedType: #none > private: false > instanceVariableNames: '' > classInstanceVariableNames: '' > imports: '' > category: '' > > initialize > > super initialize. > label := 'Kaleidoscope'. > minimumSize := 100 @ 100. > super open. > ^self > > But how can I draw a line on it now? I simply cannot access a valid > graphicsContext to use. > > All examples in the Application Development Guide and in the Visual Works > Application Programming Guide works very well in a direct codification in > the Transcript. > > But I can't aceess the graphicsContext from the ScheduledWindow class > inerithed from inside the KaleidoscopeApp. > > Any idea? > > Thank's. > Lorenzo. Karsten Kusche - Dipl. Inf. - [hidden email] Georg Heeg eK - Köthen Handelsregister: Amtsgericht Dortmund A 12812 _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc View
message @ http://forum.world.st/How-to-draw-from-a-SheduledWindow-inerithed-class-tp2312231p2312995.html
To unsubscribe from How to draw from a SheduledWindow inerithed class?, click here. |
Free forum by Nabble | Edit this page |