Think of something that you wish Authorware could do but it doesn't?  Let the our good friends at Macromedia know via the wishlist.

Please let us know if you find any of the materials on this site inappropriate or offensive. Please include the url and why the material should be reviewed.

Comments and questions about the site are also welcome. Please no Authorware questions, use the AWARE list.

Back

B5005 - Why isn't my records location working when I jump to another file?

by - Joseph Ganci


Okay, it might be late in the afternoon but this is a nasty one I cannot figure. In my first program, called Inloader, I setup some variables at the beginning:

G_Dummy:= #DummySymbol
G_UserFileLocation:=RecordsLocation^"UserRec"

The G_Dummy variable is just there because of technote 13621 from Macromedia. The G_UserFileLocation is pointing at where I want to store the users data. The next thing I do is to make a call to my MainMenu program:

JumpFile(FileLocation^"MainMenu";"G_*";G_UserFileLocation)

My intention is to call the MainMenu program, transfer all variables starting with G_ and change the RecordsLocation to the value of G_UserFileLocation.

What happens is: MainMenu is called and all variables are transferred. But the RecordsLocation is still equal to "C:\\WINDOWS\\A5W_DATA\\" instead of "C:\\WINDOWS\\A5W_DATA\\UserRec". How come?

I have remembered to set G_Dummy:= #DummySymbol at the beginning of each of my programs and the only program that is set to "Resume" is the MainMenu program. Why can't I change the RecordsLocation? I was able to do it in A4W, but it doesn't seem to work (for me) in A5W. I give up... I'm going home now...

Another helpful person wrote the following response:
I may be wrong but you might have too many " and you use ; instead of a comma in your statement.  Try this:

JumpFile(FileLocation^"MainMenu,G_*",G_UserFileLocation)

I then responded with the following:
Actually, the semicolon is just fine. Ole lives in Europe where the semicolon is used as a delimiter, not a comma. If you are going to be sharing code with someone outside the USA, it's a good idea to place a space before and after your comma delimiters, like so:

Function(arg1 , arg2 , arg3)

My understanding (from Danny, I believe) is that this helps to convert (automatically?) over to semicolons when used outside the US keyboard layout. The original line:

JumpFile(FileLocation^"MainMenu";"G_*";G_UserFileLocation)

was correct but when you set up your variable:

G_UserFileLocation:=RecordsLocation^"UserRec"

you forgot to place the \\ at the end:

G_UserFileLocation:=RecordsLocation^"UserRec\\"

Authorware didn't recognize the new records location because it was expecting the folder delimiter, which you need to provide. Hope this helps!

There are 0 reviews
Add your review
Back