I forgot to report a traceback:
Traceback (most recent call last):
File "d:\Dropbox\pyjamas\v8\pyjd\mshtmlevents.py", line 243, in
IDispatch_Invoke
result = mth(self.sender, event, None)
File "d:\Dropbox\pyjamas\v8\library\gwt\DOM.py", line 108, in_dispatchEvent
def _dispatchEvent(sender, evt, useCap):
File "d:\Dropbox\pyjamas\v8\library\gwt\DOM.py", line 962, indispatchEvent
dispatchEventImpl(event, element, listener)
File "d:\Dropbox\pyjamas\v8\library\gwt\DOM.py", line 999, indispatchEventImpl
listener.onBrowserEvent(event)
File "d:\Dropbox\pyjamas\v8\library\gwt\ui\Widget.py", line 68,
inonBrowserEvent
ClickHandler.onBrowserEvent(self, event)
File "d:\Dropbox\pyjamas\v8\library\gwt\ui\ClickListener.py", line 42,
inonBrowserEvent
listener(self)
File "HideWidgets.py", line 29, in OnLogin
self.OnLoginButton.setVisible(self.OnLoginButton, False)
File "d:\Dropbox\pyjamas\v8\library\gwt\ui\UIObject.py", line 256,
insetVisible
DOM.setStyleAttribute(element, 'display', "none")
File "d:\Dropbox\pyjamas\v8\library\gwt\DOM.py", line 896, insetStyleAttribute
if hasattr(element.style, 'setProperty'):
AttributeError: 'Button' object has no attribute 'style'
Il giorno lunedì 13 agosto 2012 10:59:14 UTC+2, Cesare Di Mauro ha scritto:
>
> Hi,
>
> I need to dynamically hide (and show) a widget or a panel at runtime.
>
> Looking at the API documentation, it seams that the correct method is
> setVisible.
> However any kind of tests I made failed with an exception raised:
> "AttributeError: 'Button' object has no attribute 'style'.
>
> Attached you'll find a simple example that I wrote (for Pyjamas 0.8,
> Python 2.6.4).
> There are two buttons and a label; clicking on one button hides itself and
> shows the other one, and viceversa.
>
> Please, can you give me any suggestion on how to make it work?
>
> Thanks
> Cesare
>
--