[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
eXept User Forum • View topic - redisplay problem
Questions about smalltalk/x and its class library

redisplay problem

Postby duetto » 2. Feb 2010, 16:26

hi all,

i'm building a test application. the goal is to be able to add and remove widgets dynamically. the test application has a VerticalPaneView and 2 Buttons. clicking the buttons add labels to the paneview. i have implemented postBuildWith: and an action method for each button. i add the first label in postBuildWith:. when the application opens the initial label is displayed.

the problem is that on clicking the buttons the displayed label text doesn't change. i have inspected the subpane and the new label is in its subviews collection. i have tried sending the invalidate and redraw messages to the label and subpane with no results. what am i missing?

below are the postBuildWith: and button action methods. currentWidget and panelView are instance vars.


postBuildWith: aBuilder


|widget|

panelView := aBuilder componentAt: #ID222.

widget := Label new.
widget name: 'GenericLbl'.
widget label: 'START'.
panelView add: widget.
currentWidget := widget.
self halt.


buttonActionMethod1
<resource: #uiCallback>

|widget|

panelView removeComponent: currentWidget.
self halt. ****************** panelView subViews collection is empty
widget := Label new.
widget name: 'GenericLbl'.
widget label: 'FUEL'.
currentWidget := widget.
panelView add: widget. ****************** panelView subViews collection is has new label
panelView invalidate.
duetto
 
Posts: 22
Joined: 28. Sep 2009, 02:43

Re: redisplay problem

Postby jan_vrany » 10. Feb 2010, 09:22

jan_vrany
 
Posts: 28
Joined: 10. Dec 2008, 12:37


Return to Programming Help

Users browsing this forum: No registered users and 1 guest

Design by GB