Re: How to store some data in my stack

2012-01-26 Thread Takashi Yoshino
Hi, Ken

> Are you *really* using curly quotes around "documents" and "testFile.txt"? 
> The only reason I ask is that you have straight quotes around "Data" and "no 
> file yet!", so I figured I'd check. If so, that might be the problem 
> (although I'd think you'd get an error dialog first, but)…

Thank you for you help.
The problem was resolved for your comment.

Quote is bad effect, but no error messages….

Thanks so much.


-- Write button
on mouseUp
   put fld "Data" into URL("file:" & specialFolderPath(documents) & SLASH & 
testFile.txt)
end mouseUp

-- Read button
on mouseUp
   put URL("file:" & specialFolderPath(documents) & SLASH & testFile.txt) into 
fld "Data"
end mouseUp



But Japanese Text does not write correctly both Mac and Android...



_.__ ._ _. ._ ._.__ .. ._._. _._ . ..__ ._.__ ._._. ___. .._ __.. __ .._ 
Takashi Yoshino 
http://www.wakayama-u.ac.jp/~yoshino/lab/
Tel: +81-73-457-8441

On 2012/01/27, at 2:36, Ken Ray wrote:

> 
> On Jan 25, 2012, at 10:55 PM, J. Landman Gay wrote:
> 
 put specialFolderPath(“documents”)&  "/"&  “testFile.txt” into tFile
 if there is a file tFile then
   put URL("file:"&  tFile) into fld "Data"
   put the result into fld "msg"
 else
 answer "No file yet!"
 end if
 end mouseUp
>>> 
>>> "no file yet!" is shown in an android.
>>> 
>>> 'Write' function can't work, that is,
>>>  put fld "Data" into URL("file:"&  specialFolderPath(“documents”)&  "/"&  
>>> “testFile.txt”)
>>> is not working on an android.
> 
> Are you *really* using curly quotes around "documents" and "testFile.txt"? 
> The only reason I ask is that you have straight quotes around "Data" and "no 
> file yet!", so I figured I'd check. If so, that might be the problem 
> (although I'd think you'd get an error dialog first, but)…
> 
> Ken Ray
> Sons of Thunder Software, Inc.
> Email: k...@sonsothunder.com
> Web Site: http://www.sonsothunder.com/
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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


Re: Cloning stack reset object IDs?

2012-01-26 Thread Pete
Hi Marty,
I just cloned a datagrid to see what would happen.  I'm afraid all the
control ids just carried on from the last one used in the original datagrid
so using clone doesn't help.

I also tried copying a datagrid from its original card to a card in a
different substack.  The control ids in the copied datagrid were way lower
than in the original datagrid (back down in the 1300 range) so that may be
a good way round this, although there are probably other complications I
haven't thought of.

I guess that's all expected behavior since IDs are numbered consecutively
within a stack (I think).

Don't have DGH so don't know what the cloning chamber does - sounds vaguely
Frankensteinian to me!

Pete

On Thu, Jan 26, 2012 at 8:35 PM, Marty Knapp  wrote:

> There has been talk about datagrids possibly running out of object IDs
> after a while. I'm wondering what happens when you clone a stack with a
> datagrid - does that buy you back anything? If not, I assume that using the
> "Cloning Chamber" in the Data Grid Helper plugin would give you a fresh
> start? The reason I ask is that I've been doing a lot of testing with large
> data sets in the IDE and thought that maybe when I'm ready to deploy the
> app I should give it a fresh data grid stack. Any thoughts?
>
> Thanks,
> Marty Knapp
>
> __**_
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/**mailman/listinfo/use-livecode
>
>


-- 
Pete
Molly's Revenge 
___
use-livecode mailing list
use-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: too many images on one card?

2012-01-26 Thread Nicolas Cueto
> Is there some reason why you can't reference the hundreds or thousands of
> images in a folder rather than imbedded in the stack?

No reason. In fact, referencing is what I've done for years with my
stacks. Only this time, the stack in question was originally designed
a year ago for a very limited study-set (the alphabet), so, at the
time, I figured might as well save the images as objects. But now, a
year later, I've returned to that stack, to modify it for a larger
(but still limited) study-set (phonemes and phoneme combinations).

So, wishing to avoid diving back into my convoluted code, I thought
I'd first bug the list with a question. Namely, is having hundreds
(1000s?) of hidden images on one card a problem for older pc's (800Mhz
cpu, 500Mb ram, Win2k)?


> On a mac, those images could live inside the .app package.

This made me think about iPhone. Do referenced images work on
standalones for iPhones the same as they do on desktop standalones?
Just curious.

--
Nicolas Cueto

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


Card Buttons in Windows

2012-01-26 Thread Peter Bogdanoff
Hi,

I have a bizarre issue that I can't figure out.

I have a stack created in OS X that I brought over to Windows. In Windows, card 
buttons are 12% wider and moved to the right 7 pixels.

For example, 4 card buttons, touching side by side. After opening the stack in 
Windows I see the first button moved 7 pixels to the right and stretched 16 
pixels wider. The three remaining buttons continue to be touching their sides 
but each 12% wider.

1. Card button heights are the same
2. Background buttons are normal size
3. The stack size is unchanged and was locked
4. No live resizing enabled
5. The same stack brought back to OS X had the new sizes of the card buttons
6. I did a test with a new stack with similar size and buttons--Created in OS X 
but showing unchanged in Windows, problem not replicated
7. Working with LC 5.0.0, but a runtime created in 4.6.3 showed the same 
anomaly.
8. Testing in Windows XP & 7 using Virtual Box for 7 and VMWare Fusion for XP 
on my Mac OS X Snow Lion
9. Nothing in my scripts that resize anything
10. The stack was originally created in HyperCard, converted to LC in 4.6.3
11. New buttons created in the Mac OS X stack also show the same resizing when 
the stack is brought to Windows.

Anybody have anything on this???

Peter


Peter Bogdanoff
.--. . - . .-.   -... --- --. -.. .- -. --- ..-. ..-. 
(310) 825-8494
UCLA School of the Arts and Architecture
240 Charles Young Drive N
Broad Art Center 2275
Los Angeles, CA 90095
___
use-livecode mailing list
use-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: too many images on one card?

2012-01-26 Thread stephen barncard
Is there some reason why you can't reference the hundreds or thousands of
images in a folder rather than imbedded in the stack? You'd have only the
display template stack to load and ony the images needed to be seen on that
'page'. If security is an issue, you could use encrypted files

On a mac, those images could live inside the .app package.

On 26 January 2012 19:14, Nicolas Cueto  wrote:

> Hi Mark,
>
> > Whether the stack performs well really depends on the computer it runs
> on.
> > How old and slow are the computers you want to run the stack on?
>
> I'm away from those machines right now but, CPU is in the 800MHz area,
> and memory is 500MB or so.
>
> And, to clarify. I'm concerned not about the 36 images that are
> visible, but about the 100's (1000's?) that are not, all on the one
> card.
>
> Thanks again.
>
> --
> Nicolas Cueto
>
> ___
> use-livecode mailing list
> use-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


Cloning stack reset object IDs?

2012-01-26 Thread Marty Knapp
There has been talk about datagrids possibly running out of object IDs 
after a while. I'm wondering what happens when you clone a stack with a 
datagrid - does that buy you back anything? If not, I assume that using 
the "Cloning Chamber" in the Data Grid Helper plugin would give you a 
fresh start? The reason I ask is that I've been doing a lot of testing 
with large data sets in the IDE and thought that maybe when I'm ready to 
deploy the app I should give it a fresh data grid stack. Any thoughts?


Thanks,
Marty Knapp

___
use-livecode mailing list
use-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: too many images on one card?

2012-01-26 Thread Nicolas Cueto
Hi Mark,

> Whether the stack performs well really depends on the computer it runs on.
> How old and slow are the computers you want to run the stack on?

I'm away from those machines right now but, CPU is in the 800MHz area,
and memory is 500MB or so.

And, to clarify. I'm concerned not about the 36 images that are
visible, but about the 100's (1000's?) that are not, all on the one
card.

Thanks again.

--
Nicolas Cueto

___
use-livecode mailing list
use-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: too many images on one card?

2012-01-26 Thread Mark Schonewille
Hi Nicolas,

72 Objects aren't that much and I think this isn't much of a problem for 
LiveCode. If you try to build a standalone, it might take a little longer 
because of the many objects, but I don't expect any problems besides that. 

Whether the stack performs well really depends on the computer it runs on. How 
old and slow are the computers you want to run the stack on? If your Pentium is 
a 300Mhz CPU and the "minimum memory" is 256MB then you might have a problem.

--
Best regards,

Mark Schonewille

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

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

On 27 jan 2012, at 01:32, Nicolas Cueto wrote:

>> What exactly are you trying to do?
> 
> A group gets cloned, and the icons of its two buttons get set to the
> id of one of those 100's of jpgs. There's a grid of these cloned
> groups, up to 6x6. So that's up to 36x2 referenced images, with 36
> always visible.
> 
> What I'm also trying to do is to avoid recoding. My code now sets the
> icon of a button to the id of image ABC. It can do that because the
> button and the referred-to image are on the same card. Problem is
> that, given the mess that is my code, if I move those 100's of jpgs
> to, say, another card, then I must comb thru all of my code to modify
> those "set icon" references to "the id of image ABC of card DEF".
> 
> So, besides my concern about things slowing down, I'm also trying to
> avoid having to go thru my code.
> 
> Thanks, Mark.
> 
> --
> Nicolas Cueto
> 
> ___
> use-livecode mailing list
> use-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: too many images on one card?

2012-01-26 Thread Nicolas Cueto
> What exactly are you trying to do?

A group gets cloned, and the icons of its two buttons get set to the
id of one of those 100's of jpgs. There's a grid of these cloned
groups, up to 6x6. So that's up to 36x2 referenced images, with 36
always visible.

What I'm also trying to do is to avoid recoding. My code now sets the
icon of a button to the id of image ABC. It can do that because the
button and the referred-to image are on the same card. Problem is
that, given the mess that is my code, if I move those 100's of jpgs
to, say, another card, then I must comb thru all of my code to modify
those "set icon" references to "the id of image ABC of card DEF".

So, besides my concern about things slowing down, I'm also trying to
avoid having to go thru my code.

Thanks, Mark.

--
Nicolas Cueto

___
use-livecode mailing list
use-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: too many images on one card?

2012-01-26 Thread Mark Schonewille
Hi,

I remember two cases. First case was someone creating a stack with tens of 
thousands of 4x4 px images. On a 350Ghz machine, showing and hiding one image 
took several seconds. On a current 2+ ghz machine it will be faster, but I 
expect it to still be noticeably slow. I didn't try to create a standalone, but 
this could have been problematic.

The other case is a stack with thousands of cards with several pictures, movies 
and sounds on each card. The stack as a whole was more than 1 gb big. We had 
all kinds of inexplicable problems with the stack, including crashes and the 
impossibility to create a standalone, even after moving to a faster computer 
with more memory.

What exactly are you trying to do?

--
Best regards,

Mark Schonewille

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

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

On 27 jan 2012, at 00:52, Nicolas Cueto wrote:

> Hello,
> 
> My 1-card stack has hundreds of small jpgs (about 4kb each), with
> hundreds more jpgs to be added in the near future. All these jpgs are
> on one card, and they are in hidden groups.
> 
> The thing I'm wondering now is, will having so many images all on one
> card cause runtime problems, despite their being hidden? My stacks run
> on old PC boxes -- Win2K, Pentium/Celeron cpus, minimum memory -- and
> I'm worried that this new stack might not run as zippily as the
> others.
> 
> So, do I need to worry?
> 
> Thanks.
> 
> --
> Nicolas Cueto
> 
> ___
> use-livecode mailing list
> use-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


too many images on one card?

2012-01-26 Thread Nicolas Cueto
Hello,

My 1-card stack has hundreds of small jpgs (about 4kb each), with
hundreds more jpgs to be added in the near future. All these jpgs are
on one card, and they are in hidden groups.

The thing I'm wondering now is, will having so many images all on one
card cause runtime problems, despite their being hidden? My stacks run
on old PC boxes -- Win2K, Pentium/Celeron cpus, minimum memory -- and
I'm worried that this new stack might not run as zippily as the
others.

So, do I need to worry?

Thanks.

--
Nicolas Cueto

___
use-livecode mailing list
use-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: Alternate Form of printKeys()

2012-01-26 Thread Bob Sneidar
Here are the functions. I have tested them and they seem to be fine, but any 
bug reports would be appreciated. Note that there is another distinct advantage 
of these functions over the original printKeys(): These functions allow for 
returns and tabs in the values. I convert them to ascii(30) and ascii(11) 
respectively when I return text and back again when I return an array. 

Also bear in mind I do no error checking. Who knows what would happen if you 
pass something other than what is expected. Hang on to your socks! :-)

function altPrintKeys @pArray, theKeyList, pFullData
put numtochar(11) into vertTab
put numtochar(30) into altCr
put the keys of pArray into theKeys
sort theKeys numeric
 
repeat for each line theKey in theKeys
put "[" & theKey & "] " after theKeyList
if theKey is not a number then
replace theKey with quote & theKey & quote in theKeyList
end if
if pArray[theKey] is an array then
put pArray[theKey] into theTempArray
put altPrintKeys(theTempArray, theKeyList, pFullData) after theText
put empty into the last word of theKeyList
delete the last char of theKeyList
put cr into the last char of theText
else
put "pArray " & the last word of theKeyList into theKeyName
-- put "put " & theKeyName & " into theValue" into theCommand
-- do theCommand
put the value of theKeyName into theValue
replace tab with vertTab in theValue
replace return with altCr in theValue
put theKeyList & tab & theValue & comma after theText
put empty into the last word of theKeyList
delete the last char of theKeyList
end if
end repeat

return theText
end altPrintKeys

function altKeysToArray theText
put numtochar(11) into vertTab
put numtochar(30) into altCr
repeat for each line theRecord in theText
repeat for each item theKeyData in theRecord
put the itemdelimiter into theOldDelim
set the itemdelimiter to tab
put item 1 of theKeyData into theKeyList
put item 2 of theKeyData into theValue
replace vertTab with tab in theValue
replace altCr with return in theValue
set the itemdelimiter to theOldDelim
put "put " & quote & theValue & quote & " into theArrayA " & 
theKeylist into theCommand
do theCommand
end repeat
end repeat

return theArrayA
end altKeysToArray
___
use-livecode mailing list
use-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: Alternate Form of printKeys()

2012-01-26 Thread Bob Sneidar
Try this in a fresh datagrid with no data:

on populateDatagrid
put "text1" into theDataA[1]["column1"]
put "text2" into theDataA[1]["column2"]
put "text3" into theDataA[2]["column1"]
put "text4" into theDataA[2]["column2"]
put "column1" into theColumns
put "Column 1" into theLabels
put 150 into theWidths
set the dgProp["columns"] of group "Datagrid1" to theColumns -- I got this 
wrong in another email sorry
set the dgProp["column labels"] of group "Datagrid1" to theLabels
set the dgProp["column widths"] of group "Datagrid1" to theWidths
set the dgData of group "Datagrid1" to theDataA
put the dgText of group "Datagrid1" & cr & "-" & cr & \
printkeys(the dgData of group "Datagrid1")
end populateDatagrid

You should only see column 1 but printkeys should be showing you the entire 
array. 

Bob


On Jan 26, 2012, at 2:37 PM, Pete wrote:

> Not disputing the usefullness of your routine or what you are seeing re
> dgtext/dgdata but that's NOT what I see in any of my datagrids - I see all
> columns in dgText not just hidden ones.  If I didn't, my apps would fail
> disastrously.  So let's try to figure out what's different between your
> situation and mine - LC version, OS, dg config , what else?
> 
> On Thu, Jan 26, 2012 at 2:20 PM, Bob Sneidar  wrote:
> 
>> but as I have mentioned before, I have columns of data that do not display
>> in the datagrid, and dgText only returns the visible columns of text.
> 
> 
> 
> 
> -- 
> 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


Re: dgText vs. dgData

2012-01-26 Thread Bob Sneidar
I think it is the way I go about it. I set the dgProps["column names"] to a 
subset of the actual columns. I don't actually hide a column (is that a 
property you can set for a datagrid column?) This has the distinct advantage of 
allowing me to keep much more data in the datagrid than I want or need to 
display, and yet I have that data handy when I need it. As I have mentioned 
before, I am using the datagrid array as a kind of poor man's writable cursor. 
When I am ready to update I simply pass the dgDataOfIndex[theIndex]["uniqueid"] 
to my update query. The user never even knows it's there. I hide encrypted 
password data that way too. Seems cleaner. I thought this was the way the 
datagrid was intended to behave. Have I stumbled across an undocumented 
feature? If so then please, nobody make it go away! ;-)

Bob


On Jan 26, 2012, at 2:24 PM, Pete wrote:

> Yes, very odd.  I get the same number of columns and the same data listed
> for dgtext and dgdata including all the hidden columns.  Are the columns
> that don't turn up for you in dgtext hidden or have some different
> characteristic from those that do?
> 
> I'm on LC 5.0.2 on a Mac.
> 
> Pete
> 
> On Thu, Jan 26, 2012 at 2:03 PM, Bob Sneidar  wrote:
> 
>> Odd then that this command:
>> 
>> on datavstext
>>   put the dgText["true"] of group "dgTableData" into theResult
>>   put cr & "-" & cr after theResult
>>   put the dgData of group "dgTableData" into theDataA
>>   put printKeys(theDataA) after theResult
>>   put theResult
>> end datavstext
>> 
>> should return this result:
>> 
>> reservationid   buildingroomnumber  startdate   enddate
>> amount  clientidclientname
>> 1   Harmony 403 2012-01-12  2012-01-15  0   0
>> 2   Harmony 404 2012-01-14  2012-01-15  0   0
>> -
>> 1
>>conferencename:
>>amount: 0
>>enddate: 2012-01-15
>>conferenceid: 0
>>siteid: 2
>>baseunit: day
>>uniqueid: 8
>>clientid: 0
>>starttime: 4:00 PM
>>baseprice: 0
>>building: Harmony
>>clientname:
>>discount: 0
>>roomid: 49
>>rnotes:
>>startdate: 2012-01-12
>>endtime: 10:00 AM
>>roomnumber: 403
>>reservationid: 1
>>quantity: 1
>> 2
>>conferencename:
>>amount: 0
>>enddate: 2012-01-15
>>conferenceid:
>>siteid: 2
>>baseunit: day
>>uniqueid: 9
>>clientid: 0
>>starttime: 4:00 PM
>>baseprice: 0
>>building: Harmony
>>clientname:
>>discount: 0
>>roomid: 50
>>rnotes:
>>startdate: 2012-01-14
>>endtime: 10:00 AM
>>roomnumber: 404
>>reservationid: 2
>>quantity: 1
>> 
>> 
>> Bob
>> 
>> 
>> On Jan 26, 2012, at 12:43 PM, Pete wrote:
>> 
>>> Not sure what you mean by "displayed", but f you mean columns that are
>> not
>>> hidden, that's not my experience - I see hidden columns and all rows in
>>> dgText.
>>> Pete
>>> 
>>> On Thu, Jan 26, 2012 at 11:08 AM, Bob Sneidar  wrote:
>>> 
 Hi all. Here is an interesting twist on the issue of whether or not to
>> use
 dgText or dgData when working with datagrids. dgText will only give you
>> the
 DISPLAYED data in the datagrid as text. The dgData will give you ALL the
 data in the datagrid as an array, INCLUDING the columns that are NOT
>> being
 displayed. Another good argument for using dgData wherever you can.
 
 Now what we need is an update to the filter command so that it works on
 arrays!
 
 Bob
 
 
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode
 
 
>>> 
>>> 
>>> --
>>> Pete
>>> Molly's Revenge 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
> 
> 
> -- 
> Pete
> Molly's Revenge 
> ___
> use-livecode mailing list
> use-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-livec

Re: Alternate Form of printKeys()

2012-01-26 Thread Pete
Not disputing the usefullness of your routine or what you are seeing re
dgtext/dgdata but that's NOT what I see in any of my datagrids - I see all
columns in dgText not just hidden ones.  If I didn't, my apps would fail
disastrously.  So let's try to figure out what's different between your
situation and mine - LC version, OS, dg config , what else?

On Thu, Jan 26, 2012 at 2:20 PM, Bob Sneidar  wrote:

> but as I have mentioned before, I have columns of data that do not display
> in the datagrid, and dgText only returns the visible columns of text.




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


Re: dgText vs. dgData

2012-01-26 Thread Pete
Yes, very odd.  I get the same number of columns and the same data listed
for dgtext and dgdata including all the hidden columns.  Are the columns
that don't turn up for you in dgtext hidden or have some different
characteristic from those that do?

 I'm on LC 5.0.2 on a Mac.

Pete

On Thu, Jan 26, 2012 at 2:03 PM, Bob Sneidar  wrote:

> Odd then that this command:
>
> on datavstext
>put the dgText["true"] of group "dgTableData" into theResult
>put cr & "-" & cr after theResult
>put the dgData of group "dgTableData" into theDataA
>put printKeys(theDataA) after theResult
>put theResult
> end datavstext
>
> should return this result:
>
> reservationid   buildingroomnumber  startdate   enddate
> amount  clientidclientname
> 1   Harmony 403 2012-01-12  2012-01-15  0   0
> 2   Harmony 404 2012-01-14  2012-01-15  0   0
> -
> 1
> conferencename:
> amount: 0
> enddate: 2012-01-15
> conferenceid: 0
> siteid: 2
> baseunit: day
> uniqueid: 8
> clientid: 0
> starttime: 4:00 PM
> baseprice: 0
> building: Harmony
> clientname:
> discount: 0
> roomid: 49
> rnotes:
> startdate: 2012-01-12
> endtime: 10:00 AM
> roomnumber: 403
> reservationid: 1
> quantity: 1
> 2
> conferencename:
> amount: 0
> enddate: 2012-01-15
> conferenceid:
> siteid: 2
> baseunit: day
> uniqueid: 9
> clientid: 0
> starttime: 4:00 PM
> baseprice: 0
> building: Harmony
> clientname:
> discount: 0
> roomid: 50
> rnotes:
> startdate: 2012-01-14
> endtime: 10:00 AM
> roomnumber: 404
> reservationid: 2
> quantity: 1
>
>
> Bob
>
>
> On Jan 26, 2012, at 12:43 PM, Pete wrote:
>
> > Not sure what you mean by "displayed", but f you mean columns that are
> not
> > hidden, that's not my experience - I see hidden columns and all rows in
> > dgText.
> > Pete
> >
> > On Thu, Jan 26, 2012 at 11:08 AM, Bob Sneidar  wrote:
> >
> >> Hi all. Here is an interesting twist on the issue of whether or not to
> use
> >> dgText or dgData when working with datagrids. dgText will only give you
> the
> >> DISPLAYED data in the datagrid as text. The dgData will give you ALL the
> >> data in the datagrid as an array, INCLUDING the columns that are NOT
> being
> >> displayed. Another good argument for using dgData wherever you can.
> >>
> >> Now what we need is an update to the filter command so that it works on
> >> arrays!
> >>
> >> Bob
> >>
> >>
> >>
> >> ___
> >> use-livecode mailing list
> >> use-livecode@lists.runrev.com
> >> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> >>
> >
> >
> > --
> > Pete
> > Molly's Revenge 
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>


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


Alternate Form of printKeys()

2012-01-26 Thread Bob Sneidar
Hi all. I just wrote an alternate form of printKeys which some may find useful. 
Normally printKeys returns data in this form:

1
 conferencename: 
 amount: 0
 enddate: 2012-01-15
 conferenceid: 0
 siteid: 2
 baseunit: day
 uniqueid: 8
 clientid: 0
 starttime: 4:00 PM
 baseprice: 0
 building: Harmony
 clientname: 
 discount: 0
 roomid: 49
 rnotes: 
 startdate: 2012-01-12
 endtime: 10:00 AM
 roomnumber: 403
 reservationid: 1
 quantity: 1

This makes it fairly impossible to use the filter command for records based 
upon certain values being present. My function returns the values in this form:

[1] ["conferencename"]  ,[1] ["amount"] 0,[1] ["enddate"]   
2012-01-15,[1] ["conferenceid"] 0,[1] ["siteid"]2,[1] 
["baseunit"]  day,[1] ["uniqueid"]8,[1] ["clientid"]  0,[1] 
["starttime"] 4:00 PM,[1] ["baseprice"]   0,[1] ["building"]  
Harmony,[1] ["clientname"]  ,[1] ["discount"]   0,[1] ["roomid"]
49,[1] ["rnotes"]   ,[1] ["startdate"]  2012-01-12,[1] ["endtime"]  
10:00 AM,[1] ["roomnumber"] 403,[1] ["reservationid"]   1,[1] 
["quantity"]  1

The beauty of this is if I had a lot of lines and only wanted data that had 
"2012-" in the line I could:

filter theText with "*" & tab & "2012-" & "*" -- the tab is the value delimiter

I can then convert the text back into an array using another function, and 
voila! A subset of the original array! If anyone is interested in this let me 
know, otherwise I won't waste bandwidth on it. It is mainly useful for doing 
filtering on datagrid data. Sure I could do the same thing with the dgText, but 
as I have mentioned before, I have columns of data that do not display in the 
datagrid, and dgText only returns the visible columns of text. I need to 
preserve the array structure. 

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: Trouble with 'there is a'

2012-01-26 Thread Mark Schonewille
Hi Graham,

161 means "error in source expression". Probably, it is saying that "if there 
is a folder (the defaultFolder)" can't be parsed into something that makes 
sense, which is correct because it is only the first part of an if-then-else 
control structure. If you remove the "if" then LiveCode can parse the string to 
true or false.

--
Best regards,

Mark Schonewille

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

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

On 26 jan 2012, at 23:13, Graham Samuel wrote:

> I'm  using LS 5.0.2. on Windows XP (OK, running under Parallels on a Mac). 
> I'm getting unexpected results from the 'there is..' series of 
> functions/commands - the dictionary says they're implemented as functions, 
> which I can understand.
> 
> As a very simple test, in the message box I put:
> 
>   put (if there is a folder (the defaultFolder))
> 
> expecting to get 'true'. Instead I get the totally unexpected result:
> 
>   161,426,1,return (if there is a folder (the defaultFolder))
> 
> I suppose it's my fault, but what does this mean? Just to be clear, 'the 
> default folder' does have a value - it's:
> 
>  C:/Program Files/RunRev/LiveCode 5.0.2
> 
> Puzzled
> 
> Graham


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


Re: Trouble with 'there is a'

2012-01-26 Thread Devin Asay
Graham,

The problem is you're embedding a partial 'if' structure in your statement. 
Leave out the 'if':

   put (there is a folder (the defaultFolder))

HTH

Devin

On Jan 26, 2012, at 3:13 PM, Graham Samuel wrote:

> I'm  using LS 5.0.2. on Windows XP (OK, running under Parallels on a Mac). 
> I'm getting unexpected results from the 'there is..' series of 
> functions/commands - the dictionary says they're implemented as functions, 
> which I can understand.
> 
> As a very simple test, in the message box I put:
> 
>   put (if there is a folder (the defaultFolder))
> 
> expecting to get 'true'. Instead I get the totally unexpected result:
> 
>   161,426,1,return (if there is a folder (the defaultFolder))
> 
> I suppose it's my fault, but what does this mean? Just to be clear, 'the 
> default folder' does have a value - it's:
> 
>  C:/Program Files/RunRev/LiveCode 5.0.2
> 
> Puzzled
> 
> Graham
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

Devin Asay
Humanities Technology and Research Support Center
Brigham Young University




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


Trouble with 'there is a'

2012-01-26 Thread Graham Samuel
I'm  using LS 5.0.2. on Windows XP (OK, running under Parallels on a Mac). I'm 
getting unexpected results from the 'there is..' series of functions/commands - 
the dictionary says they're implemented as functions, which I can understand.

As a very simple test, in the message box I put:

   put (if there is a folder (the defaultFolder))

expecting to get 'true'. Instead I get the totally unexpected result:

   161,426,1,return (if there is a folder (the defaultFolder))

I suppose it's my fault, but what does this mean? Just to be clear, 'the 
default folder' does have a value - it's:

  C:/Program Files/RunRev/LiveCode 5.0.2

Puzzled

Graham

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


Re: Persistent Variables during recursion

2012-01-26 Thread Bob Sneidar
Thanks John I just had figured out that the way to do it was to pass the values 
as arguments in the recursion. 

Bob


On Jan 26, 2012, at 12:34 PM, John Craig wrote:

> Hi, Bob.  Here's one way of doing it.  In the first call, pIndex is empty, so 
> some initialization is performed.  The parameters are all passed with each 
> recursive call, but pSame is always the same value.
> 
> HTH
> 
> 
> :)
> 
> 
> 
> on mouseUp
>   test "12345", 1, 99
> end mouseUp
> 
> 
> command test pData, pChange, pSame, pIndex
>   if pIndex is not an integer then
>  put 1 into tpIndex
>  put "first time" & LF into msg
>   end if
> 
>   put char pIndex of pData after pData
>   put pIndex ^ 2 into pChange
>   add 1 to pIndex
> 
>   put pData & ", " & pChange & ", " & pSame & ", " & pIndex & LF after msg
> 
>   if length(pData) < 10 then
>  test pData, pChange, pSame, pIndex
>   end if
> end test
> 
> 
> On 26/01/2012 20:04, Bob Sneidar wrote:
>> Hi all. This is my first foray into recursive functions. There are two 
>> variables I would like to be persistent for as long as the script is 
>> running, but I want them to be empty the first time I call the recursive 
>> function. I have tried declaring the variables as local, but each time the 
>> function calls itself, the variables are wiped as though a new set is made. 
>> If I declare them as global, then of course the value persists even after 
>> the last recursion terminates. The function has no idea if it is  the first 
>> time through or one of the iterations. Any idea how to get around this?
>> 
>> 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
>> 
> 
> ___
> use-livecode mailing list
> use-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: dgText vs. dgData

2012-01-26 Thread Bob Sneidar
Odd then that this command:

on datavstext
put the dgText["true"] of group "dgTableData" into theResult
put cr & "-" & cr after theResult
put the dgData of group "dgTableData" into theDataA
put printKeys(theDataA) after theResult
put theResult
end datavstext

should return this result:

reservationid   buildingroomnumber  startdate   enddate amount  
clientidclientname
1   Harmony 403 2012-01-12  2012-01-15  0   0   
2   Harmony 404 2012-01-14  2012-01-15  0   0   
-
1
 conferencename: 
 amount: 0
 enddate: 2012-01-15
 conferenceid: 0
 siteid: 2
 baseunit: day
 uniqueid: 8
 clientid: 0
 starttime: 4:00 PM
 baseprice: 0
 building: Harmony
 clientname: 
 discount: 0
 roomid: 49
 rnotes: 
 startdate: 2012-01-12
 endtime: 10:00 AM
 roomnumber: 403
 reservationid: 1
 quantity: 1
2
 conferencename: 
 amount: 0
 enddate: 2012-01-15
 conferenceid: 
 siteid: 2
 baseunit: day
 uniqueid: 9
 clientid: 0
 starttime: 4:00 PM
 baseprice: 0
 building: Harmony
 clientname: 
 discount: 0
 roomid: 50
 rnotes: 
 startdate: 2012-01-14
 endtime: 10:00 AM
 roomnumber: 404
 reservationid: 2
 quantity: 1


Bob


On Jan 26, 2012, at 12:43 PM, Pete wrote:

> Not sure what you mean by "displayed", but f you mean columns that are not
> hidden, that's not my experience - I see hidden columns and all rows in
> dgText.
> Pete
> 
> On Thu, Jan 26, 2012 at 11:08 AM, Bob Sneidar  wrote:
> 
>> Hi all. Here is an interesting twist on the issue of whether or not to use
>> dgText or dgData when working with datagrids. dgText will only give you the
>> DISPLAYED data in the datagrid as text. The dgData will give you ALL the
>> data in the datagrid as an array, INCLUDING the columns that are NOT being
>> displayed. Another good argument for using dgData wherever you can.
>> 
>> Now what we need is an update to the filter command so that it works on
>> arrays!
>> 
>> Bob
>> 
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
> 
> 
> -- 
> Pete
> Molly's Revenge 
> ___
> use-livecode mailing list
> use-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: Persistent Variables during recursion

2012-01-26 Thread Alex Tweedly

Easiest way I know is to have
 - your variables be either global or script-local
 - add an additional parameter, used only for recursive calls.

so for the public interface, used from anywhere else, you do something like

put myFunction(a,b,c) into myVar

but within the function itself, you do something like


function myFunction pA, pB, pC, pRecursive
  if pRecursive is empty or pRecursive is false then
put empty into sVar1
put empty into gVar2
  end if

   put myFunction(mya, myb, myc, TRUE) into myVar

end myFunction


Of course, you can do more interesting things like

   if pRecursive is empty then
  put 0 into pRecursive
   end if
   put myFunction(a,b,c,pRecursive+1) into mVar
and then you also know how deeply you are nested (perhaps to give a more 
graceful recovery than "recursion limit exceeded" if something is going 
wrong ...)


-- Alex.

On 26/01/2012 20:04, Bob Sneidar wrote:

Hi all. This is my first foray into recursive functions. There are two 
variables I would like to be persistent for as long as the script is running, 
but I want them to be empty the first time I call the recursive function. I 
have tried declaring the variables as local, but each time the function calls 
itself, the variables are wiped as though a new set is made. If I declare them 
as global, then of course the value persists even after the last recursion 
terminates. The function has no idea if it is  the first time through or one of 
the iterations. Any idea how to get around this?

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
.




___
use-livecode mailing list
use-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: Persistent Variables during recursion

2012-01-26 Thread Pete
You need to pass the persistent variables as parameters to the recursive
function.  When you call the function for the first time, just make sure
the variables are empty, then when you call it from within itself, they'll
get passed with whatever the values are at the time of the call.
Pete

On Thu, Jan 26, 2012 at 12:04 PM, Bob Sneidar  wrote:

> Hi all. This is my first foray into recursive functions. There are two
> variables I would like to be persistent for as long as the script is
> running, but I want them to be empty the first time I call the recursive
> function. I have tried declaring the variables as local, but each time the
> function calls itself, the variables are wiped as though a new set is made.
> If I declare them as global, then of course the value persists even after
> the last recursion terminates. The function has no idea if it is  the first
> time through or one of the iterations. Any idea how to get around this?
>
> Bob
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>


-- 
Pete
Molly's Revenge 
___
use-livecode mailing list
use-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: A few strange behaviors accessing DBs

2012-01-26 Thread Pete
Normally yes, but the that function requires you to enclose the whole
variable name in quotes.

On Thu, Jan 26, 2012 at 11:12 AM, Bob Sneidar  wrote:

> Shouldn't you quote the non-numeric keys? myArray[1]["id"]
>
> Bob
>
>
> On Jan 26, 2012, at 10:01 AM, Pete wrote:
>
> > Assuming myArray exists and I specify
> > "myArray[1][id]" as the destination for the returned data, what ends up
> in
> > myArray is a key of "1][id" with the returned value.  Arrays with a
> single
> > level of keys work fine.
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>


-- 
Pete
Molly's Revenge 
___
use-livecode mailing list
use-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: dgText vs. dgData

2012-01-26 Thread Pete
Not sure what you mean by "displayed", but f you mean columns that are not
hidden, that's not my experience - I see hidden columns and all rows in
dgText.
Pete

On Thu, Jan 26, 2012 at 11:08 AM, Bob Sneidar  wrote:

> Hi all. Here is an interesting twist on the issue of whether or not to use
> dgText or dgData when working with datagrids. dgText will only give you the
> DISPLAYED data in the datagrid as text. The dgData will give you ALL the
> data in the datagrid as an array, INCLUDING the columns that are NOT being
> displayed. Another good argument for using dgData wherever you can.
>
> Now what we need is an update to the filter command so that it works on
> arrays!
>
> Bob
>
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>


-- 
Pete
Molly's Revenge 
___
use-livecode mailing list
use-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: Persistent Variables during recursion

2012-01-26 Thread John Craig
Hi, Bob.  Here's one way of doing it.  In the first call, pIndex is 
empty, so some initialization is performed.  The parameters are all 
passed with each recursive call, but pSame is always the same value.


HTH


:)



on mouseUp
   test "12345", 1, 99
end mouseUp


command test pData, pChange, pSame, pIndex
   if pIndex is not an integer then
  put 1 into tpIndex
  put "first time" & LF into msg
   end if

   put char pIndex of pData after pData
   put pIndex ^ 2 into pChange
   add 1 to pIndex

   put pData & ", " & pChange & ", " & pSame & ", " & pIndex & LF after msg

   if length(pData) < 10 then
  test pData, pChange, pSame, pIndex
   end if
end test


On 26/01/2012 20:04, Bob Sneidar wrote:

Hi all. This is my first foray into recursive functions. There are two 
variables I would like to be persistent for as long as the script is running, 
but I want them to be empty the first time I call the recursive function. I 
have tried declaring the variables as local, but each time the function calls 
itself, the variables are wiped as though a new set is made. If I declare them 
as global, then of course the value persists even after the last recursion 
terminates. The function has no idea if it is  the first time through or one of 
the iterations. Any idea how to get around this?

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



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


Re: HTML5 REPORT

2012-01-26 Thread stephen barncard
one might check the report anyway, valuable no matter what you use.
cop their links and test your favorite.  (if they've done their
crossdomain.xml)

On 26 January 2012 11:56, Andre Garzia  wrote:

> Stephen,
>
> I am partial of mediaelementjs... check it out at:
>
> I used JW Player for a long time, I switched to MediaElementJS and
> never looked back.
>
> http://mediaelementjs.com/
>
> =)
>
> On Thu, Jan 26, 2012 at 5:42 PM, stephen barncard
>  wrote:
> > (please forget the double post if it appears, but I didn't see this
> > delivered to the list)
> >
> > This new report from Longtail , the developers of the HTML5 video and
> audio
> > player, summarized the state of HTML5 media today.
> >
> > THE STATE OF HTML5 VIDEO 
> >
> > It's quite complete, with many example test cases. Really well done.
> >
> > I've experimented with almost every video/audio player out there, and
> keep
> > coming  back to the JWPlayer for web media.
> > I love Vimeo's quality of streaming and their player, but still would
> > rather host it myself for now.
> >
> >
> > --
> >
> >
> >
> > Stephen Barncard
> > San Francisco Ca. USA
>
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


Persistent Variables during recursion

2012-01-26 Thread Bob Sneidar
Hi all. This is my first foray into recursive functions. There are two 
variables I would like to be persistent for as long as the script is running, 
but I want them to be empty the first time I call the recursive function. I 
have tried declaring the variables as local, but each time the function calls 
itself, the variables are wiped as though a new set is made. If I declare them 
as global, then of course the value persists even after the last recursion 
terminates. The function has no idea if it is  the first time through or one of 
the iterations. Any idea how to get around this? 

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: HTML5 REPORT

2012-01-26 Thread Andre Garzia
Stephen,

I am partial of mediaelementjs... check it out at:

I used JW Player for a long time, I switched to MediaElementJS and
never looked back.

http://mediaelementjs.com/

=)

On Thu, Jan 26, 2012 at 5:42 PM, stephen barncard
 wrote:
> (please forget the double post if it appears, but I didn't see this
> delivered to the list)
>
> This new report from Longtail , the developers of the HTML5 video and audio
> player, summarized the state of HTML5 media today.
>
> THE STATE OF HTML5 VIDEO 
>
> It's quite complete, with many example test cases. Really well done.
>
> I've experimented with almost every video/audio player out there, and keep
> coming  back to the JWPlayer for web media.
> I love Vimeo's quality of streaming and their player, but still would
> rather host it myself for now.
>
>
> --
>
>
>
> 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



-- 
http://www.andregarzia.com -- All We Do Is Code.
http://fon.nu -- minimalist url shortening service.

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


HTML5 REPORT

2012-01-26 Thread stephen barncard
(please forget the double post if it appears, but I didn't see this
delivered to the list)

This new report from Longtail , the developers of the HTML5 video and audio
player, summarized the state of HTML5 media today.

THE STATE OF HTML5 VIDEO 

It's quite complete, with many example test cases. Really well done.

I've experimented with almost every video/audio player out there, and keep
coming  back to the JWPlayer for web media.
I love Vimeo's quality of streaming and their player, but still would
rather host it myself for now.


-- 



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: Android Programming API level and device compliance

2012-01-26 Thread Alejandro Tejada
Hi Jacke,


J. Landman Gay wrote
> 
> It doesn't exactly say what Android levels are supported, but there is a 
> good comparison chart on Wikipedia that tells the OS version and other 
> info about lots of devices:
> 
> ;
> 
> You could probably figure out the levels using this chart.
> 

Really useful!!! Many Thanks. :-D
Now, I only need a website that review these
devices from a developer point of view.

Have a nice day!

Al

--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Android-Programming-API-level-and-device-compliance-tp4331139p4331552.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: A few strange behaviors accessing DBs

2012-01-26 Thread Mark Schonewille
Hi Pete,

I believe all those separate database-related functions are just confusing and 
shouldn't exist in the first place. One simple command to execute all MySQL 
commands should me sufficient. There is no reason why there would be any 
distinction between revExecuteSQL and revDatabaseQuery for example.

I do all my SQL in PHP and connect from LiveCode to PHP. Saves me quite a few 
headaches.

--
Best regards,

Mark Schonewille

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

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

On 26 jan 2012, at 19:01, Pete wrote:

> Thought I would pass on a few weirdnesses I've come across recently while
> accessing databases from LC.  Some of these are outside the day-to-day db
> access sphere but may be of interest to anyone developing db tools with LC.
> I came across all these while accessing SQLite databases.
> 
> The revDatabaseTableNames function returns a list of all the table names in
> a database.  Unfortunately, it also includes the names of any views defined
> in the database with no indication as to which are tables and which are
> views.  IMHO, this is incorrect, especially since the documentation is
> silent on it.  If I ask for table names, I want table names not view names.
> I've written my own handler to return a list of table names to get round
> this issue.
> 
> Next issue concerns the use of the special column name "rowid".  Calling
> revQueryDatabase with a SELECT statement that includes rowid as a column to
> be returned creates a db cursor, no problem.  However, if I then call
> revDatabaseColumnNames to get a list of the columns in the cursor, rowid is
> not in the list.  Instead, it is replaced by the name of the primary key
> field of the table being queried.  This in turn causes an error to be
> returned if I call revDatabaseColumnNamed, requesting the value of the
> rowid column.  "rowid" is sometimes a synonym for the primary key column of
> a table but not always.  Even when it is a synonym, I don't believe LC
> should return a column name that wasn't in the SELECT statement that
> created the cursor.
> 
> The final problem involves the use of revDatabaseColumnNamed, which returns
> the value of a named column from the current row in a cursor.  The
> dictionary says you can include a variable or an array element  parameter
> in the call to this function and the returned value will be placed into the
> specified variable/array element.  What it doesn't mention is that the
> variable/array must already exist in order for this to work.  If it
> doesn't, the variable/array is not created and no error is reported.  Not a
> big deal as long as you know about it.  Second problem concerns the use of
> multilevel array keys.  Assuming myArray exists and I specify
> "myArray[1][id]" as the destination for the returned data, what ends up in
> myArray is a key of "1][id" with the returned value.  Arrays with a single
> level of keys work fine.
> 
> As mentioned, these are pretty esoteric situations but wanted to pass them
> on in the hope that it might save someone some debugging time.
> 
> 
> -- 
> 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


Re: A few strange behaviors accessing DBs

2012-01-26 Thread Bob Sneidar
Shouldn't you quote the non-numeric keys? myArray[1]["id"]

Bob


On Jan 26, 2012, at 10:01 AM, Pete wrote:

> Assuming myArray exists and I specify
> "myArray[1][id]" as the destination for the returned data, what ends up in
> myArray is a key of "1][id" with the returned value.  Arrays with a single
> level of keys work fine.


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


dgText vs. dgData

2012-01-26 Thread Bob Sneidar
Hi all. Here is an interesting twist on the issue of whether or not to use 
dgText or dgData when working with datagrids. dgText will only give you the 
DISPLAYED data in the datagrid as text. The dgData will give you ALL the data 
in the datagrid as an array, INCLUDING the columns that are NOT being 
displayed. Another good argument for using dgData wherever you can. 

Now what we need is an update to the filter command so that it works on arrays! 

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: Scrollbars of option menu buttons

2012-01-26 Thread Pete
OK, might still be able to try it, just got a Windows box for testing.
Pete

On Thu, Jan 26, 2012 at 10:08 AM, Mark Schonewille <
m.schonewi...@economy-x-talk.com> wrote:

> He Pete, we're talking Windows here.
>
> --
> Best regards,
>
> Mark Schonewille
>
> Economy-x-Talk Consulting and Software Engineering
> Homepage: http://economy-x-talk.com
> Twitter: http://twitter.com/xtalkprogrammer
> KvK: 50277553
>
> Download the Installer Maker Plugin 1.7 for LiveCode here
> http://qery.us/za
>
> On 26 jan 2012, at 19:05, Pete wrote:
>
> > Hi Mark,
> > Option menus don't have scrollbars do they?  At least not on OS X) Do you
> > mean comboboxes?  If so, all works fine for me (on OS X).
> > Pete
> >
>
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>


-- 
Pete
Molly's Revenge 
___
use-livecode mailing list
use-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: Scrollbars of option menu buttons

2012-01-26 Thread Mark Schonewille
He Pete, we're talking Windows here.

--
Best regards,

Mark Schonewille

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

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

On 26 jan 2012, at 19:05, Pete wrote:

> Hi Mark,
> Option menus don't have scrollbars do they?  At least not on OS X) Do you
> mean comboboxes?  If so, all works fine for me (on OS X).
> Pete
> 



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


Re: Scrollbars of option menu buttons

2012-01-26 Thread Pete
Hi Mark,
Option menus don't have scrollbars do they?  At least not on OS X) Do you
mean comboboxes?  If so, all works fine for me (on OS X).
Pete

On Thu, Jan 26, 2012 at 9:37 AM, Mark Schonewille <
m.schonewi...@economy-x-talk.com> wrote:

> Hi,
>
> I just got a complaint about non-functional scrollbars of option menus. If
> the menuLines < number of lines of the text then a scrollbar appears but it
> is impossible to scroll. Does anyone else see this?
>
> --
> Best regards,
>
> Mark Schonewille
>
> Economy-x-Talk Consulting and Software Engineering
> Homepage: http://economy-x-talk.com
> Twitter: http://twitter.com/xtalkprogrammer
> KvK: 50277553
>
> Download the Installer Maker Plugin 1.7 for LiveCode here
> http://qery.us/za
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>


-- 
Pete
Molly's Revenge 
___
use-livecode mailing list
use-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: Android Programming API level and device compliance

2012-01-26 Thread J. Landman Gay

On 1/26/12 11:42 AM, Alejandro Tejada wrote:

Hi All,

Recently, looking at Android API Levels:
http://developer.android.com/guide/appendix/api-levels.html
I noticed that the minimal level needed
for my application is Level 4, corresponding
to Android 1.6

How I could learn about device compliance
to these characteristics without buying the
device in first place?

Does exists a website that rate Android devices
from a developer standpoint (not from a consumer
viewpoint)?


It doesn't exactly say what Android levels are supported, but there is a 
good comparison chart on Wikipedia that tells the OS version and other 
info about lots of devices:




You could probably figure out the levels using this chart.

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


A few strange behaviors accessing DBs

2012-01-26 Thread Pete
Thought I would pass on a few weirdnesses I've come across recently while
accessing databases from LC.  Some of these are outside the day-to-day db
access sphere but may be of interest to anyone developing db tools with LC.
 I came across all these while accessing SQLite databases.

The revDatabaseTableNames function returns a list of all the table names in
a database.  Unfortunately, it also includes the names of any views defined
in the database with no indication as to which are tables and which are
views.  IMHO, this is incorrect, especially since the documentation is
silent on it.  If I ask for table names, I want table names not view names.
 I've written my own handler to return a list of table names to get round
this issue.

Next issue concerns the use of the special column name "rowid".  Calling
revQueryDatabase with a SELECT statement that includes rowid as a column to
be returned creates a db cursor, no problem.  However, if I then call
revDatabaseColumnNames to get a list of the columns in the cursor, rowid is
not in the list.  Instead, it is replaced by the name of the primary key
field of the table being queried.  This in turn causes an error to be
returned if I call revDatabaseColumnNamed, requesting the value of the
rowid column.  "rowid" is sometimes a synonym for the primary key column of
a table but not always.  Even when it is a synonym, I don't believe LC
should return a column name that wasn't in the SELECT statement that
created the cursor.

The final problem involves the use of revDatabaseColumnNamed, which returns
the value of a named column from the current row in a cursor.  The
dictionary says you can include a variable or an array element  parameter
in the call to this function and the returned value will be placed into the
specified variable/array element.  What it doesn't mention is that the
variable/array must already exist in order for this to work.  If it
doesn't, the variable/array is not created and no error is reported.  Not a
big deal as long as you know about it.  Second problem concerns the use of
multilevel array keys.  Assuming myArray exists and I specify
"myArray[1][id]" as the destination for the returned data, what ends up in
myArray is a key of "1][id" with the returned value.  Arrays with a single
level of keys work fine.

As mentioned, these are pretty esoteric situations but wanted to pass them
on in the hope that it might save someone some debugging time.


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


HTML5 VIDEO/AUDIO REPORT FROM LONGTAIL (JWPLAYER)

2012-01-26 Thread stephen barncard
This new report from Longtail , the developers of the HTML5 video and audio
player, summarized the state of HTML5 media today.

THE STATE OF HTML5 VIDEO 

It's quite complete, with many example test cases. Really well done.

I've experimented with almost every video/audio player out there, and keep
coming  back to the JWPlayer for web media.
I love Vimeo's quality of streaming and their player, but still would
rather host it myself for now.

-- 



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: Scrollbars of option menu buttons

2012-01-26 Thread Mark Schonewille
Hi Guglielmo,

I tested it with a new stack on XP and got the same results. Therefore, I'm now 
asking for confirmation on the list.

--
Best regards,

Mark Schonewille

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

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

On 26 jan 2012, at 18:48, Guglielmo Braguglia wrote:

> Because is my complaint ...
> ... I want just to add that this happen with the 'Installer Maker Plugin', on 
> the language selection menu, on Win 7 64 bit and *NOT *on OS X, both running 
> LiveCode 5.0.2
> 
> Regards,
> 
> Guglielmo
> 



___
use-livecode mailing list
use-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: Forbidden data in a Data Grid?

2012-01-26 Thread Bob Sneidar
So might I suggest now is a great time to get away from using dgText? dgData 
(an array) is a much better way of accessing the data in a datagrid. If you can 
retrieve the data from your database as an array, then you only need to set the 
dgData of the datagrid to that array. The form will be a numbered key followed 
by the column name. Note this is not the column label, but the actual column 
name. 

I set up my datagrid content dynamically. What I do is I get a list of the 
columns from the table first. SHOW COLUMNS . The first column will 
be the column names. set the dgData to empty first (or you will get an error on 
the next step) Next delete the column names that you do not want displayed from 
your list of columns. Then set the dgProp["columns"] to your list of columns. 
(Also dgprop["column labels"] and dgProp["column widths"] if you like because 
those will get reset when you set the dgProp["columns"]). Then set the dgData 
to an array of the data from your query. 

Note that only the columns whose names match the ones in your datagrid will be 
displayed. You can use this to your advantage. Perhaps you only want to present 
a subset of the table columns. The datagrid can still contain all of them, 
effectively making the datagrid a kind of writeable pseudo-cursor complete with 
the unique key needed in an update where clause. So rather than lots of queries 
as the user interacts with the form, you can do one large query, and work with 
the data locally. 

Also (and forgive me if I keep pressing the point) but sqlYoga is a GREAT tool 
for doing this sort of thing. Once you set up a database object and connection, 
you can ask sqlYoga for all kinds of things, like a list of columns for a 
table, or query data as text, records, a cursor or as an array. Data is 
automagically escaped so you do not have to worry about that. All the gotchas 
of working with SQL are handled for you. It's worth every penny I think. And 
the arrays it returns from queries can go right into your datagrids! 

Bob
 
On Jan 25, 2012, at 8:46 PM, Paul Looney wrote:

> Bob,
> Thank you. 
> That was very helpful. The only key that had data was the record ID - 
> explains why clicking on a line still opened the record viewer but nothing 
> else was visible.
> Looking deeper.
> PL
> 
> On Jan 25, 2012, at 5:36 PM, Bob Sneidar wrote:
> 
>> put the dgData of group "" into theDataA
>> put printKeys(theDataA)
> 
> ___
> use-livecode mailing list
> use-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: Scrollbars of option menu buttons

2012-01-26 Thread Guglielmo Braguglia

Because is my complaint ...
... I want just to add that this happen with the 'Installer Maker 
Plugin', on the language selection menu, on Win 7 64 bit and *NOT *on OS 
X, both running LiveCode 5.0.2


Regards,

Guglielmo

On 26.01.2012 18:37, Mark Schonewille wrote:

Hi,

I just got a complaint about non-functional scrollbars of option menus. If the 
menuLines<  number of lines of the text then a scrollbar appears but it is 
impossible to scroll. Does anyone else see this?

--
Best regards,

Mark Schonewille

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

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


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


Android Programming API level and device compliance

2012-01-26 Thread Alejandro Tejada
Hi All,

Recently, looking at Android API Levels:
http://developer.android.com/guide/appendix/api-levels.html
I noticed that the minimal level needed
for my application is Level 4, corresponding
to Android 1.6

How I could learn about device compliance
to these characteristics without buying the
device in first place?

Does exists a website that rate Android devices
from a developer standpoint (not from a consumer
viewpoint)?

Thanks in advance!

Al
 

--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Android-Programming-API-level-and-device-compliance-tp4331139p4331139.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


Scrollbars of option menu buttons

2012-01-26 Thread Mark Schonewille
Hi,

I just got a complaint about non-functional scrollbars of option menus. If the 
menuLines < number of lines of the text then a scrollbar appears but it is 
impossible to scroll. Does anyone else see this?

--
Best regards,

Mark Schonewille

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

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


___
use-livecode mailing list
use-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: Does 'export image to file' give any warnings?

2012-01-26 Thread gpb01

Graham Samuel-4 wrote
> 
> I'm using 'export image' to put an image into a file without invoking a
> 'save' dialog - this is what my user wants. However, I can't see any
> obvious way of knowing that the new image has the same name has an
> existing one and would therefore overwrite it. I set up a button that does
> 
> on mouseUp
>put the defaultFolder into temp
>export img "ThePic"to URL ("binfile:" & temp &"/meagain.jpg") as JPEG
>put "it= " &&"; result="&&(the result)
> end mouseUp
> 
> However may times I do this, I always get the file "meagain.jpg" with no
> indication of any difference between the first and subsequent invocations.
> 
> Obviously I can search the directory myself to look for the recurrence of
> the file name, and I guess that's what I'm going to do,but I wondered if
> anyone knows if this form of statement in LC produces any kind of error
> message and if so, how one can detect it. After all, any kind of 'write
> file' operation can fail.
> 
> TIA
> 
> Graham
> ___
> use-livecode mailing list
> use-livecode@.runrev
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 

Hi Graham,
perhaps I did not understand well your question, but why you don't test for
the existence of the file before the export ?

You can just use : if there is a file temp &"/meagain.jpg" then ...
... and decide what to do ... :)

Guglielmo

--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Does-export-image-to-file-give-any-warnings-tp4331049p4331120.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: How to store some data in my stack

2012-01-26 Thread Ken Ray

On Jan 25, 2012, at 10:55 PM, J. Landman Gay wrote:

>>>  put specialFolderPath(“documents”)&  "/"&  “testFile.txt” into tFile
>>>  if there is a file tFile then
>>>put URL("file:"&  tFile) into fld "Data"
>>>put the result into fld "msg"
>>> else
>>>  answer "No file yet!"
>>> end if
>>> end mouseUp
>> 
>> "no file yet!" is shown in an android.
>> 
>> 'Write' function can't work, that is,
>>   put fld "Data" into URL("file:"&  specialFolderPath(“documents”)&  "/"&  
>> “testFile.txt”)
>>  is not working on an android.

Are you *really* using curly quotes around "documents" and "testFile.txt"? The 
only reason I ask is that you have straight quotes around "Data" and "no file 
yet!", so I figured I'd check. If so, that might be the problem (although I'd 
think you'd get an error dialog first, but)…

Ken Ray
Sons of Thunder Software, Inc.
Email: k...@sonsothunder.com
Web Site: http://www.sonsothunder.com/  

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


Re: Does 'export image to file' give any warnings?

2012-01-26 Thread Ken Ray

On Jan 26, 2012, at 11:18 AM, Graham Samuel wrote:

> I'm using 'export image' to put an image into a file without invoking a 
> 'save' dialog - this is what my user wants. However, I can't see any obvious 
> way of knowing that the new image has the same name has an existing one and 
> would therefore overwrite it. I set up a button that does
> 
> on mouseUp
>   put the defaultFolder into temp
>   export img "ThePic"to URL ("binfile:" & temp &"/meagain.jpg") as JPEG
>   put "it= " &&"; result="&&(the result)
> end mouseUp

Graham, test the existence of the file first before ou export:

put temp & "/meagain.jpg" into tFile
if there is not a file tFile then
   export img "ThePic to URL theFile as JPEG
else
   -- do something else
end if

Ken Ray
Sons of Thunder Software, Inc.
Email: k...@sonsothunder.com
Web Site: http://www.sonsothunder.com/  

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


Does 'export image to file' give any warnings?

2012-01-26 Thread Graham Samuel
I'm using 'export image' to put an image into a file without invoking a 'save' 
dialog - this is what my user wants. However, I can't see any obvious way of 
knowing that the new image has the same name has an existing one and would 
therefore overwrite it. I set up a button that does

on mouseUp
   put the defaultFolder into temp
   export img "ThePic"to URL ("binfile:" & temp &"/meagain.jpg") as JPEG
   put "it= " &&"; result="&&(the result)
end mouseUp

However may times I do this, I always get the file "meagain.jpg" with no 
indication of any difference between the first and subsequent invocations.

Obviously I can search the directory myself to look for the recurrence of the 
file name, and I guess that's what I'm going to do,but I wondered if anyone 
knows if this form of statement in LC produces any kind of error message and if 
so, how one can detect it. After all, any kind of 'write file' operation can 
fail.

TIA

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


SoCal LUG meeting: Feb 2

2012-01-26 Thread Richard Gaskin

The next SoCal LUG meeting will be one week from today:

Where:
Burger Continental, back room
535 S. Lake Avenue
Pasadena CA 91101
http://www.burgercontinentalpasadena.com/home.html

When:
Thursday, February 2
7:00PM

Since the meeting falls on Groundhog Day I've proposed we use that as a 
theme for this one - details in the group's forum:




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

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


Android setup issues

2012-01-26 Thread Michael Doub
Well,  my HTC inspire arrived yesterday so I decided to start the android 
learning process.

I created an AVD with the following attributes:

Target:  Android 2.3.3
SD card: 120 MiB
Skin: Built In WVGA800
Hardware:
  Abstracted LCD Density 240.  (This was a default, no idea what it is)
  Number of emulated web cameras : 1
  Max VM application heap: 24 (another default)
  Camera Support: yes
  Device Ram Size: 256 (another default)
  Touch Support: yes

To me this looks like an HTC inspire, I would appreciate any comment or advice 
to the contrary.

Now when I run the simulator, everything seems to operate except for the 
camera.  I only see a
white screen.   This would lead me to believe that I have a simulator set up 
issue.

Now for the really strange part. This app works as expected on my mac.When 
I load my app in the simulator
I get really strange behavior.   My app has a square of graphics that do not 
move
but I only change the background color of them as you cycle thru a series of 
memory resident color pallets
by forward and backward buttons. 

The squares are not taking on any color, and I notice the some the text making 
up the label of the color
pallet is not being displayed.

When I load the app on the device it is matching the behavior of on the 
simulator.  So I must not be building
the app property.

My standalone settings:

I have a library stack that contains some image resizing functions so in the 
stacks section It has been added,
the main stack is present along with the MobGUI stack.

I included the library stack in the copy files section.

Android tab: 
   Build for android,
   Minimum  2.3.3
   Sign for development only
   Allow external storage
   Camera required
   Application permissions: Camera checked.

Anyone have an idea what is not set up properly?

Regards,
   Mike


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