Re: Capture the Trig Function from an Option Menu Button

2012-12-08 Thread Mark Wieder
Roger-

Saturday, December 8, 2012, 7:52:59 PM, you wrote:

> Please forgive my ignorance here, Mark, but are you suggesting
> another way of doing this kind of thing?

Ah, sorry, no. Just describing what you were doing: using a variable
to hold the name of a math operator an then executing the variable.
It's actually quite an advanced and hip programming concept. If you
can handle a lot of buzzwords that make your head spin, look up
functional programming and closures. Or just rest on your laurels on
the fact that you created something clever.

-- 
-Mark Wieder
 mwie...@ahsoftware.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: Capture the Trig Function from an Option Menu Button

2012-12-08 Thread Roger Guay
Please forgive my ignorance here, Mark, but are you suggesting another way of 
doing this kind of thing?

Thanks,
Roger


On Dec 8, 2012, at 11:15 AM, Mark Wieder  wrote:

> Jim-
> 
> Saturday, December 8, 2012, 10:11:31 AM, you wrote:
> 
>> But could you tell me how this "mouseUP" handle fails to do the job?
> 
> Well, it's not nearly as hard to read, for one thing. But seriously,
> the use of lambda functions (google it) can provide a degree of
> flexibility in code and help prevent coding errors. For instance, to
> add the arctan() to your example you'd have to add a new line to the
> option control, then add a new case statement to the switch construct
> in the mouseUp handler. Possibly you could make a mistake when cutting
> and pasting, forgetting to insert a break statement, etc. Using the
> redirected form all you'd need to do is add the new line to the option
> control.
> 
> -- 
> -Mark Wieder
> mwie...@ahsoftware.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


___
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: Capture the Trig Function from an Option Menu Button

2012-12-08 Thread Roger Guay


On Dec 8, 2012, at 11:25 AM, Jim Hurley  wrote:

> I put my script into a separate button. I think yours was in the Option 
> button.

I did exactly as you did, i.e. put your script into a separate button, created 
2 fields, 1 and 2
> 
> 
snip snip

> You should get a field 2 that locks like this, if the angle is 45 degrees::
> 
> The sine of 45 degrees  is 0.707107

I put 45 into fld 1 and get nothing in fld 2. I wonder why your's works and 
mine doesn't???

> Is that the results you wanted?

Yes, that is the result I wanted.

> 
> Jim


___
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: LiveCodeJournal.com forum registration

2012-12-08 Thread stephen barncard
As one that manages several Wordpress blogs, I do not think Richard's
request is unreasonable. One can still use the gmail client by patching in
any 'forwarding only' email from one's connection provider. Almost every
provider provides at least one email address that usually isn't used
anyway. ( like *yeracco...@comcast.com* )

The patching needs to be done at one's ISP, and added in Gmail settings so
that 'reply to' works like one would want. A great benefit is the *tremendously
effective email filters*. When members on this list are bugged by spam
getting into the mail-list - I never see the originals until they're posted
to the list by a 'good' send.  I later find these emails, with full
livecode headers and folder colors, in my spam bin.

Gmail's *rich text thingie* works well too..


On Sat, Dec 8, 2012 at 1:34 PM, Richard Gaskin
wrote:

> Peter M. Brigham wrote:
>
> > I'm not on the forums, and don't feel any particular need to join
> > them since I'm not a professional LC developer, but the exclusion
> > of gmail addresses seems extreme.
>
> It is. I regretted having to add it to the filters, and it was the last
> one to be added - I put it off for more than a year, for all the reasons
> you mentioned.
>
> But the onslaught of spambot registrations from gmail made it difficult to
> handle any other way while still providing enough time for the work I do
> that pays for the forums.
>
> If someone here would like to register for the LiveCode Journal forums and
> has no other address but gmail, first consider the loss of branding value
> from not using your companies domain, but if you still want to use gmail
> for those forums drop me a note and I'll see if I can set up a manual
> exclusion for it.
>
>
> --
>  Richard Gaskin
>  Fourth World
>  LiveCode training and consulting: http://www.fourthworld.com
>  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
>  Follow me on Twitter:  
> http://twitter.com/**FourthWorldSys
>
> __**_
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/**mailman/listinfo/use-livecode
>



-- 



Stephen Barncard
San Francisco Ca. USA

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


Re: LiveCodeJournal.com forum registration

2012-12-08 Thread Richard Gaskin

Peter M. Brigham wrote:

> I'm not on the forums, and don't feel any particular need to join
> them since I'm not a professional LC developer, but the exclusion
> of gmail addresses seems extreme.

It is. I regretted having to add it to the filters, and it was the last 
one to be added - I put it off for more than a year, for all the reasons 
you mentioned.


But the onslaught of spambot registrations from gmail made it difficult 
to handle any other way while still providing enough time for the work I 
do that pays for the forums.


If someone here would like to register for the LiveCode Journal forums 
and has no other address but gmail, first consider the loss of branding 
value from not using your companies domain, but if you still want to use 
gmail for those forums drop me a note and I'll see if I can set up a 
manual exclusion for it.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
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: What are hSscroll, vScroll really?

2012-12-08 Thread Graham Samuel
Jacque

Actually, the concept of text scrolling within a field is universal, iMHO; the 
concept of any old collection of objects scrolling in a (possibly invisible) 
frame, less so. My problem, apart from general dumbness, was my inability to 
see that the two cases are essentially the same.

I agree about the iOS scroller issues, although I did read something about it 
perhaps in some early release notes. I think there may also be some subtleties 
to be explained about the possible values returned by scrollerDidScroll, if 
anyone wants to attempt a clearer write-up!

Thanks for the response, as ever.

Graham

On 8 Dec 2012, at 21:19, J. Landman Gay wrote:

> Since the concept is universal on all computers, I can understand why the 
> docs don't specifically define it though I suppose it wouldn't hurt. What I 
> do think is missing in the case of mobile scrollers is a specific statement 
> about how it is a transparent overlay that only sends information about user 
> actions; it doesn't actually manage objects on the card.
> 
> Before I answered the original question I did a search through the RR lessons 
> and was surprised that iOS scrollers weren't addressed. Most other iOS 
> concepts are there. Scrollers are widely used and there should be an entry in 
> the lessons about it.

___
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: More scrolling queries

2012-12-08 Thread Graham Samuel
Thanks for the reply. I thought that the object was really moving: to me, the 
'frame' was the rect of the visible graphic (actually a group, tho I have no 
idea why) through which I see my object, but the object (the thing with the 
contentRect) itself was really moving under the frame. I suppose the problem 
was that my mental model of what is going on was wrong: I imagined the object 
full size, sliding under the frame, which is like a hole in a bit of card. What 
you're saying is that it's the contents of the object which is doing the 
sliding, not the object itself, and there are kind of two holes, the one which 
defines the rect and an invisible one coincident with it but underneath it, 
defining the size of the scrolling object. In the case of a desktop scroll, the 
'top' rect wouldn't be needed, but it is needed for iOS.

Of course you are right, but it's quite an elusive concept - that's why I wrote 
my mail about hScroll and vScroll.

Anyway I shall readjust the mental wiring and try again.

Graham

On 8 Dec 2012, at 21:25, J. Landman Gay wrote:

> On 12/8/12 8:39 AM, Graham Samuel wrote:
> 
>> This message arrives in the Console window as normal, with x changing
>> values as expected, and the loc of the group always the same.
>> 
>> Why is this so, and what am I seeing move if it's not my group?
> 
> I think you've already figured this out, but just in case, the position of an 
> object and its scroll are different things. Position is the place on the card 
> where the object is located. The scroll of an object is the offset of its 
> contents inside the object's rectangle (which acts like a frame.)
> 
> -- 
> 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: Send appleevent to livecode doesnt work ?

2012-12-08 Thread J. Landman Gay

On 12/8/12 2:40 PM, J. Landman Gay wrote:

On 12/8/12 1:31 AM, Serge Brami wrote:

I want to send an Applevent  to another livecode app running  on an
other Mac on a local network.

for example

on the Mac 1  a button  with the script :
"on mouseup
 send "hello" to "Mac2:livecode"
end mouseup"



on the Mac 2

"on appleevent type
 if type is "aevt" then
   put "hello"
 end if
pass applevent
end applevent


Well it works BUT only il on mac2 I switch from livecode to another
app and then switch back to livecode


I haven't used appleEvents for years, but the way I'd debug this would
be to change the receiving handler to show the parameters and see what
you get:

on appleevent
  repeat with x = 1 to the paramcount
put x && "=" && param(x)
  end repeat
end appleevent

That may show you what is being sent and give you an idea of what's
wrong. The type may not always be "aevt".



Actually, my suggested handler will go by too fast to see. Better change 
it to accumulate the info like this:


on appleevent
 repeat with x = 1 to the paramcount
   put x && "=" && param(x) & cr after tList
 end repeat
 put tList -- or you can use "answer tList"
end appleevent


--
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: Send appleevent to livecode doesnt work ?

2012-12-08 Thread J. Landman Gay

On 12/8/12 1:31 AM, Serge Brami wrote:

I want to send an Applevent  to another livecode app running  on an other Mac 
on a local network.

for example

on the Mac 1  a button  with the script :
"on mouseup
 send "hello" to "Mac2:livecode"
end mouseup"



on the Mac 2

"on appleevent type
 if type is "aevt" then
   put "hello"
 end if
pass applevent
end applevent


Well it works BUT only il on mac2 I switch from livecode to another
app and then switch back to livecode


I haven't used appleEvents for years, but the way I'd debug this would 
be to change the receiving handler to show the parameters and see what 
you get:


on appleevent
 repeat with x = 1 to the paramcount
   put x && "=" && param(x)
 end repeat
end appleevent

That may show you what is being sent and give you an idea of what's 
wrong. The type may not always be "aevt".


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


Reversing the end point arrow

2012-12-08 Thread Jim Hurley
In RR the start arrow and the end arrow point away from each other.

I needed a line with the more traditional arrows, both pointing in the same 
direction along the line.
The following handler  will reverse the direction of the start arrow.
It does so by introducing a third point ON THE LINE between the two original 
point. It is locate  just a SHORT distance (ds) up from the original start 
point.
The end arrow will now point from this new intermediate point, to the original 
start point, thus, effectively, revering the direction.

on mouseUp
   put "myLine" into tName --Name of the line
   set the endArrow of grc tName to true
   set the startArrow of grc tName to True
   set the arrowsize of grc tName to 6
   put the points of grc tName into tPoints
   put line 1 of tPoints into tStart
   put line 2 of tPoints into tEnd
   put item 1 of tEnd - item 1 of tStart into dx
   put  item 2 of tEnd - item 2 of tStart into dy
   --Now create a new end point.
   --It will be just a short distance (ds) up from the original end point.
   put 2 into ds
put atan2(dy,dx) into tAngle
   put ds * cos(tAngle) into dx
   put ds * sin(tAngle) into dy
   add round(dx) to item 1 of tStart
   add Round(dy) to item 2 of tStart
   --Insert this new end point into the line's points
   put tStart & cr & tPoints into tNewPoints
   set the points of grc tName to tNewPoints
end mouseUp


___
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: More scrolling queries

2012-12-08 Thread J. Landman Gay

On 12/8/12 8:39 AM, Graham Samuel wrote:


This message arrives in the Console window as normal, with x changing
values as expected, and the loc of the group always the same.

Why is this so, and what am I seeing move if it's not my group?


I think you've already figured this out, but just in case, the position 
of an object and its scroll are different things. Position is the place 
on the card where the object is located. The scroll of an object is the 
offset of its contents inside the object's rectangle (which acts like a 
frame.)


--
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: What are hSscroll, vScroll really?

2012-12-08 Thread J. Landman Gay

On 12/8/12 10:50 AM, Graham Samuel wrote:

This is a comment that the LC documentation has not (yet) delivered
the goods. I think there's a bit missing (I've tried the user guide,
the release notes and the dictionary by searching for the words
'scrolling' and 'scroller').

In the LC dictionary, it says this about hScroll (the horizontal and
vertical scrolls are the same in principle so I'll just quote the
entry about h):


The hScroll is the amount in pixels the object has been scrolled to
the right. If the hScroll is zero, the object has not been
scrolled.


Er yes, but what is the implied context here? If I create a group (or
a field) and plonk it onto the middle of a card, can I make it move
to the left or right by changing its hScroll, regardless of any other
objects on the card? The answer is 'no' - but the LC docs doesn't
explain the underlying context, so one can be left confused by this
definition.


That would be a good candidate for a user note entry I think. The docs 
are assuming that the user is familiar with the concept of scrolling, 
which I don't find too far off. It's probably clearer if you think about 
a scrolling field. The location/position of the field never changes, it 
always remains in the same place on the card. Only the viewable content 
changes. The offset of the content is the scroll.


Since the concept is universal on all computers, I can understand why 
the docs don't specifically define it though I suppose it wouldn't hurt. 
What I do think is missing in the case of mobile scrollers is a specific 
statement about how it is a transparent overlay that only sends 
information about user actions; it doesn't actually manage objects on 
the card.


Before I answered the original question I did a search through the RR 
lessons and was surprised that iOS scrollers weren't addressed. Most 
other iOS concepts are there. Scrollers are widely used and there should 
be an entry in the lessons about it.


--
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:Capture the Trig Function from an Option Menu Button

2012-12-08 Thread Jim Hurley
I put my script into a separate button. I think yours was in the Option button.

Put this script into your Option button:


on menuPick pItemName
   put field 1 into tAngle --Or wherever your angle is located
   put tAngle*pi/180 into tAngle
   put pItemName into tTrigFunct
   switch tTrigFunct
  case "sine"
  put sin(tAngle) into tValue
 put "The sine of " & tAngle*180/pi & " degrees  is " & tValue into 
tResult
 break
  case "cosine" 
put cos(tAngle) into tValue
 put "The cosine of " & tAngle*180/pi & " is " &  tValue into tResult
 break
  case "tangent"
 put tan(tAngle) into tValue
 put "The Tangent of " & tAngle*180/pi & " is " &  tValue into tResult
   end switch
put tResult into field 2
end menuPick


You should get a field 2 that locks like this, if the angle is 45 degrees::

The sine of 45 degrees  is 0.707107

Is that the results you wanted?

Jim



> Hi Jim,
> 
> I was trying to directly use the label of an option menu button (with sin, 
> cos and tan as menu items) and combining that with the angle derived in 
> another script. Something like:
> 
>   put (the label of btn 
> myOptionMenu)&"("&tangle&")" 
> 
> This result in something like:
> 
>   Sin(tangle)
> 
> 
> And I had trouble figuring out how to evaluate this.
> 
> BTW, Your script doesn't work for me. Does it work for you?
> 
> 
> Thanks,
> Roger



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


Re: Capture the Trig Function from an Option Menu Button

2012-12-08 Thread Mark Wieder
Jim-

Saturday, December 8, 2012, 10:11:31 AM, you wrote:

> But could you tell me how this "mouseUP" handle fails to do the job?

Well, it's not nearly as hard to read, for one thing. But seriously,
the use of lambda functions (google it) can provide a degree of
flexibility in code and help prevent coding errors. For instance, to
add the arctan() to your example you'd have to add a new line to the
option control, then add a new case statement to the switch construct
in the mouseUp handler. Possibly you could make a mistake when cutting
and pasting, forgetting to insert a break statement, etc. Using the
redirected form all you'd need to do is add the new line to the option
control.

-- 
-Mark Wieder
 mwie...@ahsoftware.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: Capture the Trig Function from an Option Menu Button

2012-12-08 Thread Roger Guay
Hi Jim,

I was trying to directly use the label of an option menu button (with sin, cos 
and tan as menu items) and combining that with the angle derived in another 
script. Something like:

put (the label of btn 
myOptionMenu)&"("&tangle&")" 

This result in something like:

Sin(tangle)


And I had trouble figuring out how to evaluate this.

BTW, Your script doesn't work for me. Does it work for you?


Thanks,
Roger



On Dec 8, 2012, at 10:11 AM, Jim Hurley  wrote:

> "The sine of " & tAngle*180/pi & " degrees  is "


___
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:Capture the Trig Function from an Option Menu Button

2012-12-08 Thread Jim Hurley
Hi Roger

I'm sure I missed the point of this thread. I'll go through it more carefully.

But could you tell me how this "mouseUP" handle fails to do the job?

Thanks,

Jim


on mouseUp
   put field 1 into tAngle
   put tAngle*pi/180 into tAngle
   --put the label of btn "myOptiionMenu" into sOption
   put the label of button "myOptionMenu" into tTrigFunct
   switch tTrigFunct
  case "sine"
 put sin(tAngle) into tValue
 put "The sine of " & tAngle*180/pi & " degrees  is " & tValue into 
tResult
 break
  case "cosine" 
put cos(tAngle) into tValue
 put "The cosine of " & tAngle*180/pi & " is " &  tValue into tResult
 break
  case "tangent"
 put tan(tAngle) into tValue
 put "The Tangent of " & tAngle*180/pi & " is " &  tValue into tResult
   end switch
put tResult into field 2
end mouseUp



> 
> Message: 5
> Date: Fri, 07 Dec 2012 12:10:28 -0800
> From: Roger Guay 
> To: How to use LiveCode 
> Subject: Capture the Trig Function from an Option Menu Button
> Message-ID: <720db527-9ff1-4754-89c1-ce08d44b0...@mac.com>
> Content-Type: text/plain; CHARSET=US-ASCII
> 
> I know this is probably a stupid question, but I can't seem to make it work:
> 
> I have an Option Menu button with sin, cos, tan as menu Items. I want my card 
> script to take the label of that button, and then perform the trig function 
> with that label. I've tried every thing I can think of to "get", "do" or in 
> general  assemble the script, but to no avail. Any suggestion?
> 
> TIA,
> Roger
> 
> 


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


Re: Capture the Trig Function from an Option Menu Button

2012-12-08 Thread Roger Guay
Thank you, Mark. Works great!


On Dec 7, 2012, at 5:40 PM, Mark Wieder  wrote:

> Roger-
> 
> Or try a one-liner:
> 
> on otherHandler theta
>  do "put" && sOption & "(" & theta & ")"
> end otherHandler
> 
> -- 
> -Mark Wieder
> mwie...@ahsoftware.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


___
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: What are hSscroll, vScroll really?

2012-12-08 Thread Alejandro Tejada
Actually, LC/RR docs would benefit of 

1) Interactive stacks that demo/explains
the terms and the context of use.

2) Frecuently Asked Questions about
this term and possible source of bugs
while using or applying in your program

Alejandro



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/What-are-hSscroll-vScroll-really-tp4657955p4657957.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: What are hSscroll, vScroll really?

2012-12-08 Thread Richmond

On 12/08/2012 06:50 PM, Graham Samuel wrote:

This is a comment that the LC documentation has not (yet) delivered the goods. 
I think there's a bit missing (I've tried the user guide, the release notes and 
the dictionary by searching for the words 'scrolling' and 'scroller').

In the LC dictionary, it says this about hScroll (the horizontal and vertical 
scrolls are the same in principle so I'll just quote the entry about h):


The hScroll is the amount in pixels the object has been scrolled to the right. 
If the hScroll is zero, the object has not been scrolled.

Er yes, but what is the implied context here? If I create a group (or a field) 
and plonk it onto the middle of a card, can I make it move to the left or right 
by changing its hScroll, regardless of any other objects on the card? The 
answer is 'no' - but the LC docs doesn't explain the underlying context, so one 
can be left confused by this definition.

What is missing is the idea that a group (or a field) can be narrower (shorter) 
than the width (height) of its full contents, as recorded in its formattedWidth 
(Height). Meaningful scrolling can take place when this is the case in one or 
both dimensions, and it allows us to shift the contents of the object within a 
frame (which is its rect). It's pretty fundamental, but I just realised that I 
had never really understood it, which is why I looked in the LC docs for an 
explanation and couldn't find anything. Having understood it, I find it easier 
to understand where the implementation of scrolling in the iOS version of LC 
came from.

If I were really a newbie trying to understand LC, I think I would find this 
confusing. Does anyone agree that the docs could do with a bit more info about 
this?

Graham




The docs could do with a bit more info about lots of things.

However; the docs were written quite sometime ago, and are beginning to 
resemble Mac OS 9;  patches on patches on patches of Mac OS 7.


From a personal point of view I have found that introducing children to 
RR/LC tends to founder on the documentation.


A lot of the documentation that does make sense to people who have 
already got quite a bit of experience with either RR/LC or
other programming environments does not make sense to newbies as it is 
written presupposing the reader is already familiar with

a lot of the underlying terminology and concepts inwith RR/LC.

There would seem to be a number of possible answers to this:

1. Somebody has to find the time and money to sit down and write a 
comprehensive book that documents all and everything.


2. Somebody has to do the same sort of things as above but have it built 
into the GUI as is the present documentation.


3. There have to a set of incentives to make documenting what a 
developer finds as s/he works with aspects of RR/LC worth
spending the necessary time away from developing the thing that 
pays for their bread and ch**se.


The problem about number 3 is that that really means that documentation 
comes after the fact rather than before.


The current documentation DOES contain a lot of good, a lot that is 
obscure, and a fair bit missing or incomplete.


Richmond.

___
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


What are hSscroll, vScroll really?

2012-12-08 Thread Graham Samuel
This is a comment that the LC documentation has not (yet) delivered the goods. 
I think there's a bit missing (I've tried the user guide, the release notes and 
the dictionary by searching for the words 'scrolling' and 'scroller').

In the LC dictionary, it says this about hScroll (the horizontal and vertical 
scrolls are the same in principle so I'll just quote the entry about h):

> The hScroll is the amount in pixels the object has been scrolled to the 
> right. If the hScroll is zero, the object has not been scrolled.

Er yes, but what is the implied context here? If I create a group (or a field) 
and plonk it onto the middle of a card, can I make it move to the left or right 
by changing its hScroll, regardless of any other objects on the card? The 
answer is 'no' - but the LC docs doesn't explain the underlying context, so one 
can be left confused by this definition.

What is missing is the idea that a group (or a field) can be narrower (shorter) 
than the width (height) of its full contents, as recorded in its formattedWidth 
(Height). Meaningful scrolling can take place when this is the case in one or 
both dimensions, and it allows us to shift the contents of the object within a 
frame (which is its rect). It's pretty fundamental, but I just realised that I 
had never really understood it, which is why I looked in the LC docs for an 
explanation and couldn't find anything. Having understood it, I find it easier 
to understand where the implementation of scrolling in the iOS version of LC 
came from.

If I were really a newbie trying to understand LC, I think I would find this 
confusing. Does anyone agree that the docs could do with a bit more info about 
this?

Graham

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


DB Lib

2012-12-08 Thread Paul Looney

On Oct 29, 2012, at 6:47 AM, Andre Garzia wrote:

> Paul,
> 
> I am ready to give away a copy of DB Lib to be raffled during the LUG
> meeting.
> 
> DB Lib (SQL, active record style) and its add-on Data Storage Lib (NoSQL,
> built on top of DB Lib and included with every DB Lib purchase) are new
> database libraries for LiveCode.
> 
> You can learn more at http://www.andregarzia.com/page/dblib
> 
> PS: Is raffled a verb?!
> 
> cheers
> andre

Andre,

Thank you again for your kind offer.

John Burtt won your DB Lib at our November meeting but left before I got his 
information:

jbu...@earthlink.net

The two of you can work out the transfer details directly.

Paul Looney

PS Yes "raffled" IS a verb.

PPS FYI: Your command of the English language has gotten very good. I remember 
that you struggled with it a bit many years ago when we first met and now you 
are a master. Congratulations - from someone who majored in English in college.



___
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: LiveCodeJournal.com forum registration

2012-12-08 Thread Peter M. Brigham
I'm not on the forums, and don't feel any particular need to join them since 
I'm not a professional LC developer, but the exclusion of gmail addresses seems 
extreme. I have been using a gmail address exclusively since they were offered 
by Google. I would hate to have to create a new email account just to join, and 
I'm not sure what domain would be acceptable other than my own (which I do not 
have).

I realize that I have no standing here at all (to use the legal metaphor). I'm 
just commenting as an observer.

-- Peter

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

On Dec 7, 2012, at 7:37 AM, Richard Gaskin wrote:

> A couple members of our community recently wrote me asking why their IP 
> address has been banned from the forums at LiveCodeJournal.com, preventing 
> them from registering.
> 
> We've resolved the issue via email, and they're now able to log in.
> 
> If you've experienced this yourself, please accept my apologies in advance.  
> I'll provide an explanation on this below, but if you get a notice that 
> either your IP address or email address prevents you from registering at 
> LiveCodeJournal.com just drop me a note with the affected info (IP address or 
> email address you're using) and I'll remove those blocks so you can 
> successfully register.
> 
> Sorry for the inconvenience, but over time as we remove some of the broader 
> blocks we had in place when we were setting up this is now affecting 
> relatively few users.  Going forward it should affect ever fewer as we use 
> more refined blocking measures at the site.
> 
> NOTE: Disposable email addresses are not allowed for accounts at 
> LiveCodeJournal.com.  This includes hotmail.com, excite.com, and even 
> gmail.com along with many others.  This is unfortunate but necessary, since 
> without that restriction I wouldn't be able to stay on top of the requests 
> that flood my In Box from spambots.  Fortunately, since LiveCodeJournal.com's 
> audience is largely developers, most of you have your own domains and use 
> those to maintain your professional correspondences, so this is not likely an 
> issue for most here.
> 
> Also, it's really helpful if the user name you choose for your 
> LiveCodeJournal.com account reflects something of your professional online 
> presence, including something related to your name or business. Account names 
> like "crackz44993", "JaneHotDate" or "freepills" may be misunderstood as a 
> spambot.
> 
> The forum is located here, linked to from the Features section at 
> LiveCodeJournal.com:
> 
> 
> Let me also take this opportunity to invite any of you interested in 
> participating in administering the site or contributing content to just drop 
> me an email and we'll set you up.  LiveCode Journal is a community effort, 
> open to all LiveCode developers.
> 
> 
> 
> Background:
> 
> If you run a server, your log reviews have no doubt made you aware of the 
> constant attack on such systems.  And if you manage a forum, esp. one using 
> any of the popular forum software like PHPBB, you've seen so many spambot 
> accounts that it likely impacts your productivity cleaning them up.
> 
> That's what happened with LiveCodeJournal.com.
> 
> Every day the system notifies me of many new accounts, most of which are 
> obviously bots.  In fact, this flood began even before we linked to it from 
> any public source; spambots are thorough and relentless.
> 
> This activity grew to the point that it was seriously affecting my ability to 
> stay on top of critical email.  As a volunteer effort for the community, the 
> only way I could keep the forum running without negatively impacting my 
> business was to block whole IP ranges.
> 
> Yes, I understand that these days the original geographic distribution of IP 
> addresses is no longer maintained in the same way and doesn't always means 
> that a given user is from the region of the world you might expect, and this 
> will result in false positives from time to time.
> 
> Still, weighing the various tradeoffs, it was necessary to allow me to get 
> back to work.
> 
> In fact, IP range blocking is a fairly common practice for not just forums 
> but even entire domains among small software shops to prevent expensive 
> bandwidth abuse from crack sites in parts of the world where law enforcement 
> has proven themselves completely ineffectual with regard to hacking and 
> intellectual property violations.
> 
> Now that the forums at LiveCodeJournal.com have been made public, I've gone 
> through and removed most of the broader blocks I originally had in place, and 
> the remaining blocks are usually specific enough to minimize the risk of 
> false positives.
> 
> Still, we do see false positives now and then, so if you're affected please 
> accept my apologies in advance, and just email me your IP address and I'll 
> refine that block so you can register.
> 
> Thanks for your understanding on this.  I look for

More scrolling queries

2012-12-08 Thread Graham Samuel
While experimenting with scrolling on iOS (as per my earlier mail), I came 
across something odd. Probably finger trouble on my part, but can anyone 
explain it?

I set up a little scrolling experiment based on the example offered in the LC 
Scroller Example stack. I have an iPhone screen with a kind of window in the 
middle, and a group "tScrollGroup" that scrolls behind ("through") the window. 
As usual, I make the scroll act via a scrollerDidScroll handler, so that for 
example when the handler fires, I use the x (horizontal) offset from the 
handler to set the hscroll of my group - for this experiment I'm only using 
horizontal scrolling. This works well, apart from some strange stuff with 
bouncing which isn't what this mail is about.

When I run this little example in the iOS Simulator, I can scroll my group back 
and forth as expected, so its location must have changed, I think: but when I 
query the location of the group it never changes! I do the querying within the 
script of the scrollerDidScroll handler. The whole handler script is:

  on scrollerDidScroll pOffsetX, pOffsetY
 lock screen
 set the hScroll of group "tScrollGroup" to pOffsetX
 unlock screen
 infoMsg "scrollerDidScroll fired with x =" && pOffsetX & "; loc of 
tScrollGroup is now:" && (the loc of grp "tScrollGroup")
  end scrollerDidScroll

This message arrives in the Console window as normal, with x changing values as 
expected, and the loc of the group always the same.

Why is this so, and what am I seeing move if it's not my group?

Puzzled

Graham

Incidentally, trying to make sense of hscroll via the IDE (i.e. not in iOS), I 
can't seem to make a group move by changing its hscroll. Clearly there's 
something I don't understand.


___
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: Password Field - Mark Schonewille

2012-12-08 Thread Andre Garzia
Andrew,

Long time ago I made a little droptool for a password field.

Http://droptools.sonsothunder.com/products/aag/aag-pw.irev

It does not have the nice padlocks from Jacque though...

Cheers

Sent from my ASUS Transformer
http://andregarzia.com :: Desktop, Mobile and Web programming
On Dec 7, 2012 10:58 PM, "Andrew Kluthe"  wrote:

> Hello,
>
> I have been using Mark Schonewille's password field in some of my
> stacks for a while. So far it has done the trick, but I found out
> recently that it doesn't like to play well with the number keys on the
> right of the keyboard. Are there any other password fields I could
> leverage or some basic tips for catching keystrokes from the number
> pad?
>
>
> --
> Regards,
>
> Andrew Kluthe
> and...@ctech.me
>
> ___
> 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


FT: FieldTrip Pre-Beta Note

2012-12-08 Thread Curry Kenworthy


Howdy FieldTrip Preorder Folks,

I posted recently that the first FieldTrip beta release was imminent. It 
is, and some folks have written since to inquire again, and suggested 
that I post here too, so here's a quick note.


After completing the current formatting features and custom GUI, I've 
been wrapping up the final library details such as installation, 
documentation, reg codes, mobile testing, and feature retesting.


I'll be posting the download link here on this list in the next two or 
three days after completing the final tests and documents!


In the meantime, please let me know offlist if you've lost your PayPal 
email (see below for why), and also keep reading if you have questions 
for other info/explanation/FAQ including why it's been slow.


I'll try to avoid posting here on the list again for these couple of 
days, and answer any further questions after that, so I can maximize the 
actual work until the download is ready


ACCESS CODE

As promised, in addition to other bonuses, the Preorder Folks will get 
exclusive access to FT (beyond the demo) for a period of time before 
anyone else.


Your reg code will be the Transaction ID of your PayPal preorder 
payment, so do check that you still have that email, or that you can 
find the transaction in your PayPal account. There will be instructions 
on using the code inside the download.


(If anyone slipped through the cracks or lost the PayPal email, let me 
know! And write again if you subsequently find it; I'll handle these in 
a batch after finding out who needs them.)


The preorder page will be closed slightly before the release of this beta.

WHAT TOOK SO LONG?

Some folks have understandably kicked my butt a bit lately about the 
delay; I sincerely apologize. The preorder process funded development, 
which has been ongoing and steady since the promotion. It was never 
stopped or sold down the river at any time, in any way; that would never 
happen, and is not who I am, as those who know me know well! It was 
simply slower than expected.


Why? I had an unexpected relapse of fairly serious health issues that 
cause difficulty moving the body, pain when inhaling, and 
lightheadedness. (Lovely combination!) It's gradually getting better, 
but dealing with this and working toward getting it truly fixed this 
time around have been challenging and not very kind to my schedule. It 
also prevented me from posting news here on the list as frequently as I 
wanted to.


However, the experience has also increased my determination and zeal 
more than ever, so I intend to come back in a big way with some 
groundbreaking work in LiveCode projects.


(There also were a couple of specific areas within the overall 
development that were delayed two or three months to obtain information 
about certain LiveCode developments, to avoid duplicated or misdirected 
efforts in those areas, and this preserved more of the development funds 
to use now in integrating those thoroughly and effectively.)


THE BIG PICTURE

FieldTrip development includes not just the goal of supporting all text 
formatting features of LC 5.5+, but also ongoing development of a custom 
GUI (the buttons, etc.), and a word processing interface with 
desktop/mobile parity, which will facilitate interaction to an unusual 
extent on all platforms. All of this will continue far beyond the level 
of this first beta. FT also needs to integrate closely with WordLib and 
WordOut (which are also undergoing updates right now, and nearing 
release too) and other WP-related tech to increasingly provide the 
ultimate drop-in word processing solution for users and end users.


I aim to make every preorder customer truly happy, so thanks for both 
the criticisms and the encouragement, it all helps! Keep the feedback 
coming after trying the beta (to ensure timely completion, I'll be 
finishing it before posting again or responding to other questions) and 
be ready for other bonuses for preorder folks, as my way of saying both 
"thanks" and "sorry it took a while".


WHAT'S IN FT?

It's a set of LiveCode word processor controls and features, a friendly 
interface to handle all the old and new text formatting features 
supported by LC fields (and incidentally the development of WordLib and 
FT have led to some additional text features in LC). The toolbar is 
similar to the main controls of MS Word, Open Office, or (insert 
favorite WP).


FieldTrip also has its own GUI for buttons, since it is designed for all 
platforms. The GUI colors can adjusted to suit one's taste or platform. 
The GUI was also designed without excess complexity of controls or 
visual settings, to hopefully be faster on simple devices such as 
low-end Android tablets. (Which in my opinion are very exciting options 
for end users in both the developed and developing world, so I wanted to 
ensure they'd be snappy.)


Since FT was designed with mobile/desktop parity in mind, it will offer 
more mobile access than most interface

Re: Password Field - Mark Schonewille

2012-12-08 Thread Mark Schonewille
Hi Andrew,

Have you reported the bug already? There's a contact for for it on 
Economy-x-Talk's website.

--
Best regards,

Mark Schonewille

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

Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other colour 
spaces. http://www.color-converter.com

We have time for new software development projects. Contact me for a quote.




On 8 dec 2012, at 01:57, Andrew Kluthe wrote:

> Hello,
> 
> I have been using Mark Schonewille's password field in some of my
> stacks for a while. So far it has done the trick, but I found out
> recently that it doesn't like to play well with the number keys on the
> right of the keyboard. Are there any other password fields I could
> leverage or some basic tips for catching keystrokes from the number
> pad?
> 
> 
> -- 
> Regards,
> 
> Andrew Kluthe
> and...@ctech.me


___
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


Mobile sockets crowd funding opportunity

2012-12-08 Thread Monte Goulding
Hi LiveCoders

A number of LiveCode developers need sockets on iOS and android. The subject of 
developing an external for this feature came up recently on the LiveCode 
Developer Program list. It was proposed by a number of developers that the 
external would be a good candidate for crowd funding. As part of the 
discussions RunRev was asked for comment and we were given permission to 
publish the reply: 

"I would go ahead and develop this if you receive the funding. We are not 
working on mobile sockets as a feature at the moment and it may be some time 
before we can commit resources to it." Ben Beaumont (LiveCode Product Manager)

The current situation for sockets is a TCP client is able to be implemented on 
iOS using the rresocket external that is available in the iOS Externals SDK. 
This external is implemented using NSStream and won't port to android when the 
android external sdk is published. 

The proposal is to implement a sockets external in portable C++ code based on 
the boost.asio library in the hope that once the android external sdk is 
released it would port with minimal changes. The expectation is that $1000 to 
$1500 of funding will be sufficient to implement the bulk of the external, 
however, to ensure we are implementing the highest priority features first the 
external would be implemented in the following order:
- UDP client
- TCP server
- UDP server
- TCP client (last because of the availability of rresocket)

mergExt is about implementing features the LiveCode community needs when you 
need them. Some comments from members of the LiveCode Developer Program about 
why this external is worthwhile finding:

"Currently, mobile network actions are severely limited by the lack of a socket 
library.  There is no way, for instance, to send mail without using the 
built-in mail app, even though having the user have a chance to read a system 
message and mess it up is not desirable.

We have an application where we would like to be able to communicate with a 
network-enabled appliance.  it does not have bluetooth, and it does not use a 
standard http protocol, so without a network stack/sockets, I am 
dead-in-the-water." Mike Kerner (R. M. Kerner Co.)

"I will definitely take part on the funding. I think socket support is an 
essential feature for LiveCode Mobile." Matthias Rebbe

"I'm In." Ralph DiMola (Evergreen Information Services)

"Mine included there are at least three votes. Anyone else?" Ralf Bitter 
(author of revIgniter)

"Please add my vote to this." Pierre Sahores

"I am sure there are a number of people that would like to help fund a sockets 
external.  I for one would be more than happy to dive in should you decide to 
look for funders for this external.  I have a feeling this external will reach 
the funding value very quickly." Mark Talluto (Canela Software)

There are 3 choices for funding. All options come with the access to the 
pre-release versions and the final version for iOS. Each level of funding gives 
you access to special discount rates on the mergExt store for the next 3 
months. All funders (unless they don't want to) will be thanked for their 
generous contribution in the documentation under their funding level.

- Bronze: $80 funding and 10% off
- Silver: $160 funding and 20% off
- Gold: $240 funding and 30% off

Please note that as the android externals sdk is currently an unknown variable 
there can be no guarantee that more funding will not be required when it's 
released. It is, however, the intention that the external be implemented so 
that it should cross compile for android. It is also not possible at this stage 
to estimate a date for an android version to be provided.

After 90 days if the project has not met it's target the funders will be 
offered credit at the mergExt store to the value of their funding.

To get involved go to http://mergext.com/fund/sockets

For anyone interested in the progress of the Game Center crowd funding effort 
the external will be be released shortly and funders are currently making use 
of it to implement a number of games. The external is still open to funding to 
cover turn based matches and matchmaking.

Cheers

--
Monte Goulding

M E R Goulding - software development services
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: iOS Scrolling - need a cookbook

2012-12-08 Thread Graham Samuel
Jacque, what a treasure you are! What I hope to do now (there are some other 
pressures) is to experiment, refine this explanation a bit and write it up with 
a couple of diagrams (which sadly can't go into this list). I think it's pretty 
bad news that (AFAIK) very little of this has reached any of the official LC 
documentation - which means for example if one follows the sample stack it's 
very difficult to modify it without stopping it working. Scrolling is a very 
fundamental idea in mobile interfaces, and the method which LC have chosen to 
implement it are not obvious, nor are the consequences of setting the various 
parameters.

Thanks again

Graham

PS Yes I do have a scrollerDidScroll handler, but again I didn't find the way 
it worked particularly intuitive.

On 8 Dec 2012, at 06:02, J. Landman Gay wrote:

> On 12/7/12 12:17 PM, Graham Samuel wrote:
> 
>> Fumbling around, I have made scrollers work in the past, but I
>> realise that I don't know what I'm doing, so success has come by
>> luck, mostly. What I need is a nice clear "how to" description of
>> dealing with iOS scrolling. It may well exist, but so far i haven't
>> found it. Can anyone point me in the right direction?
> 
> There's an example stack in the resouces that ship with LiveCode. Under the 
> Help menu choose Example Stacks and Resources which opens a Finder window. 
> Then look for the Scroller Example stack.
> 
> Most everything is in there, though there's not a lot of explanation. I was 
> confused about contentRect until I was told that the rect is relative to the 
> scoller control. That is, the 0,0 topleft is always the topleft of the group 
> or field you are scrolling; it isn't a card location. So if you want the 
> entire content of the group or field to scroll, the scroller's contentRect 
> will always start with 0,0 and the last two items will be the formattedWidth 
> and formattedHeight of the group/field.
> 
> Basic concepts are:
> Ensure that the layermode for the group is "dynamic" and acceleratedRendering 
> is on
> 
> Set the scroll(s) of the underlying group or field to 0
> Create the scroller
> Set the rect of the scroller to the visible area you want to display
> Set the contentRect of the scroller to the total area that should scroll (as 
> per above)
> Set the scroll of the scroller to 0 -- may not be necessary but I do it
> Set any other properties you want (bounce, colors, paging, etc. Here's where 
> you'd disable vertical scrolling if you don't want it)
> Set the visible of the scroller to TRUE -- for some reason the default is 
> false, which means the scroller won't respond
> 
> If you need to restore a previous scroll position, set the scroll(s) of both 
> the group and the scroller to a previously saved scroll amount as a last step.
> 
> I've found it best to delete the scroller when changing cards, and re-create 
> it when opening the card.
> 
> You probably already have a scrollerDidScroll handler. It passes the x,y 
> position of the scroller and you just set the scroll of the group to the same 
> thing. If you don't want vertical scrolling, just ignore the Y parameter and 
> only change the horizontal position of the group.
> 
> -- 
> Jacqueline Landman Gay | jac...@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