Web apps
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Web apps
I'm just trying out Revolution to see if I can get the hang of it.
I'm not a programmer and don't really have any real experience, although I have spent a few months recently trying to develop some software with Realbasic, with a bit of success (success defined as the bits I have done do at least work, although the coding ain't pretty). After saying that I've really struggled every step of the way trying to understand the overall concepts of Realbasic.
After a couple of hours with Revolution, I managed to do something that I've never been able to do with Realbasic despite my best efforts, so I'm thinking well maybe this is worth investing some time in. I dare say its not as good in other areas, but I was impressed with this bit.
The main thing for me is to be able to develop software that is cross platform. Being able to deploy it on the web would be a huge advantage and it seams very easy to do this.
So my first question is with the web apps. I have done a simple programme and put it on my sever and it works a treat. But if I save the web page locally, I can still run it. Ideally I wouldn't want this to be possible. Can this be prevented?
I'm not a programmer and don't really have any real experience, although I have spent a few months recently trying to develop some software with Realbasic, with a bit of success (success defined as the bits I have done do at least work, although the coding ain't pretty). After saying that I've really struggled every step of the way trying to understand the overall concepts of Realbasic.
After a couple of hours with Revolution, I managed to do something that I've never been able to do with Realbasic despite my best efforts, so I'm thinking well maybe this is worth investing some time in. I dare say its not as good in other areas, but I was impressed with this bit.
The main thing for me is to be able to develop software that is cross platform. Being able to deploy it on the web would be a huge advantage and it seams very easy to do this.
So my first question is with the web apps. I have done a simple programme and put it on my sever and it works a treat. But if I save the web page locally, I can still run it. Ideally I wouldn't want this to be possible. Can this be prevented?
Re: Web apps
I didn't make tests with Web version of RunRev, but you could try to use the commands "directory". It returns current working directory. You could then try to check if the working directory return a local path (it means the user is running the page from a locally saved!). See the documentation.
Cheers
Cheers
Runtime Revolution Widgets, tutorials, tips & tricks and more!
http://runrevwidgets.com/wiki
http://runrevwidgets.com/wiki
Re: Web apps
Thanks, yes I can see how that could do the trick.
Funny thing, I tried the same thing on 2 other computers and it doesn't run, it just says file not found.
Maybe it only ran before because the revlet file was on my computer ?
This would make some sense as when you save the html file locally, that wouldn't be any use without the revlet.
Funny thing, I tried the same thing on 2 other computers and it doesn't run, it just says file not found.
Maybe it only ran before because the revlet file was on my computer ?
This would make some sense as when you save the html file locally, that wouldn't be any use without the revlet.
Re: Web apps
Generally speaking, browser plugins have some restrictions caused by security police (to protect the final user).
So it could be possible the command "directory" return a not reliable result because, in web-browser, you cannot access to local files. If so, you could use this "behavior" to check if you are running locally or via web.
Cheers!
So it could be possible the command "directory" return a not reliable result because, in web-browser, you cannot access to local files. If so, you could use this "behavior" to check if you are running locally or via web.
Cheers!
Runtime Revolution Widgets, tutorials, tips & tricks and more!
http://runrevwidgets.com/wiki
http://runrevwidgets.com/wiki
Re: Web apps
Don't know if this will help but I use the following in an openStack handler
be well
Dixie
Code: Select all
on openStack
/*on the desktop */
if environment() = "development" OR environment() = "standalone" then
/* do something */
end if
/* on the server */
if environment() = "browser" then
/* do something else */
end if
end openStack
Dixie
Re: Web apps
Hello @Dixie, your solution is great, but I red the documentation (dictionary) and the return value "browser" does not exist. Are you sure it works (sometimes the dictionary does not contain some details
)
Thank you!

Thank you!
Runtime Revolution Widgets, tutorials, tips & tricks and more!
http://runrevwidgets.com/wiki
http://runrevwidgets.com/wiki
Re: Web apps
After reading your post, I just had one of those moments of self doubt... so I quickly but a field and a button on a stack
in the IDE it returns 'development', as a standalone it returns 'standalone application' ( I was sure it just used to return 'standalone') and running as a revlet returns 'browser'.
be well
Dixie
Code: Select all
on mouseUp
put environment() into fld 1
end mouseUp
be well
Dixie
Re: Web apps
It means the documentation is not updated! (it is not the first time I find this problem!).
Thank you for your test!
Thank you for your test!
Runtime Revolution Widgets, tutorials, tips & tricks and more!
http://runrevwidgets.com/wiki
http://runrevwidgets.com/wiki
Re: Web apps
Thanks for the tip Dixie, this looks quite promising.
If I put a file on the server with a password in it and put in the code to read and check the password when the programme is opened in a browser, then if the file is run locally the file and password won't be there and it could be programmed to close down ?
I'll give it go and see what happens.
If I put a file on the server with a password in it and put in the code to read and check the password when the programme is opened in a browser, then if the file is run locally the file and password won't be there and it could be programmed to close down ?
I'll give it go and see what happens.
Re: Web apps
Hi Duke...
This very basic script works... if your stack is running on the desktop then 'no questions asked!'
Be well
Dixie
This very basic script works... if your stack is running on the desktop then 'no questions asked!'
Code: Select all
on preOpenStack
put environment() into fld 1
end preOpenStack
on openStack
if environment() = "browser" then
ask password clear "Who are you ?" titled "Security"
if it = "Harry Jones" then put " I think I'll let you in..." into fld 2
end if
end openStack
Dixie
Re: Web apps
Hello @Dixie,
your code is clear and very useful. Can I put it inside my site, for "tips & tricks" area (Site is: http://runrevwidgets.com/wiki)? If you want, I can supply your name, or email, etc...
Cheers!
your code is clear and very useful. Can I put it inside my site, for "tips & tricks" area (Site is: http://runrevwidgets.com/wiki)? If you want, I can supply your name, or email, etc...

Cheers!
Runtime Revolution Widgets, tutorials, tips & tricks and more!
http://runrevwidgets.com/wiki
http://runrevwidgets.com/wiki
Re: Web apps
You may... if you send me your email address , I'll throw a script together that is a little more functional and descriptive for you.
john@ihouse.on-rev.com
be well
Dixie
john@ihouse.on-rev.com
be well
Dixie