Re: Memory Allocation

2017-02-08 Thread Bob Sneidar via use-livecode
OK I've figured this out. I'm not sure if this qualifies as a bug per se, but 
you cannot modify the datagrid data while a selectionChanged handler is 
running. The only reason I can think this is an issue is if the datagrid 
library calls selectionChanged itself. The workaround is to send in time to a 
handler that changes the dgData or dgDataOfRecord/Index. Not sure what would 
happen with dgText.

ex.
on selectionChanged
  put "12345" into aDGData [1] ["some column"]
  set the dgData of me to aDGData
  set the dgHilitedIndex of me to 1
end selectionChanged

BD

on selectionChanged
  send populateMe to me in 10 milliseconds
selectionChanged

on populateMe
  put "12345" into aDGData [1] ["some column"]
  set the dgData of me to aDGData
  set the dgHilitedIndex of me to 1
end populateMe

GD

The odd thing is I tested this in a simple stack with a datagrid with one 
column without fail. It may be I need more data to get it to glitch, but I can 
definitely make it happen every time in a more complex app, and I can also 
definitely make it not fail using send in time.

If anyone at Livecode wants to remote in to my workstation sometime so I can 
demonstrate the issue I'm open to that. The app is way to big to even attempt 
to send via the QC center. Contact me off list.

Bob S



On Feb 8, 2017, at 14:36 , Bob Sneidar 
> wrote:

NVM I am discovering that setting the DGData of a datagrid in the middle of a 
selectionChanged handler is what is crashing to desktop. I can produce this 
every single time in my app, but alas when I rey to create a test stack I 
cannot reproduce it.

But I enabled gRevDevelopment and I discovered where it's going wrong. There is 
a private command called _resetdata that when called in this manner crashes to 
desktop. I will investigate further to see what command specifically is doing 
it.

BTW it is not the data itself. I put empty into the array, then set a single 
line and a single column to the value "12345". Still crashes.

Bob S

___
use-livecode mailing list
use-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: Script locals in library stack script

2017-02-08 Thread J. Landman Gay via use-livecode

On 2/8/17 4:52 PM, Monte Goulding via use-livecode wrote:



On 9 Feb 2017, at 9:32 am, J. Landman Gay via use-livecode
 wrote:

I have a splash stack that opens a data stack from a server. The
data stack has a substack which is used as a library with "start
using".

The handlers in the library work okay. Some of them store data in
script local variables in the library script. The script locals do
not retain their values, they are almost always empty when the
library tries to access them later.

Is this something others have seen? LC 8.1.3 rc 1.


I’m guessing you don’t mean in a separate request on the server. I’m
not aware of anything special about the way server does stuff with
variables so someone would need to chase this down based on a bug
report I think.


Right, after downloading the data stack, for this stuff it's all local 
messaging. I'll try to track it down before submitting a bug, I just 
wondered if this was a known thing. I'm seeing other problems that 
indicate the message path isn't what I expect.


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

How big of a request can be sent with https?

2017-02-08 Thread Dr. Hawkins via use-livecode
I am contemplating the changes to, instead of direct postgres
communication, using an https wrapper.

How big of an inquiry can I send?  Most are small, but when opening the
file, there are something like a thousand queries as a single transaction,

-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Script locals in library stack script

2017-02-08 Thread Monte Goulding via use-livecode

> On 9 Feb 2017, at 9:32 am, J. Landman Gay via use-livecode 
>  wrote:
> 
> I have a splash stack that opens a data stack from a server. The data stack 
> has a substack which is used as a library with "start using".
> 
> The handlers in the library work okay. Some of them store data in script 
> local variables in the library script. The script locals do not retain their 
> values, they are almost always empty when the library tries to access them 
> later.
> 
> Is this something others have seen? LC 8.1.3 rc 1.

I’m guessing you don’t mean in a separate request on the server. I’m not aware 
of anything special about the way server does stuff with variables so someone 
would need to chase this down based on a bug report I think.

Cheers

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

Re: some, but not all, custom properties survive paste to new stack

2017-02-08 Thread Dr. Hawkins via use-livecode
On Wed, Feb 8, 2017 at 1:34 PM, Paul Dupuis via use-livecode <
use-livecode@lists.runrev.com> wrote:

> All properties and
> values were copied.
>

They had been for me until recently.

At this point, I have it cleared, but I'm suspecting a deeper bug is behind
it.

I had set the properties for a few fields at a time, and these survived
multiple save/quit/load cycles.

And then the properties disappeared.

I reset them individually, and now they stuck.

>
> Now I was reminded the the custom property tab in the Project Browser is
> wacky - I would click the add new element "plus", select the default "1"
> for the key, rename it, click in the value box and enter a value and
> then click on the plus for a new element and the value never got set.
>

This one is, indeed, maddening.  Even used to it, it bites quite frequently.

You also need to click out of the data area to get the data to fix with
this.


-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Memory Allocation

2017-02-08 Thread Bob Sneidar via use-livecode
Hmmm... also of note, putting true into gRevDevelopment enables explicit 
variables. That is where that bugaboo was coming from, where people were saying 
that explicitVariables was being enabled randomly. workaround would be: 

put true into gRevDevelopment;set explicitVariables to false

 in the message box


Bob S


> On Feb 8, 2017, at 14:36 , Bob Sneidar via use-livecode 
>  wrote:
> 
> NVM I am discovering that setting the DGData of a datagrid in the middle of a 
> selectionChanged handler is what is crashing to desktop. I can produce this 
> every single time in my app, but alas when I rey to create a test stack I 
> cannot reproduce it.
> 
> But I enabled gRevDevelopment and I discovered where it's going wrong. There 
> is a private command called _resetdata that when called in this manner 
> crashes to desktop. I will investigate further to see what command 
> specifically is doing it.
> 
> BTW it is not the data itself. I put empty into the array, then set a single 
> line and a single column to the value "12345". Still crashes.
> 
> Bob S
> 
> 
> On Feb 8, 2017, at 11:38 , Bob Sneidar via use-livecode 
> > wrote:
> 
> I hesitate to post but...
> 
> A dev posted here about a change made to the engine to make it more efficient 
> which ended up causing problems down the line, memory being released before 
> it's time, and the need to create a special C class to handle it. When was 
> this implemented? I ask because I am running 8.1.2 and I have a method I am 
> using which involves some recursion and database reads and writes in between.
> 
> Sometimes it works famously, other times I crash to desktop. I have gone 
> through the code to make sure I have no endless loops, and yet I am still 
> getting this CtoD sporadically. If it were looping it would happen every time.
> 
> Bob S
> 
> ___
> use-livecode mailing list
> use-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: Memory Allocation

2017-02-08 Thread Bob Sneidar via use-livecode
NVM I am discovering that setting the DGData of a datagrid in the middle of a 
selectionChanged handler is what is crashing to desktop. I can produce this 
every single time in my app, but alas when I rey to create a test stack I 
cannot reproduce it.

But I enabled gRevDevelopment and I discovered where it's going wrong. There is 
a private command called _resetdata that when called in this manner crashes to 
desktop. I will investigate further to see what command specifically is doing 
it.

BTW it is not the data itself. I put empty into the array, then set a single 
line and a single column to the value "12345". Still crashes.

Bob S


On Feb 8, 2017, at 11:38 , Bob Sneidar via use-livecode 
> wrote:

I hesitate to post but...

A dev posted here about a change made to the engine to make it more efficient 
which ended up causing problems down the line, memory being released before 
it's time, and the need to create a special C class to handle it. When was this 
implemented? I ask because I am running 8.1.2 and I have a method I am using 
which involves some recursion and database reads and writes in between.

Sometimes it works famously, other times I crash to desktop. I have gone 
through the code to make sure I have no endless loops, and yet I am still 
getting this CtoD sporadically. If it were looping it would happen every time.

Bob S

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


Script locals in library stack script

2017-02-08 Thread J. Landman Gay via use-livecode
I have a splash stack that opens a data stack from a server. The data 
stack has a substack which is used as a library with "start using".


The handlers in the library work okay. Some of them store data in script 
local variables in the library script. The script locals do not retain 
their values, they are almost always empty when the library tries to 
access them later.


Is this something others have seen? LC 8.1.3 rc 1.

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

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


Re: some, but not all, custom properties survive paste to new stack

2017-02-08 Thread J. Landman Gay via use-livecode

On 2/8/17 3:34 PM, Paul Dupuis via use-livecode wrote:

Now I was reminded the the custom property tab in the Project Browser is
wacky - I would click the add new element "plus", select the default "1"
for the key, rename it, click in the value box and enter a value and
then click on the plus for a new element and the value never got set.


I struggled with that too. You have to hit the Enter key after each 
change. It wasn't intuitive.


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

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


Re: some, but not all, custom properties survive paste to new stack

2017-02-08 Thread panagiotis merakos via use-livecode
> >>I have not yet checked 8.1.3 to see if that bug of the Project
> Browser is one of the many things fixed in 8.1.3.
>

@Paul
I guess you mean "Property Inspector", and yes, it is fixed :)
http://quality.livecode.com/show_bug.cgi?id=18302

@Richard
Could you please file a bug, including a stack and a recipe?

Best,
Panos
--
___
use-livecode mailing list
use-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: some, but not all, custom properties survive paste to new stack

2017-02-08 Thread Paul Dupuis via use-livecode
On 2/8/2017 2:03 PM, Dr. Hawkins via use-livecode wrote:
> more hair-pulling time . . .
>
> I paste a group from a source stack to an output stack in a script.
>
> Some, but not all, of the custom properties that I set survive this pasting.
>
> For example, my source field has properties mrgns, txtFnt, txtSiz, and
> txtHgt.
>
> Its group, supergroups, card, and stack have no such properties.
>
> Nonetheless, all I have after paste are mrgns and txtFnt.
>
>
> I've single stepped through the paste point, and the behavior remains; the
> properties aren't there as soon as it is pasted, but remain in the source
> group.
>

I just did a test in LC 8.1.2. Created a new stack, created a field with
the custom properties mrgns, txtFnt, txtSiz, and txtxHgt with some
values. Grouped the field and set the name and properties of the group
(showBorder, showName so I could see the group). Created a second new
stack. Copied the group from the 1st stack to the 2nd new stack, Checked
the properties of the group in the second stack. All properties and
values were copied.

Now I was reminded the the custom property tab in the Project Browser is
wacky - I would click the add new element "plus", select the default "1"
for the key, rename it, click in the value box and enter a value and
then click on the plus for a new element and the value never got set.

I have not yet checked 8.1.3 to see if that bug of the Project Browser
is one of the many things fixed in 8.1.3.


___
use-livecode mailing list
use-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: PUT method where is returned data?

2017-02-08 Thread Richard Gaskin via use-livecode

Mark Hsu wrote:

>> On Feb 8, 2017, at 10:05 AM, Bob Hall wrote:
>>
>> PUT tJsonData into URL tURL
>>
>> put the result into tResult
>>
>> put it into tResult2
>>
>> I would of thought that either the result or it would have the data
>>
>
> Try the urlResponse:
>
>  PUT tJsonData into URL tURL
>
>  put the urlResponse into tResult

"it" is not longer a valid container for URL responses?

I missed that memo.  Which version did that change take place in?

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.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: AW: Different result in LC 6 to LC 8 when copying field text into Excel?

2017-02-08 Thread Mark Waddingham via use-livecode
They are platform-specific - the 'original' win32 ones are here:



It looks like Tiemo has discovered a bug in the docs!

Warmest Regards,

Mark.

Sent from my iPhone

> On 8 Feb 2017, at 16:17, Richard Gaskin via use-livecode 
>  wrote:
> 
> Tiemo Hollmann wrote:
> 
> > I tested a little bit more and this code works for me:
> > on mouseUp
> >lock clipboard
> >set the rawClipBoardData to empty
> >set the rawClipboardData["CF_UNICODETEXT"] to textEncode(fld 1, "UTF-16" 
> > )
> >unlock clipboard
> > end mouseUp
> >
> > and the IDE doesn't crashes anymore.
> > BTW. The rawclipboarddata key is supposed to be ["CF_UNICODETEXT"]
> > and not ["CF_UNICODE"] as the docs say.
> 
> I wonder if the difference in keys is because the keys of the 
> rawClipboardData are platform-specific.
> 
> After reading Mark Waddingham's note here last week on a related subject:
> http://lists.runrev.com/pipermail/use-livecode/2017-February/234491.html
> 
> ...I've come to regard the fullClipboardData as my go-to first choice for 
> manipulating Clipboard contents, resorting to rawClipboardData only when I 
> need some platform-specific special handling I can't address with 
> fullClipboardData.
> 
> -- 
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for the Desktop, Mobile, and the Web
> 
> ambassa...@fourthworld.comhttp://www.FourthWorld.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: Different result in LC 6 to LC 8 when copying field text into Excel?

2017-02-08 Thread Paul Hibbert via use-livecode
Pleased it helped and thank you for the update.

Paul


> On Feb 8, 2017, at 1:59 AM, Tiemo Hollmann TB via use-livecode 
>  wrote:
> 
> Paul,
> I tested a little bit more and this code works for me:
> on mouseUp
>   lock clipboard
>   set the rawClipBoardData to empty
>   set the rawClipboardData["CF_UNICODETEXT"] to textEncode(fld 1, "UTF-16" )
>   unlock clipboard
> end mouseUp
> 
> and the IDE doesn't crashes anymore.
> BTW. The rawclipboarddata key is supposed to be ["CF_UNICODETEXT"] and not 
> ["CF_UNICODE"] as the docs say.
> 
> Thanks for your help
> Tiemo
> 
> 
> -Ursprüngliche Nachricht-
> Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im Auftrag 
> von Tiemo Hollmann TB via use-livecode
> Gesendet: Mittwoch, 8. Februar 2017 09:33
> An: 'How to use LiveCode' 
> Cc: Tiemo Hollmann TB 
> Betreff: AW: Different result in LC 6 to LC 8 when copying field text into 
> Excel?
> 
> Hi Paul,
> 
> I test your approach, but when running the code in the DIE, LiveCode crashes 
> immediatly. When debugging the code, it doesn't crashes, but stops at setting 
> the rawclipboarddata with an error "clipboard is not locked".
> This happens anyhow, if I am using "lock clipboard" or not.  I'll file it 
> Tiemo
> 
> -Ursprüngliche Nachricht-
> Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im Auftrag 
> von Paul Hibbert via use-livecode
> Gesendet: Dienstag, 7. Februar 2017 22:11
> An: How to use LiveCode 
> Cc: Paul Hibbert 
> Betreff: Re: Different result in LC 6 to LC 8 when copying field text into 
> Excel?
> 
> Tiemo,
> 
> I’m not sure if this will help because I’m testing on Mac, but I did a little 
> bit of experimenting with the new ‘rawClipboardData’, it allows plain text to 
> be copied out of LC, just to prove it, here’s a button script copied via my 
> now modified Script Buddy plugin…
> 
> on mouseUp
>   local tClip
> 
>   if the selectedText is empty then
>  set the clipBoardData["text"] to fld “myTextField"
>   else
>  copy the selectedText
>   end if
> 
>   if the altKey is down then -- Convert the clipBoard to plain text
>  put the clipBoardData["text"] into tClip
>  lock the clipBoard
>  ## Use some code lifted from the LiveCode Dictionary…
>  set the rawClipBoardData to empty -- Clear ALL ClipboardData
>  if the platform is "Linux" then set the 
> rawClipboardData["text/plain;charset=utf-8"] \
>to textEncode(tClip, "UTF-8" ) -- Linux
>  if the platform is "Win32" then set the rawClipboardData["CF_UNICODE"] \
>to textEncode(tClip, "UTF-16" ) -- Windows
>  if the platform is "MacOS" then set the 
> rawClipboardData["public.utf8-plain-text"] \
>to textEncode(tClip, "UTF-8" ) -- OSX
>  unlock the clipboard
>   end if
> end mouseUp
> 
> At last, no extra line spacing! :-)
> 
> Normally when I paste from LC into Mail I see extra line spacing, and I would 
> have to copy and paste via a plain text editor to remove it. Emptying the 
> clipBoard and setting the rawClipboardData as above seems to work, on Mac at 
> least, hopefully it should work with Excel on Windows too.
> 
> Paul
> 
> 
> 
> 
>> On Feb 3, 2017, at 6:25 AM, Tiemo Hollmann TB via use-livecode 
>>  wrote:
>> 
>> Can anybody on Windows with LC 8 confirm this:
>> 
>> - create a new stack
>> - create a scrolling list field
>> - enter three lines of text, each with one word
>> - enter into the message box: *set the clipboarddata["text"] to fld 1*
>> - open MS Excel (in my case Windows 10, Excel 2013)
>> - paste
>> - see an extra empty line between each line of text
>> 
>> Pasted in a text editor there are no extra lines and up to LC 7 there 
>> also was no extra line in Excel.
>> 
>> Can anybody confirm this behavior or even has an idea for a workaround?
>> 
>> Thanks
>> Tiemo
>> 
>> 
>> 
>> -Ursprüngliche Nachricht-
>> Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im 
>> Auftrag von Tiemo Hollmann TB via use-livecode
>> Gesendet: Donnerstag, 2. Februar 2017 12:13
>> An: LiveCode User Liste senden 
>> Cc: Tiemo Hollmann TB 
>> Betreff: Different result in LC 6 to LC 8 when copying field text into 
>> Excel?
>> 
>> Hello,
>> 
>> I have a standard scrolling list field with multiple lines of text. I 
>> copy the text by:
>> 
>> *set the clipboarddata["text"] to fld "List"*
>> 
>> The User now can past the text into MS Excel on Windows. With LC 6 the 
>> text was pasted into Excel line by line, as it showed up in LC. In LC
>> 8.1.2 the text is pasted with an extra space line between each two lines.
>> 
>> I checked the line ends in both versions. There is only one "LF"
>> (byteToNum=10) at the end of each line and it looks the same in both 
>> versions.
>> 
>> What has changed in LC 8 

Memory Allocation

2017-02-08 Thread Bob Sneidar via use-livecode
I hesitate to post but...

A dev posted here about a change made to the engine to make it more efficient 
which ended up causing problems down the line, memory being released before 
it's time, and the need to create a special C class to handle it. When was this 
implemented? I ask because I am running 8.1.2 and I have a method I am using 
which involves some recursion and database reads and writes in between. 

Sometimes it works famously, other times I crash to desktop. I have gone 
through the code to make sure I have no endless loops, and yet I am still 
getting this CtoD sporadically. If it were looping it would happen every time. 

Bob S



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


some, but not all, custom properties survive paste to new stack

2017-02-08 Thread Dr. Hawkins via use-livecode
more hair-pulling time . . .

I paste a group from a source stack to an output stack in a script.

Some, but not all, of the custom properties that I set survive this pasting.

For example, my source field has properties mrgns, txtFnt, txtSiz, and
txtHgt.

Its group, supergroups, card, and stack have no such properties.

Nonetheless, all I have after paste are mrgns and txtFnt.


I've single stepped through the paste point, and the behavior remains; the
properties aren't there as soon as it is pasted, but remain in the source
group.

-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: PUT method where is returned data?

2017-02-08 Thread Mark Hsu via use-livecode
Try the urlResponse:

 PUT tJsonData into URL tURL
 
 put the urlResponse into tResult

Regards,

Mark Hsu
Canela Software
mar...@canelasoftware.com 



> On Feb 8, 2017, at 10:05 AM, Bob Hall via use-livecode 
>  wrote:
> 
> 8.1.2 Indy with Desktop App
> 
> I am using an API that uses the PUT method for some of the calls. JSON is 
> sent with server data as JSON. I can’t figure out how to access the returned 
> JSON data from the PUT call. I can not effect the API call. It's a commercial 
> SAAS application.
> 
> Here’s my snippet of code (everything is working with the PUT as far as I can 
> tell. The  data in the JSON ends up in the server App where it should). I use 
> the all caps PUT for my pea brain to understand this is a HTTP PUT method 
> request ;-)
> 
> PUT tJsonData into URL tURL
> 
> put the result into tResult
> 
> put it into tResult2
> 
> 
> I would of thought that either the result or it would have the data but both 
> are empty. If there is an error, I do see tsneterr in the result. Where do 
> can I find the response data?
> 
> Thanks in advance,
> Bob Hall
> 
> Hosting, eCommerce, Website Design,
> Custom Apps, and yes, Bicycle Repairs
> 
> 
> ___
> use-livecode mailing list
> use-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

PUT method where is returned data?

2017-02-08 Thread Bob Hall via use-livecode
8.1.2 Indy with Desktop App

I am using an API that uses the PUT method for some of the calls. JSON is sent 
with server data as JSON. I can’t figure out how to access the returned JSON 
data from the PUT call. I can not effect the API call. It's a commercial SAAS 
application.

Here’s my snippet of code (everything is working with the PUT as far as I can 
tell. The  data in the JSON ends up in the server App where it should). I use 
the all caps PUT for my pea brain to understand this is a HTTP PUT method 
request ;-)

PUT tJsonData into URL tURL

put the result into tResult

put it into tResult2


I would of thought that either the result or it would have the data but both 
are empty. If there is an error, I do see tsneterr in the result. Where do can 
I find the response data?

Thanks in advance,
Bob Hall

Hosting, eCommerce, Website Design,
Custom Apps, and yes, Bicycle Repairs


___
use-livecode mailing list
use-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: AW: Different result in LC 6 to LC 8 when copying field text into Excel?

2017-02-08 Thread Richard Gaskin via use-livecode

Tiemo Hollmann wrote:

> I tested a little bit more and this code works for me:
> on mouseUp
>lock clipboard
>set the rawClipBoardData to empty
>set the rawClipboardData["CF_UNICODETEXT"] to textEncode(fld 1, 
"UTF-16" )

>unlock clipboard
> end mouseUp
>
> and the IDE doesn't crashes anymore.
> BTW. The rawclipboarddata key is supposed to be ["CF_UNICODETEXT"]
> and not ["CF_UNICODE"] as the docs say.

I wonder if the difference in keys is because the keys of the 
rawClipboardData are platform-specific.


After reading Mark Waddingham's note here last week on a related subject:
http://lists.runrev.com/pipermail/use-livecode/2017-February/234491.html

...I've come to regard the fullClipboardData as my go-to first choice 
for manipulating Clipboard contents, resorting to rawClipboardData only 
when I need some platform-specific special handling I can't address with 
fullClipboardData.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.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: Different result in LC 6 to LC 8 when copying field text into Excel?

2017-02-08 Thread Bob Sneidar via use-livecode
Well any attempt to run the code in the DIE mode would understandably cause 
anything to crash. ;-)

(sorry I just had to).

Bob S


On Feb 8, 2017, at 24:32 , Tiemo Hollmann TB via use-livecode 
> wrote:

but when running the code in the DIE, LiveCode crashes immediatly

___
use-livecode mailing list
use-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: Size of Image in RAM

2017-02-08 Thread Bob Sneidar via use-livecode
It's very possible that for the purposes of efficiency, Photoshop allocates 
enough memory so that it can work on the file as though it were in 24 bit color 
mode. It may be that some filters do a temporary shift to 24 bit color to do 
their magic, then back to 8 bit. This is just a guess though. I wouldn't go by 
that. If Photoshop reports 8 bit, then it's 8 bit.

Bob S


On Feb 7, 2017, at 22:17 , Sannyasin Brahmanathaswami via use-livecode 
> wrote:

@ Scott:

That's not what I get if I open this image in Photoshop.  (CC 2017)



575 X 1000

http://wiki.hindu.org/uploads/img37.jpg


It is a JPEG, but under the mode menu it shows "RGB/8 Bit" and if I look under 
indexed colors it says "256"  definitely not 16bit (in which case we should see 
65536 colors)

So, somehow this IS a JPG that at least reports in PS as 8 bit but shows it is 
taking 2.17 MB in RAM, which it would if it were 16 bit.

___
use-livecode mailing list
use-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: Browser Widget Appears to be caching data (JavaScript)?

2017-02-08 Thread Bob Sneidar via use-livecode
I think he mentioned a different site. I could be mistaken.

Bob S


On Feb 7, 2017, at 22:31 , Sannyasin Brahmanathaswami via use-livecode 
> wrote:

Are you serving this content yourself from your web server? If so there are 
"cb" (cache busting) methods already well worked out.

e.g.

logo.jpg  # on disk
logo-cb123455678.jpg  # in the html code

and mod-rewrite handles the translation back to the original image. So you can 
update "logo.jpg" without changing it's name, but your content assembly system 
appends the cache busting string to the outgoing html… (Ralf does this in 
RevIgniter)

BR

___
use-livecode mailing list
use-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: Size of Image in RAM

2017-02-08 Thread Bob Sneidar via use-livecode
On our copiers, we have the option of scanning to Compact PDF. All it does is 
use the highest compression for the embedded JPEG images. The copier will not 
allow the selection of Compact PDF if the color depth is set to grayscale or 
black and white. Hence, I believe you are correct in your assessment. Grayscale 
is essentially a 256 color (8 bit) image which uses only black as a color.

Bob S


On Feb 7, 2017, at 21:35 , Scott Rossi via use-livecode 
> wrote:

You say the mode is 8 bit.  I might be wrong, but I don’t believe JPEG supports 
8 bit (256 color) images.  Even if it does technically, the format is not 
really intended for 8 bit images, but rather 16 bit or higher.

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

AW: Different result in LC 6 to LC 8 when copying field text into Excel?

2017-02-08 Thread Tiemo Hollmann TB via use-livecode
Paul,
I tested a little bit more and this code works for me:
on mouseUp
   lock clipboard
   set the rawClipBoardData to empty
   set the rawClipboardData["CF_UNICODETEXT"] to textEncode(fld 1, "UTF-16" )
   unlock clipboard
end mouseUp

and the IDE doesn't crashes anymore.
BTW. The rawclipboarddata key is supposed to be ["CF_UNICODETEXT"] and not 
["CF_UNICODE"] as the docs say.

Thanks for your help
Tiemo


-Ursprüngliche Nachricht-
Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im Auftrag von 
Tiemo Hollmann TB via use-livecode
Gesendet: Mittwoch, 8. Februar 2017 09:33
An: 'How to use LiveCode' 
Cc: Tiemo Hollmann TB 
Betreff: AW: Different result in LC 6 to LC 8 when copying field text into 
Excel?

Hi Paul,

I test your approach, but when running the code in the DIE, LiveCode crashes 
immediatly. When debugging the code, it doesn't crashes, but stops at setting 
the rawclipboarddata with an error "clipboard is not locked".
This happens anyhow, if I am using "lock clipboard" or not.  I'll file it Tiemo

-Ursprüngliche Nachricht-
Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im Auftrag von 
Paul Hibbert via use-livecode
Gesendet: Dienstag, 7. Februar 2017 22:11
An: How to use LiveCode 
Cc: Paul Hibbert 
Betreff: Re: Different result in LC 6 to LC 8 when copying field text into 
Excel?

Tiemo,

I’m not sure if this will help because I’m testing on Mac, but I did a little 
bit of experimenting with the new ‘rawClipboardData’, it allows plain text to 
be copied out of LC, just to prove it, here’s a button script copied via my now 
modified Script Buddy plugin…

on mouseUp
   local tClip

   if the selectedText is empty then
  set the clipBoardData["text"] to fld “myTextField"
   else
  copy the selectedText
   end if
   
   if the altKey is down then -- Convert the clipBoard to plain text
  put the clipBoardData["text"] into tClip
  lock the clipBoard
  ## Use some code lifted from the LiveCode Dictionary…
  set the rawClipBoardData to empty -- Clear ALL ClipboardData
  if the platform is "Linux" then set the 
rawClipboardData["text/plain;charset=utf-8"] \
to textEncode(tClip, "UTF-8" ) -- Linux
  if the platform is "Win32" then set the rawClipboardData["CF_UNICODE"] \
to textEncode(tClip, "UTF-16" ) -- Windows
  if the platform is "MacOS" then set the 
rawClipboardData["public.utf8-plain-text"] \
to textEncode(tClip, "UTF-8" ) -- OSX
  unlock the clipboard
   end if
end mouseUp

At last, no extra line spacing! :-)

Normally when I paste from LC into Mail I see extra line spacing, and I would 
have to copy and paste via a plain text editor to remove it. Emptying the 
clipBoard and setting the rawClipboardData as above seems to work, on Mac at 
least, hopefully it should work with Excel on Windows too.

Paul




> On Feb 3, 2017, at 6:25 AM, Tiemo Hollmann TB via use-livecode 
>  wrote:
> 
> Can anybody on Windows with LC 8 confirm this:
> 
> - create a new stack
> - create a scrolling list field
> - enter three lines of text, each with one word
> - enter into the message box: *set the clipboarddata["text"] to fld 1*
> - open MS Excel (in my case Windows 10, Excel 2013)
> - paste
> - see an extra empty line between each line of text
> 
> Pasted in a text editor there are no extra lines and up to LC 7 there 
> also was no extra line in Excel.
> 
> Can anybody confirm this behavior or even has an idea for a workaround?
> 
> Thanks
> Tiemo
> 
> 
> 
> -Ursprüngliche Nachricht-
> Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im 
> Auftrag von Tiemo Hollmann TB via use-livecode
> Gesendet: Donnerstag, 2. Februar 2017 12:13
> An: LiveCode User Liste senden 
> Cc: Tiemo Hollmann TB 
> Betreff: Different result in LC 6 to LC 8 when copying field text into 
> Excel?
> 
> Hello,
> 
> I have a standard scrolling list field with multiple lines of text. I 
> copy the text by:
> 
> *set the clipboarddata["text"] to fld "List"*
> 
> The User now can past the text into MS Excel on Windows. With LC 6 the 
> text was pasted into Excel line by line, as it showed up in LC. In LC
> 8.1.2 the text is pasted with an extra space line between each two lines.
> 
> I checked the line ends in both versions. There is only one "LF"
> (byteToNum=10) at the end of each line and it looks the same in both 
> versions.
> 
> What has changed in LC 8 to cause such a different behavior? Is this 
> again a Unicode thing what I don't understand? I already tried 
> different clipboarddata keys, without success.
> 
> It can't be an Excel option, because I tested it with the same Excel 
> version on the same machine.
> 
> Any idea, what has to be changed to get the same clipboard result as 
> in LC 6?
> 
> Thank 

AW: Different result in LC 6 to LC 8 when copying field text into Excel?

2017-02-08 Thread Tiemo Hollmann TB via use-livecode
Hi Paul,

I test your approach, but when running the code in the DIE, LiveCode crashes 
immediatly. When debugging the code, it doesn't crashes, but stops at setting 
the rawclipboarddata with an error "clipboard is not locked".
This happens anyhow, if I am using "lock clipboard" or not.  I'll file it
Tiemo

-Ursprüngliche Nachricht-
Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im Auftrag von 
Paul Hibbert via use-livecode
Gesendet: Dienstag, 7. Februar 2017 22:11
An: How to use LiveCode 
Cc: Paul Hibbert 
Betreff: Re: Different result in LC 6 to LC 8 when copying field text into 
Excel?

Tiemo,

I’m not sure if this will help because I’m testing on Mac, but I did a little 
bit of experimenting with the new ‘rawClipboardData’, it allows plain text to 
be copied out of LC, just to prove it, here’s a button script copied via my now 
modified Script Buddy plugin…

on mouseUp
   local tClip

   if the selectedText is empty then
  set the clipBoardData["text"] to fld “myTextField"
   else
  copy the selectedText
   end if
   
   if the altKey is down then -- Convert the clipBoard to plain text
  put the clipBoardData["text"] into tClip
  lock the clipBoard
  ## Use some code lifted from the LiveCode Dictionary…
  set the rawClipBoardData to empty -- Clear ALL ClipboardData
  if the platform is "Linux" then set the 
rawClipboardData["text/plain;charset=utf-8"] \
to textEncode(tClip, "UTF-8" ) -- Linux
  if the platform is "Win32" then set the rawClipboardData["CF_UNICODE"] \
to textEncode(tClip, "UTF-16" ) -- Windows
  if the platform is "MacOS" then set the 
rawClipboardData["public.utf8-plain-text"] \
to textEncode(tClip, "UTF-8" ) -- OSX
  unlock the clipboard
   end if
end mouseUp

At last, no extra line spacing! :-)

Normally when I paste from LC into Mail I see extra line spacing, and I would 
have to copy and paste via a plain text editor to remove it. Emptying the 
clipBoard and setting the rawClipboardData as above seems to work, on Mac at 
least, hopefully it should work with Excel on Windows too.

Paul




> On Feb 3, 2017, at 6:25 AM, Tiemo Hollmann TB via use-livecode 
>  wrote:
> 
> Can anybody on Windows with LC 8 confirm this:
> 
> - create a new stack
> - create a scrolling list field
> - enter three lines of text, each with one word
> - enter into the message box: *set the clipboarddata["text"] to fld 1*
> - open MS Excel (in my case Windows 10, Excel 2013)
> - paste
> - see an extra empty line between each line of text
> 
> Pasted in a text editor there are no extra lines and up to LC 7 there 
> also was no extra line in Excel.
> 
> Can anybody confirm this behavior or even has an idea for a workaround?
> 
> Thanks
> Tiemo
> 
> 
> 
> -Ursprüngliche Nachricht-
> Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im 
> Auftrag von Tiemo Hollmann TB via use-livecode
> Gesendet: Donnerstag, 2. Februar 2017 12:13
> An: LiveCode User Liste senden 
> Cc: Tiemo Hollmann TB 
> Betreff: Different result in LC 6 to LC 8 when copying field text into 
> Excel?
> 
> Hello,
> 
> I have a standard scrolling list field with multiple lines of text. I 
> copy the text by:
> 
> *set the clipboarddata["text"] to fld "List"*
> 
> The User now can past the text into MS Excel on Windows. With LC 6 the 
> text was pasted into Excel line by line, as it showed up in LC. In LC 
> 8.1.2 the text is pasted with an extra space line between each two lines.
> 
> I checked the line ends in both versions. There is only one "LF"
> (byteToNum=10) at the end of each line and it looks the same in both 
> versions.
> 
> What has changed in LC 8 to cause such a different behavior? Is this 
> again a Unicode thing what I don't understand? I already tried 
> different clipboarddata keys, without success.
> 
> It can't be an Excel option, because I tested it with the same Excel 
> version on the same machine.
> 
> Any idea, what has to be changed to get the same clipboard result as 
> in LC 6?
> 
> Thank you
> 
> Tiemo
> 
> 
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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