Re: Reading multiple identical nodes in an XML file

2011-10-16 Thread Jim Ault

This approach takes about
11 ticks to do 20,000 lines of XML
and creates a single tab-delim table
--
but first fix the malformed tag

12

12

-
on parseXML
   put empty into MT
   put tab into TB
   put "^" into TB --remove after debugging

   put fld incmgTxtFld into dataBlock
   replace CR with MT in dataBlock  --purge all
   put "orphanage, small-child, name, age" into tree
   replace space with MT in tree

   replace (item 1 of tree) with CR in dataBlock

   --isolate each small-child & trunc data line
   replace ("") with CR in dataBlock

   --make sure each line a good data line
   get ("")
   filter dataBlock with ("<" & item 2 of tree & space & "*")

   --isolate data & build a table
   repeat for each line LNN in dataBlock
put LNN into tblRow

  repeat for each item ITM in (item 3 to -1 of tree)
   replace ""  with MT in tblRow
   replace "<" & ITM & ">"  with TB in tblRow
  end repeat
  replace "=" with CR in tblRow
  put line 2 of tblRow & CR after newDataTable
   end repeat
   replace ">" with MT in newDataTable
   put newDataTable into msg

end parseXML
-

LC chunking is very fast.
Hope this helps

Jim Ault

On Oct 17, 2011, at 12:45 AM, Sivakatirswami wrote:


I am an XML newbie:

if you want to extract data from a series of  identical nodes in a  
XML file, how do you set up the repeat function?







Rajan
12



John
8



Jose
9





--
Om Shanti
Sivakatirswami


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


Reading multiple identical nodes in an XML file

2011-10-16 Thread Sivakatirswami

I am an XML newbie:

if you want to extract data from a series of  identical nodes in a XML 
file, how do you set up the repeat function?







Rajan
12



John
8



Jose
9


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


Re: Using spaces/backdrop on OSX

2011-10-16 Thread Pete
Thanks Peter.  I forgot to mention I also tried this without a backdrop -
same problem.  I'm on 10.6.8 also LC 4.6.2.

Not really a big deal but I think I will probably enter it at the QCC just
so it's on record.

Pete
Molly's Revenge 




On Sun, Oct 16, 2011 at 6:55 PM, Peter M. Brigham, MD wrote:

> A bug, I think. Sounds as if LC isn't handling properly whatever message
> OSX provides for notification of Space change. I never use the backdrop, so
> I had not seen this, but when I test it now on Snow Leopard I see a brief
> flash of my open stack window then it disappears. MacBook, OSX 10.6.8, Rev
> Studio 4.5.3, build 1210.
>
> -- Peter
>
> Peter M. Brigham
> pmb...@gmail.com
> http://home.comcast.net/~pmbrig
>
>
> On Oct 16, 2011, at 9:14 PM, Pete wrote:
>
> > Trying to run the IDE in a separate Spaces window and setting the
> backdrop
> > to black.  All works fine until I switch to another space then back to
> the
> > one running the IDE.
> >
> > When I leave the IDE space, I have the Tools palette, the Application
> > Browser, the Message Box, and a main stack window open.  When I return to
> > the IDE space, only the tools palette and the Message Box show up.  I've
> > tried setting raiseWIndows to true - made no difference.
> >
> > Any ideas might be causing this?
> >
> > Pete
> > Molly's Revenge 
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Using spaces/backdrop on OSX

2011-10-16 Thread Peter M. Brigham, MD
A bug, I think. Sounds as if LC isn't handling properly whatever message OSX 
provides for notification of Space change. I never use the backdrop, so I had 
not seen this, but when I test it now on Snow Leopard I see a brief flash of my 
open stack window then it disappears. MacBook, OSX 10.6.8, Rev Studio 4.5.3, 
build 1210.

-- Peter

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


On Oct 16, 2011, at 9:14 PM, Pete wrote:

> Trying to run the IDE in a separate Spaces window and setting the backdrop
> to black.  All works fine until I switch to another space then back to the
> one running the IDE.
> 
> When I leave the IDE space, I have the Tools palette, the Application
> Browser, the Message Box, and a main stack window open.  When I return to
> the IDE space, only the tools palette and the Message Box show up.  I've
> tried setting raiseWIndows to true - made no difference.
> 
> Any ideas might be causing this?
> 
> Pete
> Molly's Revenge 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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


Using spaces/backdrop on OSX

2011-10-16 Thread Pete
Trying to run the IDE in a separate Spaces window and setting the backdrop
to black.  All works fine until I switch to another space then back to the
one running the IDE.

When I leave the IDE space, I have the Tools palette, the Application
Browser, the Message Box, and a main stack window open.  When I return to
the IDE space, only the tools palette and the Message Box show up.  I've
tried setting raiseWIndows to true - made no difference.

Any ideas might be causing this?

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


New rendering testing

2011-10-16 Thread James Hurley
i have been experimenting with the new rendering tools in 5.0

Here is a stack that allows you to experiment for yourselves. Run this in the 
message box.

   go url "http://jamesphurley.com/jhurleyFolder/SimpleMotion.livecode";

It doen't appear that 5.0 is that different from 4.6 when the graphic demands 
are simple. But for multiple moving objects, there is clearly an advantage to 
5.0

I have also post a stack illustrating a number of graphic functions on the User 
Samples section of the LiveCode application. These all work reasonably well in 
4.6 and 5.0 They may also be downloaded by typing this in the Message Box:

 go url 
"http://jamesphurley.com/jhurleyFolder/ProgrammableGraphics.livecode";

Render unto 5.0 that which is complex and 
render unto 4.6 that which is simpler.

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


Re: how to read an specific page into pdf document?

2011-10-16 Thread David C.
> David, this is really interesting. Where does the PDF page appear? I mean is 
> it in a stack window, and could it be manipulated by a LiveCode program? My 
> guess is that this is what Alessandro was aiming at. I don't quite understand 
> what's happening in this script. Also, in your case do you need to check if 
> the user has actually got a copy of Adobe Reader installed? Looks like this 
> method only works if you know not only that it's installed but exactly which 
> version it is. Maybe in your context this isn't an issue - can you comment?
>
> Curious
>
> TIA
>
> Graham

Hello Graham,
You are correct that I made no provisions for checking to see if the
user has Adobe Reader installed, or at what version and/or location.
My real point is/was that in order to launch a non-shell application
using the LC shell command (AcroRd32.exe in this case), you must first
set the default folder to the location where the targeted executable
resides.

On my system here, the script I posted opens a regular PDF file
(located in my documents folder) to the exact page number specified,
just as if I had manually opened it and navigated to the page.

I really didn't go any further in testing the functionality than that. :)

Best Regards,
David C.

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


Re: [OT] Slugworth

2011-10-16 Thread zryip theSlug
On Sun, Oct 16, 2011 at 5:29 PM, Richmond Mathewson
 wrote:
> http://www.markshuttleworth.com/archives/784
>
> Posing Pangolin . . .  :)
>
> How can you write such nonsense to justify a silly name?
>
> http://articles.businessinsider.com/2011-08-05/home/29964103_1_trading-platform-trade-secrets-high-frequency-trading
>
> who is whispering in whose gully lugs one wonders?

Interesting articles.


In my opinion a slug worth an half Pangolin, a little less if the said
slug was crushed by a shovel.


Best regards,
-- 
-Zryip TheSlug- My name is less silly than a pink Pangolin.
http://www.aslugontheroad.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: how to read an specific page into pdf document?

2011-10-16 Thread Graham Samuel
David, this is really interesting. Where does the PDF page appear? I mean is it 
in a stack window, and could it be manipulated by a LiveCode program? My guess 
is that this is what Alessandro was aiming at. I don't quite understand what's 
happening in this script. Also, in your case do you need to check if the user 
has actually got a copy of Adobe Reader installed? Looks like this method only 
works if you know not only that it's installed but exactly which version it is. 
Maybe in your context this isn't an issue - can you comment?

Curious

TIA

Graham

On Sat, 15 Oct 2011 09:44:12 -0500,  "David C."  wrote:

> 
> Alessandro Pisoni wrote:
 how can I do to read a page in a pdf file with Revolution, which syntax
>>> should I use?
> 
> This works on my end, (64 bit Windows 7):
> 
> on mouseUp
>   set the defaultFolder to "C:\Program Files (x86)\Adobe\Reader 10.0\Reader\"
>   put "AcroRd32.exe" & " /a page=10=openactions
> C:\TargetDocumentName.pdf" into tCommand
>   set the hideConsoleWindows to true
>   get shell (tCommand)
>   -- reset the default folder location back as it was if required
>   set the defaultFolder to specialFolderPath("home")
> end mouseUp
> 
> Best regards,
> David C.
> 

___
use-livecode mailing list
use-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: Landscape Orientation iOS LC5 - Solved

2011-10-16 Thread ddas
After re-sizing the stack and back again, the orientation started to behave the 
same way on both the stack and the simulator.

Thanks,
Debdoot

On Oct 14, 2011, at 12:16 PM, J. Landman Gay wrote:

> On 10/14/11 9:45 AM, ddas wrote:
>> Hi Colin,
>> 
>> The splash is not the problem. I want my presentation to stay in
>> landscape left regardless of the physical orientation of the device.
>> It works as desired in the simulator, just not on the device.
> 
> If I remember right, someone's app was rejected from the App Store because it 
> didn't support both orientations. So you may want to rethink that.
> 
> What are your iOS standalone settings? I've found that if you set them up in 
> the SB, and do not script them in your stack, it works as expected.
> 
> -- 
> 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


[OT] Slugworth

2011-10-16 Thread Richmond Mathewson

http://www.markshuttleworth.com/archives/784

Posing Pangolin . . .  :)

How can you write such nonsense to justify a silly name?

http://articles.businessinsider.com/2011-08-05/home/29964103_1_trading-platform-trade-secrets-high-frequency-trading

who is whispering in whose gully lugs one wonders?

___
use-livecode mailing list
use-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: Works in IDE but not the iOS simulator

2011-10-16 Thread Bill Vlahos
Mark,

I put the "with messages" in both places and it works in the simulator but not 
on an actual iPhone (iOS 5).

Bill Vlahos

On Oct 16, 2011, at 1:37 AM, Mark Schonewille wrote:

> Hi Bill,
> 
> I'm surprised that you claim this to work in the IDE. You need to use 
> repeat...with messages and wait...with messages.
> 
> --
> Best regards,
> 
> Mark Schonewille
> 
> Economy-x-Talk Consulting and Software Engineering
> Homepage: http://economy-x-talk.com
> Twitter: http://twitter.com/xtalkprogrammer
> KvK: 50277553
> 
> See what you get with only a small contribution. All our LiveCode downloads 
> are listed at http://qery.us/zr
> 
> On 16 okt 2011, at 05:32, Bill Vlahos wrote:
> 
>> Katsuyuki Katayama has a nifty Timer sample program in RevOnline. It is a 
>> stopwatch program that lets you start and stop the timer.
>> 
>> In the IDE the start button and stop buttons work as expected. However, in 
>> the iOS Simulator you can start it but you can't stop it.
>> 
>> Why?
>> 
>> Here is the code from the "start" button.
>> on mouseUp
>>  put empty into Bigin
>>  put empty into Now
>>  put empty into Timer
>>  put empty into field "Time"
>>  put empty into count
>> 
>>  if the hilite of button "start"  is true
>>  then
>> set the hilite of button "stop"  to false
>>  end if
>> 
>>  get the seconds
>>  put it into Bigin
>> 
>>  repeat while the hilite of button "start" is true
>> get the seconds
>> put it into Now
>> put Now - Bigin into Timer
>> put Timer into field "Time"
>> wait for 100 milliseconds
>> 
>>  if the mouseClick
>> --the hilite of button "stop" is true
>>  then
>> exit repeat
>> --set the hilite of button "start" to false
>>  end if
>>  end repeat
>> end mouseUp
>> 
>> 
>> Here is the code from the "stop" button
>> on mouseUp
>> if the hilite of button "stop"  is true
>>  then
>> set the hilite of button "start"  to false
>>  end if
>> end mouseUp
>> 
>> Bill Vlahos
> 
> 
> ___
> use-livecode mailing list
> use-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: [OT] Plea for help

2011-10-16 Thread Richmond Mathewson

On 10/16/2011 03:27 AM, Roger Eller wrote:

On Sat, Oct 15, 2011 at 2:34 PM, Richmond Mathewson wrote:


I took my 1.4 TB external hard-drive up to the school; partitioned into 8
HFS+ partitions and 2 DOS ones. Tried to reformat one of the HFS+ ones as
DOS at which point the whole Hard-Drive went down.

This was with Disk tools on a G3 iMac running Mac OS 10.4.11

Both Mac and Linux say the thing is completely unformatted; and I have lost
my backups for the last 15 years.

Advice gratefully received  [ apart from "always backup everything onto 97
seperate devices . . . :( ]


Here's some free software that may help.  You'll have to attach the drive to
a Windows machine, and the hfs partitions are not recoverable with this
tool.  I've also seen drives recovered with testdisk on linux, but I haven't
done it myself.

http://www.ptdd.com/


The info says it does not recognise HFS and HFS+ partitions, so, even 
with a Windows machine there would not be much joy.




˜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



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


Re: [OT] Plea for help

2011-10-16 Thread Richmond Mathewson

On 10/16/2011 03:26 AM, Tim Selander wrote:
I used Disk Warrior with great success many times in the OS9 days; not 
sure if they still are around under OSX.


I have also had success with "Data Rescue" from Prosoft Engineering. 
It doesn't 'fix' the disk, but scans the disk and copies off files it 
finds to a second disk (so you need another disk of equal or larger 
size). Takes a long time but recovered stuff from a severely damaged 
disk.




Thank you everyone for your ideas.  I found that I had Data Rescue II, 
that I bought a few years ago, backed up on a CD; so I have installed 
it; bought a 2TB external drive (currently grinding away being "diced 
and sliced"), and, at least theoretically, am ready to run; a process 
that, I imagine, will take about a week.


I ran a Demo of R-Studio for Mac, which, while being very slow indeed, 
did at least show that the partitions, with their data, are "There", 
rather than deleted.


I wish there were a simple way just to reset the MBR (or whatever it 
is) so the partitions would be recognised again, but that is too 
much to hope for.


___
use-livecode mailing list
use-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: Works in IDE but not the iOS simulator

2011-10-16 Thread Mark Schonewille
Hi Bill,

I'm surprised that you claim this to work in the IDE. You need to use 
repeat...with messages and wait...with messages.

--
Best regards,

Mark Schonewille

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

See what you get with only a small contribution. All our LiveCode downloads are 
listed at http://qery.us/zr

On 16 okt 2011, at 05:32, Bill Vlahos wrote:

> Katsuyuki Katayama has a nifty Timer sample program in RevOnline. It is a 
> stopwatch program that lets you start and stop the timer.
> 
> In the IDE the start button and stop buttons work as expected. However, in 
> the iOS Simulator you can start it but you can't stop it.
> 
> Why?
> 
> Here is the code from the "start" button.
> on mouseUp
>   put empty into Bigin
>   put empty into Now
>   put empty into Timer
>   put empty into field "Time"
>   put empty into count
> 
>   if the hilite of button "start"  is true
>   then
>  set the hilite of button "stop"  to false
>   end if
> 
>   get the seconds
>   put it into Bigin
> 
>   repeat while the hilite of button "start" is true
>  get the seconds
>  put it into Now
>  put Now - Bigin into Timer
>  put Timer into field "Time"
>  wait for 100 milliseconds
> 
>   if the mouseClick
>  --the hilite of button "stop" is true
>   then
>  exit repeat
>  --set the hilite of button "start" to false
>   end if
>   end repeat
> end mouseUp
> 
> 
> Here is the code from the "stop" button
> on mouseUp
>  if the hilite of button "stop"  is true
>   then
>  set the hilite of button "start"  to false
>   end if
> end mouseUp
> 
> Bill Vlahos


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