scope of variables

Hi all, I feel kinda foolish asking such simple questions, but the documentation sucks, or is it just me? Where is the info about scope of variables? I do not even understand how to declare global variables. So… can you point me too better basic documentation about variable scope. Thanks again…

For documentation, refer to the User Guide, Book 1: Fundamentals, page 121. A truly global variable will be added as a property of a Module and marked as Global scope.

Add a module.
Add a property to the module.
Mark it as global.

It sounds like you are trying to find everything in the Language Reference that pops up when you ask for help from within Xojo and that is not the place to go for the type of question you asked here. Language Reference manual is mainly meant to be used when you are familiar with the language and just need to refresh your memory on the syntax of a particular object, method, etc. When you are looking for answers of the “How To” type, the User’s Guide is the place to go. Unfortunately the current PDFs that make up the Users Guide that come with Xojo do not have table of contents in them so I often have to use the search feature to find what it is that I am looking for in those PDFs but the results are worth the effort.

If you are new to Xojo it is a great idea to spend time going through those User’s Guide PDFs. They have been highly improved with the advent of Xojo and hopefully in the not too distant future the table of contents and possibly an index will be added to them to make them even better.

Harrie, the user guides do have a table of contents. On MacOS in preview you can bring up the table of contents through preview menu - view and table of contents. Other viewers should be able to view the TOCs as well.

Yes, as @William James notes, use the sidebar of your PDF viewer to see the Table of Contents for the User Guide books (or use the iBooks versions).

I’ve also recently added the Table of Contents for each book to the online wiki to help with searching there.

WIlliam,

I have never been a huge fan of PDFs. I’ll take a book in my hands any day. Because of this I have never dug into the Preview goodies. Now, with your info as to how to get the TOC to appear I guess I had better start reading about the ins and outs of Preview.

One of my biggest peeves with PDFs is trying to get an exact page size set up such that hitting the page down shows exactly the next page with no drifting of the top of the page. Got a good hint on how that is accomplished.

Thanks for the enlightenment. Guess an old fart can learn new tricks. :wink:

At least with Preview, you can use the “Single Page” setting in the View menu to show one page at a time.

The same can be done in Acrobat and Reader as well. Using Acrobat, you can also set an open option so that the document always opens in this view, as well as other options, such as opening with the Bookmarks panel open. I can’t say if this setting will work with other non-Adobe PDF viewers. I don’t have the MBS plugins, but they might allow setting this option if you are creating the PDF through code.