From: richard k b. <ri...@co...> - 2005-09-01 23:56:18
|
i'm a pythonCard newby, and these questions are probably way stupid. but answers to either would help me considerably: #1: i've trying to make a minor, test change to the flatfileDatabase sample. i thought i would decorate each card with a bit of static text that shows its creation timestamp. so i added a new component in the .rsrc.py file: > {'type':'StaticText', > 'name':'enterDate', > 'position':(427, 19), > 'text':'yymmdd', > }, > using resourceEditor i see that the command associated with the "New Card" button is "editNewCard" and so i then added a handler to my class: > def on_editNewCard_command(self, event): > print "editNew" > self.components.enterDate.text = datetime.datetime.now().strftime('%y/%m/%d %H:%M') > flatfileDatabase.FlatfileDatabase.on_editNewCard_command(self, event) but nothing happens?! whether i click on the NewCard button, or use the Menu's "New Card" option (which MenuEditor shows me emits the same command), i DO get a new card, but i do NOT get the enterDate static string to be anything other than its default "yymmdd". i also do NOT see the "editNew" debugging message printed (whether i have full logging and debugging on or not). #2: i'd like to make use of dialogs described at: pythoncard.sourceforge.net/dialogs/ using the codeEditor's scriptlets seems helpful, but can you point me to JUST WHERE these bits should be dropped, into an application like flatfile, addressbook...? thanks for any help. rik |