Q and A content 30/10/13

Moderators: LCNeil, heatherlaine, kevinmiller, elanorb

Post Reply
LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Q and A content 30/10/13

Post by LCNeil » Thu Oct 31, 2013 5:58 pm

Hi Everyone,

Unfortunately due to my computer crashing on Wednesday the webinar was not recorded. It would seem that on restart, gotowebinar reverted my record folder to my desktop and the resulting file was unusable. Apologies for this.

As this is the case, I will post everything that was discussed in the webinar here. If I do by chance miss anything, please let me know and I will promptly add it to my post-

Scrolling Group

A group that can scroll to and its field size adjust according to content
resizeFieldFormattedText.livecode.zip
(3.16 KiB) Downloaded 111 times
Returned to selected mobGui tab

The easiest way to do this is by placing the follwing in the mobGui group

Code: Select all

   set the cOption of this stack to the uOptionID of me
This will set a custom property of the stack to the selection. This can then be implemented in a button that returns you to a card (e.g. back button) along with the following script

Code: Select all

put the cOption of this stack into tOption
   send "mouseDown" to group id tOption of card "your card that you navigate too"

Splash Screen

The following is a stack that shows how to implement a very simple splash screen. The splash screen is card one of the stack and has a simple "wait for *** seconds" beofore moving to the next card
splashScreen.livecode.zip
(2.84 KiB) Downloaded 101 times
dgHilitedLines issues

place in datagrid group script-

check if lines are empty

Code: Select all

if the dgHilitedLines of me is empty then
      exit mouseUp
   end if
check for double mouse click and do nothing-

Code: Select all

on mouseDoubleDown
exit mouseDoubleDown
end mouseDoubleDown
Create text url link in LiveCode


Simple method is to edit the script of a field and then add the following script to open web browser to a given link

launch URL "http://www.google.com"

The LinkedClicked message is another method to create links within some text.

Choosing specific tools-

Code: Select all

Choose "browse" tool
Choose "brush" tool
etc

Setting color of a brush

Code: Select all

set the brushColor to "red"
set the brushColor to "255,155,233|
Other information-

Create a native player for mobile

http://lessons.runrev.com/s/3527/m/4069 ... een-in-ios

I have noticed that this lesson has old iPhone specific syntax in it. I will update this asap. In the mean time, for it to work on Android, the iPhone syntax should be replaced with "mobile"

I think that is all, but please let me know if I have missed anything

Kind Regards,

Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
LiveCode – Realize fast, compile-free coding
--

pTom
Posts: 40
Joined: Wed Sep 18, 2013 10:44 pm

Re: Q and A content 30/10/13

Post by pTom » Fri Nov 01, 2013 3:37 am

Hi Neil

I wanted to respond to all of your info here so hopefully I can correct my issues on Friday. First, thank you so much for posting all of this info. It is a lot of work for you and I want your o know how much it is appreciated!

1) I was able to make the formattedHeight work for my article page (yay!). However, the display group on the article card only scrolls if I use the righthand scroll bar. Is that just because it is in development? When I use the simulator, the scrolling only works with the scroll bar as well. Can I get rid of the scroll bar and be able to scroll without it?

2) The splash screen worked as well! One question: will the splash screen open every time they open my app? I noticed many apps only show the splash screen when you first open it. If you go out to check a text and then go back into it, the app picks up right where I left off. Thoughts?

3) The data grid empty rows fix worked! The double click does not work. Don't know why?

4) For the "Back" button issue using the cOption code, I do not understand where this goes? You refer to the mobGUI group. Would that be the tabs on each card? If so, I tried that and received an error saying that the mobGUI stack is password protected and asks me to supply the password. How do I avoid this? Or am I putting the code in the wrong location (what is "mobGUI group")?

I think that covers it for these.

Thanks again!

Tom

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: Q and A content 30/10/13

Post by LCNeil » Wed Nov 06, 2013 10:49 am

Hi Tom,

I'm glad I've been able to assist so far :) Looking forward to seeing your finished app!

Some infor regarding your questions can be seen below-

1) I believe you will need to create a native scroller in order for this group to scroll on mobile. More information on how to implement a native scroller can be found here -

http://lessons.runrev.com/s/3527/m/4069 ... l-a-field

2) This is interesting. We dont officially support multitasking so if you leave the application it should re-load from the beginning and show the splash screen. If you forward your stack, we can test and advise further.

3) I have made an adjustment to the mouseDoubledown script above. I was confusing "do nothing" with "focus on nothing" . Simply exiting the mouseDoubleDown should resolve the issue :)

4) You would place the " set the cOption of this stack to the uOptionID of me" in the group "databaseType" of your card and then in your "back" button you would place
"put the cOption of this stack into tOption
send "mouseDown" to group id tOption of card "your card that you navigate too"

If this does not work for you, please let me know and I will forward your stack with these changes.

pTom
Posts: 40
Joined: Wed Sep 18, 2013 10:44 pm

Re: Q and A content 30/10/13

Post by pTom » Wed Nov 06, 2013 4:35 pm

Hi Neil

I tried the "exit mouseDoubleDown" idea and I am still receiving an error. I tried mouseDoubleUp and had the same results.

My main question though is the "cOption" coding. You said which group to put that in, so I get that. However, do I try to put that in the custom properties of the group, the code script, or ??? Sorry for asking a basic question but something just isn't clicking for me.

Thanks!

Tom

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: Q and A content 30/10/13

Post by LCNeil » Fri Nov 08, 2013 2:58 pm

Hi Tom,

If you could tell me exactly where you are trying the mouseDoubleDown, I will try to replicate the issue and in turn advise further.

For the "set the cOption of this stack to the uoptionID of me" script, this would be placed in the script of the group within the "on touchEnd" handler

Kind Regards,

Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
LiveCode – Realize fast, compile-free coding
--

pTom
Posts: 40
Joined: Wed Sep 18, 2013 10:44 pm

Re: Q and A content 30/10/13

Post by pTom » Fri Nov 08, 2013 6:14 pm

Hi Neil

As for the "on mouseDoubleDown", I am using that in the data grid script. Not that it matters, I have tried putting it before and after the "on mouseUp" section.

Also, I just tried the cOption code. I put "set the cOption of this stack to the uOptionID of me" into the group databaseType "on touchEnd" script of card "daily".
I put "put the cOption of this stack into tOption
send "mouseDown" to group id tOption of card "daily" " into the "on touchEnd" part of the "back" button on my "VidClipVideo" card. I am receiving an error that points to the "back" button script. Here it is:
"group "back2": execution error at line 7 (Chunk: can't find background), char 21"
Character 21 is right about the word "group" in the second line ("send" line)

Advice?

Thanks
Tom

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: Q and A content 30/10/13

Post by LCNeil » Tue Nov 12, 2013 12:22 am

Hi Tom,

That is strange. Even though the script was working for me on when on the 3Min4God tab, I recieved the same error on the video clips tab.

I managed to resolve the issue by first going to card "daily" before assigning the highlighted tab. The new script for the back group button should be -

on touchEnd pId
mobGUIUntouch the long id of me

lock screen for visual effect in rect "-3,32,322,432"
put the cOption of this stack into tOption
go to card "daily"
send "mouseDown" to group id tOption of card "daily"
unlock screen with visual effect "push right very fast"

end touchEnd

In regards to the mouseDoubleDown issue, I cant seem to replicate an error when double clicking in a dataGrid. If possible, could you give a bit more info on the error you are receiving and the method you use to induce the error?

Kind Regards,

Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
LiveCode – Realize fast, compile-free coding
--

pTom
Posts: 40
Joined: Wed Sep 18, 2013 10:44 pm

Re: Q and A content 30/10/13

Post by pTom » Thu Nov 14, 2013 2:28 pm

So I have to specify a card instead of using "recent card" in my code? I am trying to use the card with the "back button" as the destination for multiple cards and their data grids. If I have to specify a card, that means I have to create more cards.

Please confirm

Thanks!

Tom

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: Q and A content 30/10/13

Post by LCNeil » Thu Nov 14, 2013 2:58 pm

Hi Tom,

I was referencing the daily card directly just as an example . I have tested recent card as well and it seems to work as expected.

Kind Regards,

Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
LiveCode – Realize fast, compile-free coding
--

pTom
Posts: 40
Joined: Wed Sep 18, 2013 10:44 pm

Re: Q and A content 30/10/13

Post by pTom » Thu Nov 14, 2013 3:41 pm

Hi Neil

I am still receiving an error:

group "back2": execution error at line 8 (Chunk: can't find background), char 21

This error is for the following line of code:

send "mouseDown" to group id tOption of recent card

Any ideas?

Thanks

Tom

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: Q and A content 30/10/13

Post by LCNeil » Thu Nov 14, 2013 4:48 pm

Hi Tom,

I think the easiest thing to do would be for me to email a working update of your stack with some further changes :)

I have applied the return to selected mobGui scripts to all sections of your stack so you should be able to implement it into your own up-to-date stack

Kind Regards,

Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
LiveCode – Realize fast, compile-free coding
--

Post Reply

Return to “idea2app and Coding School”