PreOpenCard only runs once?

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dburdan
Posts: 104
Joined: Fri Jan 28, 2011 5:39 am

PreOpenCard only runs once?

Post by dburdan » Sat Feb 19, 2011 2:32 am

I have code setup to display a webbrowser when a card is opened. Then, when the user go's to another card, it deletes the webbrowser instance. But when I go back to the card it doesn't run the PreOpenCard at all, therefore not creating the webbrowser again. Is there a certain way I have to close the card?

doc
Posts: 148
Joined: Fri Jun 09, 2006 4:30 pm

Re: PreOpenCard only runs once?

Post by doc » Sat Feb 19, 2011 3:36 am

Hello dburdan,
Have you tried using openCard, rather than preOpenCard?
Unless you have some other reason not to, that should make it run each and every time you need it.

Best Regards,
-Doc-

Edit to add: I do not have the iOS package, so there is a distinct possibility I have that all wrong.

Danny
Posts: 106
Joined: Tue Nov 09, 2010 1:28 am

Re: PreOpenCard only runs once?

Post by Danny » Sat Feb 19, 2011 3:58 am

Wow burdan we must be on the same thought path because I was just about to post a question about this. Hey Doc I tried the "OpenCard" and that doesn't work. I have the iOS and it didn't work on my iPod either :( it's odd because it works perfect on the normal LiveCode. Any other ideas?

dburdan
Posts: 104
Joined: Fri Jan 28, 2011 5:39 am

Re: PreOpenCard only runs once?

Post by dburdan » Sat Feb 19, 2011 4:19 am

I think your right Danny! We seem to cross paths a lot! The weird thing is that it works fine in all my other cards but everything is set up fine. Does it have anything to do with the UIWebView instance?

Danny
Posts: 106
Joined: Tue Nov 09, 2010 1:28 am

Re: PreOpenCard only runs once?

Post by Danny » Sat Feb 19, 2011 4:29 am

You better not be making the same app as me haha! I'm not using the UIWebView I'm just using plan old cards that have your normal graphics. All i'm having it doing is adding a couple fields. The annoying thing is it only works once for every time I open up the whole app and I need it to update more than that. By the way i'm beta testing my app soon. If you'd like to join you can post your email and i'll contact you or i'll post my email and you email me. iOS 4 would be highly preferred. I'll going to post another topic when i'm ready so this doesn't get clogged with irrelevant questions. But if someone else is reading this please help answer our question. :D
Last edited by Danny on Sat Feb 19, 2011 4:34 am, edited 1 time in total.

dburdan
Posts: 104
Joined: Fri Jan 28, 2011 5:39 am

Re: PreOpenCard only runs once?

Post by dburdan » Sat Feb 19, 2011 4:33 am

Danny wrote:You better not be making the same app as me haha! I'm not using the UIWebView I'm just using plan old cards that have your normal graphics. All i'm having it doing is adding a couple fields. The annoying thing is it only works once for every time I open up the whole app and I need it to update more than that. By the way i'm beta testing my app soon. If you'd like to join you can post your email and i'll contact you or i'll post my email and you email me. I'll going to post another topic when i'm ready so this doesn't get clogged with irrelevant questions. But if someone else is reading this please help answer our question. :D
Ya I'd love to join! As far as the app, I tried to write a value to the iPhones "tmp" folder but that didn't seem to do the trick. The "OpenCard" script only runs the first time!

Danny
Posts: 106
Joined: Tue Nov 09, 2010 1:28 am

Re: PreOpenCard only runs once?

Post by Danny » Sat Feb 19, 2011 4:35 am

Do you have a iOS 4 device? Let's hope that one of the guys at RunRev know the solution to the problem

dburdan
Posts: 104
Joined: Fri Jan 28, 2011 5:39 am

Re: PreOpenCard only runs once?

Post by dburdan » Sat Feb 19, 2011 4:37 am

Yes, I have an iPhone 4 and a 2nd gen iPod. So both resolutions to test on. I plan on releasing the app tonight or tomorrow and this situation is taunting me!

Danny
Posts: 106
Joined: Tue Nov 09, 2010 1:28 am

Re: PreOpenCard only runs once?

Post by Danny » Sat Feb 19, 2011 4:45 am

Awesome! The service i'm using is great and free you might be able to use it for your app. What i'm going to do is send you the email and it will ask you to create an account you can sign up as a dev or just a user. Then (hopefully) it will have a button that says "Register Device" you click on that, then hit "Install" it says that it will change the iPod settings but it doesn't and if it works you're in, if not just retry the Registration process again. It will be a couple of days before I send out any app but the faster I can hook people up the easier it is to send it out once.

Thanks,

Danny

P.S Were you able to figure out how to give the different display sizes. Because mine works fine for my iPod 4th gen but i'm worried about the iPad

dburdan
Posts: 104
Joined: Fri Jan 28, 2011 5:39 am

Re: PreOpenCard only runs once?

Post by dburdan » Sat Feb 19, 2011 4:52 am

I actually haven't got Retina displays to work. I figured I'd release the app and then update it later for multiple displays. I think the answer is in this thread: http://forums.runrev.com/phpBB2/viewtop ... =49&t=6925

Danny
Posts: 106
Joined: Tue Nov 09, 2010 1:28 am

Re: PreOpenCard only runs once?

Post by Danny » Sat Feb 19, 2011 4:54 am

Yeah that post confused the heck out of me. What I did was save the background at 960 X 640 and sized it down to 480 X 360 and it seemed to boost the res.

dburdan
Posts: 104
Joined: Fri Jan 28, 2011 5:39 am

Re: PreOpenCard only runs once?

Post by dburdan » Sat Feb 19, 2011 11:12 pm

I'm bumping this. This is a really big issue.

Danny
Posts: 106
Joined: Tue Nov 09, 2010 1:28 am

Re: PreOpenCard only runs once?

Post by Danny » Sat Mar 05, 2011 11:00 pm

Please help us

Post Reply