Rev Packaged App hanging
Alex Tweedly
alex at tweedly.net
Mon Mar 7 16:51:41 EST 2005
Steve Bonham wrote:
> REVers,
>
> Using Revolution, I've created a main stack that reads from and writes
> to an external preferences text file entitled "TJsettings.txt".
>
>
> In the stack script (on openstack) starts with:
>
> put the filename of this stack into MyPathWay
> repeat until the last char of myPathWay is "/"
> delete last char of MyPathWay
> end repeat
>
> put myPathWay & "TJsettings.txt" into MyPathWay
>
>
> answer myPathway --"BUG TEST" line
>
>
>
> open file MyPathWay
>
> read from file MyPathWay until EOF
> put it into TheSettings
>
> put theSettings into fld "settings"
>
> ---------
> then I'll pull info from fld setting to reset preferences
>
> Only thing is-- it's not working...
>
>
> The "BUG TEST" line results in
> "Users/steve/Desktop/JeopardyQs/TJsettings.txt" which
> is accurate. But nothing is appearing in the fld "settings"
>
> Any advice?
The Subject line suggests the app is hanging - while the description
sounds like it completes, just fails to get anything into the field.
So I'm not quite sure if this will help, but ...
> open file MyPathWay
put "Result from open = " && the result & cr after msg
>
> read from file MyPathWay until EOF
> put it into TheSettings
put "Result after read = " && the result & cr after msg
>
> put theSettings into fld "settings"
btw - did you include a "close MyPathWay" ? Is it possible that the
file was already open and had reached EOF ?
(I'm not sure what happens when you "open" a file that is already still
open ....)
Alternatively, try
put URL ("file:" & MyPathWay") into TheSettings
instead of the open and the read.
--
Alex Tweedly http://www.tweedly.net
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.6.0 - Release Date: 02/03/2005
More information about the use-livecode
mailing list