Re: you know, that text that pops up when the pointer is over an object

2012-04-12 Thread Pete
That's the tooltip.

On Thu, Apr 12, 2012 at 12:55 PM, Dar Scott d...@swcp.com wrote:

 I'm not remembering the name of the property for the text that comes up
 when you hold the mouse pointer over an object.  I browsed through the
 dictionary and nothing rings a bell.

 Dar


 ___
 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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Can I put advisory text in an 'ask' dialog?

2012-04-12 Thread Pete
I use a similar technique for option menus. Set the text property to the
initial advisory (suitably colored). On mouseDown' set the text to the real
options.
On Apr 12, 2012 1:48 PM, Graham Samuel livf...@mac.com wrote:

 Thanks very much Hugh Senior, Ken Ray and Mark Smith for their solutions,
 which are going in my scrapbook and then of course into the relevant
 projects.

 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


Re: Zipping Up an LC standalone program

2012-04-10 Thread Pete
Thanks Mark, I'll take a look.
Pete

On Tue, Apr 10, 2012 at 8:39 AM, Mark Schonewille 
m.schonewi...@economy-x-talk.com wrote:

 Pete,

 This is a line from my Compression Tool software. It zips without the
 .DS_Store files. Item -1 of fld File is the name of a file or folder in
 the current defaultFolder.

 put zip -r  quote  myZipFile  quote   quote  item -1 of fld
 File  quote   -x .* *.DS_Store *Icon* into myShell

 Installer Maker compresses all embedded files with the compress()
 function. Compressing the resulting installer again hardly saves any space.
 The compress() function is very efficient.


 --
 Best regards,

 Mark Schonewille

 Economy-x-Talk Consulting and Software Engineering
 Homepage: http://economy-x-talk.com
 Twitter: http://twitter.com/xtalkprogrammer
 KvK: 50277553

 Get the extIco2Png external for LiveCode here http://qery.us/1w6

 On 10 apr 2012, at 17:25, Pete wrote:

  Thanks guys.  I was hoping for a way to automate this and a few other
 steps
  involved in getting my app ready for release by using the standaloneSaved
  message, that's why I was using the revZIPxxx commands.
 
  I was also hoping that they would get around the problem I came across
 with
  the built in Mac compress function when the archive is unzipped on a
  Windows machine - some unnecessary files are included in the archive -
  .dstore if I remember correctly.  I found a program named CleanArchiver
  that gets around that problem but, once again, makes it difficult to
  automate things using an external program.
 
  I'll give tar a try.
 
  Pete
 


 ___
 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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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


[ANN] SQLiteAdmin

2012-04-10 Thread Pete
I'm happy to announce the release of my first commercial Livecode
application, SQLiteAdmin, a db admin tool for SQLite databases.  A 30-day
trial version of SQLiteAdmin is available at www.lcsql.com/products.html

In recognition of the amazing amount of knowledge imparted to me by
subscribers to this list, I am making SQLiteAdmin available for $4.99, a
$20 discount, to any list member until midnight on Friday April 13th.
 Please email me off list at p...@lcsql.com if you would like to take
advantage of this deal, and I will send you a link to buy it at that price.

SQLiteAdmin has been tested on OS X and Windows.  I do not have access to
Linux (yet!) but would be happy to compile a Linux standalone for anyone
who would be willing to try it and give me feedback on what changes might
be needed to make it a viable Linux product.

OK, now on to the sales pitch.

SQLiteAdmin is a full-featured administration tool for SQLite databases
that removes all of the restrictions and omissions inherent in the standard
SQLite Data Definition Language.  You can safely  add, modify, or delete
any of the properties of a table or column including name, data type, data
length, primary key, foreign key, check, unique, not null, and default
constraints, all while maintaining the integrity of your data.

SQLiteAdmin extends the DDL even further with convenience features that
provide you with the ability to add multiple columns that share the same
properties with a single click, and optional automatic index creation for
foreign key fields.

SQLiteAdmin provides complete data export and import capability in a number
of formats including csv, delimited text files with your choice of
delimiter, and SQL INSERT statements.  You can export all or selected rows
of a table.  You can also export the CREATE statements necessary to build
your database, with or without the INSERT statements to populate it.

With SQLiteAdmin's Utilities view, you will be able to audit your database,
get recommendations for better performance, and modify any of your
database's PRAGMA settings.

SQLiteAdmin's Browse view gives you access to the SQLite Data Manipulation
Language.  You can display data from any table with filtering capability on
any columns in the table, select the columns you want to view and display
them in your preferred sequence, all by filling in the blanks instead of
writing any SQL statements.  The Browse Tool also provides complete insert,
duplicate, update and delete capabilities, including modification or
deletion of multiple rows in one operation.  And you can save your filter
definitions, column selections, and sort sequence for later use.

If you need to write your own SQL statements, you can enter any SQLite
command in SQLiteAdmin's SQL tool and execute it.  SQL commands can be
saved and recalled for later use.

SQliteAdmin includes full support for in memory databases and also provides
the ability to save an in memory database as a permanent disk file.

A 30-day demo version of SQLiteAdmin is available at
http://www.lcsql.com/products.html. Some functionality is disabled in the
demo version.

-- 
Peter Haworth
lcSQL Software http://www.lcsql.com



-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Zipping Up an LC standalone program

2012-04-10 Thread Pete
I guess my primary concern is that a user can simply download the
compressed file and either have his browser autoatically un-compress it or
just be able to double-click on it to un-compress it, then have the program
be ready to use.  I may be misunderstanding but sounds like it might not be
that straightforward with tar?
Pete

On Tue, Apr 10, 2012 at 4:24 PM, Mark Schonewille 
m.schonewi...@economy-x-talk.com wrote:

 Hi Tim,

 Yes, you're right, tar is older. Nonetheless, can you think of any other
 reason why one would want to use tar, except for glueing files together in
 preparation of compression? I'm not sure what you mean by property bundle
 up bits of code.

 I don't think that tar is available on Windows by default, but that's
 another story.

 --
 Best regards,

 Mark Schonewille

 Economy-x-Talk Consulting and Software Engineering
 Homepage: http://economy-x-talk.com
 Twitter: http://twitter.com/xtalkprogrammer
 KvK: 50277553

 Get the extIco2Png external for LiveCode here http://qery.us/1w6

 On 11 apr 2012, at 01:14, Tim Jones wrote:

  On Apr 10, 2012, at 4:02 PM, Mark Schonewille wrote:
 
  Hi,
 
  Tar is a bad idea because it glues files together and doesn't compress.
 Tar was invented to allow gzip to compress multiple files. It is easier and
 faster to use the zip command line tool rather than to use both tar and
 gzip. Many unix geeks still prefer tar+gzip but I'm not sure why.
 
  Wha???
 
  tar (Tape ARchiver) has been around since before we even considered
 compression schemes.  It wasn't until the Linux / FreeBSD movement that
 compression options were added.  On most systems still using ATT tar
 sources, you have to compress an archive after tar creates it and
 decompress an archive before tar can extract its contents.
 
  We prefer tar and a compressor because it allows up to properly bundle
 up bits of code, regardless of the file types, and share them with others
 while reduing the overall footprint required on disk and for transfer.  The
 tar app is available in one form or another on every platform out there, so
 you can pretty much always open another's tarball.
 
  In fact, I believe Dennis' original PDP MULTIX 9-track install tapes
 used a precursor to the modern tar format.
 
  Tim


 ___
 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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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


Zipping Up an LC standalone program

2012-04-09 Thread Pete
Been putting together a litte script to get all my files ready for a
release and used the revZIPxxx commands to make a zip file of the LC
standalone program - this all on a Mac.  The resulting zip file is only 4kb
in size, obvioulsy not correct.

The code is pretty straightfroward:

   revZipOpenArchive myZipFile,write

   *if* the result is not empty *then* *answer* the result

   *answer* file Zip file

   revZipAddItemWithFile myZipFile,myApp.app,it

   *if* the result is not empty *then* *answer* the result

   revZipCloseArchive myZipFile

Zipping the same file with the built-in OS X compress function works fine
and so does the CleanARchiver utitlity.

ANy ideas?

-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Disabling a tab

2012-04-05 Thread Pete
Phil and Marty,
Wanted to pass on to you that, while the enable/disable solution, it
changes the selectedtext property of the tab control.  Didn;t get a chance
to see if using the ( prefix did the same thing or not.
Pete
On Sun, Apr 1, 2012 at 3:16 PM, Phil Davis rev...@pdslabs.net wrote:

 Hi Pete,

 As usual in Livecode, there are multiple ways to disable a tab. If you
 want to manipulate the button text directly, you can put ( before the
 line of button text for the tab you want to disable. Or to enable all tabs,
 replace ( with empty in text of btn 1.

 Best -
 Phil



 On 4/1/12 1:45 PM, Pete wrote:

 Thanks Marty. Sometimes the obvious just slips by me!
 Pete

 On Sun, Apr 1, 2012 at 12:43 PM, Marty Knappmartykn...@comcast.net
  wrote:

  Hey Pete,
 Using disable menuItem 2 of btn Tab Menu seems to work.

 Marty Knapp

  I have a tab control and I'm using the method of revealing data on each

 tab
 by having groups with the same name as each tab which are hidden/shown
 when
 a tab is clicked.

 Depending on data conditions, I need to disable one of the tabs, meaning
 that clicking ion it has no effect.  Right now, I'm doing this in a
 selectionChanged handler that checks the data condition, beeps if the
 use
 clicks on a disallowed tab, and leaves the original tab/group displayed.

 That works OK but there is no visual indication that the tab is not
 available.  Ideally, I'd like the text in the tab heading to be greyed
 out,
 kinda like a disabled menu item.  Any ideas how to do that?



  ___

 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-livecodehttp://lists.runrev.com/**mailman/listinfo/use-livecode
 **http://lists.runrev.com/**mailman/listinfo/use-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode
 




 --
 Phil Davis

 PDS Labs
 Professional Software Development
 http://pdslabs.net



 __**_
 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-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: OT: mails bouncing back?

2012-04-03 Thread Pete
What Richard said!

However, it's ironic that I became aware of Livecode through one of these
blacklistsing incidents.  I was a memebre of a forum for one of the
blacklisting sites and Heather put a post on there becaue the RunRev
serevers were blacklisted there too.  We exchanged emails about the
problem, I noticed the product and bought it.  So sometimes, there really
are silver linings!

Pete

On Tue, Apr 3, 2012 at 8:40 AM, Richard Gaskin
ambassa...@fourthworld.comwrote:

 Tim Jones wrote:

  On Apr 3, 2012, at 7:19 AM, Richard Gaskin wrote:
 
  I've had domains caught up with sloppy blacklisting schemes myself.
 
  It's not a problem with RunRev, or their host, but with the lazy
  nature of a few blacklisting systems.
 
  Actually, in this case, it is their host.  GoDaddy needs to tighten
  up their secureserver.net environment to eliminate the spamming
  that occurs.  Their servers are high on the list of even the most
  legitimate blacklist maintainers (Barracuda, for instance).

 I'm no fan of GoDaddy so it wouldn't surprise me if they've been willing
 to turn a blind eye to illegal activity to maintain that income until
 they're absolutely forced to do the right thing.

 They wouldn't be alone on this:  a few years ago it was well known that
 some 30% of global spam was originating from three regions in Florida, but
 neither the feds nor the downstream providers did anything to enforce the
 law.  Ultimately a few upstream providers got tired of carrying all that
 wasteful traffic and blocked it all in the backbone themselves, only after
 which the feds finally decided to show up for work and make an arrest.  The
 local hosts never explained why they'd never taken care of it themselves,
 and sadly the reprieve was short-lived as that traffic eventually moved to
 the Ukraine, where it flourishes in an apparently lawless environment today.

 But back on topic:

 Blocking entire IP ranges is not a responsible way to blacklist, since it
 can - an inevitably does - affect legitimate users.  It's simply lazy, a
 ham-fisted scorched-earth way to solve a problem that requires more
 surgical methods.

 In fact, it seems On-Rev.com may be a very good example of how this gets
 out of hand so easily, since AFAIK their servers aren't on GoDaddy at all,
 but on SoftLayer:

 http://on-rev.com/hosting/**our-data-center/http://on-rev.com/hosting/our-data-center/
 

 And even if some accounts were host by GoDaddy, unless those specific
 servers are used for illegal activity there's no excuse for any responsible
 blacklisting service to block them.

 Spam is indeed a serious problem, but when attempts to stop it shut down
 legitimate businesses the cure is every bit as bad as the problem itself,
 arguably worse.


 --
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  LiveCode Journal blog: 
 http://LiveCodejournal.com/**blog.irvhttp://LiveCodejournal.com/blog.irv

 __**_
 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-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: [on-rev]Line endings for a db query

2012-04-02 Thread Pete
Try

if tvar is empty then
  put stuff into tvar
else
  put return  stuff after tvar
end ig
On Apr 2, 2012 8:13 AM, Pete Haworth p...@haworths.org wrote:

 Line delimiters are squirly! Try this pseudo code:

 if tvar is empty then
   Put stuff into tvar
 else
   put return  stuff after tvar
 end if

 If you can tell its the fitst time thru your loop, you can check for that
 instead of tvar empty.

 Pete
 On Apr 2, 2012 7:49 AM, Martin Koob mk...@rogers.com wrote:

 Actually I typed too soon.

 adding a LF or a return after tSamplesList variable then deleting the last
 line actually deletes the last record from the query in the tSamplesList
 variable.

 Back to square one.

 Martin


 --
 View this message in context:
 http://runtime-revolution.278305.n4.nabble.com/on-rev-Line-endings-for-a-db-query-tp4526068p4526238.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


___
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: getProp syntax query

2012-04-02 Thread Pete
Hi Graham,
Mark expalined the syntax I think.

You probably already realise this, but using getProp isn't an integral part
of the datagrid, I think Trevor just used it as an example.

Since you're doing a spreadsheet, I assume you'd want to multiply any 2
columns together, not specific ones.  If that's the case, you could
consider putting a handler in the datagrid's group script that takes the
column names as parameters and returns the result.  Something like:

function multiplyColumns pcol1,pcol2
  put the dgHilitedLine of me into tLine
  try
put GetDataOfLine(tLine,pcol1) * GetDataOfLine(tline,pcol2) into tresult
  catch terr
return terr
  end try
  return tresult
end multiplyColumns

The try is in there in case one of the columns doesn't contain numeric data
or the column name doesn't exist  but you could ctach that other ways.

Datagrids are great but it takes a while to get to grips with them!

Pete


On Mon, Apr 2, 2012 at 3:13 AM, Graham Samuel livf...@mac.com wrote:

 For the very first time in a pretty long career as a LiveCode coder, I'm
 trying to make sense of DataGrids, which I see were a heroic effort to
 extend LiveCode - with a very sophisticated implementation and literally
 hundreds of pages of documentation. AFAIK it was done by Trevor deVore - I
 am deeply impressed, even as I stumble.

 I am trying to implement some spreadsheet-like behaviour and have fallen
 more or less at the first fence during the lesson on Page 94 How do I get
 Aggregate Values for Columns?.

 I can make the example work if I follow it exactly. It depends on a
 getProp handler the first line of which is:

  getprop uSumOfColumn [pColumn]

 I would like to multiply two columns using this as a starting point, so I
 would like to refer to two columns in my getProp handler. However when I
 look up getProp in the LC documentation, I don't see that getProp can take
 any parameters at all, certainly not an array reference, so my attempt to
 extend this structure with a line like

 getProp usMultipleOfColumns [pColumn1] [ pColumn2]

 can't be compiled - putting a comma in between the parameters (if that's
 what they are) doesn't help. As you see I have no idea what I'm doing. My
 question is, how does the syntax of the original getProp handler work? How
 is the bit in square brackets allowed, and why isn't it featured in the LC
 documentation? If I did want to provide a getProp handler with the names of
 two different columns, how would I do it? I do realise there are much more
 pedestrian ways of achieving what I want, but it seems important to
 understand the mechanism shown in the DataGrid docs.

 Ignorantly

 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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: OT: mails bouncing back?

2012-04-02 Thread Pete
I got caught in this web a couple of years back (I think it was with
GoDaddy).  Here's the problem I have with the blacklist sites.  Their
blanket blackballing of servers means that the 99% of users who are using
it for genuine, non-spam emails get dumped on for the sins of the 1%.
 Personally, I sgtrongly object to having my genuine emails blocked in this
fashion.  It's illegal to tamper with the US Mail and it should be illegal
to block the delivery of genuine email as well.

End of rant!

Pete

On Mon, Apr 2, 2012 at 10:29 AM, Tim Jones tolis...@me.com wrote:

 It appears that OnRev uses GoDaddy services as the secureserver.net
 servers belong to them.  Because of GoDaddy's easy online setup, spammers
 / scammers are able to pop in, perform a hit-and-run with their mail
 broadcast, and the security team doesn't catch it and disable the account
 into it's already a problem.

 It sounds to me like RunRev should examine alternate mail service
 providers for the OnRev solution since secureserver.net is very deeply
 entrenched in the blacklists.

 Tim
 .
 On Apr 2, 2012, at 8:31 AM, Mark Wieder wrote:

  Klaus-
 
  Monday, April 2, 2012, 8:22:44 AM, you wrote:
 
  My web and email hoster is RunRev (on-rev).
 
  So my hoster has a bad reputation?
  If yes, how come? What can I do?
 
  Can anyone tell me who is to blame here, I plea not guilty!? :-D
 
  I no longer use the on-rev smtp server because of this problem. Use
  your local isp's smtp server instead.
 
  --
  -Mark Wieder
  mwie...@ahsoftware.net


 ___
 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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: [on-rev]Line endings for a db query

2012-04-02 Thread Pete
Hi Martin,
That's strange. I just tried the following test:

put revDataFromQuery(,,gDBID,SELECT * FROM t1) into tVar
put return  revDataFromQuery(,,gDBID,SELECT * FROM t1) after tVar

tVar looked just like it should after the above, no blank lines.

Are you using the default rowdelim character for revDataFromQuery?  What
platform are you on?  My test was done on a Mac.

Pete

On Mon, Apr 2, 2012 at 10:57 AM, Martin Koob mk...@rogers.com wrote:

 Hi Peter

 Thanks, I just tried your suggestion.

 That still inserts blank lines into the variable that I have to filter out
 later.

 It seems the revDataFromQuery does not insert an end of line character
 after
 the last record and
 it seems that the end of line character that is used to separate lines in
 the variable is not the same as the return or LF constants in LiveCode.

 Martin

 --
 View this message in context:
 http://runtime-revolution.278305.n4.nabble.com/on-rev-Line-endings-for-a-db-query-tp4526068p4526757.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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: [on-rev]Line endings for a db query

2012-04-02 Thread Pete
Do you mean decimal 10 or octal 10?  Decimal 10 is newline (which is what
I'd expect), octal 10 is backspace.
Pete

On Mon, Apr 2, 2012 at 12:05 PM, Bob Sneidar b...@twft.com wrote:

 I just checked to see what revDataFromQuery uses for a row delimiter by
 default, if you do not provide one. It returns ascii 10, the backspace
 character! Very odd. Must be an HTML thingummy.

 I then specified comma and cr as the column and row delimiters like so:

   put revDataFromQuery(comma,cr,theConnID,select * from events)  cr
 into theSQLData
   put revDataFromQuery(comma,cr,theConnID,select * from clients)  cr
 after theSQLData

 This produced NO extra line that I could see. If you still get an extra
 line using this method, I suspect you have a blank record in your table.

 Bob


 On Apr 2, 2012, at 10:57 AM, Martin Koob wrote:

  Hi Peter
 
  Thanks, I just tried your suggestion.
 
  That still inserts blank lines into the variable that I have to filter
 out
  later.
 
  It seems the revDataFromQuery does not insert an end of line character
 after
  the last record and
  it seems that the end of line character that is used to separate lines in
  the variable is not the same as the return or LF constants in LiveCode.
 
  Martin
 
  --
  View this message in context:
 http://runtime-revolution.278305.n4.nabble.com/on-rev-Line-endings-for-a-db-query-tp4526068p4526757.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


 ___
 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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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


Disabling a tab

2012-04-01 Thread Pete
I have a tab control and I'm using the method of revealing data on each tab
by having groups with the same name as each tab which are hidden/shown when
a tab is clicked.

Depending on data conditions, I need to disable one of the tabs, meaning
that clicking ion it has no effect.  Right now, I'm doing this in a
selectionChanged handler that checks the data condition, beeps if the use
clicks on a disallowed tab, and leaves the original tab/group displayed.

That works OK but there is no visual indication that the tab is not
available.  Ideally, I'd like the text in the tab heading to be greyed out,
kinda like a disabled menu item.  Any ideas how to do that?


-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Disabling a tab

2012-04-01 Thread Pete
Thanks Marty. Sometimes the obvious just slips by me!
Pete

On Sun, Apr 1, 2012 at 12:43 PM, Marty Knapp martykn...@comcast.net wrote:

 Hey Pete,
 Using disable menuItem 2 of btn Tab Menu seems to work.

 Marty Knapp

  I have a tab control and I'm using the method of revealing data on each
 tab
 by having groups with the same name as each tab which are hidden/shown
 when
 a tab is clicked.

 Depending on data conditions, I need to disable one of the tabs, meaning
 that clicking ion it has no effect.  Right now, I'm doing this in a
 selectionChanged handler that checks the data condition, beeps if the use
 clicks on a disallowed tab, and leaves the original tab/group displayed.

 That works OK but there is no visual indication that the tab is not
 available.  Ideally, I'd like the text in the tab heading to be greyed
 out,
 kinda like a disabled menu item.  Any ideas how to do that?




 __**_
 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-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Disabling a tab

2012-04-01 Thread Pete
Thanks Phil.  I think the ( is the standard char to disable menu items,
so that makes sense.  I did notice the ( character in front of the lines
that I disabled.
Pete

On Sun, Apr 1, 2012 at 3:16 PM, Phil Davis rev...@pdslabs.net wrote:

 Hi Pete,

 As usual in Livecode, there are multiple ways to disable a tab. If you
 want to manipulate the button text directly, you can put ( before the
 line of button text for the tab you want to disable. Or to enable all tabs,
 replace ( with empty in text of btn 1.

 Best -
 Phil



 On 4/1/12 1:45 PM, Pete wrote:

 Thanks Marty. Sometimes the obvious just slips by me!
 Pete

 On Sun, Apr 1, 2012 at 12:43 PM, Marty Knappmartykn...@comcast.net
  wrote:

  Hey Pete,
 Using disable menuItem 2 of btn Tab Menu seems to work.

 Marty Knapp

  I have a tab control and I'm using the method of revealing data on each

 tab
 by having groups with the same name as each tab which are hidden/shown
 when
 a tab is clicked.

 Depending on data conditions, I need to disable one of the tabs, meaning
 that clicking ion it has no effect.  Right now, I'm doing this in a
 selectionChanged handler that checks the data condition, beeps if the
 use
 clicks on a disallowed tab, and leaves the original tab/group displayed.

 That works OK but there is no visual indication that the tab is not
 available.  Ideally, I'd like the text in the tab heading to be greyed
 out,
 kinda like a disabled menu item.  Any ideas how to do that?



  ___

 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-livecodehttp://lists.runrev.com/**mailman/listinfo/use-livecode
 **http://lists.runrev.com/**mailman/listinfo/use-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode
 




 --
 Phil Davis

 PDS Labs
 Professional Software Development
 http://pdslabs.net



 __**_
 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-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Progress Bar

2012-03-31 Thread Pete
Thanks Geoff, I like the concept of time based updated rather than based on
number of records processed.
Pete

On Fri, Mar 30, 2012 at 11:43 PM, Geoff Canyon gcan...@gmail.com wrote:

 I'll throw my 2 cents in here as well -- I've found that it doesn't impact
 performance significantly to check ticks() each time through the loop. So
 instead of a fixed number of iterations, which can lead to a jumpy progress
 bar or excessive updates if what you're doing in the loop varies much, I do
 this:

 if ticks()  T then
  --update the progress bar
  put ticks() + 10 into T -- your choice how smooth you want it
 end if

 Sent from my iPad

 On Mar 29, 2012, at 6:20 PM, Scott Rossi sc...@tactilemedia.com wrote:

  Use a counter to increment progress
  every 2nd, 5th, 10th loop (whatever makes sense), so updating progress
 has a
  lower impact on the repeat loop.

 ___
 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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Progress Bar

2012-03-30 Thread Pete
Those quantum guys are such pranksters!
Pete

On Thu, Mar 29, 2012 at 7:18 PM, Peter M. Brigham, MD pmb...@gmail.comwrote:

 On Mar 29, 2012, at 6:56 PM, Mike Bonner wrote:

  Its a particle.. Its a wave! its a particle. Its a wave!  Its a cat in a
  box!

 Coincidence -- someone just sent me today a cartoon: a fake poster:

 Reward! $1,000,000,000
 Schroedinger's Cat
 Wanted Dead and Alive

 -- Peter

 Peter M. Brigham
 pmb...@gmail.com
 http://home.comcast.net/~pmbrig


 ___
 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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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


Preferences

2012-03-30 Thread Pete
Somehow or other, LC has lost my preference settings.

Where is the Preferences file kept on OS X?  I can restore from Time
Machine backup.


-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Preferences

2012-03-30 Thread Pete
Actually, yes, I think that is what happened.  I'm still using 5.0 on a
daily basis but I ran 5.5 yesterday to try a couple of things. I'll get
ther latest 5.5.
Pete

On Fri, Mar 30, 2012 at 3:07 PM, J. Landman Gay jac...@hyperactivesw.comwrote:

 On 3/30/12 1:55 PM, Pete wrote:

 Somehow or other, LC has lost my preference settings.

 Where is the Preferences file kept on OS X?  I can restore from Time
 Machine backup.



 ~/Library/Preferences/RunRev/**livecode.rev

 Some early releases of LiveCode 5.5 accidentally saved that file in the
 new 5.5 format, which means if you later re-launch 5.02 it can't be read.
 It's been fixed since then, so you may want to re-download from your store
 account if that could be what happened.

 --
 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-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: ANN: ScaleMatic

2012-03-29 Thread Pete
I think many of us have reported this to support, but to no avail.
Pete

On Thu, Mar 29, 2012 at 10:27 AM, Tim Jones tolis...@me.com wrote:

 Have you reported this to the RunRev support team?  We can all commiserate
 with you here on the list, but only they can fix something's that's wrong…

 Tim

 On Mar 29, 2012, at 10:16 AM, Roger Guay wrote:

  I've tried everything suggested in the last list digest to upload stacks
 to RevOnLine to no avail! I've tried LiveCode versions from 4.6.3 to 5.5.
 Iv'e tried restarting RunRev repeatedly, I've tried praying, swearing, and
 various words of magic. I've tried standing up, sitting down, casually
 looking away, staring with intimidation, psychokinesis, and psychic
 healing. I've tried morning, noon and night, all to no avail.
 
  RevOnLine is effectively dead as far as I am concerned!
 
  Cheers,
  Roger


 ___
 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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: ANN: ScaleMatic

2012-03-29 Thread Pete
I see they confirmed it as a bug in January.
Pete

On Thu, Mar 29, 2012 at 10:35 AM, J. Landman Gay
jac...@hyperactivesw.comwrote:

 On 3/29/12 12:27 PM, Tim Jones wrote:

 Have you reported this to the RunRev support team?  We can all
 commiserate with you here on the list, but only they can fix
 something's that's wrong…


 http://quality.runrev.com/**show_bug.cgi?id=9929http://quality.runrev.com/show_bug.cgi?id=9929

 Add your comments. My original report isn't quite accurate any more.


 --
 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-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: [OT] ACer A100 Tablet

2012-03-29 Thread Pete
Thanks Mark.  Yes, the A100 is the 7 version, not sure if there other
differences.
Pete

On Thu, Mar 29, 2012 at 12:30 PM, Mark Wieder mwie...@ahsoftware.netwrote:

 Pete-

 Wednesday, March 28, 2012, 10:40:47 PM, you wrote:

  Anyone got one of the above and willing to share thoughts on it?

 I've got an A500 that I quite like. Mostly, anyway. Don't know if that
 helps or not, but the A100 seems to be a 7-in version of the A500.

 --
 -Mark Wieder
  mwie...@ahsoftware.net


 ___
 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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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


Progress Bar

2012-03-29 Thread Pete
I'm using a progress bar for the first time.  Checked it all out stepping
through things in debug and all worked fine.  However, when I run it
normally (meaning no debug), the blue progress bar never moves beyond it's
startpos.

I'm pretty sure this is because I'm updating it in a tight loop and LC
doesn't get a chance to update the screen but I'm uncertain how to solve
that without adding to the overall execution time of the loop.

Enlightenment much appreciated.


-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Progress Bar

2012-03-29 Thread Pete
Thanks guys.  I put a wait 0 in there and that made the progress bar update
visible. Seems kinda weird that there's a difference between not waiting
and waiting zero, but that's OK!

This does lead to an interesting conundrum though.  It takes about 2.5
times longer to process my test data with a progress bar than without one.
 Not talking huge amounts of time - about 1 second vs 2.5 seconds - but
those times could get a lot longer in production, maybe by a factor of 10
or more, and this particular function of the application is going to be
judged at least partly on performance.

I calculate the update interval by dividing the number of records to be
processed by 100 with a minimum of 10 to deal with small data sets.  I
guess maybe I can play around with the divisor of 100 to see what yields
the best blend of performance while still showing progress.

I might also try using an animated cursor to see how it compares
performance wise.

Isn't there some rule of quantum physics about changing the outocme of an
experiment by observing it?

Pete

On Thu, Mar 29, 2012 at 3:13 PM, Roger Eller roger.e.el...@sealedair.comwrote:

 On Thu, Mar 29, 2012 at 6:03 PM, Pete wrote:

  I'm using a progress bar for the first time.  Checked it all out stepping
  through things in debug and all worked fine.  However, when I run it
  normally (meaning no debug), the blue progress bar never moves beyond
 it's
  startpos.
 
  I'm pretty sure this is because I'm updating it in a tight loop and LC
  doesn't get a chance to update the screen but I'm uncertain how to solve
  that without adding to the overall execution time of the loop.
 
  Enlightenment much appreciated.
 
  --
  Pete
  Molly's Revenge http://www.mollysrevenge.com
 

 Add a super-tiny wait to the end of the loop (25 to 100 millisecs,
 depending on what you're doing).

 ~Roger
 ___
 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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: [OT] ACer A100 Tablet

2012-03-29 Thread Pete
Thanks Mark.  You justy answered another question I had.  I was under the
impression that you were stuck with whatever version of Android was on a
device when you purchased it but sounds like you can updaste it?  Maybe
it's just phones that can't be updated?
Pete

On Thu, Mar 29, 2012 at 3:19 PM, Mark Wieder mwie...@ahsoftware.net wrote:

 Pete-

 Thursday, March 29, 2012, 2:58:57 PM, you wrote:

  Thanks Mark.  Yes, the A100 is the 7 version, not sure if there other
  differences.

 The A500 has a very responsive screen and has all the other things I
 was looking for in an Android tablet. I'm still running OS 3.3 on it
 but I'll get around to upgrading to 4.0 some day.

 --
 -Mark Wieder
  mwie...@ahsoftware.net


 ___
 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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: [OT] ACer A100 Tablet

2012-03-29 Thread Pete
Thanks Roger and Tim, I'm not sure where I got that idea from.  Maybe the
cell phone providers don;t want you to upgarde so you're mor elikley to buy
another phone?
Pete

On Thu, Mar 29, 2012 at 4:28 PM, Roger Eller roger.e.el...@sealedair.comwrote:

 Just about all Android phones, and tablets can be end-user-upgraded via
 CyanogenMod.  It's community driven, so you're not at the mercy of the
 hardware manufacturer.

 http://www.androidcentral.com/tags/cyanogenmod

 ~Roger


 On Thu, Mar 29, 2012 at 6:55 PM, Pete wrote:

  Thanks Mark.  You justy answered another question I had.  I was under the
  impression that you were stuck with whatever version of Android was on a
  device when you purchased it but sounds like you can updaste it?  Maybe
  it's just phones that can't be updated?
  Pete
 
  On Thu, Mar 29, 2012 at 3:19 PM, Mark Wieder mwie...@ahsoftware.net
  wrote:
   The A500 has a very responsive screen and has all the other things I
   was looking for in an Android tablet. I'm still running OS 3.3 on it
   but I'll get around to upgrading to 4.0 some day.
  
   --
   -Mark Wieder
mwie...@ahsoftware.net
 
  --
  Pete
  Molly's Revenge http://www.mollysrevenge.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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: [OT] ACer A100 Tablet

2012-03-29 Thread Pete
Folks,
I prowled around the CyanogenMod web site and it looks great BUT... nowhere
can I find how to install it on my phone.  I also see various issues about
having to reload some of the Google apps like Maps apps after upgrading.
 SO, all-in-all, this makes me pretty nervous, I'd like to upgarde but I
don't want to end up with a dead phone!

I also tried the OTA Update on my phone (HTC Incredible from Verizon) but
seem to always get a service not available message.

Pete

On Thu, Mar 29, 2012 at 4:51 PM, Tim Jones tolis...@me.com wrote:

 That's a good guess.  If I waited for Verizon, I'd still be running 2.1…

 Tim

 On Mar 29, 2012, at 4:38 PM, Pete wrote:

  Thanks Roger and Tim, I'm not sure where I got that idea from.  Maybe the
  cell phone providers don;t want you to upgarde so you're mor elikley to
 buy
  another phone?
  Pete
 
  On Thu, Mar 29, 2012 at 4:28 PM, Roger Eller 
 roger.e.el...@sealedair.comwrote:
 
  Just about all Android phones, and tablets can be end-user-upgraded via
  CyanogenMod.  It's community driven, so you're not at the mercy of the
  hardware manufacturer.
 
  http://www.androidcentral.com/tags/cyanogenmod
 
  ~Roger
 
 
  On Thu, Mar 29, 2012 at 6:55 PM, Pete wrote:
 
  Thanks Mark.  You justy answered another question I had.  I was under
 the
  impression that you were stuck with whatever version of Android was on
 a
  device when you purchased it but sounds like you can updaste it?  Maybe
  it's just phones that can't be updated?
  Pete
 
  On Thu, Mar 29, 2012 at 3:19 PM, Mark Wieder mwie...@ahsoftware.net
  wrote:
  The A500 has a very responsive screen and has all the other things I
  was looking for in an Android tablet. I'm still running OS 3.3 on it
  but I'll get around to upgrading to 4.0 some day.
 
  --
  -Mark Wieder
  mwie...@ahsoftware.net
 
  --
  Pete
  Molly's Revenge http://www.mollysrevenge.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
 
 
 
 
  --
  Pete
  Molly's Revenge http://www.mollysrevenge.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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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


CSV Files

2012-03-28 Thread Pete
OK, so I know CSV files are not everyone's favorite subject but sometimes
you have no control over how data reaches you!

I have a handler in place that deals with the vagaries of CSV files, like
returns, commas, and quotes in the data (did I miss any?) but it relies on
a repeat loop looking at every character in the csv file.  It seems to work
just fine but I'm wondering if the collective knowledge of this list gas
already come up with a more efficient solution.

Thanks,
-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: CSV Files

2012-03-28 Thread Pete
The csv files are created by an export from a database, not from a
spreadsheet so I don't think I need to worry about the Excel/Google issue
(thankfully).

Non-numeric strings will be in quotes, and the data between the quotes can
contain commas and returns, escaped quotes, just about any visible ASCII
character in fact.

Pete

On Wed, Mar 28, 2012 at 10:09 AM, Keith Clarke 
keith.cla...@clarkeandclarke.co.uk wrote:

 ...that seems to be the same for Google sheets, too - though I've not dug
 into whether there is an obvious end-of-line character.
 Best,
 Keith..

 On 28 Mar 2012, at 18:03, Bob Sneidar wrote:

  I have noticed that csv exports from Excel will stop short of including
 all the columns in any given row if there is no more data, so you will get
 rows with varying numbers of columns if you have any empty cells at the
 end of a row. That has tripped me up a few times with other software that
 expects data to be there, even if it's an empty value.
 
  Bob
 
 
  On Mar 28, 2012, at 9:55 AM, Pete wrote:
 
  OK, so I know CSV files are not everyone's favorite subject but
 sometimes
  you have no control over how data reaches you!
 
  I have a handler in place that deals with the vagaries of CSV files,
 like
  returns, commas, and quotes in the data (did I miss any?) but it relies
 on
  a repeat loop looking at every character in the csv file.  It seems to
 work
  just fine but I'm wondering if the collective knowledge of this list gas
  already come up with a more efficient solution.
 
  Thanks,
  --
  Pete
  Molly's Revenge http://www.mollysrevenge.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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: CSV Files

2012-03-28 Thread Pete
Thanks Richard.  I'm happy to say my handler parsed the extended test csv
lines with flying colors.  I'll try it along Alex's with some large
datasets to see if there's any significant performance difference.  By
conicidence, I want the output form my handler to an array and I see Alex's
does createw an array at one point so there may well be some benfits to
switching over to his routine.
Pete

On Wed, Mar 28, 2012 at 2:10 PM, Richard Gaskin
ambassa...@fourthworld.comwrote:

 Pete wrote:

  OK, so I know CSV files are not everyone's favorite subject but sometimes
 you have no control over how data reaches you!

 I have a handler in place that deals with the vagaries of CSV files, like
 returns, commas, and quotes in the data (did I miss any?) but it relies on
 a repeat loop looking at every character in the csv file.  It seems to
 work
 just fine but I'm wondering if the collective knowledge of this list gas
 already come up with a more efficient solution.


 The article here outlines some of the many oddities about CSV, and
 includes a handler from Alex Tweedly which thus far has been the most
 efficient solution I've found:


 CSV Must Die
 A Plea to Introduce Sanity to the Software Development World
 by Pledging to Never Write CSV Exporters
 http://www.fourthworld.com/**embassy/articles/csv-must-die.**htmlhttp://www.fourthworld.com/embassy/articles/csv-must-die.html
 

 --
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  LiveCode Journal blog: 
 http://LiveCodejournal.com/**blog.irvhttp://LiveCodejournal.com/blog.irv


 __**_
 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-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: LiveCode Player for 5.5

2012-03-28 Thread Pete
Hi Alejandro,
I think the discussion of whether education brings everyone down to the
lowest common denominator is a different topic!

I guess my original point, perhaps not well enough explained, was that,
according to the study in my local paper here in California, using iPads to
replace text books costs about 4 times more than using the hard copy text
books.  Personally, I can't find any justification for California schools
spending that extra money when there's hardly any evidence that using iPads
improves the quality of eduction at all, never mind 4-fold.  I don't know
enough about it to judge whether the problem is hardware, software, good vs
bad teachers, lack of teacher training , or any other cause.

But I'm not a teacher and I tend to view these things more simplistically
than perhaps I should.

Pete

On Wed, Mar 28, 2012 at 1:55 PM, Alejandro Tejada capellan2...@gmail.comwrote:

 Hi all,

 I have read the messages in this thread and please, correct me
 if I understand wrong:

 1) Too many students and teachers are too inexperienced (not dumb)
 to use the available computer educational tools in their institution.

 2) Most of the digital educational applications aim to teach using only
 the lower (or lowest) skills available to all participants.

 Surely, I am interpreting all this information in the wrong way because
 my conclusion is that education (as described here) is effectively dumbing
 down
 all the participants (teachers and students alike).

 How many of you are aware that you could run Livecode (including all
 externals and Quicktime) from a Portable device as a USB pendrive
 or Secure Digital Card or even from media as a Rewritable CD or DVD?

 No plugin or installation. Just click and run:


 http://runtime-revolution.278305.n4.nabble.com/Running-LiveCode-and-Quicktime-as-virtual-applications-td4411011.html#a4430008

 In this computer lab:

 http://www.facebook.com/media/set/?set=a.2733273854751.2150939.1344437396type=3
 the IT manager used Metacard Free Starter Kit to create exams
 that students run from a CD. He opened the exam (a stack), take out
 the CD and repeat the procedure in each machine. In this way, the exams
 only runs in RAM and the students could not copy or save to the
 computer. It works fine for him for many years...

 Al

 --
 View this message in context:
 http://runtime-revolution.278305.n4.nabble.com/Two-More-Resolutions-On-The-Way-tp4495780p4513669.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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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


[OT] ACer A100 Tablet

2012-03-28 Thread Pete
Anyone got one of the above and willing to share thoughts on it?


-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: LiveCode Player for 5.5

2012-03-27 Thread Pete
I'm not a teacher, nor involved in education in any way so take what I have
to say with a pinch of salt.

A recent analysis over here in California found that it was around 4 times
as expensive for a classroom to use iPads and electronic versions of text
books as it was to continue using hard copy text books.  The costs were
measured over a 6 year period to take account of new editions of the text
books and the life span of an iPad and I believe the analysis was done for
high school level classes.

I'd be prepared to accept the extra cost if it was accompanied by a greater
than 4-fold improvement in educational quality but there seems to be
precious little evidence that the use of iPads produces any increase in
educational quality.  This is all related to general education classes, not
computer science classes.

Of course, you can find studies to prove/disprove just about anything you
want these days.  For those interested, you might want to read the book
Wrong by David H. Freedman.  A fascinating account of why an alarmingly
high number of studies carried out by experts come to completely wrong
conclusions.

Pete

On Tue, Mar 27, 2012 at 9:20 AM, Bob Earp rje...@hotmail.com wrote:

 I say that we will see a change in current attitudes as I am encouraged by
 Apple's new education support with iBooks2, iBooks Author, and iTunesU.
  Just the fact of offering text books at a fraction of their hard copy
 price will quickly sway teachers into encouraging downloads, not to mention
 keeping the books current and all of the other goodies.  And academia using
 the tools in iTunesU will put pressure on IT people to deliver an
 infrastructure that support such.




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Displaying PDF files in an LC stack

2012-03-26 Thread Pete
Thanks Francis - and all the others who have suggested ways to deal with
this.

I think I will have to go with launching the pdf documents as a separate
process.  Seems like that is the only way to get a cross platform solution
that will deal with the display of bookmarks without having to spend time
writing Livecode scripts.

Maybe someone will write an LC plugin to deal with pdf files one day.
 Judging by the response to my initilial question, seems like there would
be enough interest to make it worthwhile.

Pete

PS I'm still looking at ScreenSteps.  They confirm that bookmarks are
included in pdf files created from ScreenSteps so I could get the best of
both worlds.

On Mon, Mar 26, 2012 at 9:31 AM, Francis Nugent Dixon effe...@wanadoo.frwrote:

 Hi from Beautiful Brittany,

 For Pete, Michael, Colin . et alia !

 I think we have been down this road before !

 This is not a completely internal display of
 pdf files within a LiveCode stack, but it's the
 closest I could get, and it solves all my needs.

 I have a library of pdf files. I have a LiveCode
 stack containing a card for each of the files
 I may want to display. On each card, I have

 1 - The pdf file name within my library,
 2 - A display scale value for the pdf file,
 3 - a field containing a list of page numbers
 that may interest me, within the pdf file.

 I select the scale, select a page number and
 open the pdf file, at a specific page, in an
 external window, by building an applescript file
 to call the Skim app with the required parameters.

 Warning : Skim is for Macs only ... Life is so hard !

 NOTE : I have not exploited the potential of all
 possible parameters which can be passed to Skim.

 I also found out that if my pdf file originated as a text
 file (first-hand), then I could eventually dig out the text,
 (which means that pdf display COULD be pure LiveCode)
 but if the pdf file was built (for example) by conversion
 from a jpg file, then I could NEVER recover the text.
 (that seems pretty reasonable, does it not ?)

 Catch me off-forum, and I can send you an
 example stack.

 Best Regards

 -Francis

 Nothing should ever be done for the first time !


 __**_
 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-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: ANN and OT: Calling All SETI Enthusiasts

2012-03-26 Thread Pete
Roger,
I'd love to take a look at your stack but when I download it and open it in
Livecode, I get an error that it is not a stack.  This is with Livecode
5.0.2.
Pete

On Mon, Mar 26, 2012 at 10:47 AM, Roger Guay i...@mac.com wrote:

 Tom,

 Please forgive me (especially Tim)  for apparently sounding argumentative.
 Not my intent at all. I was merely trying to say that given the vastness of
 our universe and the number of stars contained in it, many argue that it is
 logical to assume a multitude of intelligent species populating our entire
 galaxy. And given the vast time scale involved, it is also logical to
 assume these alien civilizations will not have evolved simultaneously
 (criterion #1)

 The second criterion is that the radio active stages of technology of
 these civilizations will be short relative to these same vast time scales.
 I'm sure that I am not the first to define this criterion, but I have not
 seen it discussed before. The validity of this is discussed very briefly in
 the simulation notes. Further to this point, I would argue that ALL
 technologies have limited durations, and the simulation allows you to
 adjust it over a very long range (albeit short relative to the vast time
 scales of our galaxy) to your heart's content. I would be happy to discuss
 this at length, but it might be best to do so off-list??

 My simulation starts with these assumptions and explores the outcome.
 These criteria are simply derived from the statistics of the numbers
 involved. There are many more qualified than I to explain the statistics
 involved, and a few references are included in the notes of the simulation.
 For those interested I would would start with the SETI project itself at.


 http://www.seti.org/

 And, the Drake equation says it all . . . statically:


 http://www.activemind.com/Mysterious/Topics/seti/drake_equation.html

 Thanks and cheers,
 Roger Guay


 On Mar 25, 2012, at 7:56 AM, use-livecode-requ...@lists.runrev.com wrote:

  Message: 6
  Date: Sat, 24 Mar 2012 20:54:05 -0400
  From: Thomas McGrath III mcgra...@mac.com
  To: How to use LiveCode use-livecode@lists.runrev.com
  Subject: Re: use-livecode Digest, Vol 102, Issue 49
  Message-ID: 02634a04-296a-4fbe-a626-3e7587ff9...@mac.com
  Content-Type: text/plain; CHARSET=US-ASCII
 
  I didn't take either comment as overly argumentative but more like a
 challenge (which we tend to do on this list from time to time). For me,
 coming up with two criteria is intriguing and caught my interest. I would
 love to see more on the validity of those two criteria, but what really
 interested me was how Roger translated those to an interesting LC project.
 Very cool. I would love to hear more about that.
 
  -- Tom McGrath III
  http://lazyriver.on-rev.com
  3mcgr...@comcast.net
 
  On Mar 24, 2012, at 8:31 PM, Roger Guay wrote:
 
  Tim,
 
  I don't pretend to know anything! As for my thesis, I am merely making
 assumptions based on statistics and the vast size of our galaxy and the
 number of stars it contains. No one has decided anything about the nature
 of our species except the religious. BTW, did you look at the simulation?
 
  I think it might be best to take any further discussions of this nature
 off-list.
 
  Cheers,
  Roger
 
 
  On Mar 24, 2012, at 6:03 PM, use-livecode-request@lists.runrev.comwrote:
 
  Message: 9
  Date: Sat, 24 Mar 2012 12:44:21 -0700
  From: Tim Jones tolis...@me.com
  To: How to use LiveCode use-livecode@lists.runrev.com
  Subject: Re: ANN and OT: Calling All SETI Enthusiasts
  Message-ID: dabd6b02-27fe-40e6-8df5-3144fce87...@me.com
  Content-Type: text/plain; CHARSET=US-ASCII
 
  Ready to defend your thesis?  Let me toss out two great Sci-Fi
 antithesis to your points below -
 
  How have we determined how long the relatively short duration of the
 radio stage of any societies is?
 
  How have we decided, even taking asynchronous development into
 account, that humans aren't the most mature and advanced species in the
 nearby galaxy?
 
  :-)
 
  Tim
 
 
  On Mar 24, 2012, at 12:20 PM, Roger Guay wrote:
 
  Hi all,
 
  The SETI project has been in existence for about 50 years, and Enrico
 Fermi's question asked in the 1940's, Where is everybody? is still
 germane today.
 
  I think I have finally succeded in building a simulation of two
 criteria relevant to this SETI problem: 1) The asynchronous evolution of
 intelligence throughout the galaxy couple with 2) the relatively short
 duration of the radio stage of alien technologies.
 
  You can download this stack at:
 
 
 https://idisk.mac.com/irog//Public/SETIproblem.livecode
 
  I welcome any feedback.
 
  Thanks and cheers,
  Roger Guay
  ___
 


 ___
 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




-- 
Pete
Molly's Revenge http

Re: About item in Application Menu

2012-03-26 Thread Pete
Hi Joe,
I haven't made custom menus like this but LC's convention for regular menus
is to treat the last line in your Help menu as the About item on the Mac
Application menu.  In other words, it will leave that item where it is on
the Help menu for Widnows systems, but move it to the Apllication menu for
OS X systems.
Pete

On Mon, Mar 26, 2012 at 12:42 PM, Joe Lewis Wilkins pepe...@cox.net wrote:

 On my current application I'm building custom menus that appear on the
 cards so that I can make them larger and they'll appear the same on both
 the Mac and Windows versions; however, I haven't figured out how to set up
 the About item on the Application Menu. Any suggestions?

 TIA,
 Joe Wilkins
 ___
 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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: ANN and OT: Calling All SETI Enthusiasts

2012-03-26 Thread Pete
Yes, thanks Roger - I missed that in the thread before sending my email.

On Mon, Mar 26, 2012 at 1:16 PM, Roger Guay i...@mac.com wrote:

 The original link is to a version 5.5. Can you use the legacy saved
 version available at?:


 https://idisk.mac.com/irog//Public/SETIproblemL.livecode

 Roger


 On Mar 26, 2012, at 2:03 PM, use-livecode-requ...@lists.runrev.com wrote:

  Message: 7
  Date: Mon, 26 Mar 2012 11:01:28 -0700
  From: Pete p...@mollysrevenge.com
  To: How to use LiveCode use-livecode@lists.runrev.com
  Subject: Re: ANN and OT: Calling All SETI Enthusiasts
  Message-ID:

 cabx6j9k4+d061urjrjjgmph_qxo2fykabfaqqxb1rwgrsr+...@mail.gmail.com
  Content-Type: text/plain; charset=ISO-8859-1
 
  Roger,
  I'd love to take a look at your stack but when I download it and open it
 in
  Livecode, I get an error that it is not a stack.  This is with Livecode
  5.0.2.
  Pete


 ___
 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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: ANN and OT: Calling All SETI Enthusiasts

2012-03-26 Thread Pete
All I can say, Bob, is if the great thinkers, scientists, and philospohers
of the years had that attitude, we'd still be living in caves.
Pete

On Mon, Mar 26, 2012 at 11:28 AM, Bob Sneidar b...@twft.com wrote:

 This discussion can happen at all because of the human mind's inability to
 focus on and balance very many things at one time and measure a thesis
 against all other things that could weigh upon it. We simply do not possess
 the wisdom and mental faculty to treat such a subject.

 No, my friends, I think all conversation along these lines is so
 incredibly presumptuous, it is staggering when you really begin to think of
 everything we take as a given or gloss over when discussing such things.
 Sorry all you Star Trek fans, and anyone else I have likely offended. I
 love science fiction as much as the next person, but I think any race of
 beings wise enough to comprehend the real logistics of space travel or
 communication across such great distances would conclude right away that it
 was a total waste of their limited resources, better spent on improving
 their own state of affairs.




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: [OT] A couple of links about Gnome and usability

2012-03-25 Thread Pete
Thanks Richmond and Warren for the info.  I like the idea of using a Linux
distro that is somewhat like an OS X interface.
Pete

On Sun, Mar 25, 2012 at 8:04 AM, Warren Samples war...@warrensweb.uswrote:

 On 03/24/2012 06:53 PM, Pete wrote:

  So now I'm left with the question of which Linux
 distro to go for
 Pete



 More ideas that might interest you :)

 Since you are mainly working in OS X and I assume you are happy and
 comfortable working in that interface, you may be interested in a linux
 distro that is set up out of the box to look and act much like OS X. You
 can do this in any distro but this would be a simpler route, and for
 someone who might not want to spend a lot of time and effort fiddling with
 a system he's not planning to use every day, a very sensible choice.

 http://www.unixmen.com/pear-**linux-comice-os-4-0-has-been-**
 released-screenshots-tour-**video/http://www.unixmen.com/pear-linux-comice-os-4-0-has-been-released-screenshots-tour-video/

 http://www.pear-os-linux.fr/

 Do-it-yourself ideas:

 http://beta.techradar.com/**news/software/operating-**
 systems/how-to-make-linux-**mint-look-like-os-x-1040983http://beta.techradar.com/news/software/operating-systems/how-to-make-linux-mint-look-like-os-x-1040983

 http://lifehacker.com/5665765/**macbuntu-makes-your-linux-**
 desktop-look-like-mac-os-xhttp://lifehacker.com/5665765/macbuntu-makes-your-linux-desktop-look-like-mac-os-x

 http://www.internetling.com/**2008/03/24/linux-docks-5-mac-**
 os-x-docks-for-ubuntu-and-**other-linux-distros/http://www.internetling.com/2008/03/24/linux-docks-5-mac-os-x-docks-for-ubuntu-and-other-linux-distros/

 http://www.howtogeek.com/**45817/how-to-make-ubuntu-**
 linux-look-like-mac-os-x/http://www.howtogeek.com/45817/how-to-make-ubuntu-linux-look-like-mac-os-x/

 http://www.dedoimedo.com/**computers/linux-docks.htmlhttp://www.dedoimedo.com/computers/linux-docks.html

 http://linuxlibrary.org/**applications/linux-desktop-**docks-panels/http://linuxlibrary.org/applications/linux-desktop-docks-panels/

 youtube also has lots of videos of people demonstrating their Mac-like
 Linux desktops. You might enjoy a peek at a few of those.

 Good luck!


 Warren

 __**_
 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-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Tools for creating a help file

2012-03-24 Thread Pete
Hi Klaus,
Tried that and still no luck.  When I look at the url it starts with
file:/// (3 slashes).  Is that OK?

I'm not sure what's going on here.  I'm using the revBrowser sample stack
provided by runrev and it won;t access any web sites, never mind pdf files.
 For instance, I tried www.google.com in the URL box.  The status message
at the bottom says accessing http://www.google.com;, the lights at the top
right flash away and it just stays like that, no web site displayed.

My internet connection is working fine and I can access web site just fine
with my Chrome browser.

Pete

On Sat, Mar 24, 2012 at 4:43 AM, Klaus on-rev kl...@major.on-rev.comwrote:

 replace   with %20 in tFile
  put file:// before tFile




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Text formatting for a slider

2012-03-24 Thread Pete
Hi Bjornke,
Does the below mean your Docu plugin won't work with 5.5?  I'd be sorry if
that was the case - it's sooo much better than the built in dictionary
interface!
Pete

2012/3/24 Björnke von Gierke b...@mac.com

 Furthermore, there's no way to find out the possible settings out that
 way, again this can only be found in the dictionary, but this time around,
 it's not machine readable.




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: [OT] A couple of links about Gnome and usability

2012-03-24 Thread Pete
Hi Richard,
This thread has been very interesting to me as I'm considering getting a
computer to run Linux.  The problem I'm having is illustrated by the
snippet from your post below.

I'm a computer savvy person and worked with them most of my working life
but I know nothing about Linux and really have no desire to spend much time
installing and configuring an OS.  I can buy a Mac or a PC, switch it on
and it just boots up and runs.

But where do I buy a computer that runs Linux and what version of Linux (if
that's the right term) I need?  I have pretty basic needs for this machine.
 Aside from running Livecode on it, I mostly need a web browser (I use
Google tools for just about all my daily needs) plus some way of playing
music.

I already have a Windows laptop that I only use for testing out the LC apps
I develop on my Mac.  I don't really want another computer.  It seems like
Apple has just about shut the door on running anything but OS X on their
computers.  Can I install Linux on my Windows computer a dual boot it
somehow?

I'm sure these are pretty basic questions for people who are familiar with
the Linux world, but I think they illustrate why the use of Linux is not
more widespread, no matter what advantages it has over other OS's.

Pete

On Sat, Mar 24, 2012 at 3:13 PM, Richard Gaskin
ambassa...@fourthworld.comwrote:

 People buy whole-product solutions.




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: [OT] A couple of links about Gnome and usability

2012-03-24 Thread Pete
Thanks for the reminder Jacque.  I had some not-so-grat experiences a few
years back running emulators on a Mac so that's coloring my opinion, but
they've probably improved a lot since then.
Pete

On Sat, Mar 24, 2012 at 4:21 PM, J. Landman Gay jac...@hyperactivesw.comwrote:

 On 3/24/12 5:48 PM, Pete wrote:

  I already have a Windows laptop that I only use for testing out the LC
 apps
 I develop on my Mac.  I don't really want another computer.  It seems like
 Apple has just about shut the door on running anything but OS X on their
 computers.  Can I install Linux on my Windows computer a dual boot it
 somehow?


 I've had very good luck with Parallels. And lots of people are using
 several other emulators too with good results, and many are free. I run Win
 XP, Vista, Ubuntu (sort of, I'm way behind on that,) and Mac OS X all from
 my iMac.

 I don't see any reason these days to have several computers just to use
 different operating systems.

 --
 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-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: [OT] A couple of links about Gnome and usability

2012-03-24 Thread Pete
Thanks Warren.  As you and Jacque both pointed out the VM approach solves
the hardware problem.  So now I'm left with the question of which Linux
distro to go for
Pete

On Sat, Mar 24, 2012 at 4:28 PM, Warren Samples war...@warrensweb.uswrote:

 On 03/24/2012 05:48 PM, Pete wrote:

 I already have a Windows laptop that I only use for testing out the LC
 apps
 I develop on my Mac.  I don't really want another computer.  It seems like
 Apple has just about shut the door on running anything but OS X on their
 computers.  Can I install Linux on my Windows computer a dual boot it
 somehow?



 If you have enough memory, it may be more useful, and simpler, to run a
 Linux distro inside VirtualBox or VMWare. To make that even easier, you can
 find, using your favorite search engine, downloadable, ready to go virtual
 machine disk images of almost any Linux distro, in current and older
 versions. For casual use, this would be my recommendation.

 Good luck,

 Warren


 __**_
 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-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: [OT] A couple of links about Gnome and usability

2012-03-24 Thread Pete
Thanks for all the info Richard.  I'm already feeling SO superior to all
those morons who don't run Ubuntu!

I will probably try out VirtualBox since it's free and probably also a dual
boot on my Windows 7 box since the only thing I ever do on Windows is test
out LC apps developed on my Mac, although it is a pretty new computer so I
may run into the driver issues you mentioned.

Pete

On Sat, Mar 24, 2012 at 4:39 PM, Richard Gaskin
ambassa...@fourthworld.comwrote:

 Pete wrote:

  Hi Richard,
  This thread has been very interesting to me as I'm considering
  getting a computer to run Linux.
 ...

  But where do I buy a computer that runs Linux and what version of
  Linux (if that's the right term) I need?

 Every distro has its fans, some quite passionate.  There's a running gag
 in the Ubuntu forums that whenever someone encounters an issue that's hard
 to solve, the answer is use Arch. :)

 Personally I like Ubuntu, and as a developer it's important to me that I'm
 working with the most popular distro (an estimated one-third of Linus
 desktops are running Ubuntu).  With its mandate of Linux for Human
 Beings, it's provided a good experience for me.

 Mark Weider uses Fedora, and I've enjoyed that one as well.   Linux Mint
 is another good choice.

 Whichever you choose, be sure to post all over the Internet that users of
 other distros or OSes are stupid fanbois who just don't get what Linux is
 all about!  That'll help keep the myth of the Linux community alive for
 those who have no familiarity with it. :)


 If you were in the market for a computer with Ubuntu pre-installed, these
 companies are good options:

 http://www.system76.com/
 http://zareason.com
 http://linucity.com

 While all three are very reputable vendors, the last there, LinuCity, is
 owned by my friend Aviv and I can personally vouch for the quality of
 service he provides.

 For more options, Canonical maintains a list of computers from major
 vendors they've worked with that have undergone their certification process:
 http://www.ubuntu.com/**certificationhttp://www.ubuntu.com/certification
 

 Note that that's only a subset of computers Ubuntu is compatible with.
 There are only so many hours in the day, and even a billionaire like Mark
 Shuttleworth can't afford to certify everything it runs on.


 One upside to Linux being mostly installed on computers designed for some
 other OS is that it expects that challenge and usually meets it pretty
 well.   In my own experience, every machine I've installed it on has worked
 great out of the box.  The only time I needed a special driver was for the
 NVideo card on my Dell Vostro, and Ubuntu identified that and prompted me
 to install it with one click on first boot.



  I already have a Windows laptop that I only use for testing out the
  LC apps I develop on my Mac.  I don't really want another computer.
  It seems like Apple has just about shut the door on running anything
  but OS X on their computers.  Can I install Linux on my Windows
  computer a dual boot it somehow?

 And even on your Mac.  Apple's OS X EULA only prevents you from legally
 installing it on anything other than an Apple branded computer, but their
 computers are frequently used by members of the Ubuntu forum for running
 Linux.  Boot camp is a natural fit for that sort of thing.

 Because Apple tends to get specialized components, it can sometimes be
 trickier to get a solid install on a Mac than on popular PCs where the
 components are in such wide use that there are plenty of good drivers for
 them.

 Dual-booting with Windows is a popular option, esp. among gamers because
 Windows still rules the roost with the games market.  I've set up dual-boot
 systems before and it's not hard (the Ubuntu installer includes options for
 that), but personally I found I was booting into Windows so rarely that I
 ditched that partition and put Windows into a VM within Ubuntu.

 In general, the sweet spot for Linux is computers between two and six
 years old.  It can often run on newer systems, and even most older ones
 (Puppy Linux can run on darn near anything), but if a computer's too old it
 won't have the horsepower to deliver a great experience with the latest
 Linux distros, and if it's too new there's a chance of needing a driver
 that hasn't been made available yet.  Even then there's almost always a way
 to get things to work, but for a simple first-time experience the
 two-to-six years guideline may be helpful for systems that haven't been
 certified.

 Most of the popular distros allow an option to run the OS from CD or USB
 drive, so you can try it out on a machine without having to install
 anything.

 If you grab the Ubuntu ISO disk image here and burn it do CD, you can boot
 from that CD and see what works and what doesn't on your machine:
 http://www.ubuntu.com/**download/ubuntu/downloadhttp://www.ubuntu.com/download/ubuntu/download
 

 If you decide to install, the lovely Nixie Pixel teaches you how in her

Displaying PDF files in an LC stack

2012-03-24 Thread Pete
In another thread, I've been soliciting advice about tools to use for Help
Text preparation and display.  One of the options was to go with a pdf file
and display it using revBrowser.  Been having some issues getting that to
work but even if it did work, I don't think it will satisfy my needs.  I
want to use the pdf feature of showing bookmarks in a navigation pane (like
the datagrid manual) and apparently that won't happen, at least on a Mac.

I could, of course, simply launch the pdf file as a separate process but
I'd really like to keep the help file within my LC stack if possible.  Are
there any other ways of displaying a pdf file within LC other than using
revBrowser?  I though I remembered seeing some sort of plugin but a quick
search didn't come up with anything.

I am still looking into ScreenSteps and WordLib.


-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Displaying PDF files in an LC stack

2012-03-24 Thread Pete
Thanks for the reminder Colin, forgot about that.  I'll give that a try.
Pete

On Sat, Mar 24, 2012 at 6:05 PM, Colin Holgate co...@verizon.net wrote:

 I don't remember that part. My suggestion was to read the PDF in a player
 object, by setting its filename property.


 On Mar 24, 2012, at 8:11 PM, Pete wrote:

  In another thread, I've been soliciting advice about tools to use for
 Help
  Text preparation and display.  One of the options was to go with a pdf
 file
  and display it using revBrowser.

 ___
 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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Translation s'il vous plait/por favor :-)

2012-03-23 Thread Pete
Looking back at the original request, it was to translate the phrase Copy
file XXX to your Applications folder, no mention of into.
Pete

On Fri, Mar 23, 2012 at 6:24 AM, Francis Nugent Dixon effe...@wanadoo.frwrote:

 Hi from Beautiful Brittany,

 Klaus, I would hate to be pedantic, but I can't miss
 adding my 2 cents.

 Dictionnaries exist to clearly define the meaning
 of a word or phrase in another language. But the
 translations, based upon the etymology of the terms
 in these languages are often betrayed by the personal
 interpretations of the users. If we can try and forget the
 environment of our computer translation (files, folders,
 disk drives, et tutti quanti), we can try to home in on
 best best translation available for a specific language.

 The French language (to my knowledge) lacks the
 precise equivalent of the English into (which
 means from the outside of ... to the inside of ...).
 So may we fall into the trap of personal interpretation !

 The French a denotes location only, but gives little
 information concerning the direction, and even less
 about the subtleties of inside or outside.
 I find it to be the worst possible translation.

 The French dans means in or at best inside,
 and has no implication of the 'into I show above.
 However, I find it a better solution than a.

 The French sur implies lying on top of and
 certainly does not imply inside. Much depends on
 the personal interpretation. As a long-standing
 nit-picker I would never use this.

 The French vers means in the direction of, which
 I find to be acceptable in the translation you request,
 because it simply skips over the notion inside, (but
 nevertheless implies it (The idea of copying a file to
 the outside of a folder would be nonsense !).
 But then again, this can be personal interpretation.

 These comments in no way undermine the scope of the
 French language, which can be so powerful in many areas.

 .. et a la fin de l'envoi, je touche .!  (French Fencing term)

 -Francis

 __**_
 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-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Need an example of how to use try and catch

2012-03-23 Thread Pete
Bob,
Maybe I'm missing something but you seem to be saying there are some
database errors that can only be detected by using try/catch, not by
checking the result or the revdberr string.

Taking your example of a database going away, I just created a small db,
opened it in LC, then deleted the db file.  Any further accesses to the db
in LC came back with an error without using try/catch, so I'm not
understanding why a try/catch is necessary.

Not saying try/catch might not be necessary, just trying to understand if I
need to start using that approach.  My test was done using sqlite so maybe
other SQL variants is where try/catch is needed or perhaps it's due to your
use of SQLYoga.

Pete

On Thu, Mar 22, 2012 at 4:10 PM, Bob Sneidar b...@twft.com wrote:

 When you are in a standalone, a runtime error that would halt execution
 might be fatal. Try/Catch allows you to handle the error gracefully without
 presenting the user with an ugly dialog and a QTD afterwards. You can
 politely inform the user that something has gone wrong and you have to exit
 the application, after tidying things up a bit if necessary.

 Databases can just go away sometimes, like the IT guy deciding it's time
 to update the servers and restart them while the user is working late on an
 important project. Setting a repeat loop around a try/catch construct
 allows you to attempt a reconnect a certain number of times, or present the
 user with a Retry/Cancel dialog, allowing you to clean up and exit
 gracefully if necessary.

 As a case in point, I was having a problem with a low level broadcast
 storm which was causing the uplinks on our switches to reset (they are
 designed to do that). Anyone who uses Microsoft SQL knows this can be
 fatal, depending on how the software is written. Our accounting software
 was not very well written, and as a result, the end user was subject to a
 never ending stream of error dialogs allowing a cancel, retry or abort!
 None of them exited gracefully. ICK!! Had the developer accounted for the
 possibility that the user could be disconnected from the database, and
 provided a graceful exit, my reputation would not now be so tarnished,
 because they all blamed me of course. :-) To the accounting girl's credit
 however, they did make me brownies when I found the source of the broadcast
 storm and fixed it.

 Bob


 On Mar 22, 2012, at 3:31 PM, Pete wrote:

  Sorry to keep this thread going but I'm trying to figure out if I should
 be
  using try/catch more, particularly for database calls.
 
  As far as I know, you can tell if any of the standard rev db calls fail
 by
  checking their returned value or the result.  Are there circumstances
 where
  that's not the case or does SQLYoga silent about errors?
 
  I have experienced silent datagrid problems that were only revealed by
  enclosing the datagrid access statements in try/catch.
 
  Pete


 ___
 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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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


Tools for creating a help file

2012-03-23 Thread Pete
I'm trying to decide how to supply the help text for an application and
wondering what tools people are using to creat help files.

I'm finding that it is much easier to use a word processor to write the
help text and graphics than trying to do it within the confines of LC text
fields.  I can't leave the help text as a separate file because that would
require the user to have the same wp program I used to create it.  I can
create a pdf version of it to get round that but I'm wondering if there is
some way of importing the help text into LC, retaining all the formatting
and graphics.  Is it possible to open a pdf file and display within an LC
application without starting a separate pdf viewer program?

Thanks for any guidance,


-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Tools for creating a help file

2012-03-23 Thread Pete
Thanks Richard, that sounds like a possibility.

I'm using iPages to create the help text but I think it is capable of
saving a file in Word format although not sure how good a job it does.  I
guess I'll give it a whirl with WordLib (hopefully there's a trial
available) and see what happens.

I'm not against typing into LC fields, just finding that there's less work
involved in using a word processor that is built to deal with formatting,
spell checking and inserting graphics that doing all that in native LC.

Pete

On Fri, Mar 23, 2012 at 11:30 AM, Richard Gaskin ambassa...@fourthworld.com
 wrote:

 Pete wrote:

 I'm trying to decide how to supply the help text for an application and
 wondering what tools people are using to creat help files.

 I'm finding that it is much easier to use a word processor to write the
 help text and graphics than trying to do it within the confines of LC text
 fields.  I can't leave the help text as a separate file because that would
 require the user to have the same wp program I used to create it.  I can
 create a pdf version of it to get round that but I'm wondering if there is
 some way of importing the help text into LC, retaining all the formatting
 and graphics.  Is it possible to open a pdf file and display within an LC
 application without starting a separate pdf viewer program?


 I enjoy typing in LiveCode fields myself, but I'm funny that way. :)

 If you like using Word you'll love Curry Kenworthy's WordLib for importing
 content from Word and OpenOffice/Libre Office into LiveCode:
 http://www.runrev.com/store/**product/word-lib-1-3-0/http://www.runrev.com/store/product/word-lib-1-3-0/
 

 He's done an amazingly thorough job of recreating every element in doc,
 docx, and odt files that can be represented in LiveCode fields.  And he's
 hard at work on a new version that takes full advantage of LC 5.5's new
 field object capabilities.

 For professional devs he also offers an option to acquire limited rights
 to the source for an additional fee.   This is a must-have for myself and
 my clients, and pretty much every other pro dev who need to consider code
 base longevity, and his source fee was more than reasonable.

 Curry's support has been exemplary, and his willingness to work with
 suggestions for new features and enhancements is an inspiration for all of
 us tools vendors.

 --
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  LiveCode Journal blog: 
 http://LiveCodejournal.com/**blog.irvhttp://LiveCodejournal.com/blog.irv


 __**_
 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-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Tools for creating a help file

2012-03-23 Thread Pete
Thanks Colin and Phil for the ScreenSteps recommendation.  I'll definitely
take a look.
Pete

On Fri, Mar 23, 2012 at 1:47 PM, Colin Holgate co...@verizon.net wrote:

 You should look at ScreenSteps:

 http://www.bluemangolearning.com/screensteps/

 In addition to being a very good way to prepare documentation, the tool
 was created with LiveCode.

 It can export to Word, PDF, and HTML. With PDF you can use a LiveCode
 player object and set the filename of the player to the path to the PDF,
 and then set the currenttime of the player to go forward and backward
 through the pages.



 ___
 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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Tools for creating a help file

2012-03-23 Thread Pete
Folks,
Still playing around with different formats for this.

One possible format is the one used by the Datagrid reference manual.  It's
a pdf file including a navigation pane on the left with
expandable/collapsible entries; clicking on an entry goes directly to the
associated page.  Pretty sure this is a built in feature of pdf files, but
wondering if there is a way to create that type of format from a standard
word processing program as opposed to purchasing Acrobat.

Thanks,
Pete

On Fri, Mar 23, 2012 at 2:11 PM, Pete p...@mollysrevenge.com wrote:

 Thanks Colin and Phil for the ScreenSteps recommendation.  I'll definitely
 take a look.
 Pete


 On Fri, Mar 23, 2012 at 1:47 PM, Colin Holgate co...@verizon.net wrote:

 You should look at ScreenSteps:

 http://www.bluemangolearning.com/screensteps/

 In addition to being a very good way to prepare documentation, the tool
 was created with LiveCode.

 It can export to Word, PDF, and HTML. With PDF you can use a LiveCode
 player object and set the filename of the player to the path to the PDF,
 and then set the currenttime of the player to go forward and backward
 through the pages.



 ___
 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




 --
 Pete
 Molly's Revenge http://www.mollysrevenge.com





-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Tools for creating a help file

2012-03-23 Thread Pete
Hi Klaus,
Haven't used revBrowser before but I got the example from runrev's web site
at
http://lessons.runrev.com/s/lessons/m/4071/l/15963-how-do-i-display-a-pdf-in-rev

However, nothing displays in the browser image no matter what pdf file I
select.  Also tried it with a straightforward http:// url and nothing
displayed.

Any tips on how to get this to work?

Pete

On Fri, Mar 23, 2012 at 11:24 AM, Klaus on-rev kl...@major.on-rev.comwrote:

 Hi Pete,

 Am 23.03.2012 um 19:17 schrieb Pete:

  I'm trying to decide how to supply the help text for an application and
  wondering what tools people are using to creat help files.
 
  I'm finding that it is much easier to use a word processor to write the
  help text and graphics than trying to do it within the confines of LC
 text
  fields.  I can't leave the help text as a separate file because that
 would
  require the user to have the same wp program I used to create it.  I can
  create a pdf version of it to get round that but I'm wondering if there
 is
  some way of importing the help text into LC, retaining all the formatting
  and graphics.  Is it possible to open a pdf file and display within an LC
  application without starting a separate pdf viewer program?

 you could use a Browser Object to display the PDFs!
 Works on the Mac and will surely do on Windows if Acrobat Reader is
 installed.

  Thanks for any guidance,
  --
  Pete

 Best

 Klaus

 --
 Klaus Major
 http://www.major-k.de
 kl...@major.on-rev.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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: revCopyFile

2012-03-22 Thread Pete
Hi Geoff,
Thanks for the speed test info.  I'm not very familiar with shell commands
so maybe you could let me know the command to use? What I need to do is
copy a file to a different folder with a different file name.

The lack of a progress bar might be a problem, but if the speed differences
are as much as you found, there may not be a need for a progress bar at all.

Also, I assume the shell commands would be different on Windows and Mac.
 That's an inconvenience because it means extra coding, but not a show
stopper.

Thanks,
Pete

On Wed, Mar 21, 2012 at 11:25 PM, Geoff Canyon gcan...@gmail.com wrote:

 The advantages derive from the fact that LiveCode isn't doing the actual
 copying with revCopyFile -- the Finder is. For completeness, the same
 advantage applies to using a shell command. You don't get a progress dialog
 though.

 Okay, I just did a quick one-off test with interface sounds off. For thirty
 files that were each about 70kb, using a shell command was about 3x faster
 than using revCopyFile. That's without taking advantage of the ability to
 move and rename in one step with a shell command. If that's what you're
 doing, the advantage would be even greater.

 On Wed, Mar 21, 2012 at 3:04 PM, Pete p...@mollysrevenge.com wrote:

  Thanks all for the input.  Sounds like Stephen's approach is the only way
  to get rid of it.  Seems like that setting will apply to other sounds as
  well, but I'm OK with that.
 
  As far as using AppleScript, I'm using revCopyFile because the dictionary
  claims there are certain advantages to using it over put URL or any
  other method, amongst which is that it does not require reading the file
  into memory, and since some of these files could be pretty large, that's
  significant.  On a Mac, it also displays a progress bar which I don;t
 think
  would be possible if I used put URL.
 
  Pete
 
  On Wed, Mar 21, 2012 at 11:35 AM, Geoff Canyon gcan...@gmail.com
 wrote:
 
   I went straight to the shell command, so I don't know for sure, but
 this
   sounds reasonable. There's also the overhead of spinning up AppleScript
  in
   the first place. If Apple is doing that badly, that might also cause
   problems I suppose.
  
   On Wed, Mar 21, 2012 at 1:24 PM, stephen barncard 
   stephenrevoluti...@barncard.com wrote:
  
That was probably a big reason why multiple file transfers would take
   more
time - loading and unloading the sound - and perhaps the reason why
 it
failed after memory was exceeded.
   
   ___
   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
  
  
 
 
  --
  Pete
  Molly's Revenge http://www.mollysrevenge.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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Need an example of how to use try and catch

2012-03-22 Thread Pete
You're getting an error because the catch part of try takes only 1
parameter - the variable that holds the error - not two as in the script.

Also, as noted by Peter, the try statement doesn't help you with the
specific example you used since getting a non-existant custom property
doesn't cause an error.  I've sometimes wished there was a preference
similar to the Strict Compilation Mode to deal with that.

Pete

On Thu, Mar 22, 2012 at 9:22 AM, Jim Hurley jhurley0...@sbcglobal.netwrote:

 Bob,

 Yes that would be fine, except that I get a compilation error at the line:

  catch theError, theNum

 RR says:  (try: not a command), char 7

 Jim


  Bob Sneidar wrote:

  try
put foo into myVar
put the value of myVarr
  catch theError, theNum
-- breakpoint
answer theNum  cr  line1 of theError as sheet
exit to top
  end try
 
  Is that what you mean?
 
  Bob
 


 ___
 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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Need an example of how to use try and catch

2012-03-22 Thread Pete
Interesting, never thought of that.  Is there an advantage to doing that
over just issuing the database call and checking for an error right after?

I've mostly thought of try/catch for as a debugging tool.  I also use it
any place where I put together a command in a variable and execute the
command with a do statement.

Pete

On Thu, Mar 22, 2012 at 11:30 AM, Bob Sneidar b...@twft.com wrote:

 I use it to determine if there has been an error executing a sequel query
 for example. All my database calls go inside a try catch statement. If you
 put it into a repeat loop, you can test to see if perhaps you have been
 disconnected, or if a runtime error occurred due to a bad query, and then
 act accordingly, either try to reconnect if disconnected, or bail out
 gracefully if a runtime error has occurred.

 Bob


 On Mar 22, 2012, at 10:33 AM, Michael Doub wrote:

  Does anyone have any guidelines as to when you should use the try and
 catch structure?   I don't really know when or when not to use it.
 
  -= Mike
 
 
 
  On Mar 22, 2012, at 1:21 PM, Jim Hurley wrote:
 
  Thanks Peter.
 
  The problem now is what do these bloody error numbers translate into.
  Is the a list somewhere?
 
  When I try:
 
  on mouseUP
   try
  put the cantdelete of me into temp
  catch tErr
  --- if tErr is ??
  end try
  end mouseUP
 
  I get an error of 348,0,0
 
  Jim
 
 
 
 
  Peter Brigham wrote:
 
  The syntax for the try construction is
 
  try
   command here
  catch tError
   other commands here
  end try
 
  and the error number is put into the variable tError. So the other
 commands could be, eg,
 
   if tError = 314 then
  answer range error in loading array
   else if ...
  etc.
   end if
 
  -- Peter
 
  Peter M. Brigham
 
  pmbrig at gmail.com
  http://home.comcast.net/~pmbrig
 
 
  ___
  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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: revCopyFile

2012-03-22 Thread Pete
Hi Maarten,
That's a nice solution.  Fast and doing it in chunks allows me to show a
progress bar.  I think I'll settle on that method.  Is there a way to get
the size of a file in LC?  With that, I could decide if it's even worth
displaying a progress bar.

Pete

On Thu, Mar 22, 2012 at 4:11 PM, Maarten Koopmans 
maarten.koopm...@gmail.com wrote:

 I scripted this using the read as binary etc. using 16KB buffers some time
 ago in pure LC. Much faster, and cross-platform.  Idon'thave the code here
 at hand, but it is really straightforward:

 Open the source file for read binary
 Open the destination file for write binary
 Read 16KB or whatever is left if it's less from the source into a buffer
 Append the buffer to the destination
 Loop until done
 Close the files

 Faster then revCopyFile (in fact, why doesn't itdo it this way) and no
 hassle with shells or external processes where you need to check if they
 actually did what you asked.

 HTH, Maarten

 On Thursday, March 22, 2012, Pete p...@mollysrevenge.com wrote:
  Hi Geoff,
  Thanks for the speed test info.  I'm not very familiar with shell
 commands
  so maybe you could let me know the command to use? What I need to do is
  copy a file to a different folder with a different file name.
 
  The lack of a progress bar might be a problem, but if the speed
 differences
  are as much as you found, there may not be a need for a progress bar at
 all.
 
  Also, I assume the shell commands would be different on Windows and Mac.
   That's an inconvenience because it means extra coding, but not a show
  stopper.
 
  Thanks,
  Pete
 
  On Wed, Mar 21, 2012 at 11:25 PM, Geoff Canyon gcan...@gmail.com
 wrote:
 
  The advantages derive from the fact that LiveCode isn't doing the actual
  copying with revCopyFile -- the Finder is. For completeness, the same
  advantage applies to using a shell command. You don't get a progress
 dialog
  though.
 
  Okay, I just did a quick one-off test with interface sounds off. For
 thirty
  files that were each about 70kb, using a shell command was about 3x
 faster
  than using revCopyFile. That's without taking advantage of the ability
 to
  move and rename in one step with a shell command. If that's what you're
  doing, the advantage would be even greater.
 
  On Wed, Mar 21, 2012 at 3:04 PM, Pete p...@mollysrevenge.com wrote:
 
   Thanks all for the input.  Sounds like Stephen's approach is the only
 way
   to get rid of it.  Seems like that setting will apply to other sounds
 as
   well, but I'm OK with that.
  
   As far as using AppleScript, I'm using revCopyFile because the
 dictionary
   claims there are certain advantages to using it over put URL or
 any
   other method, amongst which is that it does not require reading the
 file
   into memory, and since some of these files could be pretty large,
 that's
   significant.  On a Mac, it also displays a progress bar which I don;t
  think
   would be possible if I used put URL.
  
   Pete
  
   On Wed, Mar 21, 2012 at 11:35 AM, Geoff Canyon gcan...@gmail.com
  wrote:
  
I went straight to the shell command, so I don't know for sure, but
  this
sounds reasonable. There's also the overhead of spinning up
 AppleScript
   in
the first place. If Apple is doing that badly, that might also cause
problems I suppose.
   
On Wed, Mar 21, 2012 at 1:24 PM, stephen barncard 
stephenrevoluti...@barncard.com wrote:
   
 That was probably a big reason why multiple file transfers would
 take
more
 time - loading and unloading the sound - and perhaps the reason
 why
  it
 failed after memory was exceeded.

___
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
   
   
  
  
   --
   Pete
   Molly's Revenge http://www.mollysrevenge.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
 
 
 
 
  --
  Pete
  Molly's Revenge http://www.mollysrevenge.com
  ___
  use-liv
 ___
 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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.com

Re: revCopyFile

2012-03-22 Thread Pete
Hi Jacque,
Yes, I saw that in the dictionary.  I don't think there's any metadata in
the files I will be copying (straight .txt files) but I'll have to check
that before going down this path.

I found the files function in the dictionary and it includes the file size
in one of it's formats but it lists all the files in the default folder,
not an individual file.  I guess it won;t take too long to get that and use
filter to narrow it down to the source file for the copy.

Pete

On Thu, Mar 22, 2012 at 6:55 PM, J. Landman Gay jac...@hyperactivesw.comwrote:

 On 3/22/12 7:25 PM, Pete wrote:

 Hi Maarten,
 That's a nice solution.  Fast and doing it in chunks allows me to show a
 progress bar.  I think I'll settle on that method.  Is there a way to get
 the size of a file in LC?  With that, I could decide if it's even worth
 displaying a progress bar.


 The reason RR chose AppleScript is because it retains the metadata in a
 file, which a straight binary copy doesn't do. Apple is veering away from
 metadata though, so it may not be as important as it used to be.

 --
 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-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: accessing colorized script

2012-03-21 Thread Pete
The new 5.5 release has lots of stuff related to field formatting.  Maybe
some of that might help, especially if RunRev used the new features to
colorise scripts.
Pete

On Wed, Mar 21, 2012 at 9:22 AM, Mark Schonewille 
m.schonewi...@economy-x-talk.com wrote:

 Hi Peter,

 Perhaps you could use MetaCard's script colorising routines.
 http://qery.us/1w9

 --
 Best regards,

 Mark Schonewille

 Economy-x-Talk Consulting and Software Engineering
 Homepage: http://economy-x-talk.com
 Twitter: http://twitter.com/xtalkprogrammer
 KvK: 50277553

 Download the Installer Maker Plugin 1.7 for LiveCode here
 http://qery.us/za

 On 21 mrt 2012, at 13:44, Peter M. Brigham, MD wrote:
 
  Oh, too bad. Well, at least it's simple to color the comments green in
 my display field, that facilitates looking through the scripts to some
 extent.
 
  -- Peter
 
  Peter M. Brigham
  pmb...@gmail.com
  http://home.comcast.net/~pmbrig
 


 ___
 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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: MySQL standalone issues

2012-03-21 Thread Pete
I think I vaguely remember running into that once, worth a try.
Pete

On Tue, Mar 20, 2012 at 8:13 PM, Ken Ray k...@sonsothunder.com wrote:


 On Mar 20, 2012, at 6:32 PM, Sieg Lindstrom wrote:

  Next I copied the button containing the working script to my existing
 app and saved that as a standalone. This time it didn't open the database.
 Instead it returned the answer error Unable to connect to the database.
 revdberr, invalid database type.

 Sieg, I had that happen recently - it had to do with the proper
 spelling/capitalization of the first parameter. Try using mysql (all
 lower case)… it *shouldn't* make a difference, but it did for me.

 Ken Ray
 Sons of Thunder Software, Inc.
 Email: k...@sonsothunder.com
 Web Site: http://www.sonsothunder.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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Highest Image File ID

2012-03-21 Thread Pete
Maybe get the ID of the last image of stack xyz?  Not sure if that would
work or not, I seem to remember having problems with using the last
keyword in the past but I think that was specifically to do with groups.
Pete

On Wed, Mar 21, 2012 at 9:49 AM, J. Landman Gay jac...@hyperactivesw.comwrote:

 On 3/21/12 11:25 AM, Bob Sneidar wrote:

 Can anyone think of a quick way (other than a repeat loop) to
 determine the highest ID of all the image files in a stack?


 The ID of the stack is the either the last-used ID or the next available
 one, I forget which. It doesn't discriminate between the kinds of controls
 though.

 --
 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-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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


revCopyFile

2012-03-21 Thread Pete
Anyone know of a way to get rid of that annoying sound when revCopyFile has
finished copying a file?  This is on a Mac, don't know if it happens in
Windows.


-- 
Pete
Molly's Revenge http://www.mollysrevenge.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


Speaking of SmartAss..

2012-03-21 Thread Pete
I just came across this quote.  It was new to me, maybe not to others.

Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning.  - Rich Cook

-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Setting script in object not working...

2012-03-21 Thread Pete
Is this another manifestation of not being able to save anything in a stack
in a standalone program?
Pete

On Wed, Mar 21, 2012 at 3:01 PM, Glen Bojsza gboj...@gmail.com wrote:

 Hello,

 I have a stack where I generate a series of images.

 I then set the script of each image to a script that is stored in a custom
 property.

 In the ide the script works when you click an image and when you inspect
 the image's script in the script editor it is there.

 But when I take the stack and make it into an application it looks as if
 the images contain no script because when an image is clicked nothing
 happens.

 I have tried making the script very simple ie

 on mouseUp
 answer Success with OK
 end mouseUp

 Again this works in the ide but not in the final application?

 I have tried several other methods such as adding a button that I can
 manually test in the application to copy a script to an image but this
 fails?

 Has anybody experienced this before or have any suggestions?

 thanks,

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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: MySQL joined select

2012-03-20 Thread Pete
Hi Marek,
I think you're confusing what you get back from the SELECT statement with
what you display to your users - they are two different things.  I'm going
to assume that you need all the columns you name in your SELECT statement
for some processing reasons but that doesn't mean you have to show them all
to your users.  Once you get the data back from the SELECT, it's up to you
which columns you put in a filed, datagrid, or any other Livecode control.

Maybe  you're thinking that you have to SELECT the column because you refer
to it elsewhere in the SELECT statement, but that's not the case.  You can
refer to any columns form the selected tables anywhere in your SELECT even
if they are not explicitly selected.

Pete

On Tue, Mar 20, 2012 at 2:20 AM, Marek Reichenbach 
reichenbach.ma...@gmail.com wrote:

 Thanks for the replies.
 I've made it workin, but I wanna add something else:

 So the question in SQL is:

 Maybe there is a way to hide columns it the result, like:
 SELECT car_nr, model, travel_days FROM table1,table2 WHERE number  414
 AND (car_nr  truck_nr) from transport;
 and show only result of the colums travel_days, but ONLY on*
 **separate* columns
 and  HIDE OTHER COLUMNS.

 I've posted here more detailed:
 http://forums.runrev.com/viewtopic.php?f=12t=11426p=53702#p53702
 Help please...

 On 20 March 2012 01:09, Pete p...@mollysrevenge.com wrote:

  Seems like either Peter or Mark's solution would be a lot better than
  trying to do it with an SQL SELECT, but I'm also not sure of what Marek
 is
  trying to achieve - seems strange to want to replace all the numbers with
  plus signs.  Maybe he wants a floating plus sign at the start of the
  number, dunno.
  Pete
 
  On Mon, Mar 19, 2012 at 3:50 PM, Peter M. Brigham, MD pmb...@gmail.com
  wrote:
 
   repeat with n = 1 to length(tInput)
 if char n of tInput is a number
 then put + into char n of tInput
 else put - into char n of tInput
   end repeat
  
   Or am I missing something?
  
   -- Peter
  
   Peter M. Brigham
   pmb...@gmail.com
   http://home.comcast.net/~pmbrig
  
   On Mar 19, 2012, at 5:15 PM, Pete wrote:
  
I wonder if there might be a less ugly way to do this in LC instead
 of
SQL...
Pete
   
On Mon, Mar 19, 2012 at 2:04 PM, Marek reichenbach.ma...@gmail.com
   wrote:
   
Thanks a lot! That helped me a lot man.
   
Marek Reichenbach
   
On 2012 Kov. 19, at 19:29, Ken Ray k...@sonsothunder.com wrote:
   
   
On Mar 19, 2012, at 3:44 AM, Marek Reichenbach wrote:
when i get for example: 1234567 - i should get result +++,
   123-56-
I
would get +++-++- .
   
The only way I know is kind of ugly, requiring seven nested REPLACE
statements:
   
SELECT
   
  
 
 REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(123-56-,1,+),2,+),3,+),4,+),5,+),6,+),7,+)
   
This would return:
   
+++-++-
   
   
Ken Ray
Sons of Thunder Software, Inc.
Email: k...@sonsothunder.com
Web Site: http://www.sonsothunder.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
   
   
   
   
--
Pete
Molly's Revenge http://www.mollysrevenge.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
  
  
 
 
  --
  Pete
  Molly's Revenge http://www.mollysrevenge.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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.com
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe

Re: MySQL joined select

2012-03-20 Thread Pete
Hi Ken,
Good catch on the multiple FROM clauses, not sure what that's all about.
 Probably just needs to qualify the columns in the condition with the table
name.

The SELECT statement has a lot of problems in general.  There's no JOIN
statement to link table1 and table2 together, for example.  That might work
as long as the column(s) to be used to join the tables together have the
same name in both tables but in general, it's much better to explicitly
define the linkage with a JOIN statement - for clarity reasons if no other.

Just one comment on the need to qualify columns with table names.  I
definitely agree it's good practice to do that for clarity but as long as a
column name is unique among all tables, SQL will figure out which table an
unqualified column name belongs to.

Pete

On Tue, Mar 20, 2012 at 8:46 AM, Ken Ray k...@sonsothunder.com wrote:


 On Mar 20, 2012, at 4:20 AM, Marek Reichenbach wrote:

  Thanks for the replies.
  I've made it workin, but I wanna add something else:
 
  So the question in SQL is:
 
  Maybe there is a way to hide columns it the result, like:
  SELECT car_nr, model, travel_days FROM table1,table2 WHERE number  414
  AND (car_nr  truck_nr) from transport;
  and show only result of the colums travel_days, but ONLY on*
  **separate* columns
  and  HIDE OTHER COLUMNS.

 You only include the columns you want back in the SELECT part of the query:

 SELECT travel_days FROM …

 Also, although I know you provided a dummy query, be aware that there are
 two inherent problems with the one you provided:

 1) If you have multiple tables in the FROM clause, you need to identify
 the table attached to the column in the SELECT clause (although some SQL
 engines might just assume you meant the first table, it's good form to
 identify the table), either by full name:

  SELECT table1.travel_days FROM table1,table2 WHERE…

 or by alias:

  SELECT t1.travel_days FROM table1 t1,table2 t2 WHERE…

 2) I'm not sure what from transport means since you already have a FROM
 clause in your example query

 The bottom line is that you don't have to include columns in the SELECT
 portion of the query that you don't want back, so long as you identify them
 properly and they actually exist in the table you're referencing.

 Just be aware that LiveCode's text parsing is second to none, so there are
 usually times where it may actually be easier and more efficient to let SQL
 handle getting the data, but let LiveCode handle parsing the data after it
 arrives. As I mentioned in an earlier post, you *can* use SQL to change
 your numbers to + symbols, but it's ugly - Mark's method to post-process
 it in LC with a single statement if far better (IMHO).

 Ken Ray
 Sons of Thunder Software, Inc.
 Email: k...@sonsothunder.com
 Web Site: http://www.sonsothunder.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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Failing to understand the oddities of the line chunk

2012-03-20 Thread Pete
I think it's unlikely anything about this behavior will change no matter
what bug report is filed.  There's the backward compatibility issue you
raised (although I personally think that is usually a cop out) but you
could also argue that what happens is by design.

I'm thinking your hope for a more right answer is probably in vain at
this point!

Pete

On Tue, Mar 20, 2012 at 10:53 AM, Alex Tweedly a...@tweedly.net wrote:

 On 20/03/2012 17:17, Pete wrote:

 So I wouldn't vote for a bug report that asked for lines to behave like
 characters in this respect.  I would vote for a bug report that asked for
 this situation to be caught as an error (although I think it would have to
 be a run time error not compile time since the start and end points could
 be variables or expressions).

 Lost in this discussion is the reason why someone wanted to do this in the
 first place.  Alex, I think it was you that started this whole thread -
 did
 you have a specific reason for wanting to specify a line range with an end
 point before the start or was it just an observation?

  No, no specific reason to want to do it - it kind of happened by
 accident :-)
 And it wasn't so much an observation as a question -
   can someone give me a rationale for this behaviour so I can deal with it
 better ?

 What I *wanted* to do was replace line 'x' of someContainer (and
 everything after it) by my new data,
 so I did the (temptingly logical - but WRONG) thing of

 put newData into line x to -1 of someContainer

 NB that is simply wrong, because line -1 means the last line that is
 there - not to the end after what I specified :-)

 as it happened, the container had x-1 lines in it at the time (including a
 trailing line delimiter, just to confuse things), so that became equivalent
 to   put newData into line x to x-1 of someContainer

 I knew that what was happening seemed wrong - but couldn't figure out how
 or why. Jacque's explanation showed me what I should do - but still left
 that niggling feeling of something being a bit odd.

 I can get what I wanted in a couple of safe ways
 a.delete line x to -1 of t!! inverted range - but AFAIK it does
 the right thing with it in all cases
   put newData into line 2 of t

 b.put newData into line 2 to kInfinity of t   -- where kInfinity is
 some arbitrarily large constant

 I'm not sure what I would vote for now, hence I haven't yet put in a bug
 report. Personally, I'd probably like a run-time error, but I suspect that
 the need for backwards compatability would prevent that being feasible.

 -- Alex, still hoping for someone to come up with a more right answer :-)



 __**_
 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-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: New Xcode 4.3.1

2012-03-20 Thread Pete
I'm happy to see  in the newsletter announcement of LC 5.5 I just received
that it retains Save As as a file menu option.  Maybe Apple will ban LC
from use on desktops because of that, who knows.
Pete

On Mon, Mar 19, 2012 at 3:57 PM, Tim Jones tolis...@me.com wrote:

 On Mar 19, 2012, at 3:43 PM, J. Landman Gay wrote:

  On 3/19/12 3:25 PM, Ken Ray wrote:
 
  This is actually a lot uglier when you try to Save as a file on a
 locked volume to another place - you get multiple steps and tirades of
 dialogs informing you why you can't save the original file (which you
 weren't trying to do in the first place)…
 
  Is Export supposed to do that now? Mind, I'm still going on
 theoreticals until I actually install Lion.

 ... but what you're supposed to do is according to my Apple Store Genius
 is Duplicate the opened file, close the original, change the new Copy
 and then Save.  When you save the duplicate, you'll be prompted with the
 normal Save As... dialogs.

 And I agree, this is two steps back.

 Tim


 ___
 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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Failing to understand the oddities of the line chunk

2012-03-19 Thread Pete
I can't help but feel that LC should flag a run time error in this
situation. it's not logical for a range to have an end point less than its
start point.  Any other action requires an arbitrary decision on what the
user wants to happen and, as evident from this thread, different users
expect different things.
Pete

On Mon, Mar 19, 2012 at 10:29 AM, J. Landman Gay
jac...@hyperactivesw.comwrote:

 On 3/19/12 11:47 AM, Bob Sneidar wrote:

 If it resolves to an insertion point, then it's doing exactly what
 you would expect. It's putting something into that insertion point.


 That was my first reaction too, but on closer inspection it's putting the
 text into the wrong line.


 --
 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-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: OS X application ID

2012-03-19 Thread Pete
But be careful - those properties aren't carried over to the standalone so
if you need access to them in the standalone as well as the IDE, you'll
need to grab them and put them into your own custom properties, possibly in
the savingStandalone handler.
Pete

On Mon, Mar 19, 2012 at 10:39 AM, J. Landman Gay
jac...@hyperactivesw.comwrote:

 On 3/19/12 8:30 AM, Dar Scott wrote:

 I am pondering about how a handler that is part of the development of
 an application that is being created and tested in the IDE might know
 about the eventual OS X application ID of that app.

 Where is the OS X application ID saved by the standalone application
 settings window?

 I assume this is in a property of the stack.

 And if one happens to know these... What is the value when no
 settings have been set up? What is the value in standalones and in
 IDE stacks?


 All the standalone settings are stored in a custom property set of the
 stack called cRevStandaloneSettings. Turn on LiveCode UI Elements in
 Lists under the View menu and you'll be able to see that property set in
 the stack inspector.

 --
 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-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Text formatting for a slider

2012-03-19 Thread Pete
Yeah, but that displays all possible properties of any object.  The
properties property of an object gets you an array of properties for a
specific object.  Still a long list mind you, and not a complete list
either according to the dictionary.

I think you're probably right that it would make the inspector windows very
unwieldy to include all properties.  The problem is that by leaving some of
them out, arbitrarily, it gives the impression that they aren't available,
especially to new users.  I remember when I first started using LC and
wanted to set the behavior of an option menu button - there's no inspector
window behavior field so I just assumed it wasn't possible for some reason
and went down a different, much more complicated path.

Seems like it would have been trivial to include one more option in the
inspector option menu for All Properties or something similar.  I ended
up writing my own plugin to show all the properties of a selected object
and allow me to change any of them.

Pete

On Mon, Mar 19, 2012 at 11:09 AM, Richmond richmondmathew...@gmail.comwrote:

 On 03/19/2012 06:05 PM, Jim Hurley wrote:

 I have a slider in which the showValue is set to true.

 Unfortunately, the card background is gray and the black slider value is
 very difficult to read.

 The inspector for the slider does not display an option for the
 foreground color. Why not?

 Using 4W Properties (thank you RIchard) the foreground color is listed as
 an option (and can be changed there, or from the msg box.)

 Why this omission in the Inspector? (LC version 4 AND 5.)


 Almost all object have a vast number of options that one can fiddle around
 with; the Props Inspector only
 displays a subset of them; why? I don't know, but I can hazard a guess:

 a Props Inspector that displayed ALL the props of each object might be so
 unwieldy as to be virtually unusable.

 Just for fun . . .

 Set up a new stack with a scrollingListField field called PROPPS

 and try this in the MessageBox:

 put the propertyNames into fld PROPPS

 and blow your mind . . .   :)



 Jim
 __**_
 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-livecodehttp://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-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: MySQL joined select

2012-03-19 Thread Pete
I wonder if there might be a less ugly way to do this in LC instead of
SQL...
Pete

On Mon, Mar 19, 2012 at 2:04 PM, Marek reichenbach.ma...@gmail.com wrote:

 Thanks a lot! That helped me a lot man.

 Marek Reichenbach

 On 2012 Kov. 19, at 19:29, Ken Ray k...@sonsothunder.com wrote:

 
  On Mar 19, 2012, at 3:44 AM, Marek Reichenbach wrote:
  when i get for example: 1234567 - i should get result +++, 123-56-
  I
  would get +++-++- .
 
  The only way I know is kind of ugly, requiring seven nested REPLACE
 statements:
 
  SELECT
 REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(123-56-,1,+),2,+),3,+),4,+),5,+),6,+),7,+)
 
  This would return:
 
  +++-++-
 
 
  Ken Ray
  Sons of Thunder Software, Inc.
  Email: k...@sonsothunder.com
  Web Site: http://www.sonsothunder.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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: MySQL joined select

2012-03-19 Thread Pete
Seems like either Peter or Mark's solution would be a lot better than
trying to do it with an SQL SELECT, but I'm also not sure of what Marek is
trying to achieve - seems strange to want to replace all the numbers with
plus signs.  Maybe he wants a floating plus sign at the start of the
number, dunno.
Pete

On Mon, Mar 19, 2012 at 3:50 PM, Peter M. Brigham, MD pmb...@gmail.comwrote:

 repeat with n = 1 to length(tInput)
   if char n of tInput is a number
   then put + into char n of tInput
   else put - into char n of tInput
 end repeat

 Or am I missing something?

 -- Peter

 Peter M. Brigham
 pmb...@gmail.com
 http://home.comcast.net/~pmbrig

 On Mar 19, 2012, at 5:15 PM, Pete wrote:

  I wonder if there might be a less ugly way to do this in LC instead of
  SQL...
  Pete
 
  On Mon, Mar 19, 2012 at 2:04 PM, Marek reichenbach.ma...@gmail.com
 wrote:
 
  Thanks a lot! That helped me a lot man.
 
  Marek Reichenbach
 
  On 2012 Kov. 19, at 19:29, Ken Ray k...@sonsothunder.com wrote:
 
 
  On Mar 19, 2012, at 3:44 AM, Marek Reichenbach wrote:
  when i get for example: 1234567 - i should get result +++,
 123-56-
  I
  would get +++-++- .
 
  The only way I know is kind of ugly, requiring seven nested REPLACE
  statements:
 
  SELECT
 
 REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(123-56-,1,+),2,+),3,+),4,+),5,+),6,+),7,+)
 
  This would return:
 
  +++-++-
 
 
  Ken Ray
  Sons of Thunder Software, Inc.
  Email: k...@sonsothunder.com
  Web Site: http://www.sonsothunder.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
 
 
 
 
  --
  Pete
  Molly's Revenge http://www.mollysrevenge.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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Text formatting for a slider

2012-03-19 Thread Pete
Thanks, 4wProps no installed.
Pete

On Mon, Mar 19, 2012 at 2:57 PM, Jim Hurley jhurley0...@sbcglobal.netwrote:

 You might want to check out Richard's 4wProps (under the
 Development/Plugins menu). Easy access to all the properties.




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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:

2012-03-17 Thread Pete
SELECT A,B,C,TABLE2.D FROM TABLE1 LEFT JOIN TABLE2 ON TABLE2.C  TABLE1.B
On Mar 17, 2012 3:44 AM, Marek Reichenbach reichenbach.ma...@gmail.com
wrote:

 I'm trying to do in LiveCode with MySQL:
 how to use data from other table in the same query for filtering:

 SELECT A, B ,C, (SELECT D FROM TABLE2 WHERE C[from table2]  B[from
 table1]) FROM TABLE1; -- the stucture of query

 help please :/
 ___
 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: Sqlite and performances in LiveCode

2012-03-15 Thread Pete
Thanks Trevor, I found the problem.  I had a set dgText to empty in there,
forgetting that dgText doesn't exist in these circumstances.  Changed that
to se the dgNumberOfRecords to zero and all works fine now.
Pete

On Thu, Mar 15, 2012 at 4:55 AM, Trevor DeVore li...@mangomultimedia.comwrote:

 On Wed, Mar 14, 2012 at 9:35 PM, Pete p...@mollysrevenge.com wrote:

 
  I'm using the datagrid in question as a general purpose viewer of data
 from
  any table in an sqlite database.  The circumstances that cause the
 problem
  are if I have data from a table displayed, then I filter it in some way,
 so
  the number and format of the dg columns is the same but the rows contain
 a
  subset of the original data.  If I select a different table and therefore
  change the number and size of the dg columns, the correct data is
  displayed.
 

 You could try sending RefreshList to the data grid after updating the
 dgNumberOfRecords property. The data links displayed controls with lines in
 the data and if you are changing the underlying data then you will need to
 clear this cache. When setting the dgData or dgText this is done for you
 automatically.

 Regards,

 --
 Trevor DeVore
 Blue Mango Learning Systems
 www.clarify-it.com-www.screensteps.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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Detection of Keyboard Closing

2012-03-15 Thread Pete
As an Android user not developer, maybe this explains a somewhat annoying
aspect of some Andorid apps which, when you open them,  position the cursor
in a field which requires input before you can continue but does not bring
up the keyboard until you tap on the field.
Pete

On Thu, Mar 15, 2012 at 4:47 PM, Ken Ray k...@sonsothunder.com wrote:

 Yes, unfortunately showing/hiding the keyboard on Android is a hit-or-miss
 situation. We don't get any messages that the keyboard is deploying or not
 (like we get in iOS), and there's also no way AFAIK to know the height of
 the keyboard - which on Android is a big issue since you can swap keyboards
 easily and they can (and do) have different heights.




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: help pls

2012-03-14 Thread Pete
Hi Marek,
I have to admit I'm not fully understanding the requirement you described
on the forum but if you need to have a calculated value column based on
other columns, you can have the database do that by defining a triggers
that will happen every time an INSERT or UPDATE is done to the table in
question.  That way, the db does all the work for you and all you have to
do is a simple SELECT for the calculated column.

The syntax for creating a mySQL trigger is at
http://dev.mysql.com/doc/refman/5.5/en/create-trigger.html.  It would look
something like:

CREATE TRIGGER mytrigger AFTER INSERT ON thetable FOR EACH ROW
   UPDATE thetable SET PRICE to (NEW.Col1 * New.Col2) WHERE id=NEW.id

You would also have a second trigger defined as AFTER UPDATE.

With those triggers in place, just SELECT PRICE FROM theTable.

Hope that helps.

Pete

On Wed, Mar 14, 2012 at 9:30 AM, Marek Reichenbach 
reichenbach.ma...@gmail.com wrote:

 Hi , any suggestions on this post ?
 http://forums.runrev.com/viewtopic.php?f=12t=11360p=53356#p53356
 Help please
 ___
 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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Filter probelm

2012-03-14 Thread Pete
Duh!! Thank you Terry.
Pete

On Tue, Mar 13, 2012 at 9:35 PM, Terry Judd terry.j...@unimelb.edu.auwrote:


 On 14/03/2012, at 02:52 PM, Pete wrote:

 Unless I'm doing something wrong, filter tvar without tab doesn't work,
 that is the lines with a tab remain in tvar after the filter command.

 Suer would be nice to have that work when dynamically building the contents
 of a popup menu with indented lines in it...

 That would only work if the lines you wanted to filter out only contained
 a tab character. If they contain other stuff then you need one of the
 following...

 filter tvar without (*tab*) -- if the tab can be anywhere in the line
 filter tvar without (tab*) -- if the tab is at the start of the line, or
 filter tvar without (*tab) -- if the tab is at the end of the line

 Terry...

 --
 Pete
 Molly's Revenge http://www.mollysrevenge.com
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.commailto: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


 Dr Terry Judd
 Senior Lecturer in Medical Education
 Medical Eduction Unit
 Faculty of Medicine, Dentistry  Health Sciences
 The University of Melbourne



 ___
 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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Sqlite and performances in LiveCode

2012-03-14 Thread Pete
Hi Trevor,
Sorry to keep coming up with new quirks but I have another strange
situation regarding GetDataForLine.

Under some circumstances, the data that I supply from GetDataForLine ends
up in the datagrid starting at the 13th line instead of line 1 and the
first 12 lines have data in them from the previous cycle of GetDataForLine.
 One GetDataForLine cycle deals with 12 lines.

I'm using the datagrid in question as a general purpose viewer of data from
any table in an sqlite database.  The circumstances that cause the problem
are if I have data from a table displayed, then I filter it in some way, so
the number and format of the dg columns is the same but the rows contain a
subset of the original data.  If I select a different table and therefore
change the number and size of the dg columns, the correct data is displayed.

I set a breakpoint at the end of GetDataForLine and can see that I am
sending the correct data back to the datagrid in pDataA and pline starts at
1 and continues correctly up to 12.

If I refresh the datagrid either from its Inspector palette or by script,
the correct data turns up at the top of the datagrid although that invokes
another cycle of GetDataForLine.

Also, if I scroll down the datagrid past the 12th line then scroll back to
the top of the datagrid, the correct data turns up.  If I scroll less than
12 lines then back, some of the incorrect lines still appear and the the
rest of the lines are correct.  For example, if I scroll down 4 lines then
back, the first 4 lines have incorrect data and the rest are correct.

It seems like this must be something I'm doing wrong in my code but the
fact that I see the correct data being sent to the datagrid for the correct
line from GetDataForLine seems to argue against that.

Can you think of anything that might cause this behavior?

Thanks,
Pete



On Wed, Mar 14, 2012 at 7:05 AM, Trevor DeVore li...@mangomultimedia.comwrote:

 On Tue, Mar 13, 2012 at 5:46 PM, Pete p...@mollysrevenge.com wrote:

  OK, found the problem.  I had a set dgProps[sort by column] statement
  after setting the dgNUmberOfRecords.  Moved that to a place where
  dgNumberOfRecords is zero and only one cycle of GetDataForLine happens
 now.
 

 Great. Just remember that anytime a redrawing of the data grid has to occur
 (e.g. when changing sorting) GetDataForLine has to be called.


  Thanks for the help in tracking it down.  There are a lot of nuances
  to using dgNumberOfRecords!


 Yes there are. GetDataForLine is a (bolted on) means of providing an
 approach that separates the control from the data so the data doesn't
 reside within the view control itself. The API for the data grid was built
 around the standard LiveCode control behavior where the data resides within
 the control.

 There really is room for a data grid-like control that is really just a
 view and does nothing more than display data that is fed to it from a data
 source.

 Regards,

 --
 Trevor DeVore
 Blue Mango Learning Systems
 www.clarify-it.com-www.screensteps.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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Externals

2012-03-13 Thread Pete
Thank you Francois.
Pete

2012/3/12 François Chaplais francois.chapl...@mines-paristech.fr

 try
 http://www.runrev.com/newsletter/november/issue13/newsletter5.php
 and
 http://www.runrev.com/newsletter/november/issue14/newsletter3.php
 Best regards,
François
 Le 12 mars 2012 à 22:53, Pete a écrit :

  The Reference Manual includes a link to get the externals developer kit
 and
  also a couple of links to tutorials for writing externals. None of them
  work (error 404's).
 
  Can someone point me to where I can get the kit and review the tutorials?
 
  Thanks,
 
 
  --
  Pete
  Molly's Revenge http://www.mollysrevenge.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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Cyberduck versus Flow

2012-03-13 Thread Pete
I use Cyberduck and Taco HTML Edit together to get the benefits of the
combined editor/ftp.  Cyberduck detetcs the presence of Taco on your
computer and includes a contextual menu item to download a file into Taco,
then when you save it in Taco it automatically upload to the server again.
Pete

On Tue, Mar 13, 2012 at 1:40 PM, Scott Rossi sc...@tactilemedia.com wrote:

 Hi Francis:

 If you want cheap, Flow is on sale at the moment, so it is a great deal.
 I've used it a bit, though not with On_Rev, and it has worked fine.

 If you're looking specifically for a Mac solution -- there are other FTP
 tools that have been around for a while but cost more:
 Fetch - http://fetchsoftworks.com/fetch/
 Transmit - http://www.panic.com/transmit/

 One thing you might want to consider is a combination code-editor/FTP app
 like Panic's Coda or MacRabbit's Espresso.  You edit your code locally and
 then upload from the same interface.  Espresso has an option that can
 automatically upload your page every time you save locally, which is a
 great
 timesaver in some situations.  I have been using Espresso for a while now,
 and while it sometimes need to be refreshed with On-Rev, I love it.

 Regards,

 Scott Rossi
 Creative Director
 Tactile Media, UX Design




 Recently, Francis Nugent Dixon wrote:

  Hi from Beautiful Brittany,
 
  Maybe a little outside LiveCode discussions, but
  I want the best app to upload my files to my On-Rev
  server.
 
  I was happy with FileZilla, then I found Cyberduck which
  really makes me happy, now I see Flow which seems to
  beat all the FTP apps hands down (cheap at $4.99).
 
  Can I get some feedback from Cyberduck/Flow users to
  help me decide whether to go with the flow (pun intended !)
 
  -Francis
 
  Windows is, and always was, a succession of panes !
 
  ___
  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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Sqlite and performances in LiveCode

2012-03-13 Thread Pete
Hi Trevor,
OK, found the problem.  I had a set dgProps[sort by column] statement
after setting the dgNUmberOfRecords.  Moved that to a place where
dgNumberOfRecords is zero and only one cycle of GetDataForLine happens now.

Thanks for the help in tracking it down.  There are a lot of nuances to
using dgNumberOfRecords!

Pete

On Tue, Mar 13, 2012 at 10:49 AM, Trevor DeVore
li...@mangomultimedia.comwrote:

 If you have the dgNumberOfRecords set to a positive number then that makes
 sense as the data grid has to redraw.

 If the dgNumberOfRecords is set to 0 (and messages aren't locked when
 setting it) then I'm not sure why that is. Setting the dgNumberOfRecords to
 0 should do the trick as it empties out the internal sDataArray array.
 GetDataForLine is only sent if an entry in the sDataArray array is NULL.




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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


Filter probelm

2012-03-13 Thread Pete
Unless I'm doing something wrong, filter tvar without tab doesn't work,
that is the lines with a tab remain in tvar after the filter command.

Suer would be nice to have that work when dynamically building the contents
of a popup menu with indented lines in it...


-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Passing parameters by reference

2012-03-12 Thread Pete
Hi Dick,
Thanks again for this tip.  I ended up using it to solve my problem by
passing the whole array variable along with an optional second parameter
which is a list of comma-separated key values.  The function turns the key
values list into an array then uses it to access the data array.  If the
first parameter is a simple variable, then the second parameter isn't
present and the function can access it directly..

I'm wondering how you found about about this key values array feature?  I
can't find any mention of it in the dictionary or the reference manual and
it sure seems like something that should be known!

Thanks,
Pete

On Sat, Mar 10, 2012 at 12:06 AM, Dick Kriesel dick.krie...@mail.comwrote:

 LC has a way to get and set a node at any level of an array, without code
 that concatenates [ ] to specify the node.  In an array reference a single
 [ ] can enclose an array of keys,
 -- Dick


 script
 on mouseUp
   local tArray, tString
   put 4 into tArray[ 1 ][ 2 ][ 3 ]
   put getNodeViaListOfKeys( tArray, ( 1, 2, 3 )) after tString -- that is,
 get tArray[ 1 ][ 2 ][ 3 ]
   setNodeViaListOfKeys tArray, ( 5, 6, 7, 8 ), 9 -- that is, put 9 into
 tArray[ 5 ][ 6 ][ 7 ][ 8 ]
   put comma  getNodeViaListOfKeys( tArray, ( 5, 6, 7, 8 )) after tString
 -- 4,9
   breakpoint
 end mouseUp

 function getNodeViaListOfKeys @pArray, pList
   local tKeys
   put pList into tKeys
   split tKeys by comma and null
   return getNodeViaArrayOfKeys( pArray, tKeys )
 end getNodeViaListOfKeys

 function getNodeViaArrayOfKeys @pArray, @pKeysArray
   return pArray[ pKeysArray ]
 end getNodeViaArrayOfKeys

 command setNodeViaListOfKeys @rArray, pList, pValue
   local tKeys
   put pList into tKeys
   split tKeys by comma and null
   setNodeViaArrayOfKeys rArray, tKeys, pValue
 end setNodeViaListOfKeys

 command setNodeViaArrayOfKeys @rArray, @pKeysArray, @pValue
   put pValue into rArray[ pKeysArray ]
 end setNodeViaArrayOfKeys
 /script

 ___
 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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Sqlite and performances in LiveCode

2012-03-12 Thread Pete
Hi Trevor,
Thanks for making that change.

I've been following up a bit more on the behavior of GetDataForLine being
called in repeated cycles for the number of lines in the datagrid.  As a
reminder, the datagrid has 11 visible lines, GetDataForLine gets called
once for lines 1-12, then a second time for lines 1-2 again, and
occasionally a third time for lines 1-2.

I think I know the reason this is happening.

The first GetDataForLine cycle happens when I set the dgProps[Columns]
property of the datagrid.

The second cycle happens when I set the dgNumberOfRecords property.

There's a possible third cycle because sometimes I set the dgProps[Sort By
Column] property.

I have tried setting the dgNumberOfRecords to empty, zero, or NULL before
any of the above properties are changed but it doesn't seem to make any
difference.

Hoping you may have a recommendation as to how to avoid these multiple
cycles!

Thanks,
Pete



On Mon, Mar 12, 2012 at 7:01 AM, Trevor DeVore li...@mangomultimedia.comwrote:

 On Thu, Mar 8, 2012 at 2:47 PM, Jérôme Rosat jro...@mac.com wrote:

  Trevor, yes I'm going to try.
 
  But I think it would be a good idea if you could change your stack in the
  lesson Displaying Large Amounts of Data to demonstrate the performance
 of
  LiveCode.
 

 I've updated the stack to use the new technique. You can download it from
 the same url. I'm on a faster machine testing but here are the times I get:

 Opening movies cursor took 150 milliseconds

 ---

 Drawing list took 81 milliseconds

 ---


 --
 Trevor DeVore
 Blue Mango Learning Systems
 www.clarify-it.com-www.screensteps.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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Sqlite and performances in LiveCode

2012-03-12 Thread Pete
Correction of type!  Both instances of 1-2 should read 1-12, sorry.
Pete

On Mon, Mar 12, 2012 at 5:17 PM, Pete p...@mollysrevenge.com wrote:

 GetDataForLine gets called once for lines 1-12, then a second time for
 lines 1-2 again, and occasionally a third time for lines 1-2.




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Passing parameters by reference

2012-03-12 Thread Pete
I'm not sure whose post you're responding to Bob.  Where do you see
something that amounts to a statement being passed as a referenced
parameter?
Pete

On Mon, Mar 12, 2012 at 3:04 PM, Bob Sneidar b...@twft.com wrote:

 Just weighing in here, that would be a bit confusing. Passing by reference
 means that the command or function has access to the variable passed to it.
 By passing what amounts to a statement, there is nothing for LC to
 manipulate on the other end. Statements have to have some place to put the
 results. In this case, there is no place for LC to put the statement when
 passed by reference.

 Even a reference to an element of an array is a statement of sorts. That
 the command is in essence the characters for key delimiters [] doesn't
 change that. The array that is an element in a multidimensional array is
 not itself a container. The array is the container. To work with it you
 have to put it into it's own container then pass the new array by reference.

 I hope that makes sense. At least it does to me. :-)

 Bob


 On Mar 10, 2012, at 11:53 AM, Dar Scott wrote:

  Thanks for the tip, Dick, on using the list of keys.  One can think of
 arrays as nested or multidimensional.
 
  On Mar 10, 2012, at 1:06 AM, Dick Kriesel wrote:
  I agree it'd be good if LC could accept any array reference for
 invoking a handler that specifies pass-by-reference.
 
  Though is is probably more work, one might also consider chunks in
 pass-by-reference.
 
  Maybe any thing the subtract command can take.
 
  However, this might be a problem:
 
  doSomethingToTheseTwo char 1 to 2 of it, char 2 to 3 of it
 
  command doSomethingToTheseTwo @a, @b
put butter into a
put cheese into b
put empty into a
  end doSomethingToTheseTwo
 
  That might also have a problem with this call:
 
  doSomethingToTheseTwo x, x[t]
 
  I immagine LiveCode folks can come up with a semantics that makes sense
 for weird cases.
 
  The subtract command does not have the the problem because it modifies
 only one thing.
 
  Dar
 
 
  ___
  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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Passing parameters by reference

2012-03-10 Thread Pete
Dick:

Thanks for the script, another little nugget of knowledge added to my LC
store!

I have entered an enhancement request - it's # 10070

Dar:

The function in question is a general purpose one that gets called from
many places.  Sometimes I need to pass an array element and other times
just a simple variable so I'd rather not complicate things by passing in an
extra parameter that holds the array key if it is an array that's being
passed.  But that is a possible solution so thanks for the suggestion.

Bob:

Creating a temporary array works, of course, and that's what I'm doing for
now.  But it defeats the whole purpose of passing the parameter by
reference since now I have to put the temporary array back into the real
array after the call.  I may as well just change the function to return the
result of its code and pass the parameter by value instead of reference.

Pete

On Sat, Mar 10, 2012 at 12:06 AM, Dick Kriesel dick.krie...@mail.comwrote:

 Hi, Dar.  LC has a way to get and set a node at any level of an array,
 without code that concatenates [ ] to specify the node.  In an array
 reference a single [ ] can enclose an array of keys, as you can see in the
 code below.  Put the following into a button and click it.  The code
 invokes the debugger so you can see the array and the result string on the
 variables tab.

 I agree it'd be good if LC could accept any array reference for invoking a
 handler that specifies pass-by-reference.  Pete, I'd be glad to vote for
 your enhancement request.

 -- Dick




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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


Passing parameters by reference

2012-03-09 Thread Pete
I think I already know the answer to this so just confirming in case I'm
missing something

Let's say I have a handler with a parameter that is passed by reference, eg
command xyz @parm1.  If I try to pass an element of an array, eg xyz
theArray[2], I get a runtime error.  If, however, I pass the whole array,
eg xyz theArray, all seems to work fine.

That seems somewhat strange to me but apparently that's the way it is?



-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Editing very wide and tall stacks.

2012-03-09 Thread Pete
Wouldn't it be great if LC provided scrollbars at the card level...
Pete

On Fri, Mar 9, 2012 at 5:22 PM, Mark Schonewille 
m.schonewi...@economy-x-talk.com wrote:

 Dar,

 Group everything, set the rect of the group to the card rect. Disable the
 scroll bars in full-screen mode. The only problem is that turning off
 Select Grouped Controls can be problematic, but you can probably write a
 front script for that.

 --
 Best regards,

 Mark Schonewille

 Economy-x-Talk Consulting and Software Engineering
 Homepage: http://economy-x-talk.com
 Twitter: http://twitter.com/xtalkprogrammer
 KvK: 50277553

 Download the Installer Maker Plugin 1.7 for LiveCode here
 http://qery.us/za

 On 10 mrt 2012, at 02:16, Dar Scott wrote:

  I need to edit the GUI on a stack that is very wide and very tall for a
 full screen app on a large screen that is much larger than my development
 environment.  I also want to do some testing (click buttons, watch images
 fly around) on the development system.
 
  Ideas?  (I suspect there is some feature I have missed over the years
 and I'm going to feel silly.)
 
  Dar

 ___
 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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Passing parameters by reference

2012-03-09 Thread Pete
I have an update on this.  If the parameter passed is simply the name of
the array with no key qualifications, all is fine.  LC only kicks up a fuss
when  you pass a qualified array like myArray[myKey].  Weird.
Pete

On Fri, Mar 9, 2012 at 5:05 PM, Dar Scott d...@swcp.com wrote:

 Oh, that would be cool!

 Maybe the array could be global (or passed as a parameter) and the
 subscript passed.

 This works:

 add 1 to a[x]

 ...  it seems like a reasonable thing to do.  There might be problems I
 don't see right off, such as access to the same array at two different
 levels at the same time.

 Dar

 On Mar 9, 2012, at 4:30 PM, Pete wrote:

  I think I already know the answer to this so just confirming in case I'm
  missing something
 
  Let's say I have a handler with a parameter that is passed by reference,
 eg
  command xyz @parm1.  If I try to pass an element of an array, eg xyz
  theArray[2], I get a runtime error.  If, however, I pass the whole
 array,
  eg xyz theArray, all seems to work fine.
 
  That seems somewhat strange to me but apparently that's the way it is?
 
 
 
  --
  Pete
  Molly's Revenge http://www.mollysrevenge.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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Sqlite and performances in LiveCode

2012-03-08 Thread Pete
Hi Trevor,
The properties you mentioned are both set correctly.  I tried logging
executioncontexts but everything looked exactly the same each time though.
 I also logged the line number parameter of GetDataForLine each time
through and displayed them immediatly after the line of code that sets
dgnumberofrecords and it showed the line numbers there twice. I'm
concluding that it's not something in my code, since the display is right
after setting dgnumberofrecords and there's only one call to it.

However, it's not really a big deal, the amount of time consumed in setting
up 12 lines twice instead of once isn't worth worrying about.  I was really
letting you know about it in case it was a known bug.

Incidentally, I was wrong on the number of lines in my datagrid.  As in
your example, GetDataForLine seems to get called a couple more times than
there are lines in the datagrid.  Theer are eleven lines in mine and it is
being called 12 times.

Pete

On Thu, Mar 8, 2012 at 6:43 AM, Trevor DeVore li...@mangomultimedia.comwrote:

 On Thu, Mar 8, 2012 at 1:16 AM, Pete p...@mollysrevenge.com wrote:

  Hi Trevor,
  I tried this approach in Livecode an it works great.
 
  I do have one strange thing going on which I hope you can help with.
  There
  are 12 lines in my datagird.  I put a breakpoint in GetDataForLine and I
  see it being called 12 times followed by a slight pause, then it's called
  another 12 times.  I've double checked my code and I'm certain I'm only
  setting dgNumber ofRecords once.  Any ideas?
 

 Not sure. I just tested the example stack by logging calls to the message
 box and GetDataForLine is only called 7 times for 5 lines of data. Not sure
 if either will make a difference but make sure cache controls = false and
 that fixed row height = true.

 You could try logging the executioncontexts on every call to GetDataForLine
 and seeing where the 2nd set of twelve are originating from.

 --
 Trevor DeVore
 Blue Mango Learning Systems
 www.clarify-it.com-www.screensteps.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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Help with C externals

2012-03-08 Thread Pete
Hi Monte,
The callbacks that Paul mentions in his reply is one thing - would be great
to be able to display some sort of progress messages during a lengthy db
operation.  But seems like that might be a problem according to Paul.

I guess I've come across several niggling issues in the last few months.
 The latest one I found is that revDatabaseColumnNames took around 1.5
seconds to retrieve the column names for one table.  I'd been chasing my
tail trying to find the cause of slow performance thinking it was something
to do with datagrids or slow sqlite performance, but turns out to be LC.
 Using the equivalent PRAGMA to get the column names took hardly any
measurable time.

During the same exercise, I create a cursor with a SELECT rowid FROM
table statement.  Right after that, I issue a revDatabaseColumnNamed
call for rowid and get an error that the column doesn't exist.  I found
from calling revDatabaseColumnNames that the cursor has used the primary
key column of the table instead of rowid.  Arguably, that shouldn;t be a
problem but I I select rowid, then rowid is what should be in the cursor.
 I can get round it by using revDatabaseColumnNumbered.

If you followed the recent thread on putting empty into integer column in
sqlite, you'll know that when you get the data back out agin, it comes back
as zero, not empty.  Similar to the rpevious example - you should get back
whatever you put in.  I should add that QCC folks have recognised this as a
bug and plan to fix it.

On a performance front, there's been a recent thread regarding how much
faster SQLiteManager is than the LC equivalent calls.  Turns out a lot of
that was because of a neat technique used by SQLiteManager but there's
still a performance issue.  Issuing SELECT rowid FROM table in LC takes
about 5 times longer than it does in SQLIteManager for the same table.
 I'll admit that the numbers are small but for tables with large enough
number of rows, that's a significant amount of time.

There's a number of useful SQLite externals out there.  These are usually
funcations that you can include in SELECT statements or expressions.
 SQLite provides a function to load external libraries but it only works if
that functionality is enabled when the database is opened.  LC doesn't
provide a way to make that happen and there is no PRAGMA way to do it.

There's more but this is already too long!  I'll finish by saying that most
of the stuff I'm writing is in the nature of general purpose tools for
SQLite db administrators and developers so I'm probably using LC calls that
wouldn;t be used by the majority of people who develop a standard app using
a database with a known structure.

Pete


On Wed, Mar 7, 2012 at 10:27 PM, Monte Goulding mo...@sweattechnologies.com
 wrote:

 Hmm... what are the issues you are finding?

 Cheers

 Monte

 ___
 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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Help with C externals

2012-03-08 Thread Pete
Hi Paul,
Yes the callbacks are certainly one of the things I want to get access to
but you're raising doubts as to how feasible that might be.  But there are
other things too.

I guess the first thing I'm trying to ascertain is if it will be possible
to call the C API's directly from LC or if there will have to be some
intermediate external glue that sits between LC and the SQLite C API.

Pete

On Wed, Mar 7, 2012 at 11:04 PM, Paul D. DeRocco pdero...@ix.netcom.comwrote:

  From: Pete
 
  I'm seriously considering trying to use the C API for sqlite
  databases instead of the rev db functions.  I'm finding too
  many little inconsistencies and inefficiencies in the rev routines.
 
  The problem is I know nothing about using external libraries
  with LC or the sqlite C API.  I'm hoping there's someone out
  there who can at least tell me if this is feasible.  Check
  out http://www.sqlite.org/c3ref/intro.html for documentation
  of the C APIs for sqlite

 My experience with externals is that it is just a load of busywork to write
 an interface layer that calls external functions. The difficulty arises
 when
 you need to deal with callbacks, and I assume SQLite uses some mechanism
 like this for reporting progress or timeouts, or allowing long operations
 to
 be aborted. So that's what you should investigate first, to decide whether
 you can do everything you need with an external.

 In the past, I've dealt with the issue of callbacks from asynchronous
 events
 by having those callbacks record their state in a variable or fifo, and
 then
 use timer messages to poll the variable or fifo at a rate sufficient to the
 application. But that doesn't deal with callbacks that occur during the
 time
 when a function called by your code is in progress, since you're not
 handling timer messages during that time.

 --

 Ciao,   Paul D. DeRocco
 Paulmailto:pdero...@ix.netcom.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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Help with C externals

2012-03-08 Thread Pete
Brenard,
Havn't looked in detail but this sounds like it might help with developing
some sort of wrapper for the C externals.  Plus I always a good SWIG  makes
my code so much nicer!
Pete

On Thu, Mar 8, 2012 at 1:34 PM, Bernard Devlin bdrun...@gmail.com wrote:

 Probably helps if I provide a link: http://www.swig.org/

 On Thu, Mar 8, 2012 at 9:34 PM, Bernard Devlin bdrun...@gmail.com wrote:
  Would something like SWIG help with the construction of LC externals?
  I confess to not knowing anything about externals, and almost nothing
  about C.  But I've used some products which are cross-platform and
  provide interfaces in many different languages.  At their base they
  use SWIG (or something similar) to generate the interfacing code.
 
  Bernard

 ___
 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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Help with C externals

2012-03-08 Thread Pete
Done.  Although it looks like this goes back to 2005 so doesn't seem like
it's likley to get fixed after all this time.
Pete

2012/3/8 François Chaplais francois.chapl...@mines-paristech.fr

 please consider voting for report #2783 in quality center which calls for
 typed variables (an example being for passing parameters to externals)
 http://quality.runrev.com/show_bug.cgi?id=2783
 Best regards
 François

 Le 8 mars 2012 à 19:48, Paul D. DeRocco a écrit :

  From: Pete
 
  I guess the first thing I'm trying to ascertain is if it will
  be possible to call the C API's directly from LC or if there
  will have to be some intermediate external glue that sits
  between LC and the SQLite C API.
 
  I haven't written an external since Rev 3.5, but I don't think anything
  fundamental has changed. Yes, you have to write a wrapper layer, because
  everything called from LiveCode has to accept arguments and return
 results
  as null-terminated ASCII strings. So you spend a lot of time converting
  between decimal ASCII and binary, and so forth. (If current LC has
 advanced
  beyond that, I'd be interested to hear.) But like I said, it's just
  busywork, and on modern machines it's not so slow as to be a problem.
 
  --
 
  Ciao,   Paul D. DeRocco
  Paulmailto:pdero...@ix.netcom.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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: Sqlite and performances in LiveCode

2012-03-07 Thread Pete
I emailed sqlitemanager support re the manage/sql tab performance
difference. Mystery solved by the reply:

In the Manage panel when you see SELECT * FROM table the real query
executed is SELECT rowid FROM table and then a SELECT * FROM table WHERE
rowid=N is execute for each visible row of the listbox. In the SQL panel
query executed is just what you type
On Mar 6, 2012 5:47 PM, Pete p...@mollysrevenge.com wrote:

 I just noticed that the same vendor that makes SQLiteManager also makes an
 SQLite server package (cubeSQL) that does implement MVCC.  But you're
 right, it's definitely not there in standard SQLite. An SQLite server
 sounds interesting though.
 Pete

 On Tue, Mar 6, 2012 at 11:35 AM, Bernard Devlin bdrun...@gmail.comwrote:

 I notice from things discussed on the Valentina list that they
 recommend using API methods rather than SQL calls, because the former
 will be faster due to less overhead.  So these different ways of
 interacting with a sqlite database might well represent an application
 using the sqlite API.

 Although when I use the Valentina VStudio SQL interface I will still
 see results being returned in 25 ms, compared to 500 ms going through
 sql yoga  revdb  v4rev sql  valentina.  This is doing a select *
 from a table with 22k rows (10mb in size).  That's not to say that I'm
 outraged at 500ms.  There are other steps one can take to make an
 interface responsive at these timescales.

 The Valentina guys are pretty used to comparing Livecode with the
 other platforms for which they provide Valentina.  On 19/12/2010
 Ruslan had this to say about Livecode:

 REALbasic - as I remember -- was very fast, near to C code...so it
 gives e.g. 5% overhead to pure C engine... Revolution and Director
 give me x4-x10 overhead I thinkRevolution because all params are
 packed to strings ... Director because quite complex SDK similar to MS
 COM ...  This conclusion by Ruslan appears to be only in the
 discussion of calling the Valentina API, therefore one would expect
 that adding other layers (sql, revdb, etc.) one would see other layers
 adding their own torpor to the action.

 Does using explict transation control make any difference with sqlite?
  It shouldn't matter in a case where the data is only being read. I
 know on MVCC databases this is still a factor if one has a cursor
 containing the read data, as such data might still be altered from the
 cursor and the currency control of the MVCC requires a handle on such
 data to be able to maintain consistency.  I can't see that it would
 apply to sqlite, and this site confirms that sqlite does not implement
 MVCC: http://www.sqliteconcepts.org/SI_index.html

 Bernard

 On Tue, Mar 6, 2012 at 5:15 PM, Pete p...@mollysrevenge.com wrote:
  I got the same results on the movies database and even more pronounced
  differences on a table in one of my own databases with ~48k records in
 it:
  SQL tab 0.519secs, Manage tab 0.045 secs, more than a 10-fold
 difference!
   Just a straight SELECT * in each case.
  Pete

 ___
 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




 --
 Pete
 Molly's Revenge http://www.mollysrevenge.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


  1   2   3   4   5   6   7   8   9   10   >