the defaultStack changes on resume

2017-08-09 Thread Paul Dupuis via use-livecode
Has any one run into the following situation in LiveCode standalones? In a multiple window application, the user has either a standard window or a modal dialog open (the topWindow which is also the defaultStack). They navigate to a 3rd party application and by some means back to the LC standalone

Re: math, bigly

2017-08-09 Thread Mark Wieder via use-livecode
On 08/09/2017 02:36 AM, hh via use-livecode wrote: Mark wrote: but I'm annoyed that the IDE doesn't give me an overflow warning if I try to perform an operation on a number that's bigger than 0x. Instead, it just happily trims it down to an unsigned integer and proceeds to give me a

Re: the defaultStack changes on resume

2017-08-09 Thread Bob Sneidar via use-livecode
BTW I worked around this by using my getParentStack() function. Here it is: function getParentCard pObjectID put offset("card id", pObjectID) into tStartChar put char tStartChar to -1 of pObjectID into tCardID return tCardID end getParentCard function getParentStack pObjectID put

Re: the defaultStack changes on resume

2017-08-09 Thread Bob Sneidar via use-livecode
Here is an updated version that should work with any stack name: function getParentStack pObjectID put offset("stack ", pObjectID) into tStartChar put char tStartChar to -1 of pObjectID into tParentStack -- the long name of the parent stack return tParentStack end getParentStack Bob

Re: the defaultStack changes on resume

2017-08-09 Thread Paul Dupuis via use-livecode
I have handlers like these also. I have multiple work-arounds. You can use suspend and resume to preserve the defaultStack and restore it. Lots of way to work-around. I am curious if others have seen this and whether anyone ever found a reproducible recipe. So you have seen this behavior? In what

Re: SMS message in LC?

2017-08-09 Thread Matthias Rebbe via use-livecode
Hi Bill, about 1 or 2 years ago i needed to send automated sms messages. I used Clickatell (http://www.clickatell.com ) for it. They have a very easy API. https://www.clickatell.com/developers/platform/api-documentation/

Re: math, bigly

2017-08-09 Thread Richard Gaskin via use-livecode
Mark Wieder wrote: > But what annoys me isn't the fact that baseconvert, etc (bitXor is the > one that bit me) only work on integers less than 2^32. It's more the > fact that the input data was crunched down to something the functions > could handle, and then give me the wrong result with no

Re: math, bigly

2017-08-09 Thread Bob Sneidar via use-livecode
I wonder how much leveraging SQLite can help. SQLite has only basic math functions, and you cannot use stored functions, but you CAN map functions to a C API. And if you can do THAT, then someone has written a math API, and maybe that is a good place to start looking. Bob S

Re: math, bigly

2017-08-09 Thread Bob Sneidar via use-livecode
OIC. I was under the impression that the C math libraries deal with numbers of high precision better than Livecode does, perhaps themselves generating errors on overflow. Maybe that is not the case. Bob S > On Aug 9, 2017, at 10:11 , Mark Wieder via use-livecode >

Re: math, bigly

2017-08-09 Thread Mark Waddingham via use-livecode
On 2017-08-09 18:56, Bob Sneidar via use-livecode wrote: Btw, I should mention that the way numbers work in LiveCode has become one of my biggest 'pet peeves' over the last year or so. The current way things work is too simplistic really - it hides the very important distinction between

LC stack version changes between 8 and 9

2017-08-09 Thread Bob Sneidar via use-livecode
Is there a stack version change from 8 to 9? If so, I would be averse to developing much in 9 except to play around a bit just to help out. If not, and I was reasonably assured no stack corruption was going to take place (obviously there are no guarantees, and I do make versioning backups) then

Re: Parent of Target

2017-08-09 Thread J. Landman Gay via use-livecode
I'm not sure I follow all your explanation but you can refer to the object that holds the behavior script as "this me". I still get a kick out of that but it's quite appropriate. On August 8, 2017 10:41:46 PM Sannyasin Brahmanathaswami via use-livecode wrote:

Re: math, bigly

2017-08-09 Thread hh via use-livecode
> Mark wrote: > but I'm annoyed that the IDE doesn't give me an overflow warning if I try > to perform an operation on a number that's bigger than 0x. > Instead, it just happily trims it down to an unsigned integer and proceeds > to give me a wrong result. Hey Mark. Don't complain because

Re: Android Browser Widget JS problem

2017-08-09 Thread Jonathan Lynch via use-livecode
Thanks Hermann, I have that page, but the event object does not have touches in it, which apparently is some times an issue with android webviews. It does have e.latitude and e.longitude, which tells me that the webglearth library is modifying the event object but is not keeping e.pageX and

Re: Android Browser Widget JS problem

2017-08-09 Thread hh via use-livecode
Have you already seen the answer from here: https://stackoverflow.com/questions/9585487/cant-get-coordinates-of-touchevents-in-javascript-on-android-devices ?? ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to

Re: math, bigly

2017-08-09 Thread Mark Waddingham via use-livecode
On 2017-08-09 11:36, hh via use-livecode wrote: Mark wrote: but I'm annoyed that the IDE doesn't give me an overflow warning if I try to perform an operation on a number that's bigger than 0x. Instead, it just happily trims it down to an unsigned integer and proceeds to give me a

Re: LC stack version changes between 8 and 9

2017-08-09 Thread Richard Gaskin via use-livecode
Bob Sneidar wrote: > Is there a stack version change from 8 to 9? If so, I would be averse > to developing much in 9 except to play around a bit just to help out. IIRC the last format change was between 8.0 and 8.1; 8.1 and 9.0 use the same format. Better, if you do a Save As and choose a

Bug 20255 - Simple Loop Labeling

2017-08-09 Thread Dr. Hawkins via use-livecode
Eureka! I don't know why I didn't think of this earlier, but . . . A simple way to get *some* level of control structure labeling . . . So when finding the structure typed in the id of switch -- myLoop instead of simply adding an end switch, the comment could be copied end switch --

Re: Parent of Target

2017-08-09 Thread Monte Goulding via use-livecode
> On 10 Aug 2017, at 2:25 am, Bob Sneidar via use-livecode > wrote: > > I have a function that returns the stack of an object by passing the long id > of the object. getParentStack(the long id of me). All it does is parses the > long id by using wordOffset to

Re: BUG the target returns the wrong control in a scrolled datagrid

2017-08-09 Thread Craig Newman via use-livecode
Confirmed here. If you populate a DG with several lines, something like: on mouseEnter put the target end mouseEnter will give scatterbrained results. I had thought at first that, if the scroll was in the middle of its range, say, and I moved the cursor into the third visible line, I

Re: LC stack version changes between 8 and 9

2017-08-09 Thread Bob Sneidar via use-livecode
Hah! I use NextCloud Box! $130 bucks or so and I have a local cloud backup. Be forewarned though, once you sync a folder from your computer, NextCloud considers ITSELF the master, and unchecking a subfolder in that folder structure will DELETE THAT SUBFOLDER FROM YOUR DESKTOP! Suck! Much

Re: LC stack version changes between 8 and 9

2017-08-09 Thread panagiotis merakos via use-livecode
Yes, as Richard said, the stack file format is the same between 8.1.x and 9.0. Just note that the widget module format is different, so if you have built a custom widget in LC 8.x you'll need to recompile it in LC 9.0 (and vice versa) Best, Panos -- On Wed, Aug 9, 2017 at 8:19 PM, Richard

BUG the target returns the wrong control in a scrolled datagrid

2017-08-09 Thread Bob Sneidar via use-livecode
Hi all. Remember if you will someone pointed out to me that I can get the target in a mouseEnter handler in a datagrid to determine the name of the control I was pointing at? Works great... so long as the datagrid has not scrolled! If you scroll you get a control for a completely different

Re: SMS message in LC?

2017-08-09 Thread William Prothero via use-livecode
Matthias: Thanks for the link. What I’m hoping for is a way to send both voice and sms alerts to a group. I checked out twilio and they have a very capable api, but it seems more oriented toward marketing and ongoing communication and notifications. For my needs, there might be one or two

Track Mobile Player Props from Back Script

2017-08-09 Thread Sannyasin Brahmanathaswami via use-livecode
If we set up a "lib_MobileControls" and start using on init, effectlvely adding this lib to the backscript. how does this: on playerPropertyAvailable theProperty if theProperty is "duration" then answer "You can now query the length of the movie" end if end

Re: math, bigly

2017-08-09 Thread Bob Sneidar via use-livecode
I agree. At least the result should contain something about an overflow. Bob S > On Aug 9, 2017, at 09:14 , Mark Wieder via use-livecode > wrote: > > But what annoys me isn't the fact that baseconvert, etc (bitXor is the one > that bit me) only work on

Re: the defaultStack changes on resume

2017-08-09 Thread Bob Sneidar via use-livecode
When I suspend a stack is save the current focused object and the current selection. Then on resume stack I restore it. That seems to work really well for me. The topStack should still be the topStack no matter what. Not sure why you need to reference the defaultStack. Bob S > On Aug 9,

Re: math, bigly

2017-08-09 Thread Mark Wieder via use-livecode
On 08/09/2017 09:56 AM, Bob Sneidar via use-livecode wrote: I wonder how much leveraging SQLite can help. SQLite has only basic math functions, and you cannot use stored functions, but you CAN map functions to a C API. And if you can do THAT, then someone has written a math API, and maybe

SMS message in LC?

2017-08-09 Thread ELS prothero via use-livecode
Folks: Has anybody done sms and voice messaging in livecode apps? I’m looking into whether it would be feasible to create an app for emergency alerts. I am in a neighborhood where there is a high wildfire danger and various existing emergency alert systems are either very expensive or more

Re: math, bigly

2017-08-09 Thread Mark Wieder via use-livecode
On 08/09/2017 02:58 AM, Mark Waddingham via use-livecode wrote: The engine hasn't ever done range checks on integers - mainly because numbers are doubles so (in most ases) you just lose accuracy / precision as the numbers get larger. In this case it *could* because it is actually using

Re: math, bigly

2017-08-09 Thread Mark Waddingham via use-livecode
On 2017-08-09 18:14, Mark Wieder via use-livecode wrote: Oops. OK - point sheepishly taken. Is that the definition of integer in the dictionary? The "integer" entry just says "if the value contains digits (and an optional minus sign) and no other characters, it is an integer", which is as

Re: math, bigly

2017-08-09 Thread Mark Waddingham via use-livecode
On 2017-08-09 19:11, Mark Wieder via use-livecode wrote: The problem I've run into is more at a higher level, dealing with number parsing and runtime overflow detection before truncating input parameters down to unsigned integers and calling the math library. Well there's two things here...

Re: math, bigly

2017-08-09 Thread Bob Sneidar via use-livecode
Hi Mark. I remember an old trick to determine if a math function was overflowing. Run the equasion backwards and see if that result equals the initial value. This will reveal rounding errors too. Bob S > On Aug 8, 2017, at 18:38 , Mark Wieder via use-livecode >

Re: math, bigly

2017-08-09 Thread Mark Waddingham via use-livecode
On 2017-08-09 18:29, Mark Wieder via use-livecode wrote: Looking into the engine code, by the time you get to the actual bitXor code, the input arguments are already unsigned integers. Since I was passing 20-hex-digit values to bitXor, I would have expected some kind of runtime warning or error

Re: math, bigly

2017-08-09 Thread Mark Waddingham via use-livecode
On 2017-08-09 18:29, Mark Wieder via use-livecode wrote: Looking into the engine code, by the time you get to the actual bitXor code, the input arguments are already unsigned integers. Since I was passing 20-hex-digit values to bitXor, I would have expected some kind of runtime warning or error

Re: the defaultStack changes on resume

2017-08-09 Thread Bob Sneidar via use-livecode
Yes I have had situations where what the built in functions were returning were not expected, and it screwed somethign up, which is why I do not rely on them. It seems a bit ambiguous to me that "this stack" might return different things depending on where the handler resides. By moving a

Re: math, bigly

2017-08-09 Thread Mark Wieder via use-livecode
On 08/09/2017 09:32 AM, Mark Waddingham via use-livecode wrote: Please do file a bug about it - it is, at the very least, an anomaly. Done. http://quality.livecode.com/show_bug.cgi?id=20254 -- Mark Wieder ahsoftw...@gmail.com ___ use-livecode

Re: Parent of Target

2017-08-09 Thread Bob Sneidar via use-livecode
I have a function that returns the stack of an object by passing the long id of the object. getParentStack(the long id of me). All it does is parses the long id by using wordOffset to find the word "stack" then returns word tWord to -1 of the long id. Pretty basic. That method can be used for

Re: math, bigly

2017-08-09 Thread Mark Waddingham via use-livecode
On 2017-08-09 19:15, Bob Sneidar via use-livecode wrote: OIC. I was under the impression that the C math libraries deal with numbers of high precision better than Livecode does, perhaps themselves generating errors on overflow. Maybe that is not the case. C itself does no error checking/bounds

Re: LC stack version changes between 8 and 9

2017-08-09 Thread Richard Gaskin via use-livecode
Bob Sneidar wrote: > Hah! I use NextCloud Box! $130 bucks or so and I have a local cloud > backup. ...and so much more. When I need to trade files with clients and vendors I create accounts for them and they use it as easy as Dropbox, but without the limitations. > Be forewarned though,

Re: Parent of Target

2017-08-09 Thread Mark Wieder via use-livecode
On 08/09/2017 01:48 PM, Monte Goulding via use-livecode wrote: One day I dream of an object reference that we can get and use that is not a string that needs to be resolved every time it’s used but a direct reference to the object. Perhaps if someone tries to do a string operation on it then

Re: Parent of Target

2017-08-09 Thread Richard Gaskin via use-livecode
Monte Goulding wrote: > I have actually thought about whether it would be reasonable for `the > long id` to return such an object reference as it would stringify > automagically if necessaryI think complex objects that handle many > object references and the IDE would have a significant bump

Re: Parent of Target

2017-08-09 Thread Monte Goulding via use-livecode
> On 10 Aug 2017, at 7:17 am, Mark Wieder via use-livecode > wrote: > > ...and then... > we could name them 'pointers' and 'handles' and I'd be very happy. > Ha… one of the reasons I thought about overloading long ID is because pointer and handle aren’t very

Re: Parent of Target

2017-08-09 Thread Brian Milby via use-livecode
Pretty funny... reading the conversation and I immediately thought "pointer". > > On Aug 9, 2017 at 4:17 PM, (mailto:use-livecode@lists.runrev.com)> wrote: > > > > On 08/09/2017 01:48 PM, Monte Goulding via use-livecode wrote: > One day I > dream of an

Re: math, bigly

2017-08-09 Thread Mark Waddingham via use-livecode
On 2017-08-09 18:50, Richard Gaskin via use-livecode wrote: Imagine the frustration of passing an invalid object reference to something like the delete command, and rather than reporting that it couldn't do what it asked you it just arbitrarily deleted some other object instead without

Re: math, bigly

2017-08-09 Thread hh via use-livecode
Is it a good idea to implement a bignum library in LC Builder? ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

Re: the defaultStack changes on resume

2017-08-09 Thread Trevor DeVore via use-livecode
On Wed, Aug 9, 2017 at 11:08 AM, Paul Dupuis via use-livecode < use-livecode@lists.runrev.com> wrote: > Has any one run into the following situation in LiveCode standalones? > > In a multiple window application, the user has either a standard window > or a modal dialog open (the topWindow which

Re: Parent of Target

2017-08-09 Thread Sannyasin Brahmanathaswami via use-livecode
@ Jacque the behavior is attached to a stack that is not the same stack as the target (a download button) so "this me" won't work @ Bob " getParentStack(the long id of me). All it does is parses the long id by using wordOffset to find the word "stack" then returns word tWord to -1 of the

Re: math, bigly

2017-08-09 Thread Mark Wieder via use-livecode
On 08/09/2017 10:15 AM, Mark Waddingham via use-livecode wrote: ...although that scale is relatively common in 'high-end' cryptography settings (factoring large numbers for the purposes of generating keys and such). Heh. And that, of course, is exactly what I was working on, and what got me

Re: math, bigly

2017-08-09 Thread Mark Wieder via use-livecode
On 08/09/2017 11:05 AM, Mark Waddingham via use-livecode wrote: Fortunately, there is a potential carrot to go with the stick - we can expand the range of the bit operations (and baseConvert) to 52-bits without too much difficulty I think; and add error checking at the same time. Which would

Weird thing I noticed with a graphics speed test

2017-08-09 Thread Jonathan Lynch via use-livecode
I created a group with ten buttons. I have a function that scrolls this group as many times as it can in a second. With acceleratedrendering on, it can scroll 30 times on my Mac. My very slow android device also scrolls it 30 times. With accelerated rendering off, it can scroll the group 87

Re: Weird thing I noticed with a graphics speed test

2017-08-09 Thread Jonathan Lynch via use-livecode
Actually, I had forgotten to set the layermode of the group. Now the number of passes on my Mac is 47 and on the android it is 31. This still seems rather close. I expected the slow android device to be like a quarter as fast. Sent from my iPhone > On Aug 9, 2017, at 9:27 PM,

Re: Parent of Target

2017-08-09 Thread Mark Wieder via use-livecode
On 08/09/2017 06:24 PM, Sannyasin Brahmanathaswami via use-livecode wrote: local sCurrentFlavorA function returnCurrentFlavor put sCurrentFlavorA["fruit"] end returnCurrentFlavor So now, with debug on you can trace easily where things are happening. so some way to track, not only

Re: Parent of Target

2017-08-09 Thread Monte Goulding via use-livecode
> On 10 Aug 2017, at 6:48 am, Monte Goulding via use-livecode > wrote: > > I have actually thought about whether it would be reasonable for `the long > id` to return such an object reference as it would stringify automagically if > necessary. However, deleting

Re: Using Find with Shell on Mac

2017-08-09 Thread Alex Tweedly via use-livecode
On 10/08/2017 01:10, Alex Tweedly via use-livecode wrote: You should put quotes around the "*.livecode", because find ~/ -iname "*.livecode" -print will do what I think you want to do. Whereas if you do, find ~/ -iname *.livecode -print the *.livecode is seen by, and interpreted by,

Using Find with Shell on Mac

2017-08-09 Thread Sannyasin Brahmanathaswami via use-livecode
I'm pretty much fed up with Spotlight. On Linux apps I use Locate, which is really efficient. but setting up and keep the locate dbase on mac is also frought with issues. it will not index $Home which is weird. FIND is slower of course, but perfectly effective. this: find ~/ -iname

Re: Using Find with Shell on Mac

2017-08-09 Thread Bob Sneidar via use-livecode
Not sure what $Home is. I didn't know you could refer to your home folder that way. But keep in mind that you can change what Spotlight does and does not index. you home folder typically is not a place you would create new folders and files for. What would be the point to indexing it? Bob S

Re: Using Find with Shell on Mac

2017-08-09 Thread Alex Tweedly via use-livecode
You should put quotes around the "*.livecode", because find ~/ -iname "*.livecode" -print will do what I think you want to do. Whereas if you do, find ~/ -iname *.livecode -print the *.livecode is seen by, and interpreted by, shell - and so expands to the livecode files in your home

Re: Using Find with Shell on Mac

2017-08-09 Thread Sannyasin Brahmanathaswami via use-livecode
@ bob try it in msg put $HOME see the dictionary for $ but this is one more of those "Alice in wonderland features" of LC that you will only discover after you fall into the hole (hehe) like the long owner of the target "why index" to locate and find return the long paths to the

Re: Bug 20255 - Simple Loop Labeling

2017-08-09 Thread Mark Wieder via use-livecode
On 08/09/2017 01:39 PM, Dr. Hawkins via use-livecode wrote: Eureka! I don't know why I didn't think of this earlier, but . . . A simple way to get *some* level of control structure labeling . . . So when finding the structure typed in the id of switch -- myLoop instead of simply adding

Re: Parent of Target

2017-08-09 Thread J. Landman Gay via use-livecode
On 8/9/17 8:24 PM, Sannyasin Brahmanathaswami via use-livecode wrote: the behavior is attached to a stack that is not the same stack as the target (a download button) so "this me" won't work I think it should... Object with an assigned behavior: "me" Object that contains the behavior