MACROMEDIA FLEX BUILDER-USING FLEX BUILDER Use Manual page 57

Table of Contents

Advertisement

Scroll down the Flex Store page and click the grid view button.
5.
The click event calls the changeView function in the ActionScript file. Flex Builder does the
following:
Stops the application's execution at the breakpoint you set.
Switches to Code view and centers on the line with the breakpoint.
Displays the Call Stack panel in the Results panel group.
Click the Variables tab next to the Call Stack tab and then expand the Locals category.
6.
The Variables panel tells you that the
should be "grid". The function is receiving an incorrect value from the grid view button.
Switch to the flexstore.mxml file and click the Code button on the Document toolbar.
7.
Locate the
8.
<mx:Image>
and check the value of the changeView function's parameter:
<mx:Image source="@Embed('assets/images/list_off.png')"...
mouseDown="changeView('thumb')" />
The value of the parameter is wrong: it should be
Click the Stop button on the Debug toolbar and change the parameter from
9.
in the
<mx:Image>
Note: You cannot edit files when the debugger is running.
Save the file.
10.
Click Debug to recompile the application and check the grid view button again.
11.
After you click the application's grid view button in the embedded browser, the Variables panel
should confirm that the value of the
Click Continue on the Debug toolbar.
12.
Since you didn't set any other breakpoints, the application finishes executing. It should now
display the catalog's grid view.
For more information on using the ActionScript debugger, see
on page
87.
This completes the components tutorial. If you like, you can continue building the Flex Store by
completing the bindings tutorial.
view
tag associated with the grid view button (it uses the list_off.png image)
tag.
view
Tutorial: Building custom components with Flex Builder
variable contains the value "thumb". The value
.
'grid'
variable is now "grid".
"Debugging ActionScript"
to
'thumb'
'grid'
57

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flex builder

Table of Contents