Re: Retrieving Date and Time From The Internet

2011-08-16 Thread stephen barncard
 I thought it could be done directly with a time server, and one can!
I did some dicking around with sockets and made this up.

this uses the Daytime Protocol
(RFC-867)

function returnNISTime

  -- returns UTC time in RFC-867 (Daytime) format

  -- sqb @ the house of cubes

  put "time-C.timefreq.bldrdoc.gov:13" into pServerURL

  set the socketTimeoutInterval to 1000

  open socket to pServerURL

  write "" to socket pServerURL

  read from socket pServerURL for 49

  put it into a

  put the result into b

  close socket pServerURL

  delete line 1 of a

  return  a

end returnNISTime


--

put returnNISTime()


returns:


55790 11-08-17 04:57:45 50 0 0 102.3 UTC(NIST) *


note that everything one needs is here, including the year.

This clock data is read directly from a source that is mission critical and
cannot go down.


THe only caveat: if you are on a LAN then you must open up port 13 on the
router


-

The NIST format  : is
* J YR-MO-DA HH:MM:SS TT L H msADV UTC(NIST) OTM*

 J - the Julian Date is : 53746
  YR-MO-DA - the Date is : 2006-01-11
  HH:MM:SS - the Time in UTC is : 21:28:49
  TT - Indication whether USA is on Standard Time (ST) or Daylight Saving
Time (DST) : 00 (Standard Time)
  L - Leap second at the end of the month (0: no, 1: +1, 2: -1) : 0
  H - Health of the server (0: healthy, >0: errors) : 0
  msADV - time code advanced in milliseconds to compensate network delays :
266.1
  UTC(NIST) - the originator of this time code : UTC(NIST)
  OTM - on-time marker : *


hope you all can use this.


On 16 August 2011 15:11, Bob Sneidar  wrote:

> Thanks Waren and Scott. I will have a look at those. I can extrapolate UTX
> time from those zones I suppose, and then do the math for the particular
> time zone in the system settings.
>
> Thanks.
> Bob
>
>
> Stephen Barncard
San Francisco Ca. USA

more about sqb  
___
use-livecode mailing list
use-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: Slideshow Image CMS Best Practice

2011-08-16 Thread Sivakatirswami

I am using Galleria on our web site.. (galleria aino.se)
I love it... so extensible, customizable, documentation is excellent

I've written some .irev libraries that only need a path to a folder with 
images and adjacent matching text files for captions and then LiveCode 
dynamically builds the slide show web page. It's simple. I have a 
desktop client that people use to create content:


someImage.jpg
someImage.txt  # a caption file

this CMS is really very portable and can be massaged into any kind of 
delivery framework...


I'm just wondering what others think in terms of future CMS and coding 
and issues.  A fork in the road:


1. ALL IMAGES IN ONE FOLDER (thumbnails, 800px wide "large" photo, 
1500px wide "Big Photo"

-- with file name appendages

/centipede-gallery
/images
mother-centipede.jpg #800px wide
mother-centipede.txt# caption
mother-centipede_thumb.jpg #100px wide
mother-centipede_big.jpg  #1500px wide

OR

2) USE Separate Folders AND file name appendages

/centipede-gallery

/images
mother-centipede.jpg #800px wide
mother-centipede.txt# caption
/thumbnails
mother-centipede_thumb.jpg #100px wide
/big
mother-centipede_big.jpg  #1500px wide

Galleria documentation is agnostic (as it should be) but "kinda" points 
to all images in the same folder:


as flat HTML:

div  id="gallery">




or as JSON:


Re: ASCII, Unicode and Livecode

2011-08-16 Thread Peter W A Wood
Richmond

> So, there I am reading a BBC computer manual (as one does) where I am
> informed that the ASCII set consists of 128 chars . . .
> 
> . . . that's funny, because I had 256 (i.e. 2 x 128) rumbling around in my 
> mind.

A common misconception and the source of endless problems in applications which 
share data from multiple computers or are run all over the world due to the 
different ways people worked out how to make use of the extra 128 combinations 
that are available (MacRoman, ISO-8859-1, ISO-8859-2,etc and, not forgetting, 
the myriad of Windows Code Pages.

> As I have to develop a script that determines whether a char is a single-byte 
> char or the first half of a double-byte char . . . ouch . . . this is 
> probably fairly важно, to use a rather useful Bulgarian word . . .
> 
> Messing around in Livecode, I set up a stack with 2 fields; one containing a 
> string of ASCII text:
> 
> "LAT" Еat my cheese
> 
> and the other containing a Unicode string:
> 
> "UNIK" 'a Sanskrit word' I won't try to represent here [anyway, a spot of 
> juicy double-byted goodness]
> 
> then I set up a third field called "C1"
> 
> 2 buttons; one to get the charToNum for the first char in fld "LAT", and one 
> to do the
> same for fld "UNIK"
> 
> they both contain this sort of script:
> 
> on mouseUp
> put charToNum(char 1 of fld "LAT") into fld "C1"
> end mouseUp
> 
> and that's all very jolly, except that
> 
> on mouseUp
> put charToNum(char 1 of fld "UNIK") into fld "C1"
> end mouseUp
> 
> returns "9" which is within the ASCII range, so there is no way I can use 
> that sort of script to determine what I want to.

It is just not possible to distinguish between a two consecutive single-byte 
chars and a double-byte char, after all they are just combinations of 16 bits. 
To handle any text, you need to know how the text is encoded. If you haven't 
read http://www.joelonsoftware.com/articles/Unicode.html you probably should. 
It even mentions Bulgaria!

Regards

Peter



___
use-livecode mailing list
use-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: Beginning Programming with LiveCode for the world

2011-08-16 Thread Sivakatirswami

http://www.nytimes.com/2011/08/16/science/16stanford.html?_r=1&hpw

It would be interesting if someone did a "Basic Programming" course for 
the whole planet, using LiveCode.


I think Devin Asay is well positioned this.

We have a new young recruit here at the monastery.

I sent him all the URLS for Devin's materials a the BYU site, for LiveCode.

oops, wait, LiveCode is not free...

skts

___
use-livecode mailing list
use-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] Facing a datagrid bug

2011-08-16 Thread Trevor DeVore
On Tue, Aug 16, 2011 at 3:55 PM, Andre Garzia  wrote:

>
> Thanks, I will build the stack here. I isolated the problem to a carriage
> return character in one of the records. The \n character mess up the
> theData
> variable in sortDataByKey and it all breaks down from that database field
> with a CR char in it...
>
> Does this makes sense?
>

I think so. Updating the code so that only line 1 of sDataArray[theIndex][pKey]
is added to theData should fix the problem.

-- 
Trevor DeVore
Blue Mango Learning Systems
LiveCode Resources for Developers: http://livecode.bluemangolearning.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: Exporting vector images

2011-08-16 Thread Alejandro Tejada
Hi Richmond,


Richmond Mathewson-2 wrote:
> 
> [snip]
> HOWEVER; I am bu**ered if I am going to have an app with an accompanying 
> directory full of, say, 5,000 EPS files; that is real monkey business.
> 

Actually, it's only 1522 letters that you could store
as compressed custom properties.


Richmond Mathewson-2 wrote:
> 
> What is needed is a way to export the contents of a textField as a 
> single EPS/SVG file.
> 

Notice that some years ago, someone post in this mail list
a stack, where you type text ina field and a script replaced the
letter with an image.

The principle is similar with vector graphics. You just need to store
the vector data somewhere in a stack.

Al


--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Exporting-vector-images-tp3733066p3748794.html
Sent from the Revolution - User mailing list archive at Nabble.com.

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


Re: Re : two really neat pdf tools

2011-08-16 Thread Bob Sneidar


On Aug 16, 2011, at 1:11 PM, Francis Nugent Dixon wrote:

> Hi from Beautiful Brittany,
> 
>> Mac only!
>> 
>> try pdfedit for Linux and Windows
> 
> You mean . you mean that there is another world,
>  out there . which  is not .. aware
> about 
> 
> REAL COMPUTING  ???
> 
> You mean that . there are some .. who
> haven't .. been told  that .
> heaven is now . ON EARTH ...
> ...   (and assembled in Ireland) ?
> 
> You mean  you mean that .. awareness ...
> is still . just another word in the dictionary ?
> 
> .Consternation ! 
> 
> Do you mean that   I am alone ...
> 
> .with my MAC ?
> 
> 
> 
> After 30 years of total awareness of the most beautiful
> thing that ever fell to earth .. from the sky .
> 
> .a MAC 
> 
> They want me to pay them money every year, to execute MY
> programs on MY computer using MY LiveCode software .
> 
> Let them become rich enough to pay the US National Debt !
> 
> So easily is faith lost 
> 
> .And so the wilderness returns .
> 
> .,,, And I fall prey to the infamous PC gods 
> 
> ... ..So the mighty have fallen 
> 
> .and there, but for the grace of Android, go I ! ...
> 
> 
> -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-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: Using the Detailed Files Function to Get Info From a Remote Machine

2011-08-16 Thread Roger Eller
On Tue, Aug 16, 2011 at 2:08 PM, Andre Garzia wrote:

> Gregory,
>
> Are you sure that they don't because they usually return the same output as
> "ls" which contains such data strange...
>
> andre
>
> On Tue, Aug 16, 2011 at 2:52 PM, Gregory Lypny
> wrote:
>
> > Thanks Andre,
> >
> > The LIST option returns what url (“ftp://...”) does in the absence of
> > libURLSetFTPListCommand, so I guess the idea of the command is to toggle
> > between LIST and NLST.  Unfortunately, neither returns the creation or
> > modification dates of the files.
> >
> > Regards,
> >
> > Gregory
>

If all you need is the modified date/time of a file from an FTP site, the
MDTM command works well.

put libURLftpCommand("MDTM " & pathToFile, tFtpServer, tFtpUserName,
tFtpUserPassword) into tMDTM
answer tMDTM

The commands like LIST, RETR, etc. that need an open socket won't work with
this form.  Commands which perform an action such as renaming a file work
well, and return a simple result string.

I wish there was a get the detailedFTPfiles command in LC.

http://www.nsftools.com/tips/RawFTP.htm#MDTM

˜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


Re: Retrieving Date and Time From The Internet

2011-08-16 Thread Bob Sneidar
Thanks Waren and Scott. I will have a look at those. I can extrapolate UTX time 
from those zones I suppose, and then do the math for the particular time zone 
in the system settings. 

Thanks. 
Bob


On Aug 16, 2011, at 2:10 PM, Warren Samples wrote:

> On Tuesday, August 16, 2011 11:13:58 AM Bob Sneidar wrote:
>> Okay, I contacted the USNO site via email and requested that they include 
>> the year in the returned date/time. 
> 
> You could try this:
> 
> http://www.worldtimeserver.com/current_time_in_CA-QC.aspx
> 
> Your time info is here in the html it returns (example):
> 
>
>
>5:10 PM
>
>
>
>Tuesday, August 16, 2011
>
>
>Eastern Daylight Time (EDT) -0400 
> UTC
> 
> Isolate this from the rest of the source and filter out the lines that begin 
> with <, and you'll have what you're looking for. If you want a different 
> city, just select one 
> from the list and copy that URL.
> 
> Warren
> 
> ___
> 

> A fun challenge.  Here's one option, limited to a single time (US Eastern),
> with no guarantee of reliability (can any Web-based service truly claim
> this?):
> 
> function timeStamp
>   put url "http://www.atomictime.net/front.html"; into temp
>   wait 500 millisecs with messages
>   put url "http://www.atomictime.net/time_tel.html?2"; into temp
>   repeat with N = number of lines of temp down to 1
>  if line N of temp is not empty then return line N of temp
>   end repeat
> end timeStamp
> 
> The reason for the dual URLs is the host requires initial access through a
> home page.  Only thing I can guess is there's some back-end foolery going on
> that's not accessible (at least I can't see anything that's apparent, but
> maybe that's just me).
> 
> I tried setting my system clock back 2 hours and the page continues to
> return the current Eastern time, so the service *appears* to be legit.
> 
> Regards,
> 
> Scott Rossi
> Creative Director
> Tactile Media, UX Design

___
use-livecode mailing list
use-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: ASCII, Unicode and Livecode

2011-08-16 Thread Bernard Devlin
If you get the htmlText of a char in a unicode mixed field (i.e.
containing single & double byte chars), there is an attribute of the
 tag that tells you the font.  If you get char 1 of a double
byte char, that font attribute of the paragraph tag will (in my
experience) contain "unicode" as item 2 of the font.

Thus, try "put the htmlText of char 1 of fld SomeUnicodeField into msg".

That at least allows one to detect if a char is unicode or not, even
if one only gets hold of one of the two bytes that make up the char.
I think this is the simplest (albeit clumsy) way to detect the nature
of a char in a run of mixed text.

Bernard

On Tue, Aug 16, 2011 at 6:48 PM, Richmond Mathewson
 wrote:
> As I have to develop a script that determines whether a char is a
> single-byte char or the first half of a double-byte char . . . ouch . . .
> this is probably fairly важно, to use a rather useful Bulgarian word . . .

___
use-livecode mailing list
use-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: Retrieving Date and Time From The Internet

2011-08-16 Thread Warren Samples
On Tuesday, August 16, 2011 11:13:58 AM Bob Sneidar wrote:
> Okay, I contacted the USNO site via email and requested that they include the 
> year in the returned date/time. 

You could try this:

http://www.worldtimeserver.com/current_time_in_CA-QC.aspx

Your time info is here in the html it returns (example):



5:10 PM



Tuesday, August 16, 2011


Eastern Daylight Time (EDT) -0400 
UTC

Isolate this from the rest of the source and filter out the lines that begin 
with <, and you'll have what you're looking for. If you want a different city, 
just select one 
from the list and copy that URL.

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


Re: Retrieving Date and Time From The Internet

2011-08-16 Thread Scott Rossi
Recently, Bob Sneidar wrote:

> Until someone can come up with an HTTP link that returns the year with the
> date and time, or else Livecode supports NTP queries, we are SOL. I have
> searched high and low and cannot find one single web site besides
> http://tycho.usno.navy.mil/cgi-bin/timer.pl that returns anything usable.
> Leave it up to a sailor to get you most of the way there, and then let you
> swim the rest of the way! LOL! (I'm an ex-sailor so I can say that).

A fun challenge.  Here's one option, limited to a single time (US Eastern),
with no guarantee of reliability (can any Web-based service truly claim
this?):

function timeStamp
   put url "http://www.atomictime.net/front.html"; into temp
   wait 500 millisecs with messages
   put url "http://www.atomictime.net/time_tel.html?2"; into temp
   repeat with N = number of lines of temp down to 1
  if line N of temp is not empty then return line N of temp
   end repeat
end timeStamp

The reason for the dual URLs is the host requires initial access through a
home page.  Only thing I can guess is there's some back-end foolery going on
that's not accessible (at least I can't see anything that's apparent, but
maybe that's just me).

I tried setting my system clock back 2 hours and the page continues to
return the current Eastern time, so the service *appears* to be legit.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design



___
use-livecode mailing list
use-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 : two really neat pdf tools

2011-08-16 Thread Francis Nugent Dixon

Hi from Beautiful Brittany,


Mac only!

try pdfedit for Linux and Windows


You mean . you mean that there is another world,
 out there . which  is not .. aware
about 

 REAL COMPUTING  ???

You mean that . there are some .. who
haven't .. been told  that .
heaven is now . ON EARTH ...
...   (and assembled in Ireland) ?

You mean  you mean that .. awareness ...
is still . just another word in the dictionary ?

.Consternation ! 

Do you mean that   I am alone ...

.with my MAC ?



After 30 years of total awareness of the most beautiful
thing that ever fell to earth .. from the sky .

 .a MAC 

They want me to pay them money every year, to execute MY
programs on MY computer using MY LiveCode software .

Let them become rich enough to pay the US National Debt !

So easily is faith lost 

.And so the wilderness returns .

.,,, And I fall prey to the infamous PC gods 

... ..So the mighty have fallen 

.and there, but for the grace of Android, go I ! ...


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


Email issues at quartam.com

2011-08-16 Thread Jan Schenkel
Dear LiveCode Users,

Due to an unfortunate misconfiguration of a spam filter in my domain email 
delivery chain, a number of emails to 'quartam.com' were delayed, going back as 
far as July 22nd, 2011.
Having just 'liberated' those emails, I am working my way through them now. If 
you are still awaiting a reply, do not hesitate to resend it to this yahoo.com 
email address, or the regular quartam.com email addresses, or both.

My apologies for any inconvenience, as a result of the delays caused by this 
mishap.

Best regards,

Jan Schenkel.
=
Quartam Reports & PDF Library for LiveCode
www.quartam.com


=
"As we grow older, we grow both wiser and more foolish at the same time."  (La 
Rochefoucauld)

___
use-livecode mailing list
use-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] Facing a datagrid bug

2011-08-16 Thread Andre Garzia
On Tue, Aug 16, 2011 at 4:43 PM, Trevor DeVore wrote:

> On Tue, Aug 16, 2011 at 3:04 PM, Andre Garzia 
> wrote:
>
> > It stopped working again... well, back to the debugging board.
> >
> >
> Andre,
>
> Cant you send me a single stack with a single data grid in it that has the
> data causing problems? I should be able to determine the problem based on
> the problems you found thus far.
>

Trevor,

Thanks, I will build the stack here. I isolated the problem to a carriage
return character in one of the records. The \n character mess up the theData
variable in sortDataByKey and it all breaks down from that database field
with a CR char in it...

Does this makes sense?

Andre




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



-- 
http://www.andregarzia.com All We Do Is Code.
___
use-livecode mailing list
use-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: Double byte trouble

2011-08-16 Thread Mark Schonewille
Hi Richmond,

I wrote this yesterday already. The availability of byte and char indicate that 
RunRev is aware of this problem. Unfortunately, RunRev hasn't actually taken 
action to solve it yet.

For now, it is just a fact that fields who have the unicodeText property set, 
need two bytes for a character and will return only the first byte of a 
character when you retrieve char 1 of that field.

That said, have you tried getting char 1 of the text of fld x? Does that help?

--
Best regards,

Mark Schonewille

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

What does that error mean? Buy LiveCodeErrors for iPhone now http://qery.us/v4 
A must-have for LiveCode programmers.

On 16 aug 2011, at 21:06, Richmond Mathewson wrote:

> I did this:
> 
> set the useUnicode to true
> set the unicodeText of fld "INN" to numToChar(69)
> 
> and, unsurprisingly, an 'E' appeared in fld "INN"
> 
> when I then did this:
> 
> delete char 1 of fld "INN"   'E' vanished; again, unsurprisingly
> 
> when I put a spot of unicodeText in my fld "INN"
> the "delete char 1" script MADE THE FIRST UNICODE CHAR vanish.
> 
> If that is so, why do I have to refer to double-byte unicode chars as "chars 
> 1 - 2" 


___
use-livecode mailing list
use-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] Facing a datagrid bug

2011-08-16 Thread Andre Garzia
Yes what Bob said... you can see by my reactions that one should not try to
script rev stacks...

On Tue, Aug 16, 2011 at 4:28 PM, Bob Sneidar  wrote:

> You must mean DON'T try to script the rev stacks. :-)
>
> Bob
>
>
> On Aug 16, 2011, at 12:04 PM, Andre Garzia wrote:
>
> > RRRGGHHH
> >
> > It stopped working again... well, back to the debugging board.
> >
> > folks, for anyone following this thread, to try to script the rev stacks,
> > you can break your IDE or introduce real problems. I am doing this
> because I
> > have a backup of Trevors original stack, so I can play and if I break
> > something really badly, I can rollback.
> >
> > On Tue, Aug 16, 2011 at 3:56 PM, Andre Garzia 
> wrote:
> >
> >> Update
> >>
> >> the sortByKey function calculates a variable theData that is used to
> >> compute the sorting. This variable had a leading CR here in some cases
> and
> >> thus broke the functions after it. Deleting that line made things work.
> >>
> >> Andre
> >>
> >>
> >> On Tue, Aug 16, 2011 at 3:39 PM, Andre Garzia  >wrote:
> >>
> >>> bob,
> >>>
> >>> don't praise me, Trevors work is brilliant.
> >>>
> >>> I think the bug goes deeper than that. While I solved the drawing
> problem,
> >>> I am facing a new problem now. When I click a line, it selects the line
> on
> >>> top of it. I guess the indexes are wrong because of what I did. I think
> that
> >>> the array sTableObjectsA has to changed as well...
> >>>
> >>> :-/
> >>>
> >>> I will get there, I have enough Red Bull...
> >>>
> >>
> >>
> >>
> >> --
> >> http://www.andregarzia.com All We Do Is Code.
> >>
> >
> >
> >
> > --
> > http://www.andregarzia.com All We Do Is Code.
> > ___
> > use-livecode mailing list
> > use-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
>



-- 
http://www.andregarzia.com All We Do Is Code.
___
use-livecode mailing list
use-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] Facing a datagrid bug

2011-08-16 Thread Trevor DeVore
On Tue, Aug 16, 2011 at 3:04 PM, Andre Garzia  wrote:

> It stopped working again... well, back to the debugging board.
>
>
Andre,

Cant you send me a single stack with a single data grid in it that has the
data causing problems? I should be able to determine the problem based on
the problems you found thus far.

-- 
Trevor DeVore
Blue Mango Learning Systems
___
use-livecode mailing list
use-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: Double byte trouble

2011-08-16 Thread Bob Sneidar
I'm going to say that if you were to delete the first char of a 2 byte unicode 
char and then put more unicode text after it, things would not go so well, but 
I am just guessing. 

Bob


On Aug 16, 2011, at 12:06 PM, Richmond Mathewson wrote:

> I did this:
> 
> set the useUnicode to true
> set the unicodeText of fld "INN" to numToChar(69)
> 
> and, unsurprisingly, an 'E' appeared in fld "INN"
> 
> when I then did this:
> 
> delete char 1 of fld "INN"   'E' vanished; again, unsurprisingly
> 
> when I put a spot of unicodeText in my fld "INN"
> the "delete char 1" script MADE THE FIRST UNICODE CHAR vanish.
> 
> If that is so, why do I have to refer to double-byte unicode chars as "chars 
> 1 - 2" 
> 
> ___
> use-livecode mailing list
> use-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: [HELP] Facing a datagrid bug

2011-08-16 Thread Bob Sneidar
You must mean DON'T try to script the rev stacks. :-)

Bob


On Aug 16, 2011, at 12:04 PM, Andre Garzia wrote:

> RRRGGHHH
> 
> It stopped working again... well, back to the debugging board.
> 
> folks, for anyone following this thread, to try to script the rev stacks,
> you can break your IDE or introduce real problems. I am doing this because I
> have a backup of Trevors original stack, so I can play and if I break
> something really badly, I can rollback.
> 
> On Tue, Aug 16, 2011 at 3:56 PM, Andre Garzia  wrote:
> 
>> Update
>> 
>> the sortByKey function calculates a variable theData that is used to
>> compute the sorting. This variable had a leading CR here in some cases and
>> thus broke the functions after it. Deleting that line made things work.
>> 
>> Andre
>> 
>> 
>> On Tue, Aug 16, 2011 at 3:39 PM, Andre Garzia wrote:
>> 
>>> bob,
>>> 
>>> don't praise me, Trevors work is brilliant.
>>> 
>>> I think the bug goes deeper than that. While I solved the drawing problem,
>>> I am facing a new problem now. When I click a line, it selects the line on
>>> top of it. I guess the indexes are wrong because of what I did. I think that
>>> the array sTableObjectsA has to changed as well...
>>> 
>>> :-/
>>> 
>>> I will get there, I have enough Red Bull...
>>> 
>> 
>> 
>> 
>> --
>> http://www.andregarzia.com All We Do Is Code.
>> 
> 
> 
> 
> -- 
> http://www.andregarzia.com All We Do Is Code.
> ___
> use-livecode mailing list
> use-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


Double byte trouble

2011-08-16 Thread Richmond Mathewson

I did this:

set the useUnicode to true
set the unicodeText of fld "INN" to numToChar(69)

and, unsurprisingly, an 'E' appeared in fld "INN"

when I then did this:

delete char 1 of fld "INN"   'E' vanished; again, unsurprisingly

when I put a spot of unicodeText in my fld "INN"
the "delete char 1" script MADE THE FIRST UNICODE CHAR vanish.

If that is so, why do I have to refer to double-byte unicode chars as 
"chars 1 - 2" 


___
use-livecode mailing list
use-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] Facing a datagrid bug

2011-08-16 Thread Andre Garzia
RRRGGHHH

It stopped working again... well, back to the debugging board.

folks, for anyone following this thread, to try to script the rev stacks,
you can break your IDE or introduce real problems. I am doing this because I
have a backup of Trevors original stack, so I can play and if I break
something really badly, I can rollback.

On Tue, Aug 16, 2011 at 3:56 PM, Andre Garzia  wrote:

> Update
>
> the sortByKey function calculates a variable theData that is used to
> compute the sorting. This variable had a leading CR here in some cases and
> thus broke the functions after it. Deleting that line made things work.
>
> Andre
>
>
> On Tue, Aug 16, 2011 at 3:39 PM, Andre Garzia wrote:
>
>> bob,
>>
>> don't praise me, Trevors work is brilliant.
>>
>> I think the bug goes deeper than that. While I solved the drawing problem,
>> I am facing a new problem now. When I click a line, it selects the line on
>> top of it. I guess the indexes are wrong because of what I did. I think that
>> the array sTableObjectsA has to changed as well...
>>
>> :-/
>>
>> I will get there, I have enough Red Bull...
>>
>
>
>
> --
> http://www.andregarzia.com All We Do Is Code.
>



-- 
http://www.andregarzia.com All We Do Is Code.
___
use-livecode mailing list
use-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] Facing a datagrid bug

2011-08-16 Thread Andre Garzia
Update

the sortByKey function calculates a variable theData that is used to compute
the sorting. This variable had a leading CR here in some cases and thus
broke the functions after it. Deleting that line made things work.

Andre

On Tue, Aug 16, 2011 at 3:39 PM, Andre Garzia  wrote:

> bob,
>
> don't praise me, Trevors work is brilliant.
>
> I think the bug goes deeper than that. While I solved the drawing problem,
> I am facing a new problem now. When I click a line, it selects the line on
> top of it. I guess the indexes are wrong because of what I did. I think that
> the array sTableObjectsA has to changed as well...
>
> :-/
>
> I will get there, I have enough Red Bull...
>



-- 
http://www.andregarzia.com All We Do Is Code.
___
use-livecode mailing list
use-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] Facing a datagrid bug

2011-08-16 Thread Andre Garzia
bob,

don't praise me, Trevors work is brilliant.

I think the bug goes deeper than that. While I solved the drawing problem, I
am facing a new problem now. When I click a line, it selects the line on top
of it. I guess the indexes are wrong because of what I did. I think that the
array sTableObjectsA has to changed as well...

:-/

I will get there, I have enough Red Bull...
___
use-livecode mailing list
use-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: Unicode woes

2011-08-16 Thread Paul Dupuis

Err - my bad. Posted to the wrong list! Arrgh!

On 8/16/2011 2:24 PM, stephen barncard wrote:

Roadmaps shouldn't be discussed on the use-list...  nda ...



On 16 August 2011 11:06, Paul Dupuis  wrote:


On 8/15/2011 3:51 PM, Malte Brill wrote:


I have taken these scripts from the unicode lib that I am still trying to
set up. If there is any interested, I'll upload it to revOnline and announce
it on the list.

Cheers,

Malte


Malte,

Thank you. I for one would love any Unicode library any one cares to post.
Currently Unicode in LiveCode is one of the technology items that requires a
LOT of fussing with to get anything to work.

I'd also ask Kevin (RunRev) to please consider posting an update on the new
Field object and "Unicode that just works" as we approach the end of Q3 2011
next month. The guestimated time frame for 5.0, the version that will
hopefully contain the new field and Unicode support, was suggested as late
Q4 2011 or Q1 2012. As Q3 2011 comes to an end in September, some update
would really help those of use who have product development plans tied to
that next LiveCode version (or at least the features we hope will be in it).

--
Paul Dupuis
Cofounder
Researchware, Inc.
http://www.researchware.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






--
Paul Dupuis
Cofounder
Researchware, Inc.
http://www.researchware.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: Unicode woes

2011-08-16 Thread stephen barncard
Roadmaps shouldn't be discussed on the use-list...  nda ...



On 16 August 2011 11:06, Paul Dupuis  wrote:

> On 8/15/2011 3:51 PM, Malte Brill wrote:
>
>> I have taken these scripts from the unicode lib that I am still trying to
>> set up. If there is any interested, I'll upload it to revOnline and announce
>> it on the list.
>>
>> Cheers,
>>
>> Malte
>>
>
> Malte,
>
> Thank you. I for one would love any Unicode library any one cares to post.
> Currently Unicode in LiveCode is one of the technology items that requires a
> LOT of fussing with to get anything to work.
>
> I'd also ask Kevin (RunRev) to please consider posting an update on the new
> Field object and "Unicode that just works" as we approach the end of Q3 2011
> next month. The guestimated time frame for 5.0, the version that will
> hopefully contain the new field and Unicode support, was suggested as late
> Q4 2011 or Q1 2012. As Q3 2011 comes to an end in September, some update
> would really help those of use who have product development plans tied to
> that next LiveCode version (or at least the features we hope will be in it).
>
> --
> Paul Dupuis
> Cofounder
> Researchware, Inc.
> http://www.researchware.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
>



-- 



Stephen Barncard
San Francisco Ca. USA

more about sqb  
___
use-livecode mailing list
use-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: Retrieving Date and Time From The Internet

2011-08-16 Thread Bob Sneidar
Okay, I contacted the USNO site via email and requested that they include the 
year in the returned date/time. 

I have a modified script which includes the year, but I caution you that the 
convert command is getting the current year from the system if it is not 
supplied, which defeats the whole purpose of getting the Real Time. We are 
still at the mercy of the system date and whatever the user sets it to. 

Until someone can come up with an HTTP link that returns the year with the date 
and time, or else Livecode supports NTP queries, we are SOL. I have searched 
high and low and cannot find one single web site besides 
http://tycho.usno.navy.mil/cgi-bin/timer.pl that returns anything usable. Leave 
it up to a sailor to get you most of the way there, and then let you swim the 
rest of the way! LOL! (I'm an ex-sailor so I can say that). 

function realTime theFormat, useOffset
   if useOffset is empty then put false into useOffset
   put "http://tycho.usno.navy.mil/cgi-bin/timer.pl"; into theURL
   get url theURL
   put it into theResult
   filter theResult with "*UTC*"
   replace "" with empty in theResult
   put word 1 to 3 of theResult into theResult
   put word 4 of the internet date into theYear -- bummer relies on system 
datetime
   
   if useOffset then
  put word -1 of theResult into theTime
  put word -1 of the internet date into theZoneOffset
  put theZoneOffset /100 into theZoneOffset
  set the itemdelimiter to ":"
  put (item 1 of theTime + theZoneOffset) into item 1 of theTime
  put theTime into word -1 of theResult
   end if
   
   put space & theYear after word 2 of theResult
   
   if theFormat is "seconds" then
  -- not entirely accurate as it returns the same value with the year
  -- as it does without it, leading me to believe the convert command 
  -- is accessing the system datetime to get the year if it is not provided
  convert theResult to seconds
   end if
   
   return theResult
end realTime

Bob


On Aug 16, 2011, at 10:37 AM, J. Landman Gay wrote:

> On 8/16/11 12:31 PM, Gregory Lypny wrote:
>> Hi Stephen,
>> 
>> Yes, and Bob Sneidar has kindly provided us with a function that does
>> that (see "Re: Grabbing the Date and Time From a Time Server on the
>> Internet”).  The only thing it lacks at the moment is the year.  I
>> asked about doing the same with a remote computer only to explore an
>> alternative.
> 
> I'm not sure if your setup will allow it, but the actual delivery date and 
> time will be listed on the server. Can you just retrieve the date from there, 
> separately from the client app? Does the date need to be embedded in the file 
> itself?
> 
> -- 
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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


Re: Using the Detailed Files Function to Get Info From a Remote Machine

2011-08-16 Thread Andre Garzia
Gregory,

Are you sure that they don't because they usually return the same output as
"ls" which contains such data strange...

andre

On Tue, Aug 16, 2011 at 2:52 PM, Gregory Lypny
wrote:

> Thanks Andre,
>
> The LIST option returns what url (“ftp://...”) does in the absence of
> libURLSetFTPListCommand, so I guess the idea of the command is to toggle
> between LIST and NLST.  Unfortunately, neither returns the creation or
> modification dates of the files.
>
> Regards,
>
> Gregory
>
>
> On Tue, Aug 16, 2011, at 11:44 AM, use-livecode-request@lists.runrev.comwrote:
>
> > Gregory,
> >
> > You can't access remote machines unless they have an FTP server or
> something
> > similar or you can mount their volumes as a disk. If you mount the remote
> > machine volumes, then you can use the detailed files but I think that
> > appleshare file sharing only works on LAN.
> >
> > You best option would be to use:
> >
> > libURLSetFTPListCommand "LIST"
> > put url "ftp://myserver/files/";
> >
> > I think LIST is the default choice, so you should already see something
> > similar to the detailed files. If your remote mac has no FTP server
> enabled
> > and it is not on LAN with File Sharing enabled, then unless you have
> > something running there, you can't get a file listing.
> >
> > andre
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 
http://www.andregarzia.com All We Do Is Code.
___
use-livecode mailing list
use-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: Unicode woes

2011-08-16 Thread Paul Dupuis

On 8/15/2011 3:51 PM, Malte Brill wrote:

I have taken these scripts from the unicode lib that I am still trying to set 
up. If there is any interested, I'll upload it to revOnline and announce it on 
the list.

Cheers,

Malte


Malte,

Thank you. I for one would love any Unicode library any one cares to 
post. Currently Unicode in LiveCode is one of the technology items that 
requires a LOT of fussing with to get anything to work.


I'd also ask Kevin (RunRev) to please consider posting an update on the 
new Field object and "Unicode that just works" as we approach the end of 
Q3 2011 next month. The guestimated time frame for 5.0, the version that 
will hopefully contain the new field and Unicode support, was suggested 
as late Q4 2011 or Q1 2012. As Q3 2011 comes to an end in September, 
some update would really help those of use who have product development 
plans tied to that next LiveCode version (or at least the features we 
hope will be in it).


--
Paul Dupuis
Cofounder
Researchware, Inc.
http://www.researchware.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: Using the Detailed Files Function to Get Info From a Remote Machine

2011-08-16 Thread Gregory Lypny
Thanks Andre,

The LIST option returns what url (“ftp://...”) does in the absence of 
libURLSetFTPListCommand, so I guess the idea of the command is to toggle 
between LIST and NLST.  Unfortunately, neither returns the creation or 
modification dates of the files.

Regards,

Gregory


On Tue, Aug 16, 2011, at 11:44 AM, use-livecode-requ...@lists.runrev.com wrote:

> Gregory,
> 
> You can't access remote machines unless they have an FTP server or something
> similar or you can mount their volumes as a disk. If you mount the remote
> machine volumes, then you can use the detailed files but I think that
> appleshare file sharing only works on LAN.
> 
> You best option would be to use:
> 
> libURLSetFTPListCommand "LIST"
> put url "ftp://myserver/files/";
> 
> I think LIST is the default choice, so you should already see something
> similar to the detailed files. If your remote mac has no FTP server enabled
> and it is not on LAN with File Sharing enabled, then unless you have
> something running there, you can't get a file listing.
> 
> andre

___
use-livecode mailing list
use-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: Unicode woes

2011-08-16 Thread Richmond Mathewson

On 08/15/2011 10:51 PM, Malte Brill wrote:

Hey Richmond,

maybe these might come in handy:

setprop cUTF8Text pUTF8String
 if word 1 of the name of the target<>"field" and word 1 of the name of the 
target<>"button" then
 if "dev" is in the environment then
 throw "cUTF8Text: Target is not a field or Button"
 end if
 exit cUTF8Text
 end if
 if word 1 of the name of the target = "field" then
 set the unicodetext of the target to uniencode(pUTF8String,"UTF8")
 else
 set the text of the target to uniencode(pUTF8String,"UTF8")
 set the textFont of the target to ",UNICODE"
 end if
end cUTF8Text

getprop cUTF8Text
 if word 1 of the name of the target<>"field" and  word 1 of the name of the 
target<>"button" then
 if "dev" is in the environment then
 throw "cUTF8Text: Target is not a field or button"
 end if
 exit cUTF8Text
 end if
 if word 1 of the name of the target="field" then
 return unidecode(the unicodetext of the target,"UTF8")
 else
   if ",UNICODE" is in the textfont of the target then
 return unidecode(the text of the target,"UTF8")
  end if
 end if
end cUTF8Text

Keep them at stack level or in a library stack. Use them the following way:

put the cUTF8Text of field "ContainsMixedChars" into tUTF8
-->  Now holds a correctly UTF8 encoded string
-->  UTF8 is double byte only when needed and things like the itemdel
-->  do work as expected on UTF8 text

put "aoi" after tUTF8

set the cUTF8Text of field "ContainsMixedChars" to tUTF8

I have taken these scripts from the unicode lib that I am still trying to set 
up. If there is any interested, I'll upload it to revOnline and announce it on 
the list.

Cheers,

Malte





Pour quoi?

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


ASCII, Unicode and Livecode

2011-08-16 Thread Richmond Mathewson

So, there I am reading a BBC computer manual (as one does) where I am
informed that the ASCII set consists of 128 chars . . .

. . . that's funny, because I had 256 (i.e. 2 x 128) rumbling around in 
my mind.


As I have to develop a script that determines whether a char is a 
single-byte char or the first half of a double-byte char . . . ouch . . 
. this is probably fairly важно, to use a rather useful Bulgarian word . . .


Messing around in Livecode, I set up a stack with 2 fields; one 
containing a string of ASCII text:


"LAT" Еat my cheese

and the other containing a Unicode string:

"UNIK" 'a Sanskrit word' I won't try to represent here [anyway, a spot 
of juicy double-byted goodness]


then I set up a third field called "C1"

2 buttons; one to get the charToNum for the first char in fld "LAT", and 
one to do the

same for fld "UNIK"

they both contain this sort of script:

on mouseUp
put charToNum(char 1 of fld "LAT") into fld "C1"
end mouseUp

and that's all very jolly, except that

on mouseUp
put charToNum(char 1 of fld "UNIK") into fld "C1"
end mouseUp

returns "9" which is within the ASCII range, so there is no way I can 
use that sort of script to determine what I want to.


___
use-livecode mailing list
use-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: Retrieving Date and Time From a Remote Computer

2011-08-16 Thread J. Landman Gay

On 8/16/11 12:31 PM, Gregory Lypny wrote:

Hi Stephen,

Yes, and Bob Sneidar has kindly provided us with a function that does
that (see "Re: Grabbing the Date and Time From a Time Server on the
Internet”).  The only thing it lacks at the moment is the year.  I
asked about doing the same with a remote computer only to explore an
alternative.


I'm not sure if your setup will allow it, but the actual delivery date 
and time will be listed on the server. Can you just retrieve the date 
from there, separately from the client app? Does the date need to be 
embedded in the file itself?


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com


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


Re: Retrieving Date and Time From a Remote Computer

2011-08-16 Thread Gregory Lypny
Hi Stephen,

Yes, and Bob Sneidar has kindly provided us with a function that does that (see 
"Re: Grabbing the Date and Time From a Time Server on the Internet”).  The only 
thing it lacks at the moment is the year.  I asked about doing the same with a 
remote computer only to explore an alternative.

Regards,

Gregory



On Tue, Aug 16, 2011, at 1:00 PM, Stephen Barncard wrote:

> Wouldn't it be better to get time data from a place that's mission-critical
> consistent, like the NAVY and WWV? Then you wouldn't have to maintain it or
> deal with outages.


___
use-livecode mailing list
use-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: Grabbing the Date and Time From a Time Server on the Internet

2011-08-16 Thread Bob Sneidar
I see the problem here. The url I use does not return the year! And I cannot 
just get the year from the system date, because that defeats the whole purpose 
of a "RealTime" function. Going to have to do a bit more research. 

Bob


On Aug 16, 2011, at 9:33 AM, Gregory Lypny wrote:

> Hi Bob,
> 
> Good summary, Bob.  It summarizes nicely the issues that I’m dealing with in 
> creating a client-side student helper app.  Your RealTime function works 
> nicely.  The only thing missing is the year, which again, is something that a 
> user could set manually.
> 
> Regards,
> 
> Gregory


___
use-livecode mailing list
use-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] Facing a datagrid bug

2011-08-16 Thread Bob Sneidar
Brilliant Andre. I am betting though that the problem occurs in the code that 
calls this function. I am going to wait until Trevor finds the source and 
releases an update for the dataGrid. 

Bob


On Aug 16, 2011, at 9:14 AM, Andre Garzia wrote:

> On Tue, Aug 16, 2011 at 1:09 PM, Andre Garzia  wrote:
> 
>> 
>> 
>> On Tue, Aug 16, 2011 at 12:58 PM, Andre Garzia wrote:
>> 
>>> the error is not on sorting, it is on:
>>> 
>>> _table.DrawColumns
>>> 
>>> some error in an object reference... odd... only when ascending, the
>>> descending sort works.
>>> 
>> 
>> 
>> I think I found it. When sorting ascending, the pIndexesToDraw variable
>> which contains a comma separated list of indexes, has an extra comma like:
>> 
>> ,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18
>> 
>> So it fails. I think I might have uncovered a bug somewhere
>> 
> 
> 
> I've added the following code to the data grid library:
> 
> ## Default is not to pass in value for pIndexes to draw in which case
>  ## we use the base sequence for visible controls to determine indexes
> to draw
>  if pIndexesToDraw is not empty then
> put itemOffset(item 1 of pIndexesToDraw, sIndexSequencing) - 1 into
> theSequence
>  else
> put item sTableObjectsA["base sequence for visible controls"] to \
>   (sTableObjectsA["base sequence for visible controls"] +
> sTableObjectsA["row control count"] - 1) of sIndexSequencing into
> pIndexesToDraw
> put sTableObjectsA["base sequence for visible controls"] - 1 into
> theSequence
>  end if
> 
> ## AAG: Below I fix a possible bug
>  repeat while char 1 of pIndexesToDraw is not a number
> delete char 1 of pIndexesToDraw
> if pIndexesToDraw is empty then
>exit repeat
> end if
>  end repeat
> 
> 
> With that in place, everything starts working.
> 
> 
>> 
>> 
>> 
>> --
>> http://www.andregarzia.com All We Do Is Code.
>> 
> 
> 
> 
> -- 
> http://www.andregarzia.com All We Do Is Code.
> ___
> use-livecode mailing list
> use-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: Retrieving Date and Time From a Remote Computer

2011-08-16 Thread stephen barncard
Wouldn't it be better to get time data from a place that's mission-critical
consistent, like the NAVY and WWV? Then you wouldn't have to maintain it or
deal with outages.

On 16 August 2011 09:37, Gregory Lypny  wrote:

> Hi Bob,
>
> No, just my office Mac a few kilometres away.  I was thinking of other ways
> of not relying on the date and time settings of users who would FTP data to
> me.  If my client app can grab the date and time from my office make, then I
> have a consistent timestamp that I can rely on.
>
>
> Gregory
>
>
>
> On Tue, Aug 16, 2011, at 11:44 AM, use-livecode-request@lists.runrev.comwrote:
>
> > Message: 24
> > Date: Tue, 16 Aug 2011 08:24:30 -0700
> > From: Bob Sneidar 
> > To: How to use LiveCode 
> > Subject: Re: Retrieving Date and Time From a Remote Computer
> > Message-ID: <3fcb9ed9-3960-40b9-b391-9abf6dbac...@twft.com>
> > Content-Type: text/plain; charset=us-ascii
> >
> > Remote as in a different time zone?? If they are both set to query a time
> server, then the remote mac will ALWAYS have the same time as the local one.
> If it is always in the same time zone, calculate it.
> >
> > Apart from that, I suppose you would have to ssh in which means setting
> up firewalls (ick). Or else you would have to set up some kind of server
> that could be queried, but still firewall issues.
> >
> > 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
>



-- 



Stephen Barncard
San Francisco Ca. USA

more about sqb  
___
use-livecode mailing list
use-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: Re : two really neat pdf tools

2011-08-16 Thread Pete
Depending on your needs, another good one is Formulate Pro (Mac only, free).
 You can place graphics, text, draw shapes.
Pete
Molly's Revenge 




On Tue, Aug 16, 2011 at 2:56 AM, Francis Nugent Dixon wrote:

> Hi from Beautiful Brittany,
>
> Peter, take a look at SKIM !
>
> I junked Adobe Reader and I now use SKIM
> for all my pdf work. Great Open Source
> program.
>
> - 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-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: Retrieving Date and Time From a Remote Computer

2011-08-16 Thread Gregory Lypny
Hi Bob,

No, just my office Mac a few kilometres away.  I was thinking of other ways of 
not relying on the date and time settings of users who would FTP data to me.  
If my client app can grab the date and time from my office make, then I have a 
consistent timestamp that I can rely on.


Gregory



On Tue, Aug 16, 2011, at 11:44 AM, use-livecode-requ...@lists.runrev.com wrote:

> Message: 24
> Date: Tue, 16 Aug 2011 08:24:30 -0700
> From: Bob Sneidar 
> To: How to use LiveCode 
> Subject: Re: Retrieving Date and Time From a Remote Computer
> Message-ID: <3fcb9ed9-3960-40b9-b391-9abf6dbac...@twft.com>
> Content-Type: text/plain; charset=us-ascii
> 
> Remote as in a different time zone?? If they are both set to query a time 
> server, then the remote mac will ALWAYS have the same time as the local one. 
> If it is always in the same time zone, calculate it. 
> 
> Apart from that, I suppose you would have to ssh in which means setting up 
> firewalls (ick). Or else you would have to set up some kind of server that 
> could be queried, but still firewall issues. 
> 
> 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


Re: Grabbing the Date and Time From a Time Server on the Internet

2011-08-16 Thread Gregory Lypny
Hi Bob,

Good summary, Bob.  It summarizes nicely the issues that I’m dealing with in 
creating a client-side student helper app.  Your RealTime function works 
nicely.  The only thing missing is the year, which again, is something that a 
user could set manually.

Regards,

Gregory



On Tue, Aug 16, 2011, at 11:44 AM, use-livecode-requ...@lists.runrev.com wrote:

> Message: 1
> Date: Mon, 15 Aug 2011 17:04:42 -0700
> From: Bob Sneidar 
> To: How to use LiveCode 
> Subject: Re: Grabbing the Date and Time From a Time Server on the
>   Internet
> Message-ID: <71dfe006-b408-43b4-8cec-ab4f1fe20...@twft.com>
> Content-Type: text/plain; charset=us-ascii
> 
> The Internet Date returns the date and time, along with the current time zone 
> set in your preferences. If the user changes his date and time manually 
> though, it will faithfully return whatever the user enters. Querying a time 
> server on the internet will always return the real date and time. 
> 
> Suppose you had a trial scheme which expired the license after 30 days. The 
> easiest way to defeat that would be to always set the clock back whenever you 
> used the software. But that would be to no avail if you check the RealTime 
> (as I named my function). 
> 
> Also, Windows Clients are sometimes configured to get the date and time from 
> an internal time server running on the network. If that time server service 
> stops functioning and the admin doesn't know it, the time can drift quite a 
> bit aver several weeks. Any app that was critically dependent on knowing the 
> exact time might not work correctly. 
> 
> Someone mentioned that if you were using sql, that you could query the sql 
> server for the date and time. This actually has a real advantage over a time 
> server, as NTP or even HTTP could be blocked by a personal firewall using 
> ports or a blacklist, but no one could firewall off the sql server you need 
> to run your application! 
> 
> 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


Re: Using the Detailed Files Function to Get Info From a Remote Machine

2011-08-16 Thread Gregory Lypny
Thanks Andre,

Much obliged.

Gregory


On Tue, Aug 16, 2011, at 11:44 AM, use-livecode-requ...@lists.runrev.com wrote:

> Message: 22
> Date: Tue, 16 Aug 2011 12:20:35 -0300
> From: Andre Garzia 
> To: How to use LiveCode 
> Subject: Re: Using the Detailed Files Function to Get Info From a
>   Remote  Machine
> Message-ID:
>   
> Content-Type: text/plain; charset=windows-1252
> 
> Gregory,
> 
> You can't access remote machines unless they have an FTP server or something
> similar or you can mount their volumes as a disk. If you mount the remote
> machine volumes, then you can use the detailed files but I think that
> appleshare file sharing only works on LAN.
> 
> You best option would be to use:
> 
> libURLSetFTPListCommand "LIST"
> put url "ftp://myserver/files/";
> 
> I think LIST is the default choice, so you should already see something
> similar to the detailed files. If your remote mac has no FTP server enabled
> and it is not on LAN with File Sharing enabled, then unless you have
> something running there, you can't get a file listing.
> 
> andre

___
use-livecode mailing list
use-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] Facing a datagrid bug

2011-08-16 Thread Andre Garzia
On Tue, Aug 16, 2011 at 1:09 PM, Andre Garzia  wrote:

>
>
> On Tue, Aug 16, 2011 at 12:58 PM, Andre Garzia wrote:
>
>> the error is not on sorting, it is on:
>>
>> _table.DrawColumns
>>
>> some error in an object reference... odd... only when ascending, the
>> descending sort works.
>>
>
>
> I think I found it. When sorting ascending, the pIndexesToDraw variable
> which contains a comma separated list of indexes, has an extra comma like:
>
>  ,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18
>
> So it fails. I think I might have uncovered a bug somewhere
>


I've added the following code to the data grid library:

## Default is not to pass in value for pIndexes to draw in which case
  ## we use the base sequence for visible controls to determine indexes
to draw
  if pIndexesToDraw is not empty then
 put itemOffset(item 1 of pIndexesToDraw, sIndexSequencing) - 1 into
theSequence
  else
 put item sTableObjectsA["base sequence for visible controls"] to \
   (sTableObjectsA["base sequence for visible controls"] +
sTableObjectsA["row control count"] - 1) of sIndexSequencing into
pIndexesToDraw
 put sTableObjectsA["base sequence for visible controls"] - 1 into
theSequence
  end if

## AAG: Below I fix a possible bug
  repeat while char 1 of pIndexesToDraw is not a number
 delete char 1 of pIndexesToDraw
 if pIndexesToDraw is empty then
exit repeat
 end if
  end repeat


With that in place, everything starts working.


>
>
>
> --
> http://www.andregarzia.com All We Do Is Code.
>



-- 
http://www.andregarzia.com All We Do Is Code.
___
use-livecode mailing list
use-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] Facing a datagrid bug

2011-08-16 Thread Andre Garzia
On Tue, Aug 16, 2011 at 12:58 PM, Andre Garzia wrote:

> the error is not on sorting, it is on:
>
> _table.DrawColumns
>
> some error in an object reference... odd... only when ascending, the
> descending sort works.
>


I think I found it. When sorting ascending, the pIndexesToDraw variable
which contains a comma separated list of indexes, has an extra comma like:

 ,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18

So it fails. I think I might have uncovered a bug somewhere



-- 
http://www.andregarzia.com All We Do Is Code.
___
use-livecode mailing list
use-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] Facing a datagrid bug

2011-08-16 Thread Bob Sneidar
I am going to say that there are characters in the text that Livecode does not 
expect. But I am guessing. You can try a divide and conquer approach to test 
this. Start by creating two globals. Put half the data into one global and half 
the data into the other. Populate the dataGrid with one half, try to sort. If 
it fails, divide that in two. Rinse and repeat. 

Eventually and before too long you are wither going to find out what the 
offending data is, or the problem will persist proving that it isn't an odd 
character in the data. 

Also, would you mind sending me a stack with the datagrid complete with the 
data? Let's see what happens here. If it's reproducible, it's pandemic. If not, 
it's local. 

Bob


On Aug 16, 2011, at 8:58 AM, Andre Garzia wrote:

> the error is not on sorting, it is on:
> 
> _table.DrawColumns
> 
> some error in an object reference... odd... only when ascending, the
> descending sort works.
> ___
> use-livecode mailing list
> use-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: [HELP] Facing a datagrid bug

2011-08-16 Thread Andre Garzia
the error is not on sorting, it is on:

_table.DrawColumns

some error in an object reference... odd... only when ascending, the
descending sort works.
___
use-livecode mailing list
use-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: Praise for Screensteps Pro

2011-08-16 Thread Andre Garzia
Martin,

I've built manuals for myself using Screensteps, it is a great product!

:-D

On Tue, Aug 16, 2011 at 12:29 PM, Martin Koob  wrote:

> I have been updating a pdf manual for my LiveCode application which I
> created
> with Screensteps Pro.   It is such a great product.  I had to redo many
> screen shots since I had some UI changes.   Piece of cake.  I also decided
> to rearrange the order of the sections in the manual and move sections
> between two different manuals.  No problem.
>
> If you are new to LiveCode and haven't yet heard of ScreenSteps you should
> try it out.   It is created with LiveCode.
>
> http://www.bluemangolearning.com/screensteps/
>
>
> Martin
>
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/Praise-for-Screensteps-Pro-tp3747551p3747551.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
>



-- 
http://www.andregarzia.com All We Do Is Code.
___
use-livecode mailing list
use-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] Facing a datagrid bug

2011-08-16 Thread Andre Garzia
Thanks Bob and Trevor,

I am trying to pinpoint where the error happens... tried using a try/catch
block on the sort routine to no effect.

Here is a shot of the error when I try to order something:

http://andregarzia.com/shots/_datagridbug-20110816-124238.png

error in object expression, any clue?

cheers
andre

On Tue, Aug 16, 2011 at 12:35 PM, Bob Sneidar  wrote:

> You can override everything about the datagrid. Copy the behavior script to
> a button in your own stack:
> set the behavior of button "myBehaviorButton" to the script of the behavior
> of group "dgMyDataGrid"
>
> Then set the behavior of your datagrid to the new button:
> set the behavior of group "dgMyDataGrid" to the long ID of button
> "myBehaviorButton"
>
> Now you can make the datagrid pop up grumpy messages every time you sort
> like, "I'm not in the mood." or "You sure are bossy!" if you like. :-)
>
> Bob
>
>
> On Aug 16, 2011, at 8:14 AM, Trevor DeVore wrote:
>
> >> Also, why can't we override the sorting routines?
> >>
> >
> > You can.
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 
http://www.andregarzia.com All We Do Is Code.
___
use-livecode mailing list
use-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] Facing a datagrid bug

2011-08-16 Thread Bob Sneidar
You can override everything about the datagrid. Copy the behavior script to a 
button in your own stack:
set the behavior of button "myBehaviorButton" to the script of the behavior of 
group "dgMyDataGrid"

Then set the behavior of your datagrid to the new button:
set the behavior of group "dgMyDataGrid" to the long ID of button 
"myBehaviorButton"

Now you can make the datagrid pop up grumpy messages every time you sort like, 
"I'm not in the mood." or "You sure are bossy!" if you like. :-)

Bob


On Aug 16, 2011, at 8:14 AM, Trevor DeVore wrote:

>> Also, why can't we override the sorting routines?
>> 
> 
> You can.


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


Praise for Screensteps Pro

2011-08-16 Thread Martin Koob
I have been updating a pdf manual for my LiveCode application which I created
with Screensteps Pro.   It is such a great product.  I had to redo many
screen shots since I had some UI changes.   Piece of cake.  I also decided
to rearrange the order of the sections in the manual and move sections
between two different manuals.  No problem. 

If you are new to LiveCode and haven't yet heard of ScreenSteps you should
try it out.   It is created with LiveCode.

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


Martin


--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Praise-for-Screensteps-Pro-tp3747551p3747551.html
Sent from the Revolution - User mailing list archive at Nabble.com.

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


Re: Retrieving Date and Time From a Remote Computer

2011-08-16 Thread Bob Sneidar
Remote as in a different time zone?? If they are both set to query a time 
server, then the remote mac will ALWAYS have the same time as the local one. If 
it is always in the same time zone, calculate it. 

Apart from that, I suppose you would have to ssh in which means setting up 
firewalls (ick). Or else you would have to set up some kind of server that 
could be queried, but still firewall issues. 

Bob


On Aug 16, 2011, at 6:31 AM, Gregory Lypny wrote:

> Hello everyone,
> 
> Another date and time retrieval question: How can I retrieve the date and 
> time from my remote Mac?
> 
> Regards,
> 
> Gregory
> 
> ___
> use-livecode mailing list
> use-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: [HELP] Facing a datagrid bug

2011-08-16 Thread Andre Garzia
Trevor,

Thanks very much for the quick reply I will investigate this and will
post back to the list with my findings.

Thanks for the lesson link as well, I might create my own sorting for some
columns.

:-D

On Tue, Aug 16, 2011 at 12:14 PM, Trevor DeVore
wrote:

> On Tue, Aug 16, 2011 at 11:04 AM, Andre Garzia  >wrote:
>
> > This is happening here in three different projects all related to
> database
> > frontends. I have a card with a list of records. When for example I click
> > the header of column "Title", it will fail and die. I don't know why. The
> > datagrid should not fail like that. The array used is a really big one
> > maybe
> > a megabyte or two worth of information. It is basically text but it may
> > contain unicode characters. I am using that unidecode trick from the
> > documentation, the data appears fine in the datagrid.
> >
>
> The sorting routines just use the built-in sort command in LiveCode. My
> guess is it chokes on the unicode data. I don't think it will choke on
> UTF-8
> data. You can look at SortDataByKey in the "Data Grid" button of the
> "revDataGridLibraryStack" to see the code that is being executed.
>
>
> > Also, why can't we override the sorting routines?
> >
>
> You can.
>
>
> http://lessons.runrev.com/spaces/lessons/manuals/datagrid/lessons/7330-How-Do-I-Customize-Column-Sorting-
>
> --
> Trevor DeVore
> Blue Mango Learning Systems
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



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


Re: Using the Detailed Files Function to Get Info From a Remote Machine

2011-08-16 Thread Andre Garzia
Gregory,

You can't access remote machines unless they have an FTP server or something
similar or you can mount their volumes as a disk. If you mount the remote
machine volumes, then you can use the detailed files but I think that
appleshare file sharing only works on LAN.

You best option would be to use:

libURLSetFTPListCommand "LIST"
put url "ftp://myserver/files/";

I think LIST is the default choice, so you should already see something
similar to the detailed files. If your remote mac has no FTP server enabled
and it is not on LAN with File Sharing enabled, then unless you have
something running there, you can't get a file listing.

andre

source: http://docs.runrev.com/Command/libURLSetFTPListCommand

On Tue, Aug 16, 2011 at 12:06 PM, Gregory Lypny
wrote:

> Hello everyone,
>
> Can the Detailed Files function be used to get file information from a
> remote Mac or am I limited to the listing provided by put url (“ftp://
> ...”)?
>
> Regards,
>
> Gregory
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 
http://www.andregarzia.com All We Do Is Code.
___
use-livecode mailing list
use-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] Facing a datagrid bug

2011-08-16 Thread Trevor DeVore
On Tue, Aug 16, 2011 at 11:04 AM, Andre Garzia wrote:

> This is happening here in three different projects all related to database
> frontends. I have a card with a list of records. When for example I click
> the header of column "Title", it will fail and die. I don't know why. The
> datagrid should not fail like that. The array used is a really big one
> maybe
> a megabyte or two worth of information. It is basically text but it may
> contain unicode characters. I am using that unidecode trick from the
> documentation, the data appears fine in the datagrid.
>

The sorting routines just use the built-in sort command in LiveCode. My
guess is it chokes on the unicode data. I don't think it will choke on UTF-8
data. You can look at SortDataByKey in the "Data Grid" button of the
"revDataGridLibraryStack" to see the code that is being executed.


> Also, why can't we override the sorting routines?
>

You can.

http://lessons.runrev.com/spaces/lessons/manuals/datagrid/lessons/7330-How-Do-I-Customize-Column-Sorting-

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


Using the Detailed Files Function to Get Info From a Remote Machine

2011-08-16 Thread Gregory Lypny
Hello everyone,

Can the Detailed Files function be used to get file information from a remote 
Mac or am I limited to the listing provided by put url (“ftp://...”)?

Regards,

Gregory


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


[HELP] Facing a datagrid bug

2011-08-16 Thread Andre Garzia
Folks,

I am consistently facing a strange bug with the datagrid in 4.6.x in more
than one project. I don't have an exact recipe but I can explain how it
works. I have a datagrid that mimics a table. I am just placing text in
there. Some text columns will have content on just some fields and this
content may have some unicode characters such as accents of some symbols
such as that superscript "o". When clicking the column header to sort the
column, the datagrid will display an dialog box saying error in the script
and die. This happens just for some columns but it is happening in three
projects. It is really hard to debug but I believe it is related to the
routine that sorts the datagrid, I think that down inside that function,
some comparision command fails and the error bubbles up from there.

Anyone seeing something similar?

This is happening here in three different projects all related to database
frontends. I have a card with a list of records. When for example I click
the header of column "Title", it will fail and die. I don't know why. The
datagrid should not fail like that. The array used is a really big one maybe
a megabyte or two worth of information. It is basically text but it may
contain unicode characters. I am using that unidecode trick from the
documentation, the data appears fine in the datagrid.

Also, why can't we override the sorting routines?

Cheers
andre

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


iOs - images from the foto library

2011-08-16 Thread Malte Brill
Hi all,

out of academic interest I would like to know if it is possible to set the 
filename of an image to an image resource in the photo library? I guess due to 
the sandboxed nature of iOS apps, the answer is no, but I'd better ask before 
speculating... As far as I can see the only way is mobilePickPhoto "library" 
and then use the imported image, right?

Cheers,

Malte


___
use-livecode mailing list
use-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: Lion snapshot trouble (was: Lion trouble with quicktime) please confirm

2011-08-16 Thread Klaus on-rev
Hi Tiemo,

Am 16.08.2011 um 14:34 schrieb Tiemo Hollmann TB:

> Hi Klaus,
> 
> thanks for testing, that didn't do the trick for me, I get irregular
> results, the more often I do testing.
> I think I found the reason what has changed with Lion. It is related to the
> alwaysbuffer property of the player. Setting it to true in my test app did
> the trick, but doing the same in my real app, I still get a bluescreen as a
> snapshot. Setting it permanently to true, I can't even play videos anymore,
> the player object keeps bluescreen too.
> Something must have changed with Lion, because my standalone runs fine on
> Leopard, but not anymore on Lion.

hmm, very strange indeed!

I never use "snapshot" with a player anyway, since I use Trevors wonderful 
"Enhanced QuickTime External" to export a movieframe to disk:


At least worth a try! :-)

> Confused
> Tiemo

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


Re: Re : two really neat pdf tools

2011-08-16 Thread Richmond Mathewson

On 08/16/2011 12:56 PM, Francis Nugent Dixon wrote:

Hi from Beautiful Brittany,

Peter, take a look at SKIM !

I junked Adobe Reader and I now use SKIM
for all my pdf work. Great Open Source
program.


Mac only!

try pdfedit for Linux and Windows

http://pdfedit.cz/en/index.html



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


Retrieving Date and Time From a Remote Computer

2011-08-16 Thread Gregory Lypny
Hello everyone,

Another date and time retrieval question: How can I retrieve the date and time 
from my remote Mac?

Regards,

Gregory

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


AW: Lion snapshot trouble (was: Lion trouble with quicktime) please confirm

2011-08-16 Thread Tiemo Hollmann TB
Hi Klaus,

thanks for testing, that didn't do the trick for me, I get irregular
results, the more often I do testing.
I think I found the reason what has changed with Lion. It is related to the
alwaysbuffer property of the player. Setting it to true in my test app did
the trick, but doing the same in my real app, I still get a bluescreen as a
snapshot. Setting it permanently to true, I can't even play videos anymore,
the player object keeps bluescreen too.
Something must have changed with Lion, because my standalone runs fine on
Leopard, but not anymore on Lion.
Confused
Tiemo

> -Ursprüngliche Nachricht-
> Von: use-livecode-boun...@lists.runrev.com [mailto:use-livecode-
> boun...@lists.runrev.com] Im Auftrag von Klaus on-rev
> Gesendet: Dienstag, 16. August 2011 13:01
> An: How to use LiveCode
> Betreff: Re: Lion snapshot trouble (was: Lion trouble with quicktime)
please
> confirm
> 
> Hi Tiemo,
> 
> Am 16.08.2011 um 10:56 schrieb Tiemo Hollmann TB:
> 
> > Ok, I made some more test and the problem doesn't seems to be related to
> > quicktime, but to the snapshop function on Lion.
> > I tested with LC 4.6.3 on Lion with the following code:
> >
> > Put the rect of [image | player | button] "foo" into tRect
> > Export snapshot from rect tRect to file "export.png" as [PNG | JPEG]
> >
> > Exporting a snapshot of an image or player object (with assigned
image/video
> > file) results in corrupted image data (stripes, black,...)
> > Exporting a snapshot of a button works fine as expected.
> >
> > Could anybody please confirm this as a bug or point me on what I am not
> > seeing?
> 
> Confirmed, I get an empty image instead!
> 
> But this snytax does work:
> ...
>   Put the rect of player 1into tRect
>   Export snapshot from rect (the rect of player "foo") of player "foo" to
file
> "export.png" as PNG
> ...
> 
> > Thank you
> > Tiemo
> 
> 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


___
use-livecode mailing list
use-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: Lion snapshot trouble (was: Lion trouble with quicktime) please confirm

2011-08-16 Thread Klaus on-rev
Hi Tiemo,

Am 16.08.2011 um 10:56 schrieb Tiemo Hollmann TB:

> Ok, I made some more test and the problem doesn't seems to be related to
> quicktime, but to the snapshop function on Lion.
> I tested with LC 4.6.3 on Lion with the following code:
> 
> Put the rect of [image | player | button] "foo" into tRect
> Export snapshot from rect tRect to file "export.png" as [PNG | JPEG]
> 
> Exporting a snapshot of an image or player object (with assigned image/video
> file) results in corrupted image data (stripes, black,...)
> Exporting a snapshot of a button works fine as expected.
> 
> Could anybody please confirm this as a bug or point me on what I am not
> seeing?

Confirmed, I get an empty image instead!

But this snytax does work:
...
  Put the rect of player 1into tRect
  Export snapshot from rect (the rect of player "foo") of player "foo" to file 
"export.png" as PNG
...

> Thank you
> Tiemo

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


Re : two really neat pdf tools

2011-08-16 Thread Francis Nugent Dixon

Hi from Beautiful Brittany,

Peter, take a look at SKIM !

I junked Adobe Reader and I now use SKIM
for all my pdf work. Great Open Source
program.

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


Lion snapshot trouble (was: Lion trouble with quicktime) please confirm

2011-08-16 Thread Tiemo Hollmann TB
Ok, I made some more test and the problem doesn't seems to be related to
quicktime, but to the snapshop function on Lion.
I tested with LC 4.6.3 on Lion with the following code:

Put the rect of [image | player | button] "foo" into tRect
Export snapshot from rect tRect to file "export.png" as [PNG | JPEG]

Exporting a snapshot of an image or player object (with assigned image/video
file) results in corrupted image data (stripes, black,...)
Exporting a snapshot of a button works fine as expected.

Could anybody please confirm this as a bug or point me on what I am not
seeing?
Thank you
Tiemo

> -Ursprüngliche Nachricht-
> Von: use-livecode-boun...@lists.runrev.com [mailto:use-livecode-
> boun...@lists.runrev.com] Im Auftrag von Tiemo Hollmann TB
> Gesendet: Montag, 15. August 2011 13:19
> An: 'How to use LiveCode'
> Betreff: Lion trouble with quicktime video snapshot
> 
> Hello,
> 
> a major feature of my software is taking snapshots from build in videos.
> 
> Running on Lion this snapshot feature is corrupted. I don't get anymore a
> snapshot of my video, but irregular colors or patterns. One time the
> snapshot is grey blurred, one time plain blue or plain black. Always
> different. Taking the snapshot I do it like this:
> 
> export snapshot from rect tRectSSQuelle to gScreenshot as PNG
> 
> put gScreenshot into img "imgScreenShot" of tCard
> 
> 
> 
> Are there any known issue with Lion and Quicktime?
> 
> I am still using LC 4.5.1. Are there perhaps any issues with LC 4.5.1 and
> Lion
> 
> Are there any other approaches or parameters, how to create a snapshot?
What
> could I test to get an idea which part is corrupted?
> 
> 
> 
> Thanks for any ideas
> 
> Tiemo
> 
> 
> 
> 
> 
> ___
> use-livecode mailing list
> use-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: Back to LC & Inventive Users

2011-08-16 Thread Richmond Mathewson

On 08/16/2011 10:24 AM, Kay C Lan wrote:

Judy,

I might be too late to the thread but I'll offer a slightly twisted
perspective of where to go with this. These are adults, right?

Don't ask them so much about what they like, instead figure out what ticks
them off the most, or wastes their time the most or elicits the response
'it's a friggin computer, it should be able to..'

To me, and I don't mean any offense to those who suggested them, but to
build a calculator,


I had one kid who wanted to make an egg-timer for his Granny.


address book, music library, etc etc, would having me
rolling my eyes with I've already got one of those, why reinvent the wheel -
with one that is worse than the free one I've already got. I'd switch off in
that class immediately.

But a special kind of calculator - for specific task as per the Therac-25
suggestion, or a music library that allows me to search the lyrics - because
iTunes doesn't, now that would interest me.

as Peter Brigham said in another tread:

but I think that the most user-friendly apps are those produced by the

people who use them...

my own practice management stack is miles ahead of anything else I've seen
but then I designed it for just the way I think and work


To me the key is to have your class members identify a number of small
'real' problems that you filter to those you know that LC can quickly solve.
These might take YOU anywhere from 1 - 6 hrs to solve. You might also
discover that a couple of problems fall into the same category, like text
parsing - my favourite ;-) It might then be possible to work with the class
as a whole to solve one problem, then assign homework to apply their new
found knowledge to solve the other.

As an example, I'm interested in buying a second hand car, and I visit two
websites to check out what's available. It's a hassle flicking through the
pages and trying to remember how many kms the 2005 model for $14,990 had. So
for each site I've created a script that takes the data and scrapes it for
only the info I'm interested in: model, year, kms, number of owners,
transmission, price. The data is then stored in a db from which I can group,
compare and order the cars so that I can figure which appear to be better
value for money.

As for lesson 1, I reckon a 100% chance that someone will have a text
manipulation problem so after discussing what people want their computer's
to do, I'd cover how easy it is to work with text in LC. Simple stack, two
fields - one to enter data, the other for output. Start with a button, but
eventually go with 'on closeField'. Show them how they can extract the
first, second, last and char/word/line 24 from the field. How they can add
or remove char/word/line. How char/word/line can be rearranged. If the text
happens to be a list, how they can be referred to as items. How if the data
has any form of consistency, then extraction of specific data is easy; this
can be because it's always on line x, it's always word y, it's always the
word before 'kms', or are the chars immediately after $ - you can avoid grep
and still find the data, that's the great thing about LC. But if you spark
someone's interest, you can always teach them a grep solution too :-)

And just to give you my personal favourite, I'd teach them the switch
statement.

switch (tInput)
   case ("yes")
  hYesHandle
   break
   case ("no")
 hNoHandle
   break
   default
 answer "An answer I wasn't expecting" title "Case Error!"
breakpoint
end switch

I hated nested if-then-else statements which can be extremely hard to
understand, so unless I'm 100% certain that it's yes/no, true/false, or 1/0
, I always use a switch statement similar to above - with the default set to
tell me I'm missing something followed by a breakpoint. As soon as I get a
"maybe" input, I'm prompted that I need extra code, presented with the
Script Editor exactly in the handler where the extra code is needed and the
Variable Pane showing what's in tInput so I can immediately figure out why
the script didn't proceed as expected. For newbie programmers this can save
a huge amount of time wasted (read - turn you off programing frustration)
trying to figure out why the outcome is wrong.

Good luck,
___
use-livecode mailing list
use-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: Back to LC & Inventive Users

2011-08-16 Thread Kay C Lan
Judy,

I might be too late to the thread but I'll offer a slightly twisted
perspective of where to go with this. These are adults, right?

Don't ask them so much about what they like, instead figure out what ticks
them off the most, or wastes their time the most or elicits the response
'it's a friggin computer, it should be able to..'

To me, and I don't mean any offense to those who suggested them, but to
build a calculator, address book, music library, etc etc, would having me
rolling my eyes with I've already got one of those, why reinvent the wheel -
with one that is worse than the free one I've already got. I'd switch off in
that class immediately.

But a special kind of calculator - for specific task as per the Therac-25
suggestion, or a music library that allows me to search the lyrics - because
iTunes doesn't, now that would interest me.

as Peter Brigham said in another tread:

but I think that the most user-friendly apps are those produced by the
> people who use them...
>
> my own practice management stack is miles ahead of anything else I've seen
> but then I designed it for just the way I think and work
>

To me the key is to have your class members identify a number of small
'real' problems that you filter to those you know that LC can quickly solve.
These might take YOU anywhere from 1 - 6 hrs to solve. You might also
discover that a couple of problems fall into the same category, like text
parsing - my favourite ;-) It might then be possible to work with the class
as a whole to solve one problem, then assign homework to apply their new
found knowledge to solve the other.

As an example, I'm interested in buying a second hand car, and I visit two
websites to check out what's available. It's a hassle flicking through the
pages and trying to remember how many kms the 2005 model for $14,990 had. So
for each site I've created a script that takes the data and scrapes it for
only the info I'm interested in: model, year, kms, number of owners,
transmission, price. The data is then stored in a db from which I can group,
compare and order the cars so that I can figure which appear to be better
value for money.

As for lesson 1, I reckon a 100% chance that someone will have a text
manipulation problem so after discussing what people want their computer's
to do, I'd cover how easy it is to work with text in LC. Simple stack, two
fields - one to enter data, the other for output. Start with a button, but
eventually go with 'on closeField'. Show them how they can extract the
first, second, last and char/word/line 24 from the field. How they can add
or remove char/word/line. How char/word/line can be rearranged. If the text
happens to be a list, how they can be referred to as items. How if the data
has any form of consistency, then extraction of specific data is easy; this
can be because it's always on line x, it's always word y, it's always the
word before 'kms', or are the chars immediately after $ - you can avoid grep
and still find the data, that's the great thing about LC. But if you spark
someone's interest, you can always teach them a grep solution too :-)

And just to give you my personal favourite, I'd teach them the switch
statement.

switch (tInput)
  case ("yes")
 hYesHandle
  break
  case ("no")
hNoHandle
  break
  default
answer "An answer I wasn't expecting" title "Case Error!"
   breakpoint
end switch

I hated nested if-then-else statements which can be extremely hard to
understand, so unless I'm 100% certain that it's yes/no, true/false, or 1/0
, I always use a switch statement similar to above - with the default set to
tell me I'm missing something followed by a breakpoint. As soon as I get a
"maybe" input, I'm prompted that I need extra code, presented with the
Script Editor exactly in the handler where the extra code is needed and the
Variable Pane showing what's in tInput so I can immediately figure out why
the script didn't proceed as expected. For newbie programmers this can save
a huge amount of time wasted (read - turn you off programing frustration)
trying to figure out why the outcome is wrong.

Good luck,
___
use-livecode mailing list
use-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: Ideal Unicode?

2011-08-16 Thread Richmond Mathewson

"Ideal Unicode'

Will never exist for a few simple reasons:

1. Unicode is a moving target (the Unicode commission keep producing 
updated versions).


2. Computers and computer operating systems are moving targets.

If one is prepared to invest one hell of a lot of time (and I have) 
poking around in Livecode one can do almost everything with unicode; 
admittedly often in a cumbersome and counter intuitive sort of way.


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