Re: Cloning a SQLite (or any SQL) database

2016-05-22 Thread Kay C Lan
On Mon, May 23, 2016 at 4:46 AM, Paul Dupuis  wrote:
> this app may use MySQL (or someday, possible other flavors of
> SQL database) and I'd like to have a generalized routine that just
> relies on LiveCode and "standard" SQL commands.
>
If you are using MySQL why not have a look at DUMP. This is not an SQL
command, but it's accessible from LC as a shell command> mysqldump
[options] --db_name

https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html

The output is very human (LC) readable and includes ALL the standard
SQL commands used to create/define the db/tables. So it's relatively
easy in LC to parse the output and grab those commands, send them to
LC's revExecuteSQL to recreate the db from scratch.

If memory serves me I think the only limitation is you must be doing
this on the same machine as the MySQL server, you can't do it over a
network connection.

I believe SQLite's '.dump' command is very similar to DUMP:

https://www.sqlite.org/cli.html#section_10

Either way, both of these approaches will give you a text file that
allows you to rebuild your DB in any flavour of DB that recognises
SQL.

HTH

___
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: Positive Infinity forever

2016-05-22 Thread Mick Collins
(Try again, apologies for accidentally sending)
... typo
When you said
" 2^AJ=A(J+1)"

I wonder if you meant 
"2^AJ   >=   A(J+1)"

To many that may seem like nit-picking, but it is a NIT. However, if you MEANT 
what you wrote, then it is a YUGE NIT. It would mean that someone (Halmos?) 
found an extension of ZFC that trumps (sorry) Cohen's independence of CH. Is 
that the case?


> On May 22, 2016, at 9:18 PM, Mick Collins  wrote:
> 
> Doc Hawk,
> I'm envious that you took a course from Halmos, but I question what is 
> probably a typo.
> 
> "Dr. Hawkins"  wrote:
> 
> Well, which infinity?  aleph-naught (A0) is the count of the
> integers/wholes/natural
> 
> A1=2^A0, the count of the reals.
> 
> For that mater 2^AJ=A(J+1)
> 
> A1-A0=A1
> 
> Aj^n=Aj
> 
> A0 is also "countable"; A1 and higher are not.
> 
> 
> Yes, I really took a course  on that, from the master himself (Halmos)
> 
> -- Dr. Richard E. Hawkins, Esq.
(702) 508-8462


--
___
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: Positive Infinity forever

2016-05-22 Thread Mick Collins
Doc Hawk,
I'm envious that you took a course from Halmos, but I question what is probably 
a typo.

"Dr. Hawkins"  wrote:

Well, which infinity?  aleph-naught (A0) is the count of the
integers/wholes/natural

A1=2^A0, the count of the reals.

For that mater 2^AJ=A(J+1)

A1-A0=A1

Aj^n=Aj

A0 is also "countable"; A1 and higher are not.


Yes, I really took a course  on that, from the master himself (Halmos)

-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462


--





--

Message: 8
Date: Fri, 13 May 2016 15:24:03 -0400

Sent from my iPhone

> On May 13, 2016, at 6:03 PM, use-livecode-requ...@lists.runrev.com wrote:
> 
> For that mater 2^AJ=A(J+


For that mater 2^AJ=A(J+1)
___
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: Suspense

2016-05-22 Thread et...@lish.net

Well.  In light of that I just doubled down.
Takes a village!
E

et...@lish.net
240.876.1389

Sent from my pocket computer 
Please excuse my brevity and typos
___
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: Suspense

2016-05-22 Thread Mark Smith
Heather Laine-2 wrote
> Guys, I'm sitting here hitting refresh compulsively on the pledge page.
> Are we there yet... We are so close to 40k. Who is going to push us over? 

Hahaha I know the feeling. But more seriously, you need $1,000 an hour for
the next 19 hours to make the final goal. May the force be with you.

Mark



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Suspense-tp4704926p4705037.html
Sent from the Revolution - User mailing list archive at Nabble.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


Re: Cloning a SQLite (or any SQL) database

2016-05-22 Thread et...@lish.net
Check out LiveCloud for LiveCodehttps://livecloud.io
Addresses the cloning element but it's seems like a closed database 
architecture so you have to adopt their model
I've played with it but yet to build anything production grade with it. 
The team is extremely helpful and stays with you every step of the way. It 
holds excellent promise. 
E

et...@lish.net
240.876.1389

Sent from my pocket computer 
Please excuse my brevity and typos
___
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: Cloning a SQLite (or any SQL) database

2016-05-22 Thread et...@lish.net
Check out LiveCloud for LiveCodehttps://livecloud.io
Addresses the cloning element but it's seems like a closed database 
architecture so you have to adopt their model
I've played with it but yet to build anything production grade with it. 
The team is extremely helpful and stays with you every step of the way. It 
holds excellent promise. 
E

et...@lish.net
240.876.1389

Sent from my pocket computer 
Please excuse my brevity and typos




On Sun, May 22, 2016 at 1:47 PM -0700, "Paul Dupuis"  
wrote:










On 5/22/2016 11:19 AM, Mike Bonner wrote:
> If you just need to duplicate the database, would making a copy of the file
> be sufficient?
>

Yes. I should have been clearer. While I could just copy the file for a
sqlite db, this app may use MySQL (or someday, possible other flavors of
SQL database) and I'd like to have a generalized routine that just
relies on LiveCode and "standard" SQL commands.

Also I already see that "standard" SQL commands may be an issue in that
I would have assumed DESCRIBE  to get the details of a table was
part of sqlite, but now I see you need to use other tricks to get a
table description in sqlite.


___
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: Cloning a SQLite (or any SQL) database

2016-05-22 Thread Paul Dupuis
On 5/22/2016 11:19 AM, Mike Bonner wrote:
> If you just need to duplicate the database, would making a copy of the file
> be sufficient?
>

Yes. I should have been clearer. While I could just copy the file for a
sqlite db, this app may use MySQL (or someday, possible other flavors of
SQL database) and I'd like to have a generalized routine that just
relies on LiveCode and "standard" SQL commands.

Also I already see that "standard" SQL commands may be an issue in that
I would have assumed DESCRIBE  to get the details of a table was
part of sqlite, but now I see you need to use other tricks to get a
table description in sqlite.


___
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: And while I'm at it...

2016-05-22 Thread J. Landman Gay

On 5/22/2016 6:45 AM, Kay C Lan wrote:

In your Mainstack, as part of it's stack script, can't you have,
within a closeStack handler that already exists or just add one:

if then number of lines of openstacks() = 2 then show stack "Mainstack"


When I had to deal with a similar issue, I put a custom property into 
every stack I needed to control. Then the mainstack script had a 
closeStack handler that checked for the property of the target and if it 
was true, showed the mainstack.


--
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


Re: Storing and retrieving data from a SQL database

2016-05-22 Thread Peter Haworth
Glad you figured it out Paul.

I'll check out the SQLiteAdmin problem.

On Sun, May 22, 2016 at 7:48 AM Paul Dupuis  wrote:

> On 5/20/2016 10:38 PM, Peter Haworth wrote:
> > Tabs shouldn't be a problem so I suspect something else.
> >
> > Have you tried using LC to select the data after updating it?  As
> mentioned
> > in an earlier post, if you use revDataFromQuery to do the SELECT, be sure
> > to use something other than tab/return for the column/row delimiters.
>
> There was a bug in my code (typo in a variable name). Query parameters
> do handle tabs just fine.
>
> Thank you for walking me through the move to using parametrized queries.
> I've been doing SQL in Livecode for ... many years .. but never tried
> query parameters before.
>
> > I'm wondering if whatever program you used to "directly check" the data
> has
> > a problem with the tabs (fingers crossed it wasn't SQLiteAdmin!).
>
> I am using SQLiteAdmin 1.3.6 (and generally love the tool!). I did just
> notice, when using it to help debug this issue, that I could not paste
> text from the clip board into a field when entering a new record.
>
>
>
> ___
> 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: Avoiding a stupid mistake

2016-05-22 Thread RM

Ha, Ha, Ha: I'm sure that everybody is dumb enough to do that at least once.

I know that I, being extra skilled, have done it (deleting things 
accidentally)  . . . at least . . . oh, dear, I seem to have run out of 
fingers and toes.


Deleting anything may lead to regrets later: hence  I have about 6 1 
terabyte hard drives in external containers containing

stuff going back to 1993.

This also points out the limitations of 'transparent' cross-platform 
development.


Richmond.

On 22.05.2016 18:31, Graham Samuel wrote:

Just for general interest -

I wanted to delete the Preferences folder for an app I’m working on, so I 
scripted a button as follows:

get specialFolderPath("preferences")
revdeletefolder it

What I’d forgotten was that on the Mac version, my preferences were not in a 
folder dedicated to my app, but just stored in a folder called ‘Preferences’ 
with all the preferences of all other apps for my whole library! So the result 
of pressing this button was to delete all the preferences from the machine! 
Luckily Time Machine came to my aid… but the point is, nothing stopped my 
script from executing.

Of course nobody else would be dumb enough to do this, but just in case…

Graham
___
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

Avoiding a stupid mistake

2016-05-22 Thread Graham Samuel
Just for general interest -

I wanted to delete the Preferences folder for an app I’m working on, so I 
scripted a button as follows:

   get specialFolderPath("preferences")
   revdeletefolder it 

What I’d forgotten was that on the Mac version, my preferences were not in a 
folder dedicated to my app, but just stored in a folder called ‘Preferences’ 
with all the preferences of all other apps for my whole library! So the result 
of pressing this button was to delete all the preferences from the machine! 
Luckily Time Machine came to my aid… but the point is, nothing stopped my 
script from executing.

Of course nobody else would be dumb enough to do this, but just in case…

Graham
___
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: Cloning a SQLite (or any SQL) database

2016-05-22 Thread Mike Bonner
If you just need to duplicate the database, would making a copy of the file
be sufficient?

On Sun, May 22, 2016 at 9:15 AM, Paul Dupuis  wrote:

> Does any one have a good script they might care to share for cloning a
> SQLite database?
>
> the basic model is to use revDatabaseTableNames(databaseID) to get the
> list of tables in the source database and then loop through getting each
> tables schema and data and recreate that in the target database.
>
> Achievable, but before I write one, I thought I would save myself the
> effort and see if anyone had one there were willing to share?
>
> ___
> 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


Cloning a SQLite (or any SQL) database

2016-05-22 Thread Paul Dupuis
Does any one have a good script they might care to share for cloning a
SQLite database?

the basic model is to use revDatabaseTableNames(databaseID) to get the
list of tables in the source database and then loop through getting each
tables schema and data and recreate that in the target database.

Achievable, but before I write one, I thought I would save myself the
effort and see if anyone had one there were willing to share?

___
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: Storing and retrieving data from a SQL database

2016-05-22 Thread Paul Dupuis
On 5/20/2016 10:38 PM, Peter Haworth wrote:
> Tabs shouldn't be a problem so I suspect something else.
>
> Have you tried using LC to select the data after updating it?  As mentioned
> in an earlier post, if you use revDataFromQuery to do the SELECT, be sure
> to use something other than tab/return for the column/row delimiters.

There was a bug in my code (typo in a variable name). Query parameters
do handle tabs just fine.

Thank you for walking me through the move to using parametrized queries.
I've been doing SQL in Livecode for ... many years .. but never tried
query parameters before.

> I'm wondering if whatever program you used to "directly check" the data has
> a problem with the tabs (fingers crossed it wasn't SQLiteAdmin!).

I am using SQLiteAdmin 1.3.6 (and generally love the tool!). I did just
notice, when using it to help debug this issue, that I could not paste
text from the clip board into a field when entering a new record.



___
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 standalone from Livecode 8.0.1

2016-05-22 Thread RM

Just a "little something" for Sunday afternoon:

http://forums.livecode.com/viewtopic.php?f=120&t=27345

Richmond.

___
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: Problems with Xcode

2016-05-22 Thread panagiotis merakos
Hi Martin,

Try this in the terminal:

1. Type:
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

2. Press enter. You will be asked for your password. Type your password and
press enter.

3. Type xcode-select -p

4. Press Enter. This should output:
/Applications/Xcode.app/Contents/Developer

The command in (1) tells the system where to look for the command line tools
The command in (3) returns the path to the command lines tools.

5. In LiveCode, go to Preferences-> Mobile Support and remove any existing
entries. Now add the path to your Xcode.app

Hopefully this will work.

Best,
Panos
--

On Sun, May 22, 2016 at 1:48 PM, martin meili 
wrote:

> Hi Marc
> Yes, I have removed this space.
> No effect on the result.
>
> The correct path should be: /Applications/Xcode.app/Contents/Developer.
> The „Xcode 2.app“ doesn’t exist anymore on my computer; it was about
> version 4.2.
> LiveCode is leading me to the anymore-existent Xcode version; the question
> is how I can force Terminal to change the wrong path to the correct one.
> Then also LC would do it ………
>
> I’ve contacted Apple about the issue via my account.
> If I get the solution to my problem from Apple, I will let know the list.
>
> Many thanks for your help and advice.
>
> Martin
> ___
> 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
>



-- 
Panagiotis Merakos 
LiveCode Software Developer

Everyone Can Create Apps 
___
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: And while I'm at it...

2016-05-22 Thread Kay C Lan
UUrggh, typo:

if THE number of lines of openstacks() = 2 then show stack "Mainstack"

Why is it that I can only spell AFTER I've pressed the Send button!!

___
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: And while I'm at it...

2016-05-22 Thread Kay C Lan
In your Mainstack, as part of it's stack script, can't you have,
within a closeStack handler that already exists or just add one:

if then number of lines of openstacks() = 2 then show stack "Mainstack"

2 assumes that you aren't using any other stacks as toolbars or some
such and this is in a standalone - in the IDE the number will be much
higher depending on what you have open, but easy enough to determine.
So assuming you have a standalone with a Mainstack and two Substacks,
when you close a Substack openstacks() will report 3 as the substack
isn't actually closed until the closeStack handler completes. When you
close the last remaining substack, openstacks() will report 2, the
Mainstack will be shown and then the Substack will be closed - but
it's so quick it appears to be instantaneous.

This is pretty basic. If you are using toolbars, plugins or other
things so it's not that simple to test the number of openstacks,
openstacks() actually gives you the names so a more complex test could
be carried out based on the existence or lack thereof of names in the
list. As long as your test is carried out in the closestack handler of
the stack script of the mainstack, every time a stack is closed you
will be able to test if it's appropriate to show your Mainstack.

HTH

___
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


Problems with Xcode

2016-05-22 Thread martin meili
Hi Marc
Yes, I have removed this space.
No effect on the result.

The correct path should be: /Applications/Xcode.app/Contents/Developer.
The „Xcode 2.app“ doesn’t exist anymore on my computer; it was about version 
4.2.
LiveCode is leading me to the anymore-existent Xcode version; the question is 
how I can force Terminal to change the wrong path to the correct one. Then also 
LC would do it ………

I’ve contacted Apple about the issue via my account.
If I get the solution to my problem from Apple, I will let know the list.

Many thanks for your help and advice.

Martin
___
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