Modify

Ticket #117 (closed bug: fixed)

Opened 9 years ago

Last modified 9 years ago

Load and save dialog from main menu not functional

Reported by: eliedebrauwer Owned by: eliedebrauwer
Priority: major Milestone: Techdemo 1
Component: scripts Version: trunk
Keywords: Cc:
Blocked By: Blocking:
Department:

Description

Somebody (perhaps me ? :-) ) broke the load/save dialog window from the main menu. If you click on them you get a stacktrace.

<scripts.engine.Engine instance at 0x96488ac>
action <Swig Object of type 'gcn::ActionEvent *' at 0xbff3aa90>
Traceback (most recent call last):
  File "../../engine/extensions/pychan/events.py", line 159, in _redirectEvent
    timer.delayCall(0,delayed_f)
  File "../../engine/extensions/fife_timer.py", line 101, in delayCall
    timer.callback = cbwa(real_callback, callback, timer)
  File "../../engine/extensions/fife_timer.py", line 96, in cbwa
    c(*args)
  File "../../engine/extensions/fife_timer.py", line 99, in real_callback
    c()
  File "../../engine/extensions/pychan/events.py", line 158, in delayed_f
    f( event )
  File "../../engine/extensions/pychan/events.py", line 308, in captured_f
    tools.applyOnlySuitable(self_ref().callbacks[group_name][event_name],event=event,widget=self_ref().widget_ref())
  File "../../engine/extensions/pychan/tools.py", line 56, in applyOnlySuitable
    return func(*args,**kwargs)
  File "/home/edb/parpg/FIFE/clients/parpg/scripts/world.py", line 98, in loadGame
    self.data.load(*args, **kwargs)
TypeError: load() got an unexpected keyword argument 'widget'
 File "../../engine/extensions/pychan/events.py", line 181, in action
    def action(self,e): self._redirectEvent("action",e)
 File "../../engine/extensions/pychan/events.py", line 159, in _redirectEvent
    timer.delayCall(0,delayed_f)
 File "../../engine/extensions/fife_timer.py", line 101, in delayCall
    timer.callback = cbwa(real_callback, callback, timer)
 File "../../engine/extensions/fife_timer.py", line 96, in cbwa
    c(*args)
 File "../../engine/extensions/fife_timer.py", line 99, in real_callback
    c()
 File "../../engine/extensions/pychan/events.py", line 158, in delayed_f
    f( event )
 File "../../engine/extensions/pychan/events.py", line 308, in captured_f
    tools.applyOnlySuitable(self_ref().callbacks[group_name][event_name],event=event,widget=self_ref().widget_ref())
 File "../../engine/extensions/pychan/tools.py", line 56, in applyOnlySuitable
    return func(*args,**kwargs)
 File "/home/edb/parpg/FIFE/clients/parpg/scripts/world.py", line 98, in loadGame
    self.data.load(*args, **kwargs)
 TypeError: load() got an unexpected keyword argument 'widget'

Catched director exception

Also note that when fixing this a load is triggered by setting load_saver and savegame in engine.py (which isn't very clean). Save however should work as is, but it seems something is wrong with the handling of the callbacks.

Attachments

Change History

comment:1 Changed 9 years ago by eliedebrauwer

  • Owner changed from parpg to eliedebrauwer

comment:2 Changed 9 years ago by eliedebrauwer

  • Status changed from new to closed
  • Resolution set to fixed

(In [326]) Ticket #117: Patch by eliedebrauwer, fixed load/save game callback, due to refactoring (see ticket #2) variable and function names got mixed up. closes #117

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.