Fwd: Quantum tunneling in LiveCode

2015-03-03 Thread stgoldb...@aol.com
The issue of a background group being in two places at once is not quite 
clarified. Getting back to the script sequence below, when there is a mouseUp 
handler in a background group, the message, on clicking on the grouped button 
goes from:


 button -- group -- card -- stack

When clicking on the card the message goes from:


card -- group -- stack


In effect the group acts on both sides of the card depending on where you 
click. So is mistaken to think that as soon as a background group is formed it 
mysteriously picks up and moves from one side of the card to the other 
(spreading out as it does so).  It in effect remains on both sides, as seen by 
the message sequence when clicking on the button.


I think the practicality of this discussion is in the situation where one 
wants, say, a cluster of buttons to appear on all cards in a stack, so one 
makes the button cluster a background group. If the background group has a 
mouseUp handler, its script will confusingly be enacted not only when clicking 
on the buttons but also wherever one clicks on the card. I think the bottom 
line is to be cautious about putting mouseUp scripts in background groups, or 
to put a disclaimer in the group at the beginning of the group handler the line 
(as mentioned in the User Manual (pg 131, 5.3.9):


if the owner of the target is not me then pass mouseUp


Stephen Goldberg
www.medmaster.net


-Original Message-
From: stgoldberg stgoldb...@aol.com
To: use-livecode use-livecode@lists.runrev.com
Sent: Mon, Mar 2, 2015 4:07 pm
Subject: Quantum tunneling in LiveCode


 In quantum mechanics something can be in more than one place at once.  A 
paradox of sorts seems to occur in the message chain with groups in LiveCode. 
Try this:   
   
 
1.  Place a button on a card.   

2.  Make the button a group. Set the group's backgroundBehavior to true.   

3.  Place the following script in the button:   




on mouseUp   

answer I am a button   

pass mouseUp   

end mouseUp   




4.  Place the following script in the group:   




on mouseUp   

answer I am a strange group   

pass mouseUp   

end mouseUp   




5.  On the card script write:   




on mouseUp   

answer I am a card   

pass mouseUp   

end mouseUp   




6.  In the stack script write:   




on mouseUp   

answer I am a stack   

end mouseUp   







7. Now click on the button.  You get the sequence:   

I am a button -- I am a strange group -- I am a card -- I am a stack   




8.  Now click on the card.  You get:   

I am a card -- I am a strange group -- I am a stack




Where is the strange group, before or after the card?   




Stephen Goldberg   

www.medmaster.net   






   
 

___
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: Fwd: Quantum tunneling in LiveCode

2015-03-03 Thread Richard Gaskin

Stephen Goldberg wrote:

 I think the bottom line is to be cautious about putting mouseUp
 scripts in background groups, or to put a disclaimer in the group
 at the beginning of the group handler the line (as mentioned in
 the User Manual (pg 131, 5.3.9):

 if the owner of the target is not me then pass mouseUp

The backgroundBehavior property is a tricky thing, implemented for 
compatibility with imported HyperCard stacks but given the differences 
between the HC and LC object models it's always going to be at least a 
little mind-bending.


In HC, there was always and only one background, which was placed below 
the card.


In LC, there is no background object pe se, but instead employs groups 
which can be shared across cards.  In LC we can have any number of 
groups, and they may even be nested.


In LC, in the absence of an always-present background object, all 
objects always reside on the card.


To maintain compatibility with HC, the backgroundBehavior was introduced 
in an attempt to account for those cases where the message handling 
order needed the background after the card, as it was in HC, rather than 
before the card as is natural in LC.


In older versions of LC setting the backgroundBehavior was the only way 
to share groups among multiple cards, which sometimes caused problems 
for developers expecting the natural order of messages to be in play, 
reflecting the visual order in which all controls, even groups, are on 
top of the card.


So a few versions back a new property was added:  the sharedBehavior. 
When true this allows us to share a group across multiple cards, and 
when creating a new card any groups with their sharedBehavior set are 
automatically placed on new cards.  It's related to the 
backgroundBehavior, but is not the same thing:


When the backgroundBehavior is set, the sharedBehavior is also set. 
This should trigger the change you're describing, in which messages are 
handled by as group with the backgroundBehavior set occur after the card 
receives them.


But the sharedBehavior can be set by itself, allowing sharing without 
altering LC's natural message order as reflected by what we see visually 
on screen:  objects on top of the card get messages before the card does.


So all that said, we might consider what you're seeing to be a bug.

But personally, with more than a decade separating me from the last time 
I had a machine even capable of running HC, it's been so long since I've 
thought about the HC-style message order that I never rely on it.  I was 
very glad when they introduced the sharedBehavior as a way of sharing 
groups while maintaining the natural, visible order of messages, and 
when I need messages to occur after the card I generally just put them 
in the stack or a library.


But there are those who may need the older HC-style message order, and 
if so that's what the backgroundBehavior is supposed to provide.


If you see a difference between LC and HC with message flow when the 
backgroundBehavior is set, it may be time to file a bug report.


--
 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: Power Status (was Re: Because LC can't do two things at once.)

2015-03-03 Thread Peter M. Brigham
So it looks from your links that I should use /sys/class/power_supply/BAT0/ 
for the URL on Unix, and check for charging or discharging as the first 
word??

-- Peter

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

On Mar 2, 2015, at 2:18 PM, Richard Gaskin wrote:

 Peter Brigham wrote:
 
  What gets returned in
 get URL /proc/acpi/battery/BAT1/state on Unix?
  If you give me a sample to work with I will finish the handler and
  post it.
 
 Further reading shows that path deprecated on many modern systems, suggesting 
 the /sys path instead:
 
 /sys/class/power_supply/BAT0/
 
 https://blog.sleeplessbeastie.eu/2013/01/02/debian-how-to-monitor-battery-capacity/
 
 Of the elements found at that path status seems the most relevant, but at 
 the moment I'm on a desktop workstation and my Linux laptop is at home so I 
 can't check it right now.
 
 The key question for the moment is whether BAT0 or BAT1 is used by folks 
 here.  Oddly enough when I was using /proc I had no BAT0 but I did find the 
 info in BAT1.
 
 Perhaps my Dell model thinks it can support multiple batteries (maybe 
 counting the onboard clock battery?  Seems unlikely).
 
 Once we discover the battery numbering scheme, parsing the byte stream at 
 that location will be trivial.
 
 In fact, the articles I've found suggest that when that status element is 
 present it contains just a single word, such as charging or discharging, 
 shown in the example here:
 https://bbs.archlinux.org/viewtopic.php?id=133716
 
 I'll see if I can get some time to look into this further this evening.
 
 -- 
 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: Power Status (was Re: Because LC can't do two things at once.)

2015-03-03 Thread Richard Gaskin

Peter M. Brigham wrote:
 So it looks from your links that I should use /sys/class/power_supply
 /BAT0/ for the URL on Unix, and check for charging or
 discharging as the first word??

...or full, as I saw last night while testing this.

So far I'm only seeing one-word values, so using word 1 would seem a 
safe choice - good call.



We have one remaining mystery, however:  my Dell has only one battery, 
but has no values at /sys/class/power_supply/BAT0/, instead using 
/sys/class/power_supply/BAT1/.


I've read other cases online where folks find the same thing, but 
haven't found the definitive rule governing why.


In my reading I also came across some laptop models (Toshiba came up a 
couple times) in which the battery firmware doesn't report its info in a 
standard way, making it more difficult for generalized utilities to 
obtain it.  But frankly, if an OEM chooses to disregard published 
standards personally I can't see spending much time accommodating them, 
so I'm not too worried about such edge cases.


Given all this, I would feel reasonably safe at this time with the 
following algorithm:


First check BAT0/status
If empty then
check BAT1/status
end if
If both are empty there's probably no battery
If a value is found then use it

I've seen no mention of BAT2 or more, so I feel this should account for 
a reasonably useful range of contexts.



My own goal here is to know whether I can feel save performing optional 
background processing which can improve performance but at the cost of 
battery life.


So either full or charging implies that the laptop is plugged into a 
wall socket, so I'd proceed with those background tasks.


And if no battery info can be found at all in either location (BAT0 or 
BAT1), it seems safe to assume we're not on a battery-powered device, so 
I'd also proceed with optional background tasks.


So it's only when the status returns discharging that I know a battery 
is present and that it's not plugged into a wall socket, in which case I 
should at least let the user decide whether or not to run optional 
background tasks.


--
 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: Fwd: Quantum tunneling in LiveCode

2015-03-03 Thread Peter Haworth
Thanks for that explanation Richard. I finally get the difference between
sharedBehavior and backgroundBehavior. Seems like sharedBehavior is the one
to use for everything except old HC stacks.

On Tue, Mar 3, 2015, 7:14 AM Richard Gaskin ambassa...@fourthworld.com
wrote:

 Stephen Goldberg wrote:

   I think the bottom line is to be cautious about putting mouseUp
   scripts in background groups, or to put a disclaimer in the group
   at the beginning of the group handler the line (as mentioned in
   the User Manual (pg 131, 5.3.9):
  
   if the owner of the target is not me then pass mouseUp

 The backgroundBehavior property is a tricky thing, implemented for
 compatibility with imported HyperCard stacks but given the differences
 between the HC and LC object models it's always going to be at least a
 little mind-bending.

 In HC, there was always and only one background, which was placed below
 the card.

 In LC, there is no background object pe se, but instead employs groups
 which can be shared across cards.  In LC we can have any number of
 groups, and they may even be nested.

 In LC, in the absence of an always-present background object, all
 objects always reside on the card.

 To maintain compatibility with HC, the backgroundBehavior was introduced
 in an attempt to account for those cases where the message handling
 order needed the background after the card, as it was in HC, rather than
 before the card as is natural in LC.

 In older versions of LC setting the backgroundBehavior was the only way
 to share groups among multiple cards, which sometimes caused problems
 for developers expecting the natural order of messages to be in play,
 reflecting the visual order in which all controls, even groups, are on
 top of the card.

 So a few versions back a new property was added:  the sharedBehavior.
 When true this allows us to share a group across multiple cards, and
 when creating a new card any groups with their sharedBehavior set are
 automatically placed on new cards.  It's related to the
 backgroundBehavior, but is not the same thing:

 When the backgroundBehavior is set, the sharedBehavior is also set.
 This should trigger the change you're describing, in which messages are
 handled by as group with the backgroundBehavior set occur after the card
 receives them.

 But the sharedBehavior can be set by itself, allowing sharing without
 altering LC's natural message order as reflected by what we see visually
 on screen:  objects on top of the card get messages before the card does.

 So all that said, we might consider what you're seeing to be a bug.

 But personally, with more than a decade separating me from the last time
 I had a machine even capable of running HC, it's been so long since I've
 thought about the HC-style message order that I never rely on it.  I was
 very glad when they introduced the sharedBehavior as a way of sharing
 groups while maintaining the natural, visible order of messages, and
 when I need messages to occur after the card I generally just put them
 in the stack or a library.

 But there are those who may need the older HC-style message order, and
 if so that's what the backgroundBehavior is supposed to provide.

 If you see a difference between LC and HC with message flow when the
 backgroundBehavior is set, it may be time to file a bug report.

 --
   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: Fwd: Quantum tunneling in LiveCode

2015-03-03 Thread J. Landman Gay

On 3/3/2015 9:13 AM, Richard Gaskin wrote:

The backgroundBehavior property is a tricky thing,


I think of it like this: A message to an object will always go to the 
object's owner group(s) first, if any. After that it hits the card and 
follows the normal hierarchy.


--
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: ANN: Re-Collections iOS app now available - FREE for a limited time

2015-03-03 Thread William Prothero
Alan:
Nice Idea. I downloaded it and will try it out, but first I’ve gotta select the 
photos from my humungous photo library to go onto my iPad.

Great work!
Bill
 On Mar 2, 2015, at 3:07 AM, Alan Stenhouse alanstenho...@hotmail.com wrote:
 
 G’day all!
 
 Just wanted to let you know I’ve just released another iOS app called 
 “Re-Collections”, made in LiveCode.
 
 It’s going for free the first few days so if you’re interested you can get it 
 at:
 
 https://itunes.apple.com/app/re-collections/id948329642?mt=8uo=4
 
 or learn more about it on the website at:
 
 http://scruffmonkey.com/Re-Collections.html
 
 Any suggestions or bugs do let me know… Thanks!!
 
 As always, if you have time (and like it!!) please do leave a review and 
 rating on the iTunes App Store once you’ve had a play. :-) 
 
 It runs on iPad and is designed to help you record stories from your parents 
 or grandparents (or others) about old photos. You can record both audio and 
 text notes. The “special” thing is something called “continuous recording” 
 where the audio recording keeps going automatically for each picture as you 
 swipe through them. As they look at old pictures that you’ve scanned in, you 
 can record their stories and catch their emotions and first reactions… 
 
 Or that’s the idea. Use it for whatever you want! :-)
 
 Cheers
 
 Alan
 
 ___
 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: Fwd: Quantum tunneling in LiveCode

2015-03-03 Thread Peter Haworth
While on the subject of out-of-the-normal message paths, I came across
another one a couple of months ago.

openControl messages are sent to the highest level group and then DOWN to
any of it's child groups which seems the opposite of the normal message
direction.

It gets more interesting though.  Let's say you have a group hierarchy like
this:

Group A
   GroupA.1 (child of groupA)
  GroupA.1.1 (child of groupA.1)

If all these groups have openControl handlers, they fire in the following
order

GroupA
GroupA.1
GroupA
GroupA.1.1
GroupA.1
GroupA

So not only do these messages go down to each child group but they also
come back up again!  In the above example, the openControl for GroupA is
executed 3 times, GroupA.1 twice, and GroupA.1.1 just once.

I submitted a bug report for this some time ago (#14091) and it's been
stuck in Expert Review status for about 3 months.  I don't know if it's a
bug or not but it certainly seems like odd behavior and could certainly
screw up whatever logic you have in an openControl handler.

Pete


On Tue, Mar 3, 2015 at 10:43 AM J. Landman Gay jac...@hyperactivesw.com
wrote:

 On 3/3/2015 9:13 AM, Richard Gaskin wrote:
  The backgroundBehavior property is a tricky thing,

 I think of it like this: A message to an object will always go to the
 object's owner group(s) first, if any. After that it hits the card and
 follows the normal hierarchy.

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

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

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


Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-03 Thread Peter M. Brigham
Assuming that when you saw full that meant AC connected but fully charged, 
here is what I have. Probably should be tested on all 3 platforms before 
letting it fly as a finished utility. Works a peach on the Mac.

function getPowerSource
   -- returns the current power source for a laptop
   --AC or Battery
   -- requires caseSwitch()
   switch the platform
  case MacOS
 -- thanks to Martin Koob, use-LC list
 put shell (pmset -g batt) into tSource
 -- returns something like:
 --Currently drawing from 'AC Power'
 -- -InternalBattery-0  99%; finishing charge; 0:00 remaining
 return char 2 to -1 of word -2 of line 1 of tSource
 break
  case Win32
 -- thanks to Bob Sneidar, use-LC list
 put shell(WMIC Path Win32_Battery GetAvailability) into tSource
 -- Line 3 will contain 2 if the battery is charging, 3 if running on 
battery
 put line 3 of tSource into tStatus
 return caseSwitch(tStatus,3=Battery,*=AC)
 break
  default
 -- Unix, thanks to Richard Gaskin, use-LC list
 put url /sys/class/power_supply/BAT0/ into tStatus
 if tSource = empty then put url /sys/class/power_supply/BAT1/ into 
tStatus
 return 
caseSwitch(tStatus,discharging=Battery,charging,full=AC,*=*)
 -- if non-standard,
 --just returns whatever /sys/class/power_supply/BATx/ reports
   end switch
end getPowerSource

-- Peter

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


On Mar 3, 2015, at 10:29 AM, Richard Gaskin wrote:

 Peter M. Brigham wrote:
  So it looks from your links that I should use /sys/class/power_supply
  /BAT0/ for the URL on Unix, and check for charging or
  discharging as the first word??
 
 ...or full, as I saw last night while testing this.
 
 So far I'm only seeing one-word values, so using word 1 would seem a safe 
 choice - good call.
 
 
 We have one remaining mystery, however:  my Dell has only one battery, but 
 has no values at /sys/class/power_supply/BAT0/, instead using 
 /sys/class/power_supply/BAT1/.
 
 I've read other cases online where folks find the same thing, but haven't 
 found the definitive rule governing why.
 
 In my reading I also came across some laptop models (Toshiba came up a couple 
 times) in which the battery firmware doesn't report its info in a standard 
 way, making it more difficult for generalized utilities to obtain it.  But 
 frankly, if an OEM chooses to disregard published standards personally I 
 can't see spending much time accommodating them, so I'm not too worried about 
 such edge cases.
 
 Given all this, I would feel reasonably safe at this time with the following 
 algorithm:
 
 First check BAT0/status
 If empty then
check BAT1/status
 end if
 If both are empty there's probably no battery
 If a value is found then use it
 
 I've seen no mention of BAT2 or more, so I feel this should account for a 
 reasonably useful range of contexts.
 
 
 My own goal here is to know whether I can feel save performing optional 
 background processing which can improve performance but at the cost of 
 battery life.
 
 So either full or charging implies that the laptop is plugged into a wall 
 socket, so I'd proceed with those background tasks.
 
 And if no battery info can be found at all in either location (BAT0 or BAT1), 
 it seems safe to assume we're not on a battery-powered device, so I'd also 
 proceed with optional background tasks.
 
 So it's only when the status returns discharging that I know a battery is 
 present and that it's not plugged into a wall socket, in which case I should 
 at least let the user decide whether or not to run optional background tasks.
 
 -- 
 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: Sorting Columns

2015-03-03 Thread Sri
dunbarx wrote
 An easy way is to extract the full dataset, perhaps with the dgData.
 This will give you a tab and return delimited list. 

1. I think Craig meant dgText (dgData is an array).

2. Don't forget to set itemDel to tab

Regards,
Sri.



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Sorting-Columns-tp4689614p4689631.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


Project Browser Disclosure Triangles Not Responding

2015-03-03 Thread Mike Kerner
I have a project that seems to be having an issue with the project browser:
 if I click on one of the disclosure triangles, the object (even cards)
won't expand.

Anyone else?

-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, This is good.
___
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: sane way to keep menubar on mac (and what about windows???)

2015-03-03 Thread Bob Sneidar
Wha?? Where?? Not home but Pro?

Bob S


On Mar 2, 2015, at 08:42 , Richard Gaskin 
ambassa...@fourthworld.commailto:ambassa...@fourthworld.com wrote:

So with VirtualBox being free and open, and a Win license being under $100

___
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: Quantum tunneling in LiveCode

2015-03-03 Thread Paul Hibbert
 
 On Mar 3, 2015, at 7:13 AM, Richard Gaskin ambassa...@fourthworld.com wrote:
 
 So all that said, we might consider what you're seeing to be a bug.

I think another big issue here is the lack of up-to-date documentation, and 
this helps to illustrate the depth of this problem.

According to the dictionary 'sharedBehavior' was introduced in LC 4.6.4, but it 
doesn't even appear in the current user guide at all, whereas 
'backgroundBehavior' is mentioned multiple times in paragraphs about the 
message path and groups.

There is no mention of 'sharedBehavior' in the LC Lessons on-line, but there is 
a tutorial covering 'backgroundBehavior'. The only places to learn about 
'sharedBehavior' seems to be the Dictionary or when post like this show up on 
this list, or the 6 entries for 'sharedBehavior' in the forums.

I appreciate that some things do fall through the cracks from time to time, but 
the cracks in LC documentation are growing wider with every new release.

I am a huge LC fan, but to me this is probably the biggest failing of RR and we 
see it crop up over and over again, I think many of the questions on this list 
and the forums could be addressed with good quality documentation, and I'm sure 
that it would also reduce the stress on RR support, not to mention improving 
the LC user experience, especially for new LC users.

Personally, I wish RR would use some of the crowdfunding money to employ a good 
technical writer to work alongside the software engineers, the current user 
guide (LC7.0.3) is revision 19 (2010.11.09), that's well over 4 years 
out-of-date, how many entries are really missing? Now I think I understand why 
RR dropped it from the LC Help menu for a while, but the fact that the users 
wanted it re-instating should tell them how important it really is.

Just my 2¢.

Paul
___
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: Because LC can't do two things at once.

2015-03-03 Thread Bob Sneidar
Wouldn’t hurt for RunRev to add an argument to hide the Microsoft command 
window when shelling out. Looks ominous to an end user when a command window 
pops up then disappears with nothing to show for it.

Bob S


On Mar 2, 2015, at 07:20 , miked...@gmail.commailto:miked...@gmail.com wrote:

It will be added when the linux part is sorted out. :)

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


Re: Power Status (was Re: Because LC can't do two things at once.)

2015-03-03 Thread Peter M. Brigham
Sorry, I left out the word 1 part. The Unix case should read:

 put url /sys/class/power_supply/BAT0/ into tStatus
 if tSource = empty then put url /sys/class/power_supply/BAT1/ into 
tStatus
 put word 1 of tStatus into tStatus
 return 
caseSwitch(tStatus,discharging=Battery,charging,full=AC,*=*)

-- Peter

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

On Mar 3, 2015, at 10:29 AM, Richard Gaskin wrote:

 Peter M. Brigham wrote:
  So it looks from your links that I should use /sys/class/power_supply
  /BAT0/ for the URL on Unix, and check for charging or
  discharging as the first word??
 
 ...or full, as I saw last night while testing this.
 
 So far I'm only seeing one-word values, so using word 1 would seem a safe 
 choice - good call.
 
 
 We have one remaining mystery, however:  my Dell has only one battery, but 
 has no values at /sys/class/power_supply/BAT0/, instead using 
 /sys/class/power_supply/BAT1/.
 
 I've read other cases online where folks find the same thing, but haven't 
 found the definitive rule governing why.
 
 In my reading I also came across some laptop models (Toshiba came up a couple 
 times) in which the battery firmware doesn't report its info in a standard 
 way, making it more difficult for generalized utilities to obtain it.  But 
 frankly, if an OEM chooses to disregard published standards personally I 
 can't see spending much time accommodating them, so I'm not too worried about 
 such edge cases.
 
 Given all this, I would feel reasonably safe at this time with the following 
 algorithm:
 
 First check BAT0/status
 If empty then
check BAT1/status
 end if
 If both are empty there's probably no battery
 If a value is found then use it
 
 I've seen no mention of BAT2 or more, so I feel this should account for a 
 reasonably useful range of contexts.
 
 
 My own goal here is to know whether I can feel save performing optional 
 background processing which can improve performance but at the cost of 
 battery life.
 
 So either full or charging implies that the laptop is plugged into a wall 
 socket, so I'd proceed with those background tasks.
 
 And if no battery info can be found at all in either location (BAT0 or BAT1), 
 it seems safe to assume we're not on a battery-powered device, so I'd also 
 proceed with optional background tasks.
 
 So it's only when the status returns discharging that I know a battery is 
 present and that it's not plugged into a wall socket, in which case I should 
 at least let the user decide whether or not to run optional background tasks.
 
 -- 
 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


OT: Need Panorama Developer (for hire)

2015-03-03 Thread Brahmanathaswami
If you do Panorama using PanoTour Pro from Kolor.. please contact me off 
list



Thank you.

Swasti Astu, Be Well!
Brahmanathaswami

Kauai's Hindu Monastery
www.HimalayanAcademy.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: Because LC can't do two things at once.

2015-03-03 Thread J. Landman Gay

On 3/3/2015 1:32 PM, Bob Sneidar wrote:

Wouldn’t hurt for RunRev to add an argument to hide the Microsoft
command window when shelling out. Looks ominous to an end user when a
command window pops up then disappears with nothing to show for it.


MetaCard beat you to it: hideConsoleWindows

--
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: Power Status (was Re: Because LC can't do two things at once.)

2015-03-03 Thread Peter M. Brigham
OK, as usual, I find some tweaks *after* I hit the send button. I changed 
caseSwitch() so it handles the case of an empty tCheckValue, allowing 
getPowerSource() to  report no battery if getting the URL returns empty. The 
expansion of caseSwitch() is useful in and of itself….

-- Peter

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

--

-- watch linewraps

function getPowerSource
   -- returns the current power source for a laptop
   --AC or Battery
   --or no battery if there is no battery (Unix)
   -- requires caseSwitch()
   switch the platform
  case MacOS
 -- thanks to Martin Koob, use-LC list
 put shell (pmset -g batt) into tSource
 -- returns something like:
 --Currently drawing from 'AC Power'
 -- -InternalBattery-0  99%; finishing charge; 0:00 remaining
 return char 2 to -1 of word -2 of line 1 of tSource
 break
  case Win32
 -- thanks to Bob Sneidar, use-LC list
 put shell(WMIC Path Win32_Battery GetAvailability) into tSource
 -- Line 3 will contain 2 if the battery is charging, 3 if running on 
battery
 put line 3 of tSource into tStatus
 return caseSwitch(tStatus,3=Battery,*=AC)
 break
  default
 -- Unix, thanks to Richard Gaskin, use-LC list
 put url /sys/class/power_supply/BAT0/ into tStatus
 if tSource = empty then put url /sys/class/power_supply/BAT1/ into 
tStatus
 put word 1 of tStatus into tStatus
 return 
caseSwitch(tStatus,discharging=Battery,charging,full=AC,=no battery,*=*)
 -- if tStatus = empty, returns no battery, else if tStatus is 
non-standard,
 --just returns whatever /sys/class/power_supply/BATx/ reports
   end switch
end getPowerSource

function caseSwitch
   -- does a quick inline switch/case
   -- param 1 is checkValue
   -- params 2+ are in the form matchValue(s)=returnValue
   --separate multiple matcheValues with commas
   --and enclose each matchValue=returnValue pair in quotes
   -- if checkValue matches one or more items in matchValue(s),
   --returns returnValue
   -- note that checkValue should NOT be enclosed in quotes
   -- use a matchValue of * to specify a default value,
   --to be returned if no matches found in the list
   --if the default is *=* then no match returns the original checkValue
   --if no match and no default value specified, then returns empty
   -- usage:
   --put caseSwitch(len(tZip),5=zip,10=zip+4,*=not a zip code) \
  -- into zipCodeType
   -- from Ken Ray, use-LC list, originally named stsSwitch()
   -- revised by Peter M. Brigham, pmb...@gmail.com
   --to catch an empty checkValue, eg,
   --…,=empty input,…
   
   put param(1) into tCheckValue
   set the itemDel to =
   put  into tDefault
   repeat with x = 2 to the paramCount
  put param(x) into tCheck
  put item 1 of tCheck into tMatch
  put item 2 of tCheck into tRetVal
  replace , with = in tMatch
  if tCheckValue = empty and tMatch = empty then return tRetVal
  if tCheckValue is among the items of tMatch then return tRetVal
  if tMatch = * then
 if tRetVal = * then
put tCheckValue into tDefault
 else
put tRetVal into tDefault
 end if
  end if
   end repeat
   return tDefault
end caseSwitch

On Mar 3, 2015, at 10:29 AM, Richard Gaskin wrote:

 Peter M. Brigham wrote:
  So it looks from your links that I should use /sys/class/power_supply
  /BAT0/ for the URL on Unix, and check for charging or
  discharging as the first word??
 
 ...or full, as I saw last night while testing this.
 
 So far I'm only seeing one-word values, so using word 1 would seem a safe 
 choice - good call.
 
 
 We have one remaining mystery, however:  my Dell has only one battery, but 
 has no values at /sys/class/power_supply/BAT0/, instead using 
 /sys/class/power_supply/BAT1/.
 
 I've read other cases online where folks find the same thing, but haven't 
 found the definitive rule governing why.
 
 In my reading I also came across some laptop models (Toshiba came up a couple 
 times) in which the battery firmware doesn't report its info in a standard 
 way, making it more difficult for generalized utilities to obtain it.  But 
 frankly, if an OEM chooses to disregard published standards personally I 
 can't see spending much time accommodating them, so I'm not too worried about 
 such edge cases.
 
 Given all this, I would feel reasonably safe at this time with the following 
 algorithm:
 
 First check BAT0/status
 If empty then
check BAT1/status
 end if
 If both are empty there's probably no battery
 If a value is found then use it
 
 I've seen no mention of BAT2 or more, so I feel this should account for a 
 reasonably useful range of contexts.
 
 
 My own goal here is to know whether I can feel save performing optional 
 background processing which can 

Re: Sorting Columns

2015-03-03 Thread dunbarx
Sri is right about all that. I could surely have been more helpful about the
difference between dgData and dgText.

I assumed that tab and return delimited data implied a tab delim.

All good, though.

Craig



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Sorting-Columns-tp4689614p4689636.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: Sorting Columns

2015-03-03 Thread Geoff Canyon
On Tue, Mar 3, 2015 at 8:18 AM, dunb...@aol.com wrote:

 function goodNumber var
   repeat for each char tChar in var
 if var is in 0123456789 then put tChar after temp
   end repeat
   return temp
 end goodNumber


It's worth checking, but this might be faster (but less robust):

function goodNumber var
  replace comma with empty in var
  return var
end goodNumber

if that does work, then I'd replace it with a more general function:

function replaceF S,F,R
  replace F with R in S
  return S
end replaceF

and then call it with

sort yourData numeric by replaceF(item columnOfInterest of each,comma,empty)
___
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: mergExt Update for LC 6.7.3 and 7.0.3

2015-03-03 Thread Ralph DiMola
+1

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net


-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf
Of Gerry
Sent: Tuesday, March 03, 2015 8:10 PM
To: How to use LiveCode
Subject: Re: mergExt Update for LC 6.7.3 and 7.0.3

The mergext externals make it possible to do serious development on iOS in
LiveCode. Without Monte's work the platform wouldn't be a serious
development took for me. It's that simple. Buy 'em!

Gerry
On Wed, 4 Mar 2015 at 10:23 am, Monte Goulding mo...@sweattechnologies.com
wrote:


 On 4 Mar 2015, at 10:19 am, Matthias Rebbe | M-R-D  
 matthias_livecode_150...@m-r-d.de wrote:

  thank you again for all your effort.
 
  Purchasing (and renewing) the mergExt Complete suite was one of my 
  best
 business decisions. :)

 Thanks Matthias

 The 64 bit push has been quite a bit of work over the last few weeks 
 so it's nice to get a pat on the back. Everyone else.. listen to 
 Matthias and buy mergExt!

 Cheers

 Monte

 --
 M E R Goulding
 Software development services
 Bespoke application development for vertical markets

 mergExt - There's an external for that!

 ___
 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: revUnplacedGroupIDs has both false positives and negatives?

2015-03-03 Thread Ralph DiMola
We had a thread a month or so ago under Garbage Collection I had a stack
that was much larger than it should be. Contributors suggested using
revUnplacedGroupIDs to loop thru and delete all the orphans. Well I did it.
The stack shrunk down but had a group deleted that was placed. I thought in
all the fiddling around that I might have done it by mistake. Now I know
what happened but I shot off my foot regardless. Thanks for testing. Hard to
submit a bug on an undocumented feature.

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net


-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf
Of Dr. Hawkins
Sent: Tuesday, March 03, 2015 10:56 PM
To: How to use LiveCode
Subject: revUnplacedGroupIDs has both false positives and negatives?

I know that it's undocumented, but has anyone looked seriously at
revUnplacedGroupIDs?

As I went hunting for crud, missing menus, and whathaveyou,

As I stepped through (after blowing a foot off), I found that some of the
ids covered by revUnplacedGroupIDs were, in fact, placed.  In one case, it
was most of the groups on a card.

I also find it *not* consistently finding all of the actually unplaced
groups, although this is much harder to track down.

Has anyone else experimented with this?

And, I suppose more importantly, can anyone reproduce it?

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


___
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: Sorting Columns

2015-03-03 Thread JB
Thanks Bob!

Any explanation is helpful since
I am fairly new to data grids.

The commas are thousands delimiters.

John Balgenorth


On Mar 3, 2015, at 4:13 PM, Bob Sneidar bobsnei...@iotecdigital.com wrote:

 dgData returns an array. dgText returns delimited text. if the commas are 
 thousand delimiters, then strip them. I’ve often thought of trying to 
 implement a “displayAs functionality for Datagrids, like Excel does, where 
 the value is one thing but the display is another. Your situation really 
 underscores the need for this.
 
 Bob S
 
 
 On Mar 3, 2015, at 06:18 , dunb...@aol.commailto:dunb...@aol.com wrote:
 
 An easy way is to extract the full dataset, perhaps with the dgData. This 
 will give you a tab and return delimited list. Then you might sort by a 
 function:
 
 ___
 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: Because LC can't do two things at once.

2015-03-03 Thread J. Landman Gay
On March 3, 2015 11:04:43 PM CST, Mark Wieder mwie...@ahsoftware.net wrote:
Jacque-

Tuesday, March 3, 2015, 11:43:36 AM, you wrote:

 MetaCard beat you to it: hideConsoleWindows

chortle
My dyslexic eyes read that as 'MeatCard'

Call if what you want, but the real reason is that both of us are getting to be 
a less comfortable distance from the apocalypse. 
-- 
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: revUnplacedGroupIDs has both false positives and negatives?

2015-03-03 Thread Peter Haworth
I wonder if this might be connected with the thread earlier today about the
difference between sharedBehavior and backgroundBehavior.

On Tue, Mar 3, 2015, 10:16 PM Ralph DiMola rdim...@evergreeninfo.net
wrote:

 We had a thread a month or so ago under Garbage Collection I had a stack
 that was much larger than it should be. Contributors suggested using
 revUnplacedGroupIDs to loop thru and delete all the orphans. Well I did it.
 The stack shrunk down but had a group deleted that was placed. I thought in
 all the fiddling around that I might have done it by mistake. Now I know
 what happened but I shot off my foot regardless. Thanks for testing. Hard
 to
 submit a bug on an undocumented feature.

 Ralph DiMola
 IT Director
 Evergreen Information Services
 rdim...@evergreeninfo.net


 -Original Message-
 From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On
 Behalf
 Of Dr. Hawkins
 Sent: Tuesday, March 03, 2015 10:56 PM
 To: How to use LiveCode
 Subject: revUnplacedGroupIDs has both false positives and negatives?

 I know that it's undocumented, but has anyone looked seriously at
 revUnplacedGroupIDs?

 As I went hunting for crud, missing menus, and whathaveyou,

 As I stepped through (after blowing a foot off), I found that some of the
 ids covered by revUnplacedGroupIDs were, in fact, placed.  In one case, it
 was most of the groups on a card.

 I also find it *not* consistently finding all of the actually unplaced
 groups, although this is much harder to track down.

 Has anyone else experimented with this?

 And, I suppose more importantly, can anyone reproduce it?

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


 ___
 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: mergExt Update for LC 6.7.3 and 7.0.3

2015-03-03 Thread Monte Goulding

On 4 Mar 2015, at 10:19 am, Matthias Rebbe | M-R-D 
matthias_livecode_150...@m-r-d.de wrote:

 thank you again for all your effort.
 
 Purchasing (and renewing) the mergExt Complete suite was one of my best 
 business decisions. :)

Thanks Matthias

The 64 bit push has been quite a bit of work over the last few weeks so it's 
nice to get a pat on the back. Everyone else.. listen to Matthias and buy 
mergExt!

Cheers

Monte

--
M E R Goulding 
Software development services
Bespoke application development for vertical markets

mergExt - There's an external for that!

___
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: iOS8 Encrpytion working?

2015-03-03 Thread Mark Talluto

On Mar 2, 2015, at 11:55 AM, Chipp Walters ch...@altuit.com wrote:

 I keep getting this error when I BUILD for iOS on 7.0.3
 Any idea why? Runs fine in simulator. Encryption is checked but it's acting
 like it's not checked.

Chipp and I have already communicated about this. There is a problem with 
encryption for iOS and version 7+ of LiveCode. 
http://quality.runrev.com/show_bug.cgi?id=14766

Hoping 7.0.4 will have this corrected.

Best regards,

Mark Talluto
livecloud.io
canelasoftware.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


mergExt Update for LC 6.7.3 and 7.0.3

2015-03-03 Thread Monte Goulding
Hi LiveCoders

I have uploaded new builds of all my iOS externals to be compatible with the 
latest versions of LiveCode and Apple's 64 bit requirements.

Cheers

Monte

--
M E R Goulding 
Software development services
Bespoke application development for vertical markets

mergExt - There's an external for that!

___
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: Sorting Columns

2015-03-03 Thread JB
Thank you, for the info and code.

John Balgenorth


On Mar 3, 2015, at 2:16 PM, Geoff Canyon gcan...@gmail.com wrote:

 On Tue, Mar 3, 2015 at 8:18 AM, dunb...@aol.com wrote:
 
 function goodNumber var
  repeat for each char tChar in var
if var is in 0123456789 then put tChar after temp
  end repeat
  return temp
 end goodNumber
 
 
 It's worth checking, but this might be faster (but less robust):
 
 function goodNumber var
  replace comma with empty in var
  return var
 end goodNumber
 
 if that does work, then I'd replace it with a more general function:
 
 function replaceF S,F,R
  replace F with R in S
  return S
 end replaceF
 
 and then call it with
 
 sort yourData numeric by replaceF(item columnOfInterest of each,comma,empty)
 ___
 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: mergExt Update for LC 6.7.3 and 7.0.3

2015-03-03 Thread Matthias Rebbe | M-R-D

thank you again for all your effort.

Purchasing (and renewing) the mergExt Complete suite was one of my best 
business decisions. :)

Matthias



 Am 04.03.2015 um 00:00 schrieb Monte Goulding mo...@sweattechnologies.com:
 
 Hi LiveCoders
 
 I have uploaded new builds of all my iOS externals to be compatible with the 
 latest versions of LiveCode and Apple's 64 bit requirements.
 
 Cheers
 
 Monte
 
 --
 M E R Goulding 
 Software development services
 Bespoke application development for vertical markets
 
 mergExt - There's an external for that!
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode


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


Re: [OT] Invalid host address

2015-03-03 Thread Bob Sneidar
It sounds like their DNS might be hosed. Perhaps the user has manual assigned a 
DNS server instead of the local network assigning one for him. Perhaps that DNS 
server is inaccessible at certain locations. Some users like to manually set 
their DNS to Google’s DNS or OpenDNS. This can get them into trouble in school 
environments, where there are typically content management systems that will 
block any attempt to use a DNS server other than the local one. 

Bob S


 On Mar 2, 2015, at 17:58 , Mike Bonner bonnm...@gmail.com wrote:
 
 The hosts file can be set up to provide specific name to ip address
 mappings.  99.9% of the time its not used, and if it is, its often a
 hijack. Along with the hijack thing, its also possible that a proxy has
 been set up unbeknownst to the user, and its munging something as it
 decides where they want to direct the user, rather than where the user
 actually wants to go.
 
 Can you post some of the gibberish?
 
 On Mon, Mar 2, 2015 at 6:53 PM, J. Landman Gay jac...@hyperactivesw.com
 wrote:
 
 Out of thousands of users, occasionally one can't connect and repeatedly
 gets an invalid host address error. What causes those? All users are
 sending to the same server at the same domain. Naturally they all say it's
 only our app and never happens in a browser.
 
 Everything I've found about it is mostly gibberish to me. Is this
 something to do with the hosts file on the computer? The latest report says
 it happens on different networks (home and school) so I assume it's
 specific to his machine.
 
 --
 Jacqueline Landman Gay | jac...@hyperactivesw.com
 HyperActive Software   | http://www.hyperactivesw.com
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode

___
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: Sorting Columns

2015-03-03 Thread Bob Sneidar
dgData returns an array. dgText returns delimited text. if the commas are 
thousand delimiters, then strip them. I’ve often thought of trying to implement 
a “displayAs functionality for Datagrids, like Excel does, where the value is 
one thing but the display is another. Your situation really underscores the 
need for this.

Bob S


On Mar 3, 2015, at 06:18 , dunb...@aol.commailto:dunb...@aol.com wrote:

An easy way is to extract the full dataset, perhaps with the dgData. This 
will give you a tab and return delimited list. Then you might sort by a 
function:

___
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: Sorting Columns

2015-03-03 Thread JB
Thanks for the info, Srl.

John Balgenorth


On Mar 3, 2015, at 11:30 AM, Sri sri...@gmail.com wrote:

 dunbarx wrote
 An easy way is to extract the full dataset, perhaps with the dgData.
 This will give you a tab and return delimited list. 
 
 1. I think Craig meant dgText (dgData is an array).
 
 2. Don't forget to set itemDel to tab
 
 Regards,
 Sri.
 
 
 
 --
 View this message in context: 
 http://runtime-revolution.278305.n4.nabble.com/Sorting-Columns-tp4689614p4689631.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
 


___
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: Power Status (was Re: Because LC can't do two things at once.)

2015-03-03 Thread Peter M. Brigham
on 3/3/15, I wrote:

 OK, as usual, I find some tweaks *after* I hit the send button. I changed 
 caseSwitch() so it handles the case of an empty tCheckValue, allowing 
 getPowerSource() to  report no battery if getting the URL returns empty. 
 The expansion of caseSwitch() is useful in and of itself….

Sigh. Some typos in the handler I sent -- I was changing variable names and 
didn't change everything. Here is the (hopefully) correct and testable handler. 
It never fails -- I am learning that if I want to debug something, all I have 
to do is send it off to this list and I'll immediately find the errors, *after* 
I hit send.

-- Peter

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

--

function getPowerSource
   -- returns the current power source for a laptop
   --AC or Battery
   --or no battery if there is no battery (Unix)
   -- requires caseSwitch()
   switch the platform
  case MacOS
 -- thanks to Martin Koob, use-LC list
 put shell (pmset -g batt) into tStatus
 -- returns something like:
 --Currently drawing from 'AC Power'
 -- -InternalBattery-0  99%; finishing charge; 0:00 remaining
 return char 2 to -1 of word -2 of line 1 of tStatus
 break
  case Win32
 -- thanks to Bob Sneidar, use-LC list
 put shell(WMIC Path Win32_Battery GetAvailability) into tStatus
 -- Line 3 will contain 2 if the battery is charging, 3 if running on 
battery
 put line 3 of tStatus into tStatus
 return caseSwitch(tStatus,3=Battery,*=AC)
 break
  default
 -- Unix, thanks to Richard Gaskin, use-LC list
 put url /sys/class/power_supply/BAT0/ into tStatus
 if tStatus = empty then put url /sys/class/power_supply/BAT1/ into 
tStatus
 put word 1 of tStatus into tStatus
 return caseSwitch(tStatus,discharging=Battery,charging,full=AC,\
 =no battery,*=*)
 -- if tStatus = empty, returns no battery, else if tStatus is 
non-standard,
 --just returns whatever /sys/class/power_supply/BATx/ reports
   end switch
end getPowerSource


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


Re: [OT] Invalid host address

2015-03-03 Thread Bob Sneidar
Good point. I mentioned before that I have adopted the method of opening a 
socket to the host first, checking for errors, before actually trying to send 
any data. That might be something you want to implement. I put it at the start 
of a Database Reconnect handler I wrote just for this sort of thing. It has a 
repeat loop so that the end user can attempt to resolve the condition and then 
try again, or else cancel. If Cancel is selected, the handler quits the app. 

Bob S


 On Mar 2, 2015, at 17:58 , Mike Bonner bonnm...@gmail.com wrote:
 
 The hosts file can be set up to provide specific name to ip address
 mappings.  99.9% of the time its not used, and if it is, its often a
 hijack. Along with the hijack thing, its also possible that a proxy has
 been set up unbeknownst to the user, and its munging something as it
 decides where they want to direct the user, rather than where the user
 actually wants to go.
 
 Can you post some of the gibberish?
 
 On Mon, Mar 2, 2015 at 6:53 PM, J. Landman Gay jac...@hyperactivesw.com
 wrote:
 
 Out of thousands of users, occasionally one can't connect and repeatedly
 gets an invalid host address error. What causes those? All users are
 sending to the same server at the same domain. Naturally they all say it's
 only our app and never happens in a browser.
 
 Everything I've found about it is mostly gibberish to me. Is this
 something to do with the hosts file on the computer? The latest report says
 it happens on different networks (home and school) so I assume it's
 specific to his machine.
 
 --
 Jacqueline Landman Gay | jac...@hyperactivesw.com
 HyperActive Software   | http://www.hyperactivesw.com
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode


___
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: DB connection times

2015-03-03 Thread Bob Sneidar
Sorry yes, I meant Char(). 

Bob S


 On Mar 2, 2015, at 20:00 , Dr. Hawkins doch...@gmail.com wrote:
 
 On Mon, Mar 2, 2015 at 9:25 AM, Bob Sneidar bobsnei...@iotecdigital.com
 wrote:
 
 To optimize connections and transfer of data, one of the things you can do
 is use VarChar() instead of TEXT whenever possible. A very knowledgable web
 designer explained to me that TEXT types pad the storage values to fill the
 defined storage size for that column, whereas VarChar only stores as much
 data as is in the column for that record.
 
 
 But TEXT has undefined object size.  According to postgres, there is not an
 efficiency difference between VARCHAR an TEXT.
 
 Perhaps he/you meant CHAR(), rather than TEXT?
 
 
 Another thing you can do is avoid querying for BLOB types until you
 actually need the data. Thirdly, I suspect as others have said, that using
 transactional querying, and combining all your SQL statements into one
 using the semi-colon delimiter is probably going to save some time overall.
 
 
 I don't know about BLOB, but isn't it also varying size?
 
 
 
 
 -- 
 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


___
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: Quantum tunneling in LiveCode

2015-03-03 Thread Bob Sneidar
May be my mind is too small, but if this is true, then Quantum Mechanics is 
flawed. But I have to wonder what the quantum definition of “at once” is. :-)

Bob S


On Mar 2, 2015, at 13:07 , stgoldb...@aol.commailto:stgoldb...@aol.com wrote:

In quantum mechanics something can be in more than one place at once.  A 
paradox of sorts seems to occur in the message chain with groups in LiveCode. 
Try this:

___
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: mergExt Update for LC 6.7.3 and 7.0.3

2015-03-03 Thread Gerry
The mergext externals make it possible to do serious development on iOS in
LiveCode. Without Monte's work the platform wouldn't be a serious
development took for me. It's that simple. Buy 'em!

Gerry
On Wed, 4 Mar 2015 at 10:23 am, Monte Goulding mo...@sweattechnologies.com
wrote:


 On 4 Mar 2015, at 10:19 am, Matthias Rebbe | M-R-D 
 matthias_livecode_150...@m-r-d.de wrote:

  thank you again for all your effort.
 
  Purchasing (and renewing) the mergExt Complete suite was one of my best
 business decisions. :)

 Thanks Matthias

 The 64 bit push has been quite a bit of work over the last few weeks so
 it's nice to get a pat on the back. Everyone else.. listen to Matthias and
 buy mergExt!

 Cheers

 Monte

 --
 M E R Goulding
 Software development services
 Bespoke application development for vertical markets

 mergExt - There's an external for that!

 ___
 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: mergExt Update for LC 6.7.3 and 7.0.3

2015-03-03 Thread Pierre Sahores
Congrats and thanks, Monte.

 Le 4 mars 2015 à 00:00, Monte Goulding mo...@sweattechnologies.com a écrit :
 
 Hi LiveCoders
 
 I have uploaded new builds of all my iOS externals to be compatible with the 
 latest versions of LiveCode and Apple's 64 bit requirements.
 
 Cheers
 
 Monte
 
 --
 M E R Goulding 
 Software development services
 Bespoke application development for vertical markets
 
 mergExt - There's an external for that!
 
 ___
 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

--
Pierre Sahores
mobile : 06 03 95 77 70
www.sahores-conseil.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: Because LC can't do two things at once.

2015-03-03 Thread Mark Wieder
Jacque-

Tuesday, March 3, 2015, 11:43:36 AM, you wrote:

 MetaCard beat you to it: hideConsoleWindows

chortle
My dyslexic eyes read that as 'MeatCard'

-- 
-Mark Wieder
 ahsoftw...@gmail.com

This communication may be unlawfully collected and stored by the National 
Security Agency (NSA) in secret. The parties to this email do not 
consent to the retrieving or storing of this communication and any 
related metadata, as well as printing, copying, re-transmitting, 
disseminating, or otherwise using it. If you believe you have received 
this communication in error, please delete it immediately.


___
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


revUnplacedGroupIDs has both false positives and negatives?

2015-03-03 Thread Dr. Hawkins
I know that it's undocumented, but has anyone looked seriously at
revUnplacedGroupIDs?

As I went hunting for crud, missing menus, and whathaveyou,

As I stepped through (after blowing a foot off), I found that some of the
ids covered by revUnplacedGroupIDs were, in fact, placed.  In one case, it
was most of the groups on a card.

I also find it *not* consistently finding all of the actually unplaced
groups, although this is much harder to track down.

Has anyone else experimented with this?

And, I suppose more importantly, can anyone reproduce it?

-- 
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: Power Status (was Re: Because LC can't do two things at once.)

2015-03-03 Thread Mark Wieder
Peter-

Actually, BAT0 is a directory, so you want

put url /sys/class/power_supply/BAT0/status into tStatus
 
and what I see on my Thinkpad running linux Mint 17 is status returns one of 
three states:

Unknown if the laptop is plugged into the AC adapter
Discharging if running off the battery power
Charging if it's (wait for it) charging the battery.

If I remove the battery and run the laptop off AC power there is no BAT0 
directory.

-- 
 Mark Wieder
 ahsoftw...@gmail.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: Fwd: Quantum tunneling in LiveCode

2015-03-03 Thread Michael Doub
Richard,  Very nice explanation of this.   I always wondered about the 
relationship between this properties.


Thanks,
   Mike

On 3/3/15 10:13 AM, Richard Gaskin wrote:

Stephen Goldberg wrote:

 I think the bottom line is to be cautious about putting mouseUp
 scripts in background groups, or to put a disclaimer in the group
 at the beginning of the group handler the line (as mentioned in
 the User Manual (pg 131, 5.3.9):

 if the owner of the target is not me then pass mouseUp

The backgroundBehavior property is a tricky thing, implemented for 
compatibility with imported HyperCard stacks but given the differences 
between the HC and LC object models it's always going to be at least a 
little mind-bending.


In HC, there was always and only one background, which was placed 
below the card.


In LC, there is no background object pe se, but instead employs 
groups which can be shared across cards.  In LC we can have any number 
of groups, and they may even be nested.


In LC, in the absence of an always-present background object, all 
objects always reside on the card.


To maintain compatibility with HC, the backgroundBehavior was 
introduced in an attempt to account for those cases where the message 
handling order needed the background after the card, as it was in HC, 
rather than before the card as is natural in LC.


In older versions of LC setting the backgroundBehavior was the only 
way to share groups among multiple cards, which sometimes caused 
problems for developers expecting the natural order of messages to be 
in play, reflecting the visual order in which all controls, even 
groups, are on top of the card.


So a few versions back a new property was added:  the sharedBehavior. 
When true this allows us to share a group across multiple cards, and 
when creating a new card any groups with their sharedBehavior set are 
automatically placed on new cards.  It's related to the 
backgroundBehavior, but is not the same thing:


When the backgroundBehavior is set, the sharedBehavior is also set. 
This should trigger the change you're describing, in which messages 
are handled by as group with the backgroundBehavior set occur after 
the card receives them.


But the sharedBehavior can be set by itself, allowing sharing without 
altering LC's natural message order as reflected by what we see 
visually on screen:  objects on top of the card get messages before 
the card does.


So all that said, we might consider what you're seeing to be a bug.

But personally, with more than a decade separating me from the last 
time I had a machine even capable of running HC, it's been so long 
since I've thought about the HC-style message order that I never rely 
on it.  I was very glad when they introduced the sharedBehavior as a 
way of sharing groups while maintaining the natural, visible order of 
messages, and when I need messages to occur after the card I generally 
just put them in the stack or a library.


But there are those who may need the older HC-style message order, and 
if so that's what the backgroundBehavior is supposed to provide.


If you see a difference between LC and HC with message flow when the 
backgroundBehavior is set, it may be time to file a bug report.





___
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: Sorting Columns

2015-03-03 Thread dunbarx
An easy way is to extract the full dataset, perhaps with the dgData. This 
will give you a tab and return delimited list. Then you might sort by a 
function:


sort yourData numeric by goodNumber(item columnOfInterest of each)


where:


function goodNumber var
  repeat for each char tChar in var
if var is in 0123456789 then put tChar after temp
  end repeat
  return temp
end goodNumber


Craig Newman



-Original Message-
From: JB sund...@pacifier.com
To: How to use LiveCode use-livecode@lists.runrev.com
Sent: Tue, Mar 3, 2015 6:33 am
Subject: Sorting Columns


I have a data grid and one of the columns
has numbers with commas included.  If I
use the property  inspector and select the
header column I can choose sort by text
or numeric.  Due to the commas neither
of the sort types gives me a correct sort.

Do I need to make another array and strip
the commas and then use that sort with
columns from the original array?  What is
the best way to sort numeric columns with
commas included in the numbers?

John Balgenort

___
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


Sorting Columns

2015-03-03 Thread JB
I have a data grid and one of the columns
has numbers with commas included.  If I
use the property  inspector and select the
header column I can choose sort by text
or numeric.  Due to the commas neither
of the sort types gives me a correct sort.

Do I need to make another array and strip
the commas and then use that sort with
columns from the original array?  What is
the best way to sort numeric columns with
commas included in the numbers?

John Balgenort

___
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: Sorting Columns

2015-03-03 Thread JB
Thank you very much, Craig!

John Balgenorth


On Mar 3, 2015, at 6:18 AM, dunb...@aol.com wrote:

 An easy way is to extract the full dataset, perhaps with the dgData. This 
 will give you a tab and return delimited list. Then you might sort by a 
 function:
 
 
 sort yourData numeric by goodNumber(item columnOfInterest of each)
 
 
 where:
 
 
 function goodNumber var
  repeat for each char tChar in var
if var is in 0123456789 then put tChar after temp
  end repeat
  return temp
 end goodNumber
 
 
 Craig Newman
 
 
 
 -Original Message-
 From: JB sund...@pacifier.com
 To: How to use LiveCode use-livecode@lists.runrev.com
 Sent: Tue, Mar 3, 2015 6:33 am
 Subject: Sorting Columns
 
 
 I have a data grid and one of the columns
 has numbers with commas included.  If I
 use the property  inspector and select the
 header column I can choose sort by text
 or numeric.  Due to the commas neither
 of the sort types gives me a correct sort.
 
 Do I need to make another array and strip
 the commas and then use that sort with
 columns from the original array?  What is
 the best way to sort numeric columns with
 commas included in the numbers?
 
 John Balgenort
 
 ___
 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