This is important because, as you
probably suspect at this point, there??™s going to be code later to get the actual path and file
name as required, but that??™s not done here.
After that, it??™s nothing but a giant if...else if block where each if check is against a
menu item ID (as seen in the menu creation code in init()). The appropriate method is called
in each case, passing the pertinent information (directory node ID, file row ID, both, or neither).
The only exception to this model is the Using Fileman menu item. Since this is a single
line of code, there??™s no doUsing() method anywhere. Instead, a new pop-up window is
opened, and the using.htm file is loaded into it, and that??™s mission accomplished (and I mean
really accomplished, not in the Bush Administration sort of accomplished way!).
toolbarButtonClick() Method
The toolbar??™s click event handler, toolbarButtonClick(), is basically the same as the
menubarButtonClick() method, and so I haven??™t printed it out here. Have a look though, and
you??™ll see it??™s again just a giant if...else if block, and nothing more. It might have been possible
to somehow use the same method for both these events (it in fact may have worked to
give the toolbar buttons and menu items the same IDs, and therefore the same code should
have worked), but I decided against that simply to keep this more extensible.
Pages:
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535