Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001216 [tweak] Any minor always 05-17-05 06:07 05-17-05 22:30
Reporter starbow View Status public  
Assigned To
Priority normal Resolution fixed  
Status resolved  
Summary 0001216: CPlayer>>onKeyStroke:signal triggers setupCostume...
Description I put
self onKeyStroke: #(ctrl 30) signal: #scrollWheel.
into my initialize method, and it calls costume, which calls wearDefaultCostume, which calls setupCostume, which was a problem as I had not finished seting everything up for the setupCostume call. Easily fixed by making the onKeyStroke call the last line of the initialize, but odd never the less
Additional Information
Attached Files

- Relationships

- Notes
(0001497 - 223 - 223 - 223 - 223 - 223 - 223)
bert
05-17-05 12:27

Actually, it's not odd - everything costume-related should be done in setupCostume, not in initialize. Without a costume you cannot reasonably have keyboard behaviour, so it's notmal that this triggers the costume creation.
 
(0001500 - 153 - 159 - 303 - 303 - 303 - 303)
starbow
05-17-05 19:37

Someone should update the FAQ entry http://tweak.impara.de/ABOUT/FAQ#WidgetBehavior [^]
that tells you to put the onKeyStroke:signal: calls into initialize.
 
(0001501 - 374 - 374 - 374 - 374 - 374 - 374)
bert
05-17-05 19:49

Well, I formulated the above a bit absolute ... it *is* okay to put something like that into initialize - it just happens to trigger the costume creation and invokation of #setupCostume. So only if you actually *have* a #setupCostume method that depends on a finished #initialize you need to care about this. For many players it is just fine to do everything in #initialize.
 
(0001503 - 113 - 113 - 113 - 113 - 113 - 113)
andreas
05-17-05 22:30

Declaring the issue as resolved by fixing the documentation. The FAQ now uses setupCostume instead of initialize.
 

- Issue History
Date Modified Username Field Change
05-17-05 06:07 starbow New Issue
05-17-05 12:27 bert Note Added: 0001497
05-17-05 19:37 starbow Note Added: 0001500
05-17-05 19:49 bert Note Added: 0001501
05-17-05 22:30 andreas Status new => resolved
05-17-05 22:30 andreas Resolution open => fixed
05-17-05 22:30 andreas Assigned To  => andreas
05-17-05 22:30 andreas Note Added: 0001503
05-17-05 22:30 andreas Assigned To andreas =>


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
49 total queries executed.
37 unique queries executed.
Powered by Mantis Bugtracker