Errors?

As a total newcomer to Xojo, I am reading very carefully the book “Introduction to programming with Xojo”, by Brad Rhine, Spring 2013 edition. Everything went fine until page 67, when the book says that to put some more parameters in a method, I have just to add multiple parameters separated by commas. Well, when I do that, I get two errors, saying that “This method requires more parameters than were passed - FillFontListBox(Me.Text)” , one on the Window1.SearchField.TextChange, line 1 and the other on Window1,FontListBox.Open, line 1.

Can someone try to reproduce the FontPreviewer.xojo_binary_project, as per the book, and help me to find what I am doing wrong?

Thanks a lot for anyone that may help me.
Robert Fuchs

I reviewed that section, but it’s not clear to me what problem you would be having. The text describes adding a parameter to FillFontList and then updating the call so it works. And section 4.4 covers default parameters.

What change did you make to FillFontListBox?

Thanks for your answer. Well, I followed exactly what is written on the book. At the FillFontListBox Open event , I typed FillFontListBox(""). Everything works fine until I try to type the two more parameters - addMeatBalls as Boolean and includeGarlicBread as Boolean, separated with commas. I also left the searchString as String parameter, also separated with a comma from the other two. When those two parameters are added to the method, I get 2 errors saying:

Window1.SearchFiel.TextChange, line15 This method requires more parameters than were passed FillFontListBox(Me.Text)
Window1.FontListBox.Open, line 1 This method requires more parameters than were passed FillFontListBox("")

That’s it. I am really at a lost…
I shall be gratefull for any explanation about WHAT AM I DOING WRONG !!!
Regards,

Robert Fuchs

From what I gather, the food-themed examples are hypothetical and not mean to be typed in to the project. Skip that and move on to 4.4.

Robert, unless I am misreading your message you changed the number of parameters in the methods definition. Did you specify those additional parameter values in the routines that called the changed method? If a method has required parameters, then they must all have values when calling that method. (There are a few exceptions to this rule.) So…

[quote]Window1.SearchFiel.TextChange, line15 This method requires more parameters than were passed FillFontListBox(Me.Text) [/quote]
…would require calls like

FillFontListBox(Me.Text, True, True) // Yes for garlic bread and for meatballs!

Thanks all of you that helped me. I shall try the example Dale wrote, and about Paul Lefebvre sugestion, that’s exactly what I did…
Regards,
Robert