Auto-Updater

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
bsouthuk
Posts: 261
Joined: Fri Dec 05, 2008 7:25 pm

Auto-Updater

Post by bsouthuk » Tue Sep 21, 2010 6:32 pm

Hi

I use the following code in my standalone which downloads my stack from the internet due to constant every day changes to my application. I need my customers to have the latest version every time they login:

Code: Select all


on mouseUp
  put url "http://some.url.to.a.stack.on.the.web" into x
  put x into url "binfile:stack.rev" 
  go stack "stack.rev"
end mouseUp

This works fine but I have recently added database/mySQL integration to the stack that is downloaded and even though when building my app as a standalone I tick the right boxes in the standalone settings the mySQL/Database side does not work.

Does anyone have any ideas as to why I need to do here?

Thanks

Dan

shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Contact:

Re: Auto-Updater

Post by shadowslash » Tue Sep 21, 2010 6:40 pm

Normally your set up should work. As for your updated stack script, here's a simpler script I believe would do what you're after on your mouseUp handler.

Code: Select all

on mouseUp
  go stack "http://some.url.to.a.stack.on.the.web"
end mouseUp
Parañaque, Philippines
Image
Image

bsouthuk
Posts: 261
Joined: Fri Dec 05, 2008 7:25 pm

Re: Auto-Updater

Post by bsouthuk » Tue Sep 21, 2010 6:56 pm

The script you have given doesnt work at all - the error i am getting is saying no such card.

The script I am using downloads the stack fine so issues with that this. Its just the database/mySQL functions do not work

shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Contact:

Re: Auto-Updater

Post by shadowslash » Tue Sep 21, 2010 7:03 pm

bsouthuk wrote:The script you have given doesnt work at all - the error i am getting is saying no such card.

The script I am using downloads the stack fine so issues with that this. Its just the database/mySQL functions do not work
Odd... What version are you using?
Parañaque, Philippines
Image
Image

bsouthuk
Posts: 261
Joined: Fri Dec 05, 2008 7:25 pm

Re: Auto-Updater

Post by bsouthuk » Tue Sep 21, 2010 7:09 pm

I'm using the latest 4.5

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Auto-Updater

Post by Klaus » Wed Sep 22, 2010 11:10 am

Hi Daniel,

what exactly do you mean with "Its just the database/mySQL functions do not work"?
"This or that does not work" is not a really helpful comment for finding bugs/errors, please spread the word 8)


Best

Klaus

P.S.
Try this
...
go stack URL "http://some.url.to.a.stack.on.the.web"
...

bsouthuk
Posts: 261
Joined: Fri Dec 05, 2008 7:25 pm

Re: Auto-Updater

Post by bsouthuk » Wed Sep 22, 2010 11:45 am

Sorry Klaus - i will never do that again -such a bad habit!

I have got it wrong - my stack is connecting to my database fine but the problem is that the datagrids do not respond when clicking on the rows/columns. The scroll bar moves up and down but the content inside the datagrid does not move.

This is only when I donwload my stack using a splash screen standalone.

If I build the stack that I download as a standalone I do not have any problems with the datagrids.

Any ideas?

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Auto-Updater

Post by Klaus » Wed Sep 22, 2010 12:27 pm

Hi Daniel,

as a moderator of this list I also must tell you NOT to open two threads on the same topic!
You posted an almost identical thread under "Off-topic"!???
If you do this again, you will be forced to programm in ASSEMBLER for at least one week!!! :D

OK, to your problem, I guess the downloaded stack is not be aware of your splash screen stack/standalone
which has loaded the db externals!

Did you put:
...
start using stack "the splash stack that turned into the standalone and loaded all the fine db externals"
## or just: start using this stack
...
somewhere into a script (openstack or whatever) of your splash screen?
If not, do it and try again.


Best

Klaus

bsouthuk
Posts: 261
Joined: Fri Dec 05, 2008 7:25 pm

Re: Auto-Updater

Post by bsouthuk » Wed Sep 22, 2010 12:42 pm

LOl ok I have been warned!

I have tried this yes Klaus and nothing has changed.

I can tell you though that my stack is connecting to my database as I can add/delete products to my product list and works perfectly so the stack is aware of the splash screens DB externals for sure.

I am only having issues with the datagrids as pointed out in my previous thread. Its as if the datagrids just freeze and respond to nothing. Again, this is only when i download the stack using a splash screen. When i save the stack itself as a standalone I do not get these issues.

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Auto-Updater

Post by Klaus » Wed Sep 22, 2010 12:49 pm

Hmm, looks like that stack somehow loses the "connection" to the Datagrid library or the DataGrid templates or the necessary behaviours.
Sorry, can't help you here...

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Re: Auto-Updater

Post by Janschenkel » Wed Sep 22, 2010 1:11 pm

See this lesson entitled 'What Do I Need to Do To Deploy a Standalone With A Data Grid?'

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

bsouthuk
Posts: 261
Joined: Fri Dec 05, 2008 7:25 pm

Re: Auto-Updater

Post by bsouthuk » Wed Sep 22, 2010 2:14 pm

Done - brilliant! thank you so so much!!

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Auto-Updater

Post by Klaus » Wed Sep 22, 2010 2:40 pm

Oh boy! :roll:
Of course we all presumed that you added the necessary libraries in the correct way!

Post Reply