Primary Student Livecode Interface (Simplified Developer Interface)

2019-10-10 Thread JOHN PATTEN via use-livecode
Good Morning from SoCal,

Quick question, anybody ever develop a simplified LiveCode “developer 
interface/tool“ project?

If you’ve been around awhile, you might remember how HyperCard had multiple 
development modes. Level one allowed you to use drawing tools create buttons 
that would allow you to ”go to next card” etc. Pretty much no script access. 

Levels 2-3 gradually provided more capabilities. 

If you new the correct procedure, you could completely unlock Hypercard, with 
access to all developer components (Level 4?)

Has anybody created a simplified Livecode developer interface for newbies?  
Something that could be used to introduce, but not initially over whelm a new 
user?

Just trying to not reinvent the wheel, if someone has already gone down this 
path and would be willing to share :)

Thank you!
John Patten



Sent from my iPhone

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Copying Text from Field In HTML5 app?

2018-05-21 Thread JOHN PATTEN via use-livecode
HI All,

I have a little HTML5 project that creates some text data in a card field. I 
would like to let my user copy the text created in this field out the HTML5 app 
so that they can paste it into a spreadsheet in order to manipulate it.

Can this be done using an HTML5 app?

Thank you!
John Patten
SUSD
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


LiveCode and iOS Simulator Set Up

2018-02-20 Thread JOHN PATTEN via use-livecode
Hi All,

I am trying to set up a new school Mac laptop with Xcode so that I can run the 
iOS simulator on it with Livecode.

I have tried LiveCode 8.1.7 and 8.1.9 with Xcode most recent version of Xcode, 
9.0, and 9.1.  Each time I attempt to launch the simulator in LiveCode I get 
the message, “The simulator seems to be taking a long time to launch…”. 
Eventually, it times out and the app never launches in the simulator.  

I’m guessing I am not using the correct versions of LiveCode or, possibly, 
Xcode?  Is there a link to documentation on how to get the simulator to work?

Thank you!
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Questions re: Michael McCreary Database Wizardry from LCGlobal?

2017-12-13 Thread JOHN PATTEN via use-livecode
Hello all!

I am trying to decipher Michael McCreary’s database wizardry form the Livecode 
conference.

Starting by duplicating what he had created with his Notes cloud app, but just 
using my own on-rev account and my mysql db.

His Notes app works fine when it is pointing to his on-rev/mysql db, but when I 
try to duplicate what he is done, my notes app opens fine, but under the drop 
down menu, in the categories area, I am getting a “tsneterr: HTTP response code 
404 returned from server.” I’m guessing it is not seeing my .lc files on my 
on-rev directory???  I also can’t create any new notes, obviously.

I have made the change in the sub stack libDataLayer for the constant kAPIURL = 
… to point to my on-rev and directory.

 I have also made the change on the .lc server file, libDataLayer.lc, within 
the libs folder, so that it is using my mysql db, username and password. 
However, I must be still missing changes to make this work on my own mysql db.

His use of db libraries in that example blew my mind, and I would like to learn 
how to do that myself, but I’m having trouble just trying to get “off the 
blocks.” :)

Are there more script changes in his example that need to be done in order for 
me to duplicate his Notes app on my on-rev account?



Thank you!

John Patten
SUSD

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Example Stack for MergAV (QR codes)?

2017-11-09 Thread JOHN PATTEN via use-livecode
Awesome…and...

thanks for the quick response!

John Patten
SUSD


> On Nov 9, 2017, at 3:55 PM, JOHN PATTEN via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Hello!
> 
> I’m attempting to use MergAV to put a little student qr code reader app 
> together. MergAV has many commands and I have not been successful with the 
> combinations I have chosen.
> 
> Does someone have an example stack or a link they can point me to and example 
> stack?
> 
> Thank you!
> 
> John Patten
> SUSD
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Example Stack for MergAV (QR codes)?

2017-11-09 Thread JOHN PATTEN via use-livecode
Hello!

I’m attempting to use MergAV to put a little student qr code reader app 
together. MergAV has many commands and I have not been successful with the 
combinations I have chosen.

Does someone have an example stack or a link they can point me to and example 
stack?

Thank you!

John Patten
SUSD
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: How to (in iOS) Import snapshot and paste resulting image to substack? (Solved)

2017-11-07 Thread JOHN PATTEN via use-livecode
I figured it out :)

Needed to just use export snapshot, instead of import snapshot, and create 
named image holders to “paste” the exported snapshots into.

export snapshot from rectangle (the rect of cd fld "pages 2-3") of this card to 
img "pages 2-3" of stack "Print Template"

go to stack "Print Template”

set the angle of img "pages 2-3" of this card to 90

set the loc of image "pages 2-3" of this card to 107,603



Cheers!

John Patten
SUSD

> On Nov 7, 2017, at 10:21 AM, JOHN PATTEN via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Hi All,
> 
> In iOS on an iPad, I am trying to import a snapshot and then place the 
> resulting image on a substack of the main stack. The idea is to save the 
> substack out as a PDF after placing a number of snapshots on it.
> 
> The code I am using is:
> 
> -
> import snapshot from rectangle (the rect of cd fld "pages 2-3") of this card
> 
> set the name of last image to "pages 2-3"
> 
> set the angle of img "pages 2-3" of this card to 90
> 
> cut image "pages 2-3" of this card. —there is no cut in iOS???
> 
> go to stack "Print Template"
> 
> paste  — there is no paste in iOS
> 
> set the loc of last image of this card to 107,603
> 
> -
> 
> 
> This all works fine on a desktop, but I am having trouble with some of the 
> iOS.  What is the proper way to cut, copy and paste images from one stack, to 
> a sub stack, in iOS?
> 
> Thank you!
> 
> John Patten
> SUSD
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

How to (in iOS) Import snapshot and paste resulting image to substack?

2017-11-07 Thread JOHN PATTEN via use-livecode
Hi All,

In iOS on an iPad, I am trying to import a snapshot and then place the 
resulting image on a substack of the main stack. The idea is to save the 
substack out as a PDF after placing a number of snapshots on it.

The code I am using is:

-
import snapshot from rectangle (the rect of cd fld "pages 2-3") of this card

set the name of last image to "pages 2-3"

set the angle of img "pages 2-3" of this card to 90

cut image "pages 2-3" of this card. —there is no cut in iOS???

go to stack "Print Template"

paste  — there is no paste in iOS

set the loc of last image of this card to 107,603

-


This all works fine on a desktop, but I am having trouble with some of the iOS. 
 What is the proper way to cut, copy and paste images from one stack, to a sub 
stack, in iOS?

Thank you!

John Patten
SUSD


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: How do I play sound files in HTML5?

2017-10-07 Thread JOHN PATTEN via use-livecode
In LiveCode under the Dictionary/Guide, there is a link in the Guide for HTML5. 
At the bottom of that information is what is required in your html to display 
the app. It is surprisingly little.

LiveCode actually creates an html page that contains, from what I can tell, a 
considerable amount of html/code just to create the html layout (i.e. loader, 
images, etc.)

Hope that helps!

John Patten
SUSD

Sent from my iPad

> On Oct 7, 2017, at 8:59 AM, Kenji Kojima via use-livecode 
>  wrote:
> 
> Hi, 
> I used LC 9.0.0 (dp9). I could play a sound file. Thanks. 
> 
> It had a strange thing the result of 
>do tScript as “JavaScript” 
>was “execution error” though it played. 
> http://kenjikojima.com/HTML5PlaySound/HTML5PlaySound.html 
> 
> 
> How can I hide a black bold belt at the bottom? It’s very ugly. 
> And I don’t need the LiveCode logo at the top left.
> 
> Thanks,
> --
> Kenji Kojima / 小島健治
> http://kenjikojima.com
> 
> 
> 
> 
>> On Oct 5, 2017, at 7:16 PM, hh via use-livecode 
>>  wrote:
>> 
>> Hi,
>> 
>> do as "javascript" was introduced not before LC 9.0.0-dp4.
>> 
>> Get additional info here (=subforum HTML5):
>> http://forums.livecode.com/viewtopic.php?p=155667#p155667.
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Beginners Guide?

2017-10-06 Thread JOHN PATTEN via use-livecode
Hi All,

I’m going to be doing some short introductions to some of our teachers about 
LiveCode. I was reviewing the support resources, specifically the Beginners 
Guide. The info seems to need a bit of an update. Is there another link with a 
more current Beginners Guide?

i.e.. 

General
To use LiveCode you will need:

1024×768 or larger monitor
True color display (16-bit or 32-bit depth)
At least 256Mb of memory
At least 150Mb of disk space (is this still accurate?)
Windows
LiveCode supports the following versions of Windows:

Windows 2000 SP4
Windows XP SP2 and above
Windows Server 2003
Windows Vista SP1 and above (both 32-bit and 64-bit)
Windows 7 (both 32-bit and 64-bit)
Windows Server 2008
Windows 8 and 8.1 Desktop
Additionally, QuickTime 7 or later is required for most multimedia features.

Mac OS X
LiveCode supports the following versions of Mac OS X:

10.3.9 (Panther) on PowerPC
10.4.11 (Tiger) on Intel and PowerPC
10.5.8 and later (Leopard) on Intel and PowerPC
10.6.x (Snow Leopard) on Intel
10.7.x (Lion)
10.8.x (Mountain Lion)
10.9.x (Mavericks)
10.10 (Yosemite)
Linux
The minimal requirements for LiveCode to run on Linux are:

32-bit installation, or a 64-bit linux distribution that has a 32-bit 
compatibility layer
2.4.x or later kernel
glibc 2.3.2 or later X11R5 capable Xserver running locally on a 24-bit display
compositing window manager (optional – required for alpha-blended window shapes)
gtk/gdk/glib (optional – required for native theme support)
pango/xft (optional – required for pdf printing, anti-aliased text and unicode 
font support)
lcms (optional – required for color profile support in JPEGs and PNGs)
gksu (optional – required for elevate process support)
mplayer (optional – required for video playback)
esd (optional – required for audio playback)
Thank  you!

John Patten
SUSD

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

HTML5 - Javascript send text to textarea html object?

2017-09-26 Thread JOHN PATTEN via use-livecode
Hello all,

Is it possible for and HTML5 app to send text from a variable in the HTML5 
stack to a textarea object in, say, a web form via javascript? 

While I’m at it, would it be possible to trigger the web form submit action, 
via javascript in the HTML5 app?

If so, how might that look?

Thank you!

John Patten
SUSD








___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Storing/Saving User Data via HTML5 app?

2017-09-24 Thread JOHN PATTEN via use-livecode
Hi All,

Is it possible to save user activity in an HTML5 application? Post to database? 
Save out to a text file? Send out via a PHP post command?

What is the current recommended strategy for this type of typical action?

Thank you!



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: HTML5 and Copy and Pasting of graphics?

2017-09-22 Thread JOHN PATTEN via use-livecode
Thanks Richard!

That works :)

http://jpatten.on-rev.com/circletest1/circletest.html 



> On Sep 22, 2017, at 12:41 PM, Richard Gaskin via use-livecode 
>  wrote:
> 
> JOHN PATTEN wrote:
> 
> > I am pretty sure I did a copy and paste from card 2 to card 1 in a
> > HTML5 project.  I may have been dreaming though :)
> >
> > I have two cards. First card has a button with this script:
> >
> > on mouseUp
> > copy grc "circle" of cd 2
> > do paste
> > set the loc of last grc of cd 1 to 100,100
> > end mouseUp
> >
> > The second card has a blue circle graphic.
> >
> > I save this out as an html5 project load it into on-rev. 
> > (http://jpatten.on-rev.com/circletest/circletest.html 
> > )
> >
> > And it does not work???
> 
> When I load that here I see only a single button, which does nothing when I 
> click.  I do not see any graphic, nor any means of navigating to other cards.
> 
> 
> > HTML5 does not allow for copy and past of grcs from one card to
> > another?
> 
> I don't know, but that won't stop me from guessing. :)
> 
> My hunch would be that using both the copy and paste commands would not work, 
> because IIRC the HTML export runtime does not currently work with the 
> system's clipboard.
> 
> That said, using the copy option which lets you specify a destination, e.g.:
> 
>  copy grc "cricle" to cd 2
> 
> ...may work because that method doesn't affect the system clipboard.
> 
> -- 
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for the Desktop, Mobile, and the Web
> 
> ambassa...@fourthworld.comhttp://www.FourthWorld.com
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


HTML5 and Copy and Pasting of graphics?

2017-09-22 Thread JOHN PATTEN via use-livecode
Hi All!

I am pretty sure I did a copy and paste from card 2 to card 1 in a HTML5 
project.  I may have been dreaming though :)

I have two cards. First card has a button with this script:

on mouseUp
copy grc "circle" of cd 2

do paste

set the loc of last grc of cd 1 to 100,100

end mouseUp


The second card has a blue circle graphic.

I save this out as an html5 project load it into on-rev. 
(http://jpatten.on-rev.com/circletest/circletest.html 
)

And it does not work???


HTML5 does not allow for copy and past of grcs from one card to another?

Thank you!

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


HTML5 and Post tArgs to URL "http://..." ?

2017-08-27 Thread JOHN PATTEN via use-livecode
Hi All,

I was experimenting with HTML 5 this weekend. I have a script that posts some 
data to a server side .lc script. The script inserts the data into a mySQL 
database.

I get a “-1” javascript error the minute the

post tArgList to URL "http://.on-rev.com/folder/tracker.lc” script runs 
from my html5 stack.

I’m guessing that is something you are not allowed to do in a Livecode HTML5 
stack?

Thank you! 
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Using "Launch URL" without actually opening browser?

2017-08-26 Thread JOHN PATTEN via use-livecode
Hi Mike,

I tried "Get URL" too. 

It may not be possible to submit/post the data in the URL (launch url 
"https://docs.google.com/forms/d/e/1FAIpQLScoYoEfrcewj4IEG0FnfjBnfeVVSLva5tWv-dVexoP95trNNA/formResponse
 
<https://docs.google.com/forms/d/e/1FAIpQLScoYoEfrcewj4IEG0FnfjBnfeVVSLva5tWv-dVexoP95trNNA/formResponse>?"&
 tStudentName & tDate & tSecondsSince & tCardName & tTargetObject) without 
getting the Google Form response.  I was thinking of possible using this 
strategy in an HTML5 stack with student Chromebooks.

Too bad, that would have been an easy way to store light weight stack data 
without a lot of effort :(

Thank you!






> On Aug 26, 2017, at 2:21 PM, Mike Bonner via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Try
> get url "https://docs.google.com/forms/d/e/1FAIpQLScoYoEfrcewj4IEG0FnfjBn
> feVVSLva5tWv-dVexoP95trNNA/formResponse?"& tStudentName & tDate &
> tSecondsSince & tCardName & tTargetObject
> 
> On Sat, Aug 26, 2017 at 3:15 PM, JOHN PATTEN via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Hi All,
>> 
>> I’m using the Google spreadsheet that gets created when you create a
>> Google Form to collect data from a stack.
>> 
>> I’ve copied out the specific Google submit form button to send my stack
>> data to the Google spreadsheet.
>> 
>> This works fine using “Launch URL” however it opens the browser and give
>> me the Google Form Submission Confirmation page.  Is there any way to
>> submit the URL without actually launching the browser?
>> 
>> I experimenting with tracking my students’ mouse clicks while using a
>> learning app I may create, and was looking at a easy way to store that
>> data, and utilize Google Forms simple data reports.
>> 
>> Here’s the card script I’m using:
>> 
>> on mouseDown
>> 
>> --put the short name of target
>> 
>> put the millisecs into TCurrentTime
>> 
>> --convert tCurrentTime to milliseconds
>> 
>> put cd fld "lastAction" into tOldTime
>> 
>> put (tCurrentTime - tOldTime)/1000 into tSecondsSince
>> 
>> if tSecondsSince > 60 then
>> 
>> put "entry.133167263=" & tSecondsSince/60 & " minutes" & "&" into
>> tSecondsSince
>> 
>> put "entry.1059711654=" & cd fld "studentName" into tStudentName
>> 
>> put "entry.630316753=" & the short date & "&" into tDate
>> 
>> put "entry.768691577=" & the name of current card & "&" into tCardName
>> 
>> put "entry.1264876799=" & the short name of target into tTargetObject
>> 
>> launch url "https://docs.google.com/forms/d/e/
>> 1FAIpQLScoYoEfrcewj4IEG0FnfjBnfeVVSLva5tWv-dVexoP95trNNA/formResponse?"&
>> tStudentName & tDate & tSecondsSince & tCardName & tTargetObject
>> 
>> end if
>> 
>> put tSecondsSince && "seconds" && "-" && the short name of target
>> 
>> put "entry.133167263=" & tSecondsSince && "seconds" & "&" into
>> tSecondsSince
>> 
>> put "entry.1059711654=" & cd fld "studentName" & "&" into tStudentName
>> 
>> put "entry.630316753=" & the short date & "&" into tDate
>> 
>> put "entry.768691577=" & the name of current card & "&" into tCardName
>> 
>> put "entry.1264876799=" & the short name of target into tTargetObject
>> 
>> launch url "https://docs.google.com/forms/d/e/
>> 1FAIpQLScoYoEfrcewj4IEG0FnfjBnfeVVSLva5tWv-dVexoP95trNNA/formResponse?"&
>> tStudentName & tDate & tSecondsSince & tCardName & tTargetObject
>> 
>> put tCurrentTime into cd fld "lastAction"
>> end mouseDown
>> 
>> on openCard
>> put the millisecs into cd fld  “lastAction"
>> end openCard
>> 
>> Thank you!
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Using "Launch URL" without actually opening browser?

2017-08-26 Thread JOHN PATTEN via use-livecode
Hi All,

I’m using the Google spreadsheet that gets created when you create a Google 
Form to collect data from a stack. 

I’ve copied out the specific Google submit form button to send my stack data to 
the Google spreadsheet. 

This works fine using “Launch URL” however it opens the browser and give me the 
Google Form Submission Confirmation page.  Is there any way to submit the URL 
without actually launching the browser?

I experimenting with tracking my students’ mouse clicks while using a learning 
app I may create, and was looking at a easy way to store that data, and utilize 
Google Forms simple data reports.  

Here’s the card script I’m using:

on mouseDown

--put the short name of target

put the millisecs into TCurrentTime

--convert tCurrentTime to milliseconds

put cd fld "lastAction" into tOldTime

put (tCurrentTime - tOldTime)/1000 into tSecondsSince

if tSecondsSince > 60 then

put "entry.133167263=" & tSecondsSince/60 & " minutes" & "&" into tSecondsSince

put "entry.1059711654=" & cd fld "studentName" into tStudentName

put "entry.630316753=" & the short date & "&" into tDate

put "entry.768691577=" & the name of current card & "&" into tCardName

put "entry.1264876799=" & the short name of target into tTargetObject

launch url 
"https://docs.google.com/forms/d/e/1FAIpQLScoYoEfrcewj4IEG0FnfjBnfeVVSLva5tWv-dVexoP95trNNA/formResponse?";
 tStudentName & tDate & tSecondsSince & tCardName & tTargetObject

end if

put tSecondsSince && "seconds" && "-" && the short name of target

put "entry.133167263=" & tSecondsSince && "seconds" & "&" into tSecondsSince

put "entry.1059711654=" & cd fld "studentName" & "&" into tStudentName

put "entry.630316753=" & the short date & "&" into tDate

put "entry.768691577=" & the name of current card & "&" into tCardName

put "entry.1264876799=" & the short name of target into tTargetObject

launch url 
"https://docs.google.com/forms/d/e/1FAIpQLScoYoEfrcewj4IEG0FnfjBnfeVVSLva5tWv-dVexoP95trNNA/formResponse?";
 tStudentName & tDate & tSecondsSince & tCardName & tTargetObject

put tCurrentTime into cd fld "lastAction"
end mouseDown

on openCard
put the millisecs into cd fld  “lastAction"
end openCard

Thank you!

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: HTML5 - Playing Audio files tutorial?

2017-08-25 Thread JOHN PATTEN via use-livecode
Hi Collin,

No, the mp3 will not play either. I must be missing a step.  :(

http://jpatten.on-rev.com/sylvan/HTNML5%20Test.html 
<http://jpatten.on-rev.com/sylvan/HTNML5%20Test.html>. (no audio plays)

http://jpatten.on-rev.com/sylvan/ 
<http://jpatten.on-rev.com/sylvan/>TestAudio2.mp3. (plays from browser)


> On Aug 25, 2017, at 11:47 AM, Colin Holgate via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Normally you would play MP3 or OGG in HTML5. Do MP3 files play ok?
> 
> 
>> On Aug 25, 2017, at 11:06 AM, JOHN PATTEN via use-livecode 
>> <use-livecode@lists.runrev.com> wrote:
>> 
>> Hi All,
>> 
>> I have followed the tutorial here on playing audio files, 
>> http://lessons.livecode.com/m/4071/l/742506-how-do-i-play-sound-files-in-html5
>>  
>> <http://lessons.livecode.com/m/4071/l/742506-how-do-i-play-sound-files-in-html5>
>> 
>> I have tried with both a wav file, and a m4a.  Neither of them seem to play.
>> 
>> Do I have to “include" the file in the Standalone Settings configuration 
>> panel, or can I just add it to my HTML5 project folder?
>> 
>> Also, the audio tag,
>> 
>>   
>> 
>> 
>> ...that can go right before the ending /body tag?
>> 
>> 
>> Thank you!
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

HTML5 - Playing Audio files tutorial?

2017-08-25 Thread JOHN PATTEN via use-livecode
Hi All,

I have followed the tutorial here on playing audio files, 
http://lessons.livecode.com/m/4071/l/742506-how-do-i-play-sound-files-in-html5 


I have tried with both a wav file, and a m4a.  Neither of them seem to play.

Do I have to “include" the file in the Standalone Settings configuration panel, 
or can I just add it to my HTML5 project folder?

Also, the audio tag,
  

  

...that can go right before the ending /body tag?


Thank you!


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: MobileControlCreate Scroller? SOLVED

2017-07-12 Thread JOHN PATTEN via use-livecode
Never mind :(  I hate when that happens :) wrong fld  name in


> On Jul 12, 2017, at 11:00 AM, JOHN PATTEN via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Hi All,
> 
> I have a group that consists of a couple of buttons and a field. The field 
> can contain text that fits nicely with it, and at times, text that is outside 
> the bounds of the field. This app is targeted for an iPhone. I wanted to 
> create a mobile scroller to allow the user to scroll the field when the text 
> is longer than the field.
> 
> I am using the tutorial online 
> (http://lessons.livecode.com/m/4069/l/94412-creating-a-native-scroller-to-scroll-a-field
>  
> <http://lessons.livecode.com/m/4069/l/94412-creating-a-native-scroller-to-scroll-a-field>)
>  and this scrip. I have placed the script in the stack as the group 
> containing the field is a background and appears on every card.
> 
> On cards where the text extends beyond the field, the mobile scroller 
> appears, however when I scroll the field in the iPhone, the text does not 
> move and I don’t see the text below the boundary of the field.
> 
> What am i doing incorrect?
> 
> 
> local sScrollerID
> 
> on preOpenCard
> 
> local tScrollerRect,tContentRect
> 
> if environment() is not "mobile" then exit preOpenCard
> 
> mobileControlCreate "scroller", "loremScroll"
> 
> put the result into sScrollerID
> 
> put the rect of fld "FieldNotes" of group id 1012 into tScrollerRect
> 
> --put the rect of group id 1012 into tScrollerRect
> 
> put the topleft of fld "FieldNotes" of group id 1012 & "," & the right of fld 
> "FieldNotes" of group id 1012 &","&( the top of fld "FieldNotes" of group id 
> 1012 + the formattedHeight of fld "FieldNotes" of group id 1012) into 
> tContentRect
> 
> mobileControlSet "loremScroll", "rect", tScrollerRect
> 
> mobileControlSet "loremScroll", "contentRect", tContentRect
> 
> mobileControlSet "loremScroll", "visible", true
> 
> mobileControlSet "loremScroll", "scrollingEnabled", true
> 
> mobileControlSet "loremScroll", "vIndicator", true
> 
> mobileControlSet "loremScroll", "vscroll", 0
> 
> mobileControlSet "loremScroll", "canBounce", true
> 
> end preOpenCard
> 
> 
> on scrollerDidScroll hOffset, vOffset
> 
> // When the user scrolls move the displayed content
> 
> set the vScroll of fld "scrollMe" to vOffset
> 
> --set the vScroll of group id 1012 to vOffset
> 
> end scrollerDidScroll
> 
> 
> 
> Thank you!
> John Patten
> SUSD
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

MobileControlCreate Scroller?

2017-07-12 Thread JOHN PATTEN via use-livecode
Hi All,

I have a group that consists of a couple of buttons and a field. The field can 
contain text that fits nicely with it, and at times, text that is outside the 
bounds of the field. This app is targeted for an iPhone. I wanted to create a 
mobile scroller to allow the user to scroll the field when the text is longer 
than the field.

I am using the tutorial online 
(http://lessons.livecode.com/m/4069/l/94412-creating-a-native-scroller-to-scroll-a-field
 
)
 and this scrip. I have placed the script in the stack as the group containing 
the field is a background and appears on every card.

On cards where the text extends beyond the field, the mobile scroller appears, 
however when I scroll the field in the iPhone, the text does not move and I 
don’t see the text below the boundary of the field.

What am i doing incorrect?


local sScrollerID

on preOpenCard

local tScrollerRect,tContentRect

if environment() is not "mobile" then exit preOpenCard

mobileControlCreate "scroller", "loremScroll"

put the result into sScrollerID

put the rect of fld "FieldNotes" of group id 1012 into tScrollerRect

--put the rect of group id 1012 into tScrollerRect

put the topleft of fld "FieldNotes" of group id 1012 & "," & the right of fld 
"FieldNotes" of group id 1012 &","&( the top of fld "FieldNotes" of group id 
1012 + the formattedHeight of fld "FieldNotes" of group id 1012) into 
tContentRect

mobileControlSet "loremScroll", "rect", tScrollerRect

mobileControlSet "loremScroll", "contentRect", tContentRect

mobileControlSet "loremScroll", "visible", true

mobileControlSet "loremScroll", "scrollingEnabled", true

mobileControlSet "loremScroll", "vIndicator", true

mobileControlSet "loremScroll", "vscroll", 0

mobileControlSet "loremScroll", "canBounce", true

end preOpenCard


on scrollerDidScroll hOffset, vOffset

// When the user scrolls move the displayed content

set the vScroll of fld "scrollMe" to vOffset

--set the vScroll of group id 1012 to vOffset

end scrollerDidScroll



Thank you!
John Patten
SUSD
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Header Widget troubles and orientationchange examples?

2017-07-11 Thread JOHN PATTEN via use-livecode
Hi All,

I am trying to do some simple navigation with the header widget.

on mouseUp

local tActionName

put the mouseAction of me into tActionName

--if tActionName is not empty then
-- Execute script triggered by the given action

if tActionName is "back" then

go prev card

else

if tActionName is  “next" then

go next card

end if

end if

end mouseUp

I have changed the action name to Back and Next. However Back works fine, but 
Next does not. If i reset the action to “new item” the next button then works.

This doesn’t see quite right. Also, why does it not display the label “Next” 
near the icon like it does for “Back?” Is that because the widget was made to 
not show labels on additional icons?

I am also getting weird results for orientation changes . I am trying to get 
the header to stay at the top of the window, however on my resize command it 
appears to only work some of the times. Is there an example of floating around 
that shows a header widget updating it’s location after each rotation of the 
device?

Thank you!

John Patten
SUSD
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: iOS Browser Widget and PDFs? SOLVED

2017-07-07 Thread JOHN PATTEN via use-livecode
FWIW…

The issue was related to the specialFolderPath. When I was testing this aspect 
of the app I had it point to specialFolderPath(“Desktop").  Naturally, on the 
iPad I changed it to specialFolderPath(“engine”) thinking that would cover the 
iOS app. Nope. Apparently you can’t save files (pdfs) to the “engine” folder.

I changed it to specialFolderpath(“Documents”) and everything seems to be good 
now.

Cheers!

John Patten
SUSD


> On Jul 6, 2017, at 3:32 PM, JOHN PATTEN via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> I had it “Answer" me the path to the pdf in the iOS app on the iPad and it 
> reports back:
> 
> /var/containerns/Bundle?Application?CA0B0721-80F7-4B24-92C4-0B156D/PTP 
> System.app/Teacher Laptop Replacement Quote (19).dpf
> 
> This should be the path that the - set url of the widget “quoteBrowser” - is 
> set to on the , correct?
> 
> Thank you!
> 
> 
>> On Jul 6, 2017, at 3:19 PM, JOHN PATTEN via use-livecode 
>> <use-livecode@lists.runrev.com> wrote:
>> 
>> Hi All!
>> 
>> I have little app that I’m using track our department quotes/purchases etc. 
>> It pulls the info out of a mySQl db. I have an issue with browser widget 
>> displaying the pdf quotes on iOS. The app pulls the PDF out of mysql via:
>> Put "SELECT attachment FROM quotes WHERE name ='" & jQuote & "'" into btSQL
>> 
>> put revDataFromQuery(tab, cr, gConnectionID, btSQL) into btData
>> 
>> put base64Decode(btData) into vtemp
>> 
>> put specialFolderPath("engine") & "/" & jQuote into vPath
>> 
>> open file vPath for binary write
>> 
>> write vtemp to file vPath
>> 
>> close file vPath
>> 
>> I then have to replace the spaces in the name of the pdf file with a:
>> 
>> replace space with "%20" in vPath
>> set the url of widget "quoteBrowser" of cd id 1067 to "file:" & vPath
>> 
>> replace "%20" with space in vPath
>> 
>> set the script button "Print Quote" of cd id 1067 to "on mouseUp" & return & 
>> "Launch url " & quote & "file:" & vPath & quote & return & "end mouseUp"
>> 
>> 
>> Again this works fine on my Mac and on the iOS simulator. The PDF shows up 
>> just fine in the browser widget. 
>> 
>> However, when I build the app, and try it out on he actual iPad, it does 
>> not. I just get the blank white widget.
>> 
>> Any suggestions on what I might try?
>> 
>> Thank you!
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: iOS Browser Widget and PDFs?

2017-07-06 Thread JOHN PATTEN via use-livecode
I had it “Answer" me the path to the pdf in the iOS app on the iPad and it 
reports back:

/var/containerns/Bundle?Application?CA0B0721-80F7-4B24-92C4-0B156D/PTP 
System.app/Teacher Laptop Replacement Quote (19).dpf

This should be the path that the - set url of the widget “quoteBrowser” - is 
set to on the , correct?

Thank you!


> On Jul 6, 2017, at 3:19 PM, JOHN PATTEN via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Hi All!
> 
> I have little app that I’m using track our department quotes/purchases etc. 
> It pulls the info out of a mySQl db. I have an issue with browser widget 
> displaying the pdf quotes on iOS. The app pulls the PDF out of mysql via:
> Put "SELECT attachment FROM quotes WHERE name ='" & jQuote & "'" into btSQL
> 
> put revDataFromQuery(tab, cr, gConnectionID, btSQL) into btData
> 
> put base64Decode(btData) into vtemp
> 
> put specialFolderPath("engine") & "/" & jQuote into vPath
> 
> open file vPath for binary write
> 
> write vtemp to file vPath
> 
> close file vPath
> 
> I then have to replace the spaces in the name of the pdf file with a:
> 
> replace space with "%20" in vPath
> set the url of widget "quoteBrowser" of cd id 1067 to "file:" & vPath
> 
> replace "%20" with space in vPath
> 
> set the script button "Print Quote" of cd id 1067 to "on mouseUp" & return & 
> "Launch url " & quote & "file:" & vPath & quote & return & "end mouseUp"
> 
> 
> Again this works fine on my Mac and on the iOS simulator. The PDF shows up 
> just fine in the browser widget. 
> 
> However, when I build the app, and try it out on he actual iPad, it does not. 
> I just get the blank white widget.
> 
> Any suggestions on what I might try?
> 
> Thank you!
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

iOS Browser Widget and PDFs?

2017-07-06 Thread JOHN PATTEN via use-livecode
Hi All!

I have little app that I’m using track our department quotes/purchases etc. It 
pulls the info out of a mySQl db. I have an issue with browser widget 
displaying the pdf quotes on iOS. The app pulls the PDF out of mysql via:
Put "SELECT attachment FROM quotes WHERE name ='" & jQuote & "'" into btSQL

put revDataFromQuery(tab, cr, gConnectionID, btSQL) into btData

put base64Decode(btData) into vtemp

put specialFolderPath("engine") & "/" & jQuote into vPath

open file vPath for binary write

write vtemp to file vPath

close file vPath

I then have to replace the spaces in the name of the pdf file with a:

replace space with "%20" in vPath
set the url of widget "quoteBrowser" of cd id 1067 to "file:" & vPath

replace "%20" with space in vPath

set the script button "Print Quote" of cd id 1067 to "on mouseUp" & return & 
"Launch url " & quote & "file:" & vPath & quote & return & "end mouseUp"


Again this works fine on my Mac and on the iOS simulator. The PDF shows up just 
fine in the browser widget. 

However, when I build the app, and try it out on he actual iPad, it does not. I 
just get the blank white widget.

Any suggestions on what I might try?

Thank you!
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Display PDF in Browser Widget Error?

2017-06-21 Thread JOHN PATTEN via use-livecode
Thank you!

The spaces where the culprit

Now working :)

> On Jun 21, 2017, at 11:40 AM, Paul Dupuis via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> If the browser widget is expecting an  encoded URL (i.e. %20 vs a space)
> then instead of replacing characters, you should use the urlEncode
> function, as in
> 
> put URLEncode(tFile) into tFile
> 
> This way any characters (spaces or Unicode or whatever) that are an
> issue are properly encoded.
> 
> 
> 
> On 6/21/2017 2:24 PM, panagiotis merakos via use-livecode wrote:
>> @Roger
>> 
>> Nice!
>> 
>> This code works with filenames with spaces, too:
>> 
>> on mouseUp
>> 
>> local tFile
>> 
>> answer file "Please choose the file you would like to display" with type "PDF
>> document|pdf|PDF"
>> 
>> if it is not empty then
>> 
>> put it into tFile
>> 
>> replace space with "%20" in tFile
>> 
>> set the url of widget 1 to tFile
>> 
>> end if
>> 
>> end mouseUp
>> 
>> On Wed, Jun 21, 2017 at 7:19 PM, Roger Eller via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>> 
>>> Have you tried "my%20Pdf"?
>>> 
>>> ~Roger
>>> 
>>> On Wed, Jun 21, 2017 at 2:04 PM, panagiotis merakos via use-livecode <
>>> use-livecode@lists.runrev.com> wrote:
>>> 
>>>> Hmm, it seems that the spaces are the culprit. I did a quick test, and
>>>> selecting a pdf "myPdf" works fine, whereas selecting a pdf "my Pdf"
>>> throws
>>>> an error.
>>>> 
>>>> This looks like a bug to me :)
>>>> 
>>>> Best,
>>>> Panos
>>>> --
>>>> 
>>>> On Wed, Jun 21, 2017 at 6:50 PM, JOHN PATTEN via use-livecode <
>>>> use-livecode@lists.runrev.com> wrote:
>>>> 
>>>>> It contains spaces, but no unicode that I can see.  i.e.
>>> "Transportation
>>>>> Bus Software Laptop.pdf”
>>>>> 
>>>>> Thank you!
>>>>> 
>>>>> 
>>>>>> On Jun 21, 2017, at 10:47 AM, panagiotis merakos via use-livecode <
>>>>> use-livecode@lists.runrev.com> wrote:
>>>>>> Hi John,
>>>>>> 
>>>>>> Does the pdf filename you select contain any unicode characters?
>>>>>> 
>>>>>> Best,
>>>>>> Panos
>>>>>> --
>>>>>> 
>>>>>> On Wed, Jun 21, 2017 at 6:31 PM, JOHN PATTEN via use-livecode <
>>>>>> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com
>>>>> wrote:
>>>>>>> Hi All,
>>>>>>> 
>>>>>>> I am trying to display a PDF in a browser widget using the tutorial
>>>>> here:
>>>>>>> http://lessons.livecode.com/m/4071/l/727199-how-do-i- <
>>>>> http://lessons.livecode.com/m/4071/l/727199-how-do-i->
>>>>>>> display-a-pdf-in-livecode <http://lessons.livecode.com/ <
>>>>> http://lessons.livecode.com/>
>>>>>>> m/4071/l/727199-how-do-i-display-a-pdf-in-livecode>
>>>>>>> 
>>>>>>> and this code:
>>>>>>> 
>>>>>>> on mouseUp
>>>>>>>  local tFile
>>>>>>>  answer file "Please choose the file you would like to display"
>>> with
>>>>>>> type "PDF document|pdf|PDF"
>>>>>>>  if it is not empty then
>>>>>>> put it into tFile
>>>>>>> set the url of widget "browser" to tFile
>>>>>>>  end if
>>>>>>> end mouseUp
>>>>>>> 
>>>>>>> 
>>>>>>> I’m getting this error:
>>>>>>> 
>>>>>>> button "Button": execution error at line 6 (extension: error occured
>>>>> with
>>>>>>> domain) near "runtime", char 1
>>>>>>> 
>>>>>>> 
>>>>>>> Would this be a bug, or am I doing something incorrectly?
>>>>>>> 
>>>>>>> 
>>>>>>> Thank you!
>>>>>>> John Patten
>>>>>>> SUSD
>>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Display PDF in Browser Widget Error?

2017-06-21 Thread JOHN PATTEN via use-livecode
It contains spaces, but no unicode that I can see.  i.e. "Transportation Bus 
Software Laptop.pdf”

Thank you!


> On Jun 21, 2017, at 10:47 AM, panagiotis merakos via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Hi John,
> 
> Does the pdf filename you select contain any unicode characters?
> 
> Best,
> Panos
> --
> 
> On Wed, Jun 21, 2017 at 6:31 PM, JOHN PATTEN via use-livecode <
> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>> wrote:
> 
>> Hi All,
>> 
>> I am trying to display a PDF in a browser widget using the tutorial here:
>> http://lessons.livecode.com/m/4071/l/727199-how-do-i- 
>> <http://lessons.livecode.com/m/4071/l/727199-how-do-i->
>> display-a-pdf-in-livecode <http://lessons.livecode.com/ 
>> <http://lessons.livecode.com/>
>> m/4071/l/727199-how-do-i-display-a-pdf-in-livecode>
>> 
>> and this code:
>> 
>> on mouseUp
>>   local tFile
>>   answer file "Please choose the file you would like to display" with
>> type "PDF document|pdf|PDF"
>>   if it is not empty then
>>  put it into tFile
>>  set the url of widget "browser" to tFile
>>   end if
>> end mouseUp
>> 
>> 
>> I’m getting this error:
>> 
>> button "Button": execution error at line 6 (extension: error occured with
>> domain) near "runtime", char 1
>> 
>> 
>> Would this be a bug, or am I doing something incorrectly?
>> 
>> 
>> Thank you!
>> John Patten
>> SUSD
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode 
>> <http://lists.runrev.com/mailman/listinfo/use-livecode>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode 
> <http://lists.runrev.com/mailman/listinfo/use-livecode>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Display PDF in Browser Widget Error?

2017-06-21 Thread JOHN PATTEN via use-livecode
Hi All,

I am trying to display a PDF in a browser widget using the tutorial here:  
http://lessons.livecode.com/m/4071/l/727199-how-do-i-display-a-pdf-in-livecode 


and this code:

on mouseUp
   local tFile
   answer file "Please choose the file you would like to display" with type 
"PDF document|pdf|PDF"
   if it is not empty then
  put it into tFile
  set the url of widget "browser" to tFile
   end if
end mouseUp  


I’m getting this error:  

button "Button": execution error at line 6 (extension: error occured with 
domain) near "runtime", char 1


Would this be a bug, or am I doing something incorrectly?


Thank you!
John Patten
SUSD
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Uploading Image - Livecode Tutorial Example? Sessions?

2017-05-26 Thread JOHN PATTEN via use-livecode
Hi Mike,

It appears to be working for me now, and I did not have to override the version 
editing the .htaccess file. 

What I’d like to do now is keep the script from naming the new image with a 
random number. :)

Cheers!




> On May 26, 2017, at 9:52 AM, Mike Bonner via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Theres another issue with on-rev.  Even if you set the sessionSavePath, it
> won't work due to the default version of LC on on-rev.  You need to
> override the version using an .htaccess file, but i've not managed to
> actually get that to work for me.  Looking for the link that tells you how
> to do this. If you actually get it to work please let me know how!
> 
> http://lessons.livecode.com/m/4070/l/41105-how-do-i-choose-which-livecode-server-engine-to-use-with-on-rev
> 
> Unless they've updated the default version for .lc files, you'll need to
> switch to a more recent version of the server to get sessions to work.
> 
> On Fri, May 26, 2017 at 10:15 AM, JOHN PATTEN via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> I think I figured out the issue based on an old post by Sturgis…
>> 
>> Apparently you have to set the sessionSavePath before you call the “start
>> session.”
>> 
>> set the sessionSavePath to the defaultfolder
>> 
>> Forum discussion here:
>> 
>> http://forums.livecode.com/viewtopic.php?f=15=10787=
>> 50056=session#p50034 <http://forums.livecode.com/
>> viewtopic.php?f=15=10787=50056=session#p50034>
>> 
>> Cheers!
>> 
>> 
>>> On May 26, 2017, at 8:39 AM, JOHN PATTEN via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>> 
>>> Hello!
>>> 
>>> Thanks for those that answered about the problem I was having with FTP.
>> It was the URLEncode issue that was tripping me up.
>>> 
>>> However, I’m changing gears as I hadn’t realized that I could not ftp
>> directly into a htmlpublic directory on On-Rev. Ultimately I am trying to
>> just create a little iOS app that will allow me upload and image and create
>> a simple html page to display the image.
>>> 
>>> I have been using the LiveCode tutorial here: “How do I use LiveCode
>> graphics features server-side?” (http://lessons.livecode.com/
>> m/15262/l/156710-how-do-i-use-livecode-graphics-features-server-side <
>> http://lessons.livecode.com/m/15262/l/156710-how-do-i-use-
>> livecode-graphics-features-server-side>)
>>> 
>>> I can’t get this to work the “start session” included in the script?
>>> 
>>> The example starts:
>>> ---
>>> >> start session
>>> ## enter the image file into our $_SESSION if one's just been uploaded
>>> if $_FILES["imagefile"] is not empty then
>>> put url("binfile:" & $_FILES["imagefile"]["filename"]) into
>> $_SESSION["imagedata"]
>>> end if
>>> if $_SESSION["imagedata"] is empty then
>>> printForm ## no image has been uploaded so display the form to
>> upload one
>>> else
>>> create image “myImage” …
>>> 
>>> 
>>> 
>>> If I take the “start session” out, the server script works, sort of…as I
>> think it will upload the image, but because there is no session, you can’t
>> manipulate the image.
>>> 
>>> Has anybody got this example to work? I have tried moving the “start
>> session” around to different areas of the server script, but that does not
>> seem to work either.
>>> 
>>> Thank you!
>>> John Patten
>>> SUSD
>>> 
>>> 
>>> 
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Uploading Image - Livecode Tutorial Example? Sessions?

2017-05-26 Thread JOHN PATTEN via use-livecode
I think I figured out the issue based on an old post by Sturgis…

Apparently you have to set the sessionSavePath before you call the “start 
session.”

set the sessionSavePath to the defaultfolder

Forum discussion here:

http://forums.livecode.com/viewtopic.php?f=15=10787=50056=session#p50034
 
<http://forums.livecode.com/viewtopic.php?f=15=10787=50056=session#p50034>

Cheers!


> On May 26, 2017, at 8:39 AM, JOHN PATTEN via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Hello!
> 
> Thanks for those that answered about the problem I was having with FTP. It 
> was the URLEncode issue that was tripping me up. 
> 
> However, I’m changing gears as I hadn’t realized that I could not ftp 
> directly into a htmlpublic directory on On-Rev. Ultimately I am trying to 
> just create a little iOS app that will allow me upload and image and create a 
> simple html page to display the image.
> 
> I have been using the LiveCode tutorial here: “How do I use LiveCode graphics 
> features server-side?” 
> (http://lessons.livecode.com/m/15262/l/156710-how-do-i-use-livecode-graphics-features-server-side
>  
> <http://lessons.livecode.com/m/15262/l/156710-how-do-i-use-livecode-graphics-features-server-side>)
>  
> 
> I can’t get this to work the “start session” included in the script?
> 
> The example starts:
> ---
>  start session
> ## enter the image file into our $_SESSION if one's just been uploaded
> if $_FILES["imagefile"] is not empty then
>  put url("binfile:" & $_FILES["imagefile"]["filename"]) into 
> $_SESSION["imagedata"]
> end if
> if $_SESSION["imagedata"] is empty then
>  printForm ## no image has been uploaded so display the form to 
> upload one
> else
>  create image “myImage” …
> 
> 
> 
> If I take the “start session” out, the server script works, sort of…as I 
> think it will upload the image, but because there is no session, you can’t 
> manipulate the image.
> 
> Has anybody got this example to work? I have tried moving the “start session” 
> around to different areas of the server script, but that does not seem to 
> work either.
> 
> Thank you!
> John Patten
> SUSD
> 
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Uploading Image - Livecode Tutorial Example? Sessions?

2017-05-26 Thread JOHN PATTEN via use-livecode
Hello!

Thanks for those that answered about the problem I was having with FTP. It was 
the URLEncode issue that was tripping me up. 

However, I’m changing gears as I hadn’t realized that I could not ftp directly 
into a htmlpublic directory on On-Rev. Ultimately I am trying to just create a 
little iOS app that will allow me upload and image and create a simple html 
page to display the image.

I have been using the LiveCode tutorial here: “How do I use LiveCode graphics 
features server-side?” 
(http://lessons.livecode.com/m/15262/l/156710-how-do-i-use-livecode-graphics-features-server-side
 
)
 

I can’t get this to work the “start session” included in the script?

The example starts:
---
http://lists.runrev.com/mailman/listinfo/use-livecode

FTP from iOS but getting tsneterr: (67) Access denied: 530

2017-05-25 Thread JOHN PATTEN via use-livecode
Hi All,

I’m trying to ftp and image from the photo gallery on iOS to my on-rev account. 
 I’m using the example:

on mouseUp
mobilepickphoto “library"
--upload to FTP
put the last image into url 
("ftp://autoim...@jdoe.on-rev.com:xx...@jdoe.on-rev.com/autoimage/images/newimage.jpg”)
--Informs of successful or unsuccessful upload
if the result is not empty then
answer "url put failed:" && the result
else
answer "success!”
end if
end mouseUp
——

It is throwing and an error, tsnetterr:(67) Access Denied: 530.

I can use Fetch (a mac FTP client) just fine with the same credentials and 
upload an image with no problem. I don’t even have to give Fetch the full ftp 
directory, just the host.

What am I missing?

Thank you!

John Patten
SUSD
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Snaptshot of Browser Widget in iOS?

2017-05-18 Thread JOHN PATTEN via use-livecode
Hi All!

I am trying to lay some objects (text fields, graphics, etc.) over a browser 
widget. I am essentially just taking a screen capture and then layering the 
objects on top of the image. Here is my script:

on mouseUp
lock screen
put the rect of current stack into tCoord

set the width of image 1 to the width of current stack
set the height of image 1 to the height of current stack
set the topleft of image 1 to 0,0
export snapshot from rect tCoord to file specialFolderPath("documents") & 
"File1.png"
set the visible of widget "browser" to false
set the filename of image id 1008 to ""
wait 2
set the filename of image id 1008 to SpecialFolderPath("documents") & 
"File1.png"
-- I believe i needed the three previous lines to get this to work for some 
reason???
show image id 1008 with visual effect dissolve slowly
unlock screen

end mouseUp


This works fine on my Mac, but when I test it in the iOS simulator it does not 
work. Is it not possible to take a snapshot of the browser widget in iOS?

Thank you!

John Patten
SUSD
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Error connecting to SQLlite in iOS

2017-04-20 Thread JOHN PATTEN via use-livecode
Hi All,

I have a simple project that uses an sql lite database. It works fine in 
LiveCode, but when I test it in the iOS simulator, i get an error.

I have copied to the SQL.lite database to the “Copy Files” in the standalone 
settings. I have also added the SqLite and MySQL inclusions.

Here is the link to the project and db: Here is a link to the stack and sql db: 
 https://www.dropbox.com/s/74rhx88dod6cs2k/CCSS%20App.zip?dl=0 


Here is the script I am using.

local sDatabaseID

command databaseConnect
local tDatabasePath, tDatabaseID

 put specialFolderPath("Documents") &  "/ccssdb-ela.sqlite" into 
tDatabasePath

## Test if a database exists

if there is a file tDatabasePath then

answer "A database already exists" with "Okay"

end if

if there is a file tDatabasepath then
put  revOpenDatabase("sqlite", tDatabasePath, , , , ) into tDatabaseID
setDatabaseID tDatabaseID

put cd fld "targetGrade" into tGrade

if tGrade is 10 then

put 9 into tGrade

end if

if tGrade is 12 then

put 11 into tGrade

end if

put revQueryDatabase(tDatabaseID,"SELECT * FROM ccss_data WHERE grade 
=:1","tGrade") into theCursor

if theCursor is an integer then

ConvertSQLCursorToArray theCursor, theDataGridArray

put the result into theError

if theError is empty then

set the dgData of group "ccss_data" to theDataGridArray

end if

revCloseCursor theCursor


revCloseDatabase tDatabaseID

else


Answer "Error connecting to the database:" && tDatabaseID & "."
end if


else

Answer "Having trouble locating database."

end if

end DatabaseConnect

command setDatabaseID pDatabaseID

  put pDatabaseID into sDatabaseID

end setDatabaseID


function getDatabaseID

  return sDatabaseID

end getDatabaseID


command ConvertSQLCursorToArray pCursor, @pOutArrayA

local i

local theFields

local theError


put revDatabaseColumnNames(pCursor) into theFields

if theFields begins with "revdberr," then

put item 2 to -1 of theFields into theError

end if

if theError is empty then

put 0 into i

repeat until revQueryIsAtEnd(pCursor)

add 1 to i


repeat for each item theField in theFields

put revDatabaseColumnNamed(pCursor, theField) into pOutArrayA [i] [theField]

end repeat


revMoveToNextRecord pCursor

end repeat

end if

return theError

end ConvertSQLCursorToArray


Thank you!

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: OT (?): Bookmarking GPS coords

2017-04-09 Thread JOHN PATTEN via use-livecode
This sound interesting, I'd be interested in learning more too.

Thank you
John Patten
SUSD

Sent from my iPad

> On Apr 9, 2017, at 1:34 AM, Graham Samuel via use-livecode 
>  wrote:
> 
> I’d love it if this topic could stay on the list for a bit, as I’m just 
> getting involved in reconstructing an existing desktop Geographical 
> Information System which has been very successfully sold to UK 
> schoolchildren, who use it to understand maps and map symbols based on their 
> own locality; but it very much overdue to be re-designed and implemented for 
> mobile devices - mostly tablets. The use of GPS to explore and record a 
> locality is clearly a very powerful and necessary addition to the program. As 
> it’s the UK, even Alex’s interest in postcodes is highly relevant to me (to 
> those outside the UK, and individual UK postcode identifies a very small area 
> - normally seen as a postman’s walk. This is different from other countries 
> like France where postcodes are wide-ranging and therefore less useful for 
> apps like this.)
> 
> Thanks
> 
> Graham
> 
> 
>> On 9 Apr 2017, at 03:40, J. Landman Gay via use-livecode 
>>  wrote:
>> 
>> If you go for Android it is trivial to build and distribute. There are no 
>> restrictions, you can email the app or supply a web download link, or put it 
>> on a public server. Apple is more restrictive, so you'd need to get the 
>> UUIDs of everyone who will use the device, or else pay for an Enterprise 
>> license, or else put it in the App Store.
>> 
>> If you want to create the stack I'd be happy to build it in Android for you, 
>> and show you how to do it yourself if you like. It isn't difficult.
>> 
>>> On 4/8/17 7:58 PM, Alex Tweedly via use-livecode wrote:
>>> It would be the most trivial app to write in LC
>>> 
>>> - ask the postcode
>>> 
>>> - download the list of addresses in that postcode, and put it into a
>>> selection control
>>> 
>>> - have a button that takes current location and stores it for the
>>> selected address
>>> 
>>> [walk along the road, selecting and clicking as I pass each house :-) ]
>>> 
>>> - upload the completed file of locations + addresses
>>> 
>>> BUT - I would need to figure out how to build an iOS and/or Android app,
>>> and how to release it or get it on to the phones of my volunteers, which
>>> seems to be so troublesome I'd rather avoid it :-)
>> 
>> 
>> -- 
>> Jacqueline Landman Gay | jac...@hyperactivesw.com
>> HyperActive Software   | http://www.hyperactivesw.com
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: MDM and App deployment

2017-04-06 Thread JOHN PATTEN via use-livecode
ess to the device's camera
NSContactsUsageDescription
This application requires access to your Contacts
NSMicrophoneUsageDescription
This application requires access to the device's 
microphone
NSMotionUsageDescription
This application requires access to the device's 
accelerometer
NSRemindersUsageDescription
This application requires access to your Reminders
NSPhotoLibraryUsageDescription
This application requires access to Photo Library



——

Xcode Food App info.plist


http://www.apple.com/DTDs/PropertyList-1.0.dtd;>

  
CFBundleName
FoodTracker
DTXcode
0820
DTSDKName
iphoneos10.2
UILaunchStoryboardName
LaunchScreen
DTSDKBuild
14C89
CFBundleDevelopmentRegion
en
CFBundleVersion
1
BuildMachineOSBuild
16E195
DTPlatformName
iphoneos
CFBundlePackageType
APPL
UIMainStoryboardFile
Main
CFBundleSupportedPlatforms

  iPhoneOS

CFBundleShortVersionString
1.0
CFBundleInfoDictionaryVersion
6.0
UIRequiredDeviceCapabilities

  armv7

CFBundleExecutable
FoodTracker
DTCompiler
com.apple.compilers.llvm.clang.1_0
UISupportedInterfaceOrientations~ipad

  UIInterfaceOrientationPortrait
  UIInterfaceOrientationPortraitUpsideDown
  UIInterfaceOrientationLandscapeLeft
  UIInterfaceOrientationLandscapeRight

CFBundleIdentifier
com.sylvanapps.FoodTracker
MinimumOSVersion
10.0
DTXcodeBuild
8C38
DTPlatformVersion
10.2
LSRequiresIPhoneOS

UISupportedInterfaceOrientations

  UIInterfaceOrientationPortrait
  UIInterfaceOrientationLandscapeLeft
  UIInterfaceOrientationLandscapeRight

UIDeviceFamily

  1
  2

DTPlatformBuild
14C89
  




Thank you!

> On Apr 6, 2017, at 8:28 AM, JOHN PATTEN via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Thanks Terry and Jacqueline,
> 
> The file/app is being served via our MDM which is using https.
> 
> Terry, you mention that the manifest file has to be perfect, do you happen to 
> know what that would look like? I have never tweaked the manifest file that 
> gets created automatically. 
> 
> I have been following Richard Miller’s challenges with getting his app into 
> the regular app store so I know the info.plist file can be problematic, 
> depending on what you are trying to do.  However, I’m not quite sure what a 
> “perfect” plist file should look like. Someone else had mentioned being sure 
> that I,…  "Call all the links on the plist and html with https,” but I’m not 
> sure what that means.  It was pulled from this this stackoverflow 
> conversation, 
> http://stackoverflow.com/questions/34820355/enterprise-app-installing-but-immediatelly-dissapears
>  
> <http://stackoverflow.com/questions/34820355/enterprise-app-installing-but-immediatelly-dissapears>,
>  but I have  a hunch it is not the same problem as mine.
> 
> Let me know if I’ missing something in the plist file….
> 
> 
> Thank you!
> 
> 
> 
> 
>> On Apr 5, 2017, at 7:35 PM, Terry Judd via use-livecode 
>> <use-livecode@lists.runrev.com> wrote:
>> 
>> I missed the start of this thread so I might be off target but the app needs 
>> to be server from a secure (https) server. If it isn’t and/or if your 
>> manifest file isn’t perfect then you will get that sort of message as well.
>> 
>> Terry...
>> 
>> On 6/04/2017 12:18 pm, "use-livecode on behalf of J. Landman Gay via 
>> use-livecode" <use-livecode-boun...@lists.runrev.com on behalf of 
>> use-livecode@lists.runrev.com> wrote:
>> 
>>   On 4/5/17 5:17 PM, JOHN PATTEN via use-livecode wrote:
>>> A student iPad can see the app in their Self Service app, but when
>>> they go to install it reports it can’t download at this time.
>> 
>>   I don't know if things are different with an Enterprise account, but in 
>>   my experience an app that partially downloads and then errors indicates 
>>   something wrong with the distribution profile.
>> 
>>   -- 
>>   Jacqueline Landman Gay | jac...@hyperactivesw.com
>>   HyperActive Software   | http://www.hyperactivesw.com
>> 
>> 
>>   ___
>>   use-livecode mailing list
>>   use-livecode@lists.runrev.com
>>   Please visit this url to subscribe, unsubscribe and manage your 
>> subscription preferences:
>>   http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livec

Re: MDM and App deployment

2017-04-06 Thread JOHN PATTEN via use-livecode
Thanks Terry and Jacqueline,

The file/app is being served via our MDM which is using https.

Terry, you mention that the manifest file has to be perfect, do you happen to 
know what that would look like? I have never tweaked the manifest file that 
gets created automatically. 

I have been following Richard Miller’s challenges with getting his app into the 
regular app store so I know the info.plist file can be problematic, depending 
on what you are trying to do.  However, I’m not quite sure what a “perfect” 
plist file should look like. Someone else had mentioned being sure that I,…  
"Call all the links on the plist and html with https,” but I’m not sure what 
that means.  It was pulled from this this stackoverflow conversation, 
http://stackoverflow.com/questions/34820355/enterprise-app-installing-but-immediatelly-dissapears
 
<http://stackoverflow.com/questions/34820355/enterprise-app-installing-but-immediatelly-dissapears>,
 but I have  a hunch it is not the same problem as mine.

Let me know if I’ missing something in the plist file….


Thank you!




> On Apr 5, 2017, at 7:35 PM, Terry Judd via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> I missed the start of this thread so I might be off target but the app needs 
> to be server from a secure (https) server. If it isn’t and/or if your 
> manifest file isn’t perfect then you will get that sort of message as well.
> 
> Terry...
> 
> On 6/04/2017 12:18 pm, "use-livecode on behalf of J. Landman Gay via 
> use-livecode" <use-livecode-boun...@lists.runrev.com on behalf of 
> use-livecode@lists.runrev.com> wrote:
> 
>On 4/5/17 5:17 PM, JOHN PATTEN via use-livecode wrote:
>> A student iPad can see the app in their Self Service app, but when
>> they go to install it reports it can’t download at this time.
> 
>I don't know if things are different with an Enterprise account, but in 
>my experience an app that partially downloads and then errors indicates 
>something wrong with the distribution profile.
> 
>-- 
>Jacqueline Landman Gay | jac...@hyperactivesw.com
>HyperActive Software   | http://www.hyperactivesw.com
> 
> 
>___
>use-livecode mailing list
>use-livecode@lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

MDM and App deployment

2017-04-05 Thread JOHN PATTEN via use-livecode
Hi All,

History - We use JAMF (Casper) as our MDM. Our math teachers have been using an 
app called Casper Focus which locks students into a particular web site for 
when they are giving  the students an assessment. JAMF no longer supports 
Casper Focus now that Apple has created the Classroom app. However, the 
Classroom app does not have the ability to lock students to a specific webs 
site, only to specific apps.  

In comes LiveCode. I create a little secure web browser app that only goes to 
their, one,  math web site, and now teachers can use Apple Classroom and my app 
to secure students to  the app i created when giving their assessments. 

Problem: I can upload the App just fine into JAMF and into the JAMF Self 
Service app. We use our Enterprise Apple Developer profile to create an iOS app 
in LiveCode. I then, because of past practice, create a folder and title it 
“Payload, “ drop the iOS app into the folder, compress the folder, and rename 
it my app.ipa.  

A student iPad can see the app in their Self Service app, but when they go to 
install it reports it can’t download at this time.

Here is a little video demo:  https://youtu.be/--JJPUx3Zlg 


The app is not pretty, but it is functional. It is essentially a browser object 
with a little behind the scenes data gathering via mysql on its usage. The data 
is just for me to see how it’s being used.

Anybody distributed iOS apps via an MDM? Is there anything that has to be done 
beyond the Standalone Settings configuration window, i.e info.plist etc. etc?

If I can get this MDM distribution thing figured out, I hope to do more :)

Thank you!







___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Quasi Student Secure Web Browser?

2017-03-30 Thread JOHN PATTEN via use-livecode
Never mind… Figured out where all commands that go with the new browser widget 
were located (release notes).  I was looking in the dictionary and never saw 
them until I saw another post on the list.

This works:

on browserDocumentLoadBegin pURL

put the itemDel into tOrgItemDel

set the itemDel to "/"

if item 3 of pURL is not "www.myopenmath.com" then

launch url "https://www.myopenmath.com; in widget "OpenMathBrowser"

answer "Sorry that link is not accessible at this time."

end if

end browserDocumentLoadBegin


If anybody else is looking for those browser widget commands they can be found 
in the release notes here:  

http://livecodestatic.com/downloads/livecode/8_0_0/LiveCodeNotes-8_0_0_dp_11.pdf
 
<http://livecodestatic.com/downloads/livecode/8_0_0/LiveCodeNotes-8_0_0_dp_11.pdf>

Cheers!

John Patten
SUSD

> On Mar 29, 2017, at 6:32 PM, JOHN PATTEN via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Hi All,
> 
> I’m attempting to create a simple secure web browser iOS app for some 
> teachers. I want to prevent any links within an approved site (i.e. 
> “www.approvedsite.com") that link out to others sites from launching. For 
> example, if the "www.approvedsite.com" has a link out to Youtube.com, I want 
> to detect that it is outside the target site and prevent it from loading in 
> the browser object. If the link is within the approved site, i.e. 
> "www.approvedsite.com/anotherpage.html,” I want to allow that page to load in 
> the browser object.
> 
> At first I thought i would use a widget, but then did not see any command 
> that would get the url. So, I switched gears and went with the 
> mobileControlCreate browser strategy.  I thought I could use the 
> browserStartedLoading command, but I’m not quite sure how to go about it. 
> 
> I am not sure how to capture the link url when the user clicks/taps on the 
> link in the browser, and then check it against acceptable urls? 
> 
> I had this is the card script:
> 
> on browserStartedLoading pUrl
> put pUrl into tUrlLoading
> wait 50
> answer tUrlLoading
> set the itemdel to "/"
> answer item 2 of tUrlLoading
> if item 2 of tUrlLoading is not "www.myopenmath.com" then
> answer “You can not access this site."
> end if
> end browserStartedLoading
> 
> 
> Is there a better way to go about accomplishing this in LiveCode?
> 
> Thank you!
> 
> John Patten
> SUSD
> 
> 
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Quasi Student Secure Web Browser?

2017-03-29 Thread JOHN PATTEN via use-livecode
Hi All,

I’m attempting to create a simple secure web browser iOS app for some teachers. 
I want to prevent any links within an approved site (i.e. 
“www.approvedsite.com") that link out to others sites from launching. For 
example, if the "www.approvedsite.com" has a link out to Youtube.com, I want to 
detect that it is outside the target site and prevent it from loading in the 
browser object. If the link is within the approved site, i.e. 
"www.approvedsite.com/anotherpage.html,” I want to allow that page to load in 
the browser object.

At first I thought i would use a widget, but then did not see any command that 
would get the url. So, I switched gears and went with the mobileControlCreate 
browser strategy.  I thought I could use the browserStartedLoading command, but 
I’m not quite sure how to go about it. 

I am not sure how to capture the link url when the user clicks/taps on the link 
in the browser, and then check it against acceptable urls? 

I had this is the card script:

on browserStartedLoading pUrl
put pUrl into tUrlLoading
wait 50
answer tUrlLoading
set the itemdel to "/"
answer item 2 of tUrlLoading
if item 2 of tUrlLoading is not "www.myopenmath.com" then
answer “You can not access this site."
end if
end browserStartedLoading


Is there a better way to go about accomplishing this in LiveCode?

Thank you!

John Patten
SUSD





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Resize Images in on-rev folder via lc script?

2017-03-12 Thread JOHN PATTEN via use-livecode
Hi All,

I have a simple html form that uploads images to a directory on the on-rev 
server. The images are uploaded at different resolutions. I would like to have 
the on-rev server resize the width of the images  in that folder when users 
drop them into the server via an html form.

Is it possible using lc scripts on the on-rev server to resize the images? I 
can do the resize easily via a stack using the example here, 
http://lessons.livecode.com/m/4071/l/15018-how-to-proportionally-resize-an-image
 

 , but I’m not sure how that could be applied to a folder on the server using 
.lc scripts?

Thank you!
John Patten
SUSD


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Browser Widget Appears to be caching data (javascript)?

2017-02-05 Thread JOHN PATTEN via use-livecode
Hi Bill,

Did not seem to make a difference with the “?” added to the end. It is still 
going to the old site.

I have attached an example stack. 
https://dl.dropboxusercontent.com/u/6767916/Pano%20JavaScript%20Tester.livecode.zip

The “cow” hotspot should launch the NASA site instead of the cow site.  (I’m 
guessing it will work for you the first time though. I would have to change the 
url in the javascript after you were to try it once, and then see if the 
hotspot goes to the new url.)

The cow hotspot should be going to the nasa.gov site.


Thank you!

John Patten
SUSD
> On Feb 5, 2017, at 11:53 AM, William Prothero via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> John:
> Try adding “?” to the URL. This should force reload.
> Bill
> 
>> On Feb 5, 2017, at 11:31 AM, JOHN PATTEN via use-livecode 
>> <use-livecode@lists.runrev.com> wrote:
>> 
>> Hi All,
>> 
>> How do you get the browser widget to dump any cached web content?
>> 
>> I have an html5 panoramic running in a browser widget. I change the 
>> javascript code associated to a hotspot to point to a different url, but the 
>> hotspot link continues to point to the old URL. 
>> 
>> If I launch the panorama in a browser (Chrome,) the hotspot points to the 
>> changed url.  
>> 
>> Why after loading the panorama in the browser widget does the hotspot 
>> continue to point to the old url?
>> 
>> Thank you!
>> 
>> John Patten
>> SUSD
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Browser Widget Appears to be caching data (javascript)?

2017-02-05 Thread JOHN PATTEN via use-livecode
Hi All,

How do you get the browser widget to dump any cached web content?

I have an html5 panoramic running in a browser widget. I change the javascript 
code associated to a hotspot to point to a different url, but the hotspot link 
continues to point to the old URL. 

If I launch the panorama in a browser (Chrome,) the hotspot points to the 
changed url.  

Why after loading the panorama in the browser widget does the hotspot continue 
to point to the old url?

Thank you!

John Patten
SUSD
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: JavaScript, Browser Object, VR with Hotspots?

2017-02-03 Thread JOHN PATTEN via use-livecode
Thanks Mike!

I posted this question on Pano2VR ggnome forum with a  little animation of the 
particular challenge. 

https://ggnome.com/forum/viewtopic.php?f=13=11663 
<https://ggnome.com/forum/viewtopic.php?f=13=11663>

There may be folks interested in what Livecode could do for their workflow too 
:)

Cheers!


> On Feb 2, 2017, at 7:56 PM, Mike Bonner via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Hmm. NO easy way to see the critical stuff from here but I found this post.
> 
> https://ggnome.com/forum/viewtopic.php?f=6=9123=35818=custom+function+hotspot#p35818
> 
> I think the key is to do similar to what is being done in the post.
> Basically,pass the value of me.hotspot.id to livecode as part of the
> function call, and add a switch block that gives a message based on the
> hotspot id. Very hard to actually test anything from here, but maybe there
> is something useful in the post.
> 
> On Thu, Feb 2, 2017 at 8:12 PM, JOHN PATTEN via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Hi All,
>> 
>> I managed to trial and error together a working html5 panorama using
>> Pan2VR (http://ggnome.com/pano2vr <http://ggnome.com/pano2vr>). The
>> interface of their software allows you to attach a javascript action to a
>> vr hotspot. The interface creates the following javascript for the hotspot
>> to trigger the LiveCode handler:
>> 
>> this._svg2.onclick=function (e) {
>>window.addEventListener('click',
>> function() {liveCode.myLiveCodeHandler2();});
>>}
>> 
>> (svg2 is the hotspot icon).
>> 
>> The hotspot in the vr adds some text to a field on the card when clicked,
>> waits 2 seconds, and then removes the text.
>> 
>> This javascript works only the first time, because after the hotspot is
>> clicked, the LiveCode handler is triggered any time the user clicks within
>> the vr of the browser object. (Javascript “event listener” listens for any
>> click in the browser object, after the hotspot is clicked once.)
>> 
>> The only solution I have found is to reload the html for the vr into the
>> browser object again. But that is not ideal.
>> 
>> I am aware of a the javascript command removeEventListener, and that
>> appears to be what I need, however I am not sure how I would go about and
>> use the script?  Its appears that “this.” is defined in the js as the
>> hotspot, and _svg2 is the hot spot ID, but everything I have tried to
>> cobble together to apply this command has not worked. I’m not sure where it
>> should even be located in the process?
>> 
>> I’ve shared the LiveCode project and VR files here:
>> https://dl.dropboxusercontent.com/u/6767916/VR_and_Javascript_Example.zip
>> <https://dl.dropboxusercontent.com/u/6767916/VR_and_Javascript_Example.zip
>>> 
>> 
>> Any help is greatly appreciated!
>> 
>> John Patten
>> SUSD
>> 
>> 
>> 
>>> On Jan 30, 2017, at 8:01 PM, Mike Bonner via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>> 
>>> Depending on what version of LC you're using,k and if you're using the
>>> widget, or openrevbrowser
>>> look at revBrowserAddJavascriptHandler in the dictionary.
>>> 
>>> If using the widget, use the dropdown to select the browser widget in the
>>> dictionary and look at the javascripthandlers property.
>>> 
>>> 
>>> 
>>> On Mon, Jan 30, 2017 at 8:22 PM, JOHN PATTEN via use-livecode <
>>> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>>
>> wrote:
>>> 
>>>> Hi All,
>>>> 
>>>> I’m not sure if this is possible with Livecode, but I thought I’d ask
>>>> anyways.
>>>> 
>>>> I have a html5 panorama I created in a trial version of Pano2VR. I
>> posted
>>>> it up here: http://jpatten.on-rev.com/vrjs/index.html <
>> http://jpatten.on-rev.com/vrjs/index.html> <
>>>> http://jpatten.on-rev.com/vrjs/index.html <http://jpatten.on-rev.com/
>> vrjs/index.html>>
>>>> 
>>>> This pano has one hot spot that just throws a JavaScript alert, “Hello
>>>> World.”  So I know I can create a Javascript inside a hotspot in the
>> pano
>>>> using the Pano2VR app.
>>>> 
>>>> Here are my questions.
>>>> 
>>>> 1. Can Livecode intercept the Javascript result in the browser object
>> and
>>>> act on it?  If it can, I’m guessing I could have it r

Re: JavaScript, Browser Object, VR with Hotspots?

2017-02-02 Thread JOHN PATTEN via use-livecode
Hi All,

I managed to trial and error together a working html5 panorama using Pan2VR 
(http://ggnome.com/pano2vr <http://ggnome.com/pano2vr>). The interface of their 
software allows you to attach a javascript action to a vr hotspot. The 
interface creates the following javascript for the hotspot to trigger the 
LiveCode handler: 

this._svg2.onclick=function (e) {
window.addEventListener('click', function() 
{liveCode.myLiveCodeHandler2();});
}

(svg2 is the hotspot icon).

The hotspot in the vr adds some text to a field on the card when clicked, waits 
2 seconds, and then removes the text.

This javascript works only the first time, because after the hotspot is 
clicked, the LiveCode handler is triggered any time the user clicks within the 
vr of the browser object. (Javascript “event listener” listens for any click in 
the browser object, after the hotspot is clicked once.)

The only solution I have found is to reload the html for the vr into the 
browser object again. But that is not ideal.

I am aware of a the javascript command removeEventListener, and that appears to 
be what I need, however I am not sure how I would go about and use the script?  
Its appears that “this.” is defined in the js as the hotspot, and _svg2 is the 
hot spot ID, but everything I have tried to cobble together to apply this 
command has not worked. I’m not sure where it should even be located in the 
process?

I’ve shared the LiveCode project and VR files here:  
https://dl.dropboxusercontent.com/u/6767916/VR_and_Javascript_Example.zip 
<https://dl.dropboxusercontent.com/u/6767916/VR_and_Javascript_Example.zip>

Any help is greatly appreciated!

John Patten
SUSD



> On Jan 30, 2017, at 8:01 PM, Mike Bonner via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Depending on what version of LC you're using,k and if you're using the
> widget, or openrevbrowser
> look at revBrowserAddJavascriptHandler in the dictionary.
> 
> If using the widget, use the dropdown to select the browser widget in the
> dictionary and look at the javascripthandlers property.
> 
> 
> 
> On Mon, Jan 30, 2017 at 8:22 PM, JOHN PATTEN via use-livecode <
> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>> wrote:
> 
>> Hi All,
>> 
>> I’m not sure if this is possible with Livecode, but I thought I’d ask
>> anyways.
>> 
>> I have a html5 panorama I created in a trial version of Pano2VR. I posted
>> it up here: http://jpatten.on-rev.com/vrjs/index.html 
>> <http://jpatten.on-rev.com/vrjs/index.html> <
>> http://jpatten.on-rev.com/vrjs/index.html 
>> <http://jpatten.on-rev.com/vrjs/index.html>>
>> 
>> This pano has one hot spot that just throws a JavaScript alert, “Hello
>> World.”  So I know I can create a Javascript inside a hotspot in the pano
>> using the Pano2VR app.
>> 
>> Here are my questions.
>> 
>> 1. Can Livecode intercept the Javascript result in the browser object and
>> act on it?  If it can, I’m guessing I could have it return text and then
>> have Livecode run an action. Something like…  if varText = “picture 1”
>> then, show picture one … else/switch if vartex = "picture 2" then open
>> "picture 2", etc. etc. etc.
>> 
>> 
>> 2. I would like to have hotspots in a panoramic image run JavaScripts that
>> LiveCode intercepts, and then act on what it catches to runs scripts in the
>> stack. One hot spot might open and image. Another might open a substack,
>> etc. etc. all within the LiveCode project. The Browser Object is used only
>> to present the panoramic image, and the pano image acts as s pseudo
>> navigation object for additional content.
>> 
>> Anybody have a simple example of what the Javascript in the pano might
>> look like, as opposed to just an alert? What scripts would I use to capture
>> and act on the Javascript in the browser object?
>> 
>> Or, maybe this is not possible…?
>> 
>> Thank you!
>> 
>> John Patten
>> SUSD
>> 
>> 
>> 
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode 
>> <http://lists.runrev.com/mailman/listinfo/use-livecode>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode 
> <http://lists.runrev.com/mailman/listinfo/use-livecode>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

JavaScript, Browser Object, VR with Hotspots?

2017-01-30 Thread JOHN PATTEN via use-livecode
Hi All,

I’m not sure if this is possible with Livecode, but I thought I’d ask anyways. 

I have a html5 panorama I created in a trial version of Pano2VR. I posted it up 
here: http://jpatten.on-rev.com/vrjs/index.html 


This pano has one hot spot that just throws a JavaScript alert, “Hello World.”  
So I know I can create a Javascript inside a hotspot in the pano using the 
Pano2VR app.

Here are my questions.

1. Can Livecode intercept the Javascript result in the browser object and act 
on it?  If it can, I’m guessing I could have it return text and then have 
Livecode run an action. Something like…  if varText = “picture 1” then, show 
picture one … else/switch if vartex = "picture 2" then open "picture 2", etc. 
etc. etc.


2. I would like to have hotspots in a panoramic image run JavaScripts that 
LiveCode intercepts, and then act on what it catches to runs scripts in the 
stack. One hot spot might open and image. Another might open a substack, etc. 
etc. all within the LiveCode project. The Browser Object is used only to 
present the panoramic image, and the pano image acts as s pseudo navigation 
object for additional content.

Anybody have a simple example of what the Javascript in the pano might look 
like, as opposed to just an alert? What scripts would I use to capture and act 
on the Javascript in the browser object?

Or, maybe this is not possible…?

Thank you!

John Patten
SUSD





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode