Re: RevServer in CSS

2011-02-15 Thread Medard
Andre Garzia  wrote:

> I used to speak French better than Portuguese when I was really young,
> I lived in Dunkerque from 82 till 84 (I was 4 in 84) but when I
> returned to Brazil, no one spoke french to me anymore so I forgot.

That's very coincidental !!!
I used to live and work in Dunkerque up to 1984 ;-))

I may have see you, as I was wandering down town...

___
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] Apple at it again

2011-02-15 Thread Peter Haworth
Well said.  Apple's behavior in recent months has been ridiculous.   If 
Microsoft tried anything remotely close to this, the Apple lovers would be in 
an uproar.  This isn't just Amazon, it also applies to newspapers and 
periodicals who offer subscriptions for online reading of their publications 
through apps.  No company has a right to tell another company what price they 
can sell their product for and what outlets they must sell them through.

I'm a big fan of Apple hardware and software but they are becoming dictatorial. 
I won't use an iPhone or an iPad because of Apple's attitude.  I prefer to use 
an Android phone and am anxiously awaiting the release of Android tablets, to 
say nothing of the release of a version of LC that supports Android.

Pete Haworth
On Feb 15, 2011, at 9:37 PM, Chipp Walters wrote:

> Colin, if you read the article I referred to, the key issue is the
> part that reads,,
> 
> '"Apple does require that if a publisher chooses to sell a digital
> subscription separately outside of the app, that same subscription
> offer must be made available, at the same price or less, to customers
> who wish to subscribe from within the app," Apple's statement read.'
> 
> Most know Amazon (or for that matter any other mature channel presence
> company) does not have in it's business proformas an extra 30% profit
> on every item sold, to send to Apple. Furthermore, Kindle fulfillments
> are delivered from Amazon's own servers, and I'm sure the buying
> habits, nor privacy details of their customers are not something they
> wish to share with Apple or any other third party.
> 
> Furthermore, Apples states in the article,
> 
> "Publishers and content sellers must remove any links within their
> apps to outside-the-App Store purchasing options, Apple said, a
> requirement that means Amazon.com must eliminate the link to the
> Kindle Store that it currently provides in its iPhone, iPod Touch and
> iPad apps."
> 
> So combine that with the REQUIREMENT they allow for in-app purchases,
> and it appears the decision is already made for Amazon. Please tell me
> where you think I am off base.
> 
> My guess is we'll see some back pedaling b Apple on all this very
> soon. They'll call it "a clarification."
> 
> Hmmm. I wonder how Groupon or other companies like them who use an
> iPad app to sell their services will fare?
> 
> 
> 
> 
> On Tuesday, February 15, 2011, Colin Holgate  wrote:
>> 
>> On Feb 15, 2011, at 9:51 PM, Chipp Walters wrote:
>> 
>>> I suspect Kindle will have to be dropped from the iPad and iPhone. I'm
>>> sure Amazon doesn't have 30% in royalties to cough up to Apple for
>>> books sold.
>> 
>> 
>> That's not good logic. For one thing, people are making fortunes off their 
>> 70%, and I'm sure Amazon don't making more of a fortune. Also, the 30% 
>> applies to subscribers that Apple acquired for the publisher, not ones that 
>> the publisher brought to the app. Here's what the deal is supposed to be,:
>> 
>> "“Our philosophy is simple—when Apple brings a new subscriber to the app, 
>> Apple earns a 30 percent share; when the publisher brings an existing or new 
>> subscriber to the app, the publisher keeps 100 percent and Apple earns 
>> nothing,” said Steve Jobs, Apple’s CEO. “All we require is that, if a 
>> publisher is making a subscription offer outside of the app, the same (or 
>> better) offer be made inside the app, so that customers can easily subscribe 
>> with one-click right in the app."
>> 
>> 
>> ___
>> 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: Call for Linux apps

2011-02-15 Thread Bill Vlahos
Sorry for my reply to the list. I meant that to just go to Richard.

Bill Vlahos
> On Feb 15, 2011, at 6:06 PM, Richard Gaskin wrote:
> 
>> Later this month I'll be at SCaLE 9x, the SoCal Linux Expo:
>> 
>> 
>> There will be plenty of people there from Canonical, Fedora, and other major 
>> projects, and lots of great developers of all stripes, so I'd love to load 
>> my Dell up with as many cool examples of LiveCode-based apps as possible.
>> 
>> If you have an app that you deploy to Linux, please email me the URL to 
>> where I can download it along with a brief description to 
>> ambassa...@fourthworld.com
>> 
>> Thanks in advance.  It'll be good fun to show off what LiveCode can do.
>> 
>> -- 
>> Richard Gaskin
>> Fourth World Media Corporation
>> ___
>> ambassa...@fourthworld.com   http://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


___
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: Call for Linux apps

2011-02-15 Thread Bill Vlahos
Richard,

InfoWallet of course. 

Are you there in an official capacity or as an attendee?

Bill Vlahos
_
InfoWallet (http://www.infowallet.com) is about keeping your important life 
information with you, accessible, and secure.

On Feb 15, 2011, at 6:06 PM, Richard Gaskin wrote:

> Later this month I'll be at SCaLE 9x, the SoCal Linux Expo:
> 
> 
> There will be plenty of people there from Canonical, Fedora, and other major 
> projects, and lots of great developers of all stripes, so I'd love to load my 
> Dell up with as many cool examples of LiveCode-based apps as possible.
> 
> If you have an app that you deploy to Linux, please email me the URL to where 
> I can download it along with a brief description to ambassa...@fourthworld.com
> 
> Thanks in advance.  It'll be good fun to show off what LiveCode can do.
> 
> -- 
> Richard Gaskin
> Fourth World Media Corporation
> ___
> ambassa...@fourthworld.com   http://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] Apple at it again

2011-02-15 Thread Chipp Walters
Colin, if you read the article I referred to, the key issue is the
part that reads,,

'"Apple does require that if a publisher chooses to sell a digital
subscription separately outside of the app, that same subscription
offer must be made available, at the same price or less, to customers
who wish to subscribe from within the app," Apple's statement read.'

Most know Amazon (or for that matter any other mature channel presence
company) does not have in it's business proformas an extra 30% profit
on every item sold, to send to Apple. Furthermore, Kindle fulfillments
are delivered from Amazon's own servers, and I'm sure the buying
habits, nor privacy details of their customers are not something they
wish to share with Apple or any other third party.

Furthermore, Apples states in the article,

"Publishers and content sellers must remove any links within their
apps to outside-the-App Store purchasing options, Apple said, a
requirement that means Amazon.com must eliminate the link to the
Kindle Store that it currently provides in its iPhone, iPod Touch and
iPad apps."

So combine that with the REQUIREMENT they allow for in-app purchases,
and it appears the decision is already made for Amazon. Please tell me
where you think I am off base.

My guess is we'll see some back pedaling b Apple on all this very
soon. They'll call it "a clarification."

Hmmm. I wonder how Groupon or other companies like them who use an
iPad app to sell their services will fare?




On Tuesday, February 15, 2011, Colin Holgate  wrote:
>
> On Feb 15, 2011, at 9:51 PM, Chipp Walters wrote:
>
>> I suspect Kindle will have to be dropped from the iPad and iPhone. I'm
>> sure Amazon doesn't have 30% in royalties to cough up to Apple for
>> books sold.
>
>
> That's not good logic. For one thing, people are making fortunes off their 
> 70%, and I'm sure Amazon don't making more of a fortune. Also, the 30% 
> applies to subscribers that Apple acquired for the publisher, not ones that 
> the publisher brought to the app. Here's what the deal is supposed to be,:
>
> "“Our philosophy is simple—when Apple brings a new subscriber to the app, 
> Apple earns a 30 percent share; when the publisher brings an existing or new 
> subscriber to the app, the publisher keeps 100 percent and Apple earns 
> nothing,” said Steve Jobs, Apple’s CEO. “All we require is that, if a 
> publisher is making a subscription offer outside of the app, the same (or 
> better) offer be made inside the app, so that customers can easily subscribe 
> with one-click right in the app."
>
>
> ___
> 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: Plugins

2011-02-15 Thread Mark Wieder
Pete-

Tuesday, February 15, 2011, 5:50:28 PM, you wrote:

> Thanks Mark - bookmarked.

Me too. It's on my bookmarks toolbar.

-- 
-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: [OT] Apple at it again

2011-02-15 Thread Colin Holgate

On Feb 15, 2011, at 9:51 PM, Chipp Walters wrote:

> I suspect Kindle will have to be dropped from the iPad and iPhone. I'm
> sure Amazon doesn't have 30% in royalties to cough up to Apple for
> books sold.


That's not good logic. For one thing, people are making fortunes off their 70%, 
and I'm sure Amazon don't making more of a fortune. Also, the 30% applies to 
subscribers that Apple acquired for the publisher, not ones that the publisher 
brought to the app. Here's what the deal is supposed to be,:

"“Our philosophy is simple—when Apple brings a new subscriber to the app, Apple 
earns a 30 percent share; when the publisher brings an existing or new 
subscriber to the app, the publisher keeps 100 percent and Apple earns 
nothing,” said Steve Jobs, Apple’s CEO. “All we require is that, if a publisher 
is making a subscription offer outside of the app, the same (or better) offer 
be made inside the app, so that customers can easily subscribe with one-click 
right in the app."


___
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] Apple at it again

2011-02-15 Thread Chipp Walters
Surprise, Apple changed their license terms-- again.
http://www.computerworld.com/s/article/9209580/Apple_s_new_App_Store_rules_affect_Amazon_s_Kindle

I suspect Kindle will have to be dropped from the iPad and iPhone. I'm
sure Amazon doesn't have 30% in royalties to cough up to Apple for
books sold. Talk is there's a chance Netflix and Hulu and a host of
others will have to also.

Too bad Stevie just can't play nice with the rest of the world... And
there's already talk in the WSJ about justice department action. My
guess is just like the last time, after much hollering a screaming,
Apple will change it's mind and backpedal. Someday, probably sooner
than later, Jobs won't be in charge anymore, and we won't have to put
up with his constant fiddling with the iOS license-- though I suspect
we'll also miss some insanely great products-- and their launches.

Oh well.

___
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


Call for Linux apps

2011-02-15 Thread Richard Gaskin

Later this month I'll be at SCaLE 9x, the SoCal Linux Expo:


There will be plenty of people there from Canonical, Fedora, and other 
major projects, and lots of great developers of all stripes, so I'd love 
to load my Dell up with as many cool examples of LiveCode-based apps as 
possible.


If you have an app that you deploy to Linux, please email me the URL to 
where I can download it along with a brief description to 
ambassa...@fourthworld.com


Thanks in advance.  It'll be good fun to show off what LiveCode can do.

--
 Richard Gaskin
 Fourth World Media Corporation
 ___
 ambassa...@fourthworld.com   http://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: Plugins

2011-02-15 Thread Peter Haworth
Thanks Mark - bookmarked.

Pete Haworth







http://www.mollysrevenge.com
http://www.sonicbids.com/MollysRevenge
http://www.myspace.com/mollysrevengeband








On Feb 15, 2011, at 5:30 PM, Mark Wieder wrote:

> Pete-
> 
> Tuesday, February 15, 2011, 3:47:49 PM, you wrote:
> 
>> I get individual messages from the list and they don't include
>> info on where to go to search the list
> 
> http://news.gmane.org/gmane.comp.ide.revolution.user
> 
> -- 
> -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: Plugins

2011-02-15 Thread Mark Wieder
Pete-

Tuesday, February 15, 2011, 3:47:49 PM, you wrote:

> I get individual messages from the list and they don't include
> info on where to go to search the list

http://news.gmane.org/gmane.comp.ide.revolution.user

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


onrev and PDF

2011-02-15 Thread Nicolas Cueto
Hello,

Is there an LC command or method that can be used in an irev script on
the onrev server to combine jpg images into a PDF doc? The images too
are on the onrev server, and the output should of course be to a
directory on the onrev server.

Thank you.

--
Nicolas CUeto

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


Re: RevServer in CSS

2011-02-15 Thread Pierre Sahores

Le 16 févr. 2011 à 00:51, Andre Garzia a écrit :

> On Tue, Feb 15, 2011 at 6:32 PM, Medard  wrote:
>>> Cheers, sorry for the typo.
>> 
>> No harm, again (it is very easy to write harmful words in a language you
>> don't know very well -- I hope that I didn't that in Portuguese, as I
>> travelled to Lisbon in November ;-)))
> 
> I used to speak French better than Portuguese when I was really young,
> I lived in Dunkerque from 82 till 84 (I was 4 in 84) but when I
> returned to Brazil, no one spoke french to me anymore so I forgot.
> Rumor says that if I get olympicaly drunk, I start speaking very good
> French...
> 
Young you are, Andre ;-) Same for me with american. My dad went geophysics 
visiting professor at Berkley university in 65-67 (i was seven). Incredible how 
kids learn and forget foreign languages in just some weeks.
> 
> -- 
> http://www.andregarzia.com All We Do Is Code.
> 
> ___
> 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 : (33) 6 03 95 77 70

www.wrds.com
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: RevServer in CSS

2011-02-15 Thread Andre Garzia
On Tue, Feb 15, 2011 at 6:32 PM, Medard  wrote:
>> Cheers, sorry for the typo.
>
> No harm, again (it is very easy to write harmful words in a language you
> don't know very well -- I hope that I didn't that in Portuguese, as I
> travelled to Lisbon in November ;-)))

I used to speak French better than Portuguese when I was really young,
I lived in Dunkerque from 82 till 84 (I was 4 in 84) but when I
returned to Brazil, no one spoke french to me anymore so I forgot.
Rumor says that if I get olympicaly drunk, I start speaking very good
French...


-- 
http://www.andregarzia.com All We Do Is Code.

___
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


Plugins

2011-02-15 Thread Peter Haworth
I get individual messages from the list and they don't include info on where to 
go to search the list, so I have to ask here: what is the best place to put 
plugins?

Thanks,

Pete Haworth









___
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: datagrid: on closeeditor the accents are lost

2011-02-15 Thread JosepM

Hi Trevor,

Using this:

SetDataOfIndex the dgIndex of me, the dgColumn of me, unidecode(the
unicodeText of pFieldEditor, "utf8")

Don't work. Still losing the accents...

Salut,
Josep
-- 
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/datagrid-on-closeeditor-the-accents-are-lost-tp3306707p3307770.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: Keydowns during Socket Read/Writes

2011-02-15 Thread Mark Schonewille
Camm,

I didn't experience any problems. Here's a test I made http://qery.us/nz

--
Best regards,

Mark Schonewille

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

New: Download the Installer Maker Plugin 1.6 for LiveCode here http://qery.us/ce

On 15 feb 2011, at 22:14, Camm wrote:

> Can anybody who is good with Client / Server Sockets get a client to send
> some data to the server when a key is pressed on the clients keyboard ??
> 
> If it is possible please could you share or see if it is a bug .
> 
> 
> 
> Best Regards
> 
> Camm
> 


___
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: LiveCode & google maps...

2011-02-15 Thread Peter Brigham MD

On Feb 15, 2011, at 4:27 PM, James Hurley wrote:


Peter,

Thanks. Very interesting.

A couple of questions.

Is "lineoffsets" a custom function or a typo?

And what is the "sr" function?

Thanks again,

Jim Hurley


On Feb 15, 2011, at  10:00 AM, use-livecode-requ...@lists.runrev.com  
wrote:



function getMileage
  put "http://maps.googleapis.com/maps/api/directions/xml?"; & \
 "origin=&destination=&sensor=false" into tURL
  put fld "from" into tStart
  put fld "to" into tEnd
  replace "" with urlEncode(tStart) in tURL
  replace "" with urlEncode(tEnd) in tURL
  put URL tURL into t
  put lineoffsets("",t) into startSect
  put item -1 of startSect into startSect
  put lineoffsets("",t) into endSect
  put item -1 of endSect into endSect
  if startSect = 0 or endSect = 0 then
 beep
 exit to top
  end if
  put line startSect+1 to endSect-1 of t into tSect
  put lineoffset("",tSect) into dLine
  if dLine = 0 then
 beep
 exit to top
  end if
  put sr(line startSect + dLine of t) into tMiles
  --   3.6 mi
  replace "" with empty in tMiles
  delete word -1 of tMiles
  return tMiles
end getMileage


Ah, sorry, I forgot. A couple of other utility functions from my  
personal library that I use constantly -- so much so that it didn't  
register that they weren't LC-native. The offsets() function can be  
expanded if desired to wordoffsets(), itemoffsets(), etc. Exercise  
left to the reader, as they say (or email me off list if you need them  
and you're too busy to do it yourself).




function offsets str,ctr
   -- returns a comma-delimited list of all the offsets of str in ctr
   -- if none found, returns 0
   put "" into mosList
   put 0 into startPoint
   repeat
  put offset(str,ctr,startPoint) into os
  if os = 0 then exit repeat
  add os to startPoint
  put startPoint & "," after mosList
   end repeat
   if char -1 of mosList = "," then delete last char of mosList
   if mosList = "" then return "0"
   return mosList
end offsets

-- To find the last of multiple matches for str in ctr, use
--   item -1 of lineoffsets(str,ctr)
-- (which is what is done above in the getMileage handler.)

function sr str
   -- strips returns and other white space from str, fore & aft
   return word 1 to (the number of words of str) of str
end sr

-

-- Peter

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



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


Re: AW: How to hilite a checkbox with send mouseup?

2011-02-15 Thread Nonsanity
This works with a checkbox button...

Checkbox button named "Check":

   on mouseUp
  put the hilite of me into msg
   end mouseUp

   on MouseUpWithHilite
  set hilite of me to not hilite of me
  mouseup
   end MouseUpWithHilite

Some other button:

   on mouseUp
  send MouseUpWithHilite to btn "Check"
   end mouseUp

However it does not work so well with a regular button. The effects of
hilite on a regular button don't match the effect of clicking it. The effect
could probably be duplicated, but hilite isn't enough in itself. And it
would also need to be changed from a toggle effect to a delayed effect like
so:

   on MouseUpWithHilite
  set hilite of me to true
  send StopHilite to me in 1 sec
  mouseup
   end MouseUpWithHilite

   on StopHilite
  set the hilite of me to false
   end StopHilite

But as I said, the hilite by itself isn't enough. Probably need to add some
color change, etc.

This method has one advantage over "click at" however, in that it works even
if the checkbox is hidden, in another stack, behind another object, off the
edge of the card, or blocked by another window. The "click at" command would
fail to handle those situations properly.

 ~ Chris Innanen
 ~ Nonsanity


On Tue, Feb 15, 2011 at 12:30 PM, Robert Brenstein  wrote:

> On 15.02.11 at 12:14 -0500 Nonsanity apparently wrote:
>
>> It would be better to do something like add another handler to the button:
>>
>> on MouseUpWithHilite
>>set hilite of me to not hilite of me
>>mouseup
>> end MouseUpWithHilite
>>
>> And send THAT message to the button from afar. This way, the existing
>> MouseUp handler in the button works as expected, and this message has the
>> same result as clicking the button (toggling the hilite in the process)
>> and
>> enacting the MouseUp handler.
>>
>>  ~ Chris Innanen
>>  ~ Nonsanity
>>
>
> Chris,
>
> The above won't work  as intended, it will turn the hilite on for good.
> You would need to add a delay and reverse the hilite before continuing with
> mouseUp.
>
> The click command simulates user physically clicking the button, which
> I believe was the effect that original poster wanted.
>
>
> Robert
>
> ___
> 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: LiveCode & google maps...

2011-02-15 Thread James Hurley
Peter,

Thanks. Very interesting.

A couple of questions.

Is "lineoffsets" a custom function or a typo?

And what is the "sr" function?

Thanks again,

Jim Hurley


On Feb 15, 2011, at  10:00 AM, use-livecode-requ...@lists.runrev.com wrote:

> function getMileage
>put "http://maps.googleapis.com/maps/api/directions/xml?"; & \
>   "origin=&destination=&sensor=false" into tURL
>put fld "from" into tStart
>put fld "to" into tEnd
>replace "" with urlEncode(tStart) in tURL
>replace "" with urlEncode(tEnd) in tURL
>put URL tURL into t
>put lineoffsets("",t) into startSect
>put item -1 of startSect into startSect
>put lineoffsets("",t) into endSect
>put item -1 of endSect into endSect
>if startSect = 0 or endSect = 0 then
>   beep
>   exit to top
>end if
>put line startSect+1 to endSect-1 of t into tSect
>put lineoffset("",tSect) into dLine
>if dLine = 0 then
>   beep
>   exit to top
>end if
>put sr(line startSect + dLine of t) into tMiles
>--   3.6 mi
>replace "" with empty in tMiles
>delete word -1 of tMiles
>return tMiles
> end getMileage


___
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: Keydowns during Socket Read/Writes

2011-02-15 Thread Camm
Can anybody who is good with Client / Server Sockets get a client to send
some data to the server when a key is pressed on the clients keyboard ??

If it is possible please could you share or see if it is a bug .

 

Best Regards

Camm

 

From: use-livecode-boun...@lists.runrev.com
[mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of Alex Tweedly
Sent: 08 February 2011 23:56
To: use-livecode@lists.runrev.com
Subject: Re: Keydowns during Socket Read/Writes

 

Also, your script has 'the' instead of 'then' (I know, just a typo), and
it has "else" ... "end if" with no corresponding "if" to begin.

Could I suggest that you include  the complete working script, as
copied/pasted from the script editor,
then include the complete on-working script. (or include both working
scripts ...)

That way we are seeing all the script lines with minimal chance of
misunderstanding.

Thanks
-- Alex.

On 08/02/2011 23:41, Mark Schonewille wrote:
> Hi Camm,
>
> What does "does not work" mean? You need to explain this, before we can
help you.
>
> Additionally,
>
>if controlKey is down
>
> cannot work, but
>
>if controlKey() is down
>if the controlKey is down
>
> can work (provided that you're pressing the control key).
>
> --
> Best regards,
>
> Mark Schonewille
>
> Economy-x-Talk Consulting and Software Engineering
> Homepage: http://economy-x-talk.com
> Twitter: http://twitter.com/xtalkprogrammer
> KvK: 50277553
>
> New: Download the Installer Maker Plugin 1.5 for LiveCode here
http://qery.us/ce
>
> On 8 feb 2011, at 22:42, Camm wrote:
>
>> Can anybody see the problem with using "Keys" whilst using socket
commands.
>>
>> I have tried KeyUp , KeyDown , RawKeys etc they work okay except when
trying
>> to write to socket
>>
>>
>>
>> Open socket to "127.0.0.1:8090" with message "ClientConnected"
>>
>>
>>
>>   on ClientConnected pSocket
>>
>> write "Hello"&  crlf to socket pSocket
>>
>> read from socket pSocket until crlf with message
"ReceivedMessage"
>>
>>  end ClientConnected
>>
>>
>>
>> on ReceivedMessage pSocket tdata
>>
>>read from socket pSocket until crlf with message
>> "ReceivedMessage"
>>
>>put number of items in tdata into NumItems
>>
>>repeat with y=1 to NumItems
>>
>>   put  char 3 to 4 of item y of tdata into a
>>
>>   delete char 1 to 5 of item y of tdata
>>
>>   put item y of ToUpper(tdata) into line a of fld XYZ
>>
>>end repeat
>>
>>else
>>
>>end if
>>
>> THIS WORKS>>  write "Arn.Resp:5015=1:"&  crlf  to socket pSocket
>>
>>
>>
>> THIS WORKS>>  if controlKey is down the put  "Arn.Resp:5015=1:" into
fld
>> XYZ
>>
>>
>> THIS DOES NOT>  if controlKey() is down then write
"Arn.Resp:5015=1:"&
>> crlf  to socket pSocket
>>
>> end ReceivedMessage
>>
>>
>> Best Regards
>>
>> Camm
>
> ___
> 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

  _  

No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1204 / Virus Database: 1435/3430 - Release Date: 02/08/11

___
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: How to create a transition to a new screen

2011-02-15 Thread Jérôme Rosat
Thanks Tom.

This is my code:

on LeftMove
   repeat 16 times
  set the loc of group "gTexteTitre1" to (item 1 of the loc of group 
"gTexteTitre1")-10,(item 2 of the loc of group "gTexteTitre1")
  set  the blendlevel of group "gTexteTitre1" to the blendlevel of group 
"gTexteTitre1"+6
  set the loc of group "DataGrid 1" to (item 1 of the loc of group 
"DataGrid 1")-20,(item 2 of the loc of group "DataGrid 1")
  wait for 1 millisecond
   end repeat
   set the blendlevel of group "gTexteTitre1" to 100
end LeftMove

But I realize that the transition should be interrupted, so I must change the 
code. I also think that the move command is not appropriate because it is not 
possible to simultaneously move the table view and the title of the navigation 
bar.

Jerome

Le 15 févr. 2011 à 03:52, Thomas McGrath III a écrit :

> Jerome,
> 
> I doubt you can find the exact speed of these transitions from within xCode. 
> I have an app open that i wrote in xCode and on another device the one in 
> livecode and test them side by side. I just gave up on AnimationEngine to 
> emulate a paging swipe and instead gave up on the bounce in favor of the move 
> command. 
> 
> You might have to put the views offscreen and use the move command instead of 
> switching cards etc.
> 
> I am going to work on that next. Keep you informed as to progress.
> 
> -- Tom McGrath III
> http://lazyriver.on-rev.com
> 3mcgr...@comcast.net
> 
> On Feb 14, 2011, at 6:15 PM, Jérôme Rosat wrote:
> 
>> Hello everyone,
>> 
>> In iOS, a table view displays data in rows. In a hierarchical structure, 
>> when the user selects a row, a new screen slides from the right with a new 
>> table view. At the same time, the title of the navigation bar slides and 
>> appears  from the right to the center, the "back button" slides and appears 
>> from the center to the left, at a different speed from the table view (it 
>> seems).
>> 
>> I tried to create this transition with LC but I failed recreate it 
>> satisfactorily. 
>> 
>> Do you have any suggestion to create this transition with LC ? Do you know 
>> where we can find the speed of the transition of the screen and of the title 
>> of the navigation bar ?
>> 
>> Thanks in advance.
>> 
>> Jerome
>> 
>> ___
>> 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: LiveCode & google maps...

2011-02-15 Thread Peter Brigham MD

On Feb 15, 2011, at 11:57 AM, Devin Asay wrote:



On Feb 15, 2011, at 8:56 AM, Peter Brigham MD wrote:


On Feb 15, 2011, at 8:41 AM, John Dixon wrote:



Could some please point me in the right direction...

I
would like to use the browser object in a stack to display a google
map… that I can do. I would like to be able to choose a postcode or
the
name of a town or village from a list in a field in the stack to  
place

the two markers, showing the start and finish location, get the
direction drawn on the google map and the total distance put into
another field in the stack...

If someone could point me in the
the right direction (no pun intended !) of how to go about doing  
this

from within LiveCode… it would be appreciated as I don't know really
where to start..


Here is a function I have used to fetch the total distance between  
two

addresses from Google maps. The function returns the distance without
displaying any map, but you could play with the script to also  
display

the map.



function getMileage
  put "http://maps.googleapis.com/maps/api/directions/xml?"; & \
 "origin=&destination=&sensor=false" into tURL
  put fld "from" into tStart
  put fld "to" into tEnd
  replace "" with urlEncode(tStart) in tURL
  replace "" with urlEncode(tEnd) in tURL
  put URL tURL into t
  put lineoffsets("",t) into startSect
  put item -1 of startSect into startSect
  put lineoffsets("",t) into endSect
  put item -1 of endSect into endSect
  if startSect = 0 or endSect = 0 then
 beep
 exit to top
  end if
  put line startSect+1 to endSect-1 of t into tSect
  put lineoffset("",tSect) into dLine
  if dLine = 0 then
 beep
 exit to top
  end if
  put sr(line startSect + dLine of t) into tMiles
  --   3.6 mi
  replace "" with empty in tMiles
  delete word -1 of tMiles
  return tMiles
end getMileage



Peter,

Thanks for sharing this code. Can you tell us what format the origin  
and distance argument values need to be in? City, State, Country?  
Postal Code?


Devin


Look at the Google API. I just paid attention to the case of inputting  
addresses -- other values might be do-able. I didn't check out the  
alternative, but the API seems pretty informative.


-- Peter

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


___
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: RevServer in CSS

2011-02-15 Thread Medard
Andre Garzia  wrote:

> I think there is a directive for apache called AddMime or something
> like AddMimeType...

Hmmm... that's digging into Apache, a little too much for me ;-)
 
> Cheers, sorry for the typo.

No harm, again (it is very easy to write harmful words in a language you
don't know very well -- I hope that I didn't that in Portuguese, as I
travelled to Lisbon in November ;-)))

___
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: Problem transferring focus to another object

2011-02-15 Thread Terry Judd
On 16/02/11 7:04 AM, "J. Landman Gay"  wrote:

> On 2/15/11 1:41 PM, Terry Judd wrote:
>> Thanks Craig - I'm trying to create a cross-platform control so
>> unfortunately I can't use a Mac only option menu. Additionally, I want to
>> use a small text size in the menu - hence the need to fake a menu with a
>> field rather than with a proper menu (the overall effect I'm looking for is
>> like the option menus you see if you do a find (cmd-F in a Finder window on
>> the Mac). Anyway, it turns out it's not so easy to simulate a menu that
>> behaves properly when the mouse is both clicked and left open or
>> continuously held down. I've got it mostly working now - I just have to come
>> up with a method for closing the menu when the user clicks away from it.
> 
> Did you try a mouseRelease handler?

Yep - I'm already using a mouserelease handler, which is fine if you hold
the mouse down while you're doing the menu selection but doesn't catch those
situations where you click to display the menu and then move the cursor with
the mouse unclicked to make a selection. If the user moves on to some other
object without clicking the menu then it stays open.

While it's not ideal, for the moment I'm using a mouseLeave handler to send
a message to check whether the mouse is with the menu 3 seconds later - if
it isn't then I close it.

Terry...

--
Dr Terry Judd | Senior Lecturer in Medical Education
Medical Education Unit
Melbourne Medical School
The University of Melbourne



___
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: Problem transferring focus to another object

2011-02-15 Thread J. Landman Gay

On 2/15/11 1:41 PM, Terry Judd wrote:

Thanks Craig - I'm trying to create a cross-platform control so
unfortunately I can't use a Mac only option menu. Additionally, I want to
use a small text size in the menu - hence the need to fake a menu with a
field rather than with a proper menu (the overall effect I'm looking for is
like the option menus you see if you do a find (cmd-F in a Finder window on
the Mac). Anyway, it turns out it's not so easy to simulate a menu that
behaves properly when the mouse is both clicked and left open or
continuously held down. I've got it mostly working now - I just have to come
up with a method for closing the menu when the user clicks away from it.


Did you try a mouseRelease handler?

--
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: Problem transferring focus to another object

2011-02-15 Thread Terry Judd
Thanks Craig - I'm trying to create a cross-platform control so
unfortunately I can't use a Mac only option menu. Additionally, I want to
use a small text size in the menu - hence the need to fake a menu with a
field rather than with a proper menu (the overall effect I'm looking for is
like the option menus you see if you do a find (cmd-F in a Finder window on
the Mac). Anyway, it turns out it's not so easy to simulate a menu that
behaves properly when the mouse is both clicked and left open or
continuously held down. I've got it mostly working now - I just have to come
up with a method for closing the menu when the user clicks away from it.

Terry...

On 16/02/11 1:55 AM, "dunb...@aol.com"  wrote:
> 
> Hi.
> 
> I am not exactly sure what you need, but I do something similar. I have a
> locked field "class" where I want to place one of several text options. I
> have an option button "class" that I reveal wherever I click the mouse down
> in the field. That button appears at the mouseLoc and I can then select
> something from it. The selected text is loaded into the proper line of the
> field. The button disappears. In the field script:
> 
> on mouseDown
>set the loc of btn "class" to the clickLoc
>put  item 2 of the loc of btn "class" into tLoc
>put trunc((tLoc - the top of me) / the textHeight of me) + 1 into tLine
>set the clickedLine of me to tLine --remember the line of recent interest
> end mouseDown
> 
> on mouseUp
>   show btn "class" at the clickLoc
>   click at the loc of btn "class"
> end mouseUp
> 
> 
> And in the option button script:
> 
> 
> on menuPick pItemName
>put  the clickedLine of fld "class" into tLine
>put pItemname into line tLine  of fld "class"
>hide me
> end menuPick
> 
> 
> on mouseRelease
>   hide me
> end mouseRelease
> 
> 
> 
> Works fine.
> 
> 
> Craig Newman
> 

--
Dr Terry Judd | Senior Lecturer in Medical Education
Medical Education Unit
Melbourne Medical School
The University of Melbourne



___
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: Problem transferring focus to another object

2011-02-15 Thread Terry Judd
On 16/02/11 5:05 AM, "J. Landman Gay"  wrote:

> On 2/14/11 7:24 PM, Terry Judd wrote:
>> Hi there - I¹m trying to build a Œfake¹ optionmenu control where the menu is
>> a list field object that is popped up over the control. I have a mouseMove
>> handler in the field to set the hilitedLines of the field and this all works
>> well provided the user clicks the control to popup the menu (field) and
>> releases the mouse before selecting an option. However, if the mouse is held
>> down then the focus stays with the control and there doesn¹t seem to be any
>> way to hand it over to the menu (field).
> 
> Take a look at the "focus" command in the dictionary, it sounds like
> what you need.

Thanks Jacque - problem is that I'm using a list field for my 'menu' and
focus doesn't work with fields with their traversalOn set to false.

Regards,

Terry...

--
Dr Terry Judd | Senior Lecturer in Medical Education
Medical Education Unit
Melbourne Medical School
The University of Melbourne



___
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: Problem transferring focus to another object

2011-02-15 Thread Terry Judd
On 15/02/11 11:56 PM, "Peter Brigham MD"  wrote:

> On Feb 14, 2011, at 8:24 PM, Terry Judd wrote:
> 
>> Hi there - I¹m trying to build a Œfake¹ optionmenu control where the
>> menu is
>> a list field object that is popped up over the control. I have a
>> mouseMove
>> handler in the field to set the hilitedLines of the field and this
>> all works
>> well provided the user clicks the control to popup the menu (field)
>> and
>> releases the mouse before selecting an option. However, if the mouse
>> is held
>> down then the focus stays with the control and there doesn¹t seem to
>> be any
>> way to hand it over to the menu (field).
>> 
>> Any suggestions?
> 
> Try grouping the control and the list field and putting the mousemove
> handler into the group script?

Thanks Peter - I ended up doing this and parsing the mouse coordinates to
determine which line to hilight in the the menu field.

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

--
Dr Terry Judd | Senior Lecturer in Medical Education
Medical Education Unit
Melbourne Medical School
The University of Melbourne



___
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


UPDATE: Drag and Drop

2011-02-15 Thread Bob Sneidar
As far as the problems I have been having with drag and drop, I discovered I 
had a bad datagrid. When I deleted and recreated the datagrid, everything began 
to work properly again, with the exact same scripts (I saved and restored the 
scripts). Oddly, dropping onto any other column besides the third one worked, 
but dropping on the third column produced a bad dragDestination, and trying to 
get the dgIndex of the dragDestination returned empty. 

This frankly scares the bejesus out of me because at any point I can have a 
corrupted datagrid, and not know it until after I deploy. I am going to have to 
be very, very careful when working with these things. 

Also, the help says that the dragDestination is only available in the dragDrop 
handler, but I am using it in the dragReorderDrop handler (as per Datagrid 
Helper) and it works fine. Also, there is no help entry for dragReorderDrop. 

Bob



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


Re: Problem transferring focus to another object

2011-02-15 Thread J. Landman Gay

On 2/14/11 7:24 PM, Terry Judd wrote:

Hi there - I¹m trying to build a Œfake¹ optionmenu control where the menu is
a list field object that is popped up over the control. I have a mouseMove
handler in the field to set the hilitedLines of the field and this all works
well provided the user clicks the control to popup the menu (field) and
releases the mouse before selecting an option. However, if the mouse is held
down then the focus stays with the control and there doesn¹t seem to be any
way to hand it over to the menu (field).


Take a look at the "focus" command in the dictionary, it sounds like 
what you need.


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


LiveCode Event Feb 26th.

2011-02-15 Thread Peter Haworth
Hi,
Checking in to see if you still have a slot I could use for a presentation on 
the above date.  What I'd like to show is a tool I've put together that helps 
with the development of LiveCode Apps that use SQL databases by eliminating a 
large percentage of the LiveCode and SQL code developers normally have to write.

If it's a go, I'd appreciate some guidance on the tools I will need to use to 
have the presentation go out live.  I have some presentation materials and will 
also be creating some Livecode stacks using the tool during the presentation.

Thanks,

Pete Haworth







http://www.mollysrevenge.com
http://www.sonicbids.com/MollysRevenge
http://www.myspace.com/mollysrevengeband








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

Re: How to hilite a checkbox with send mouseup?

2011-02-15 Thread David C.
On Tue, Feb 15, 2011 at 11:39 AM, Tiemo Hollmann TB  wrote:
> :) it's always great to see how helpful and responsive you guys are, even 
> with such trivial issues!
> Tiemo
>

These folks are great, huh Tiemo? :)
...none of it is ever really trivial, especially when your head hurts
from banging it on the desk trying to figure something out. Even when
you don't need it, it serves as a reminder for the next time.

I'm always completely amazed at what I learn from reading the trivial
things on this list. :)

Best regards,
David C.

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


Re: AW: How to hilite a checkbox with send mouseup?

2011-02-15 Thread Robert Brenstein

On 15.02.11 at 12:14 -0500 Nonsanity apparently wrote:

It would be better to do something like add another handler to the button:

on MouseUpWithHilite
set hilite of me to not hilite of me
mouseup
end MouseUpWithHilite

And send THAT message to the button from afar. This way, the existing
MouseUp handler in the button works as expected, and this message has the
same result as clicking the button (toggling the hilite in the process) and
enacting the MouseUp handler.

 ~ Chris Innanen
 ~ Nonsanity


Chris,

The above won't work  as intended, it will turn the hilite on for good.
You would need to add a delay and reverse the hilite before 
continuing with mouseUp.


The click command simulates user physically clicking the button, which
I believe was the effect that original poster wanted.

Robert

___
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: LiveCode & google maps...

2011-02-15 Thread John Dixon

Peter,

Thanks for this... 

regards,

John Dixon

> From: pmb...@gmail.com
> To: use-livecode@lists.runrev.com
> Subject: Re: LiveCode & google maps...
> Date: Tue, 15 Feb 2011 10:56:56 -0500

> Here is a function I have used to fetch the total distance between two  
> addresses from Google maps. The function returns the distance without  
> displaying any map, but you could play with the script to also display  
> the map.
> 
> 
> 
> function getMileage
> put "http://maps.googleapis.com/maps/api/directions/xml?"; & \
>"origin=&destination=&sensor=false" into tURL
> put fld "from" into tStart
> put fld "to" into tEnd
> replace "" with urlEncode(tStart) in tURL
> replace "" with urlEncode(tEnd) in tURL
> put URL tURL into t
> put lineoffsets("",t) into startSect
> put item -1 of startSect into startSect
> put lineoffsets("",t) into endSect
> put item -1 of endSect into endSect
> if startSect = 0 or endSect = 0 then
>beep
>exit to top
> end if
> put line startSect+1 to endSect-1 of t into tSect
> put lineoffset("",tSect) into dLine
> if dLine = 0 then
>beep
>exit to top
> end if
> put sr(line startSect + dLine of t) into tMiles
> --   3.6 mi
> replace "" with empty in tMiles
> delete word -1 of tMiles
> return tMiles
> end getMileage
> 
> -- Peter
> 
> Peter M. Brigham
> pmb...@gmail.com
> http://home.comcast.net/~pmbrig
  
___
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: Stackfiles followup

2011-02-15 Thread Peter Haworth
Monte, Thanks for the update.  I just changed all my code back to using the 
stackFiles property instead of using the code you suggested in the Startup 
event and now everything works!  I have changed this code so many times now 
that I honestly can't remember what is different about it now that when it 
didn;t work.  In any case, I'm happy it is now working and I can move on.

Thanks to all who helped out with this.

Pete Haworth







http://www.mollysrevenge.com
http://www.sonicbids.com/MollysRevenge
http://www.myspace.com/mollysrevengeband








On Feb 14, 2011, at 7:57 PM, Monte Goulding wrote:

 However, it looks like I have some wholesale changes to make to get my 
 stackFiles working correctly with regard to my behavior scripts.  The 
 buttons that hold the behavior scripts are in a substack.  I've included 
 the name of the behaviors substack and it's main stack in the stackfiles, 
 both pointing to the same file path but the behaviors still aren't 
 recognised by the controls that point to them.  I tried putting just the 
 main stack into stackFiles and adding the statement "open stack "xyzsub of 
 stack "xyz"  - the behaviors still aren't recognised.
> 
> Hi Peter
> 
> I just tested using the stackfiles property as the sole reference for 
> behaviors (both those on a substack of a separate stackfile and on a 
> mainstack of a separate stackfile) and it worked perfectly so there must be 
> something else going on. Both stackfiles were in a stackfiles subdirectory 
> where the engine wouldn't normally find them. One important thing about 
> behaviors is the engine has to find them before opening the stack they are 
> used on.
> 
> Cheers
> 
> Monte
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 

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

AW: How to hilite a checkbox with send mouseup?

2011-02-15 Thread Tiemo Hollmann TB
:) it's always great to see how helpful and responsive you guys are, even with 
such trivial issues!
Tiemo

> -Ursprüngliche Nachricht-
> Von: use-livecode-boun...@lists.runrev.com [mailto:use-livecode-
> boun...@lists.runrev.com] Im Auftrag von dunb...@aol.com
> Gesendet: Dienstag, 15. Februar 2011 18:15
> An: use-livecode@lists.runrev.com
> Betreff: Re: How to hilite a checkbox with send mouseup?
> 
> This is actually a good thing. Because the actions are separate, you get more
> control.  It is therefore proper that if you want to combine them, you write
> it that way.
> 
> 
> 
> You just have to get used to the details.
> 
> 
> Craig Newman
> 
> 
> -Original Message-
> From: Tiemo Hollmann TB 
> To: 'How to use LiveCode' 
> Sent: Tue, Feb 15, 2011 11:24 am
> Subject: AW: How to hilite a checkbox with send mouseup?
> 
> 
> Hi Jim,
> thanks for your coaching. I wasn' t aware that sending the mousup message
> wouldn't trigger the needed event.
> So I was correct that I have to script both the message and the event.
> Thank you
> Tiemo
> 
> > -Ursprüngliche Nachricht-
> > Von: use-livecode-boun...@lists.runrev.com [mailto:use-livecode-
> > boun...@lists.runrev.com] Im Auftrag von Jim Ault
> > Gesendet: Dienstag, 15. Februar 2011 17:02
> > An: How to use LiveCode
> > Betreff: Re: How to hilite a checkbox with send mouseup?
> >
> >
> >
> > On Feb 15, 2011, at 7:07 AM, Tiemo Hollmann TB wrote:
> >
> > > Hello,
> > >
> > > when sending:  send "mouseup" to btn "test" the button gets the
> > > mouseUp
> > > command, but doesn't hilite, though it's property Autohilite is true.
> > >
> > > Do I really have to set additionally the hilite of that button by
> > > script?
> > >
> > > I also have "pass mouseUp" in the buttons mouseUp handler and I am
> > > getting
> > > "exit" as the result in the message box
> > >
> > > What am I missing? Why do I get "exit" in the message box?
> > >
> > mouseUp is a LCode message, not an event.
> >
> > just as 'mouseUpIwantToTrap' is a message you could send to an object,
> > or a stack script, or a back script, etc.
> >
> > Clicking on a checkbox will both send the message and perform the event.
> > set the hilite of btn "chkboxStatus" to true
> >
> > Sending the 'mouseUp' message will work just fine even if the check
> > box is hidden, on a different card, or on a card in a different
> > stack.  The same goes for setting the hilite.
> >
> > send "mouseUp" to btn id 1022 of card id 1446 of stack "Survey
> > Questions"
> >
> > set the hilite of btn "chkboxStatus" of card id 1446 of stack "Survey
> > Questions" to true
> >
> >
> > Hope this helps
> > -
> > Why not step through your code and see what happens in the flow of the
> > script?
> > It sounds like 'pass mouseUp' is triggering the 'exit' string.
> >
> > Hope this helps
> >
> > Jim Ault
> > Las Vegas
> >
> >
> >
> > ___
> > 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


___
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: LiveCode & google maps...

2011-02-15 Thread Paul Dupuis

On 2/15/2011 8:41 AM, John Dixon wrote:

Could some please point me in the right direction...

I
  would like to use the browser object in a stack to display a google
map… that I can do. I would like to be able to choose a postcode or the
name of a town or village from a list in a field in the stack to place
the two markers, showing the start and finish location, get the
direction drawn on the google map and the total distance put into
another field in the stack...

If someone could point me in the
the right direction (no pun intended !) of how to go about doing this
from within LiveCode… it would be appreciated as I don't know really where to 
start..

thanks

John Dixon

___
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


If you haven't looked at this, the Google Maps Static API is probably 
the easiest way to produce maps


http://code.google.com/apis/maps/documentation/staticmaps/


--
Paul Dupuis
Cofounder
Researchware, Inc.
http://www.researchware.com/


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


Re: How to hilite a checkbox with send mouseup?

2011-02-15 Thread dunbarx
This is actually a good thing. Because the actions are separate, you get more 
control.  It is therefore proper that if you want to combine them, you write it 
that way.



You just have to get used to the details.


Craig Newman


-Original Message-
From: Tiemo Hollmann TB 
To: 'How to use LiveCode' 
Sent: Tue, Feb 15, 2011 11:24 am
Subject: AW: How to hilite a checkbox with send mouseup?


Hi Jim,
thanks for your coaching. I wasn' t aware that sending the mousup message
wouldn't trigger the needed event.
So I was correct that I have to script both the message and the event.
Thank you
Tiemo

> -Ursprüngliche Nachricht-
> Von: use-livecode-boun...@lists.runrev.com [mailto:use-livecode-
> boun...@lists.runrev.com] Im Auftrag von Jim Ault
> Gesendet: Dienstag, 15. Februar 2011 17:02
> An: How to use LiveCode
> Betreff: Re: How to hilite a checkbox with send mouseup?
> 
> 
> 
> On Feb 15, 2011, at 7:07 AM, Tiemo Hollmann TB wrote:
> 
> > Hello,
> >
> > when sending:  send "mouseup" to btn "test" the button gets the
> > mouseUp
> > command, but doesn't hilite, though it's property Autohilite is true.
> >
> > Do I really have to set additionally the hilite of that button by
> > script?
> >
> > I also have "pass mouseUp" in the buttons mouseUp handler and I am
> > getting
> > "exit" as the result in the message box
> >
> > What am I missing? Why do I get "exit" in the message box?
> >
> mouseUp is a LCode message, not an event.
> 
> just as 'mouseUpIwantToTrap' is a message you could send to an object,
> or a stack script, or a back script, etc.
> 
> Clicking on a checkbox will both send the message and perform the event.
> set the hilite of btn "chkboxStatus" to true
> 
> Sending the 'mouseUp' message will work just fine even if the check
> box is hidden, on a different card, or on a card in a different
> stack.  The same goes for setting the hilite.
> 
> send "mouseUp" to btn id 1022 of card id 1446 of stack "Survey
> Questions"
> 
> set the hilite of btn "chkboxStatus" of card id 1446 of stack "Survey
> Questions" to true
> 
> 
> Hope this helps
> -
> Why not step through your code and see what happens in the flow of the
> script?
> It sounds like 'pass mouseUp' is triggering the 'exit' string.
> 
> Hope this helps
> 
> Jim Ault
> Las Vegas
> 
> 
> 
> ___
> 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: AW: How to hilite a checkbox with send mouseup?

2011-02-15 Thread Nonsanity
It would be better to do something like add another handler to the button:

on MouseUpWithHilite
set hilite of me to not hilite of me
mouseup
end MouseUpWithHilite

And send THAT message to the button from afar. This way, the existing
MouseUp handler in the button works as expected, and this message has the
same result as clicking the button (toggling the hilite in the process) and
enacting the MouseUp handler.

 ~ Chris Innanen
 ~ Nonsanity


On Tue, Feb 15, 2011 at 11:52 AM, Robert Brenstein  wrote:

> On 15.02.11 at 17:24 +0100 Tiemo Hollmann TB apparently wrote:
>
>> Hi Jim,
>> thanks for your coaching. I wasn' t aware that sending the mousup message
>> wouldn't trigger the needed event.
>> So I was correct that I have to script both the message and the event.
>> Thank you
>> Tiemo
>>
>
> In this case, you can use click instead of send:
>
> click at the loc of btn "test"
>
> This will create the event and send the mouseUp.
>
> Robert
>
>
> ___
> 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: AW: How to hilite a checkbox with send mouseup?

2011-02-15 Thread Robert Brenstein

On 15.02.11 at 17:24 +0100 Tiemo Hollmann TB apparently wrote:

Hi Jim,
thanks for your coaching. I wasn' t aware that sending the mousup message
wouldn't trigger the needed event.
So I was correct that I have to script both the message and the event.
Thank you
Tiemo


In this case, you can use click instead of send:

click at the loc of btn "test"

This will create the event and send the mouseUp.

Robert

___
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: LiveCode & google maps...

2011-02-15 Thread Devin Asay

On Feb 15, 2011, at 8:56 AM, Peter Brigham MD wrote:

> On Feb 15, 2011, at 8:41 AM, John Dixon wrote:
> 
>> 
>> Could some please point me in the right direction...
>> 
>> I
>> would like to use the browser object in a stack to display a google
>> map… that I can do. I would like to be able to choose a postcode or  
>> the
>> name of a town or village from a list in a field in the stack to place
>> the two markers, showing the start and finish location, get the
>> direction drawn on the google map and the total distance put into
>> another field in the stack...
>> 
>> If someone could point me in the
>> the right direction (no pun intended !) of how to go about doing this
>> from within LiveCode… it would be appreciated as I don't know really  
>> where to start..
> 
> Here is a function I have used to fetch the total distance between two  
> addresses from Google maps. The function returns the distance without  
> displaying any map, but you could play with the script to also display  
> the map.
> 
> 
> 
> function getMileage
>put "http://maps.googleapis.com/maps/api/directions/xml?"; & \
>   "origin=&destination=&sensor=false" into tURL
>put fld "from" into tStart
>put fld "to" into tEnd
>replace "" with urlEncode(tStart) in tURL
>replace "" with urlEncode(tEnd) in tURL
>put URL tURL into t
>put lineoffsets("",t) into startSect
>put item -1 of startSect into startSect
>put lineoffsets("",t) into endSect
>put item -1 of endSect into endSect
>if startSect = 0 or endSect = 0 then
>   beep
>   exit to top
>end if
>put line startSect+1 to endSect-1 of t into tSect
>put lineoffset("",tSect) into dLine
>if dLine = 0 then
>   beep
>   exit to top
>end if
>put sr(line startSect + dLine of t) into tMiles
>--   3.6 mi
>replace "" with empty in tMiles
>delete word -1 of tMiles
>return tMiles
> end getMileage


Peter,

Thanks for sharing this code. Can you tell us what format the origin and 
distance argument values need to be in? City, State, Country? Postal Code?

Devin


Devin Asay
Humanities Technology and Research Support Center
Brigham Young University


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


AW: How to hilite a checkbox with send mouseup?

2011-02-15 Thread Tiemo Hollmann TB
Hi Jim,
thanks for your coaching. I wasn' t aware that sending the mousup message
wouldn't trigger the needed event.
So I was correct that I have to script both the message and the event.
Thank you
Tiemo

> -Ursprüngliche Nachricht-
> Von: use-livecode-boun...@lists.runrev.com [mailto:use-livecode-
> boun...@lists.runrev.com] Im Auftrag von Jim Ault
> Gesendet: Dienstag, 15. Februar 2011 17:02
> An: How to use LiveCode
> Betreff: Re: How to hilite a checkbox with send mouseup?
> 
> 
> 
> On Feb 15, 2011, at 7:07 AM, Tiemo Hollmann TB wrote:
> 
> > Hello,
> >
> > when sending:  send "mouseup" to btn "test" the button gets the
> > mouseUp
> > command, but doesn't hilite, though it's property Autohilite is true.
> >
> > Do I really have to set additionally the hilite of that button by
> > script?
> >
> > I also have "pass mouseUp" in the buttons mouseUp handler and I am
> > getting
> > "exit" as the result in the message box
> >
> > What am I missing? Why do I get "exit" in the message box?
> >
> mouseUp is a LCode message, not an event.
> 
> just as 'mouseUpIwantToTrap' is a message you could send to an object,
> or a stack script, or a back script, etc.
> 
> Clicking on a checkbox will both send the message and perform the event.
> set the hilite of btn "chkboxStatus" to true
> 
> Sending the 'mouseUp' message will work just fine even if the check
> box is hidden, on a different card, or on a card in a different
> stack.  The same goes for setting the hilite.
> 
> send "mouseUp" to btn id 1022 of card id 1446 of stack "Survey
> Questions"
> 
> set the hilite of btn "chkboxStatus" of card id 1446 of stack "Survey
> Questions" to true
> 
> 
> Hope this helps
> -
> Why not step through your code and see what happens in the flow of the
> script?
> It sounds like 'pass mouseUp' is triggering the 'exit' string.
> 
> Hope this helps
> 
> Jim Ault
> Las Vegas
> 
> 
> 
> ___
> 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: Live LiveCode Code Event #10

2011-02-15 Thread Nonsanity
I'd post the stacks I used for most of my demo, but as I demonstrated, REST
API's are SO simple to put together with LiveCode that I think it's a better
exercise to write the line or two of code yourself that each contained. The
video should contain all the information you need, but are the links to the
REST services I used:

[1] http://qrserver.com/api/
[2] http://code.google.com/p/bitly-api/wiki/ApiDocumentation#/v3/shorten

 ~ Chris Innanen
 ~ Nonsanity


2011/2/14 Björnke von Gierke 

> Alright. here's the wrap up info for event 10:
>
> I introduced my progress on BvG Docu 2, and then presented some things
> planned for chartsengine (three parts due to weak bandwidth):
> http://www.ustream.tv/recorded/12649506
> http://www.ustream.tv/recorded/12649796
> http://www.ustream.tv/recorded/12649915
>
> If you think about making your own presentation, then Calvins intro to web
> streaming behaviour might be interesting to you:
> http://www.ustream.tv/recorded/12650231
>
> The list of tips can be seen here:
> http://presentationchecklist.helps.mm.st/
>
> Chris showed how you can use REST APIs using a single line of LC-code, and
> then continued to show various things he's done using that, including
> creating QR code images and weather updates (two parts, due to low quality
> first time around):
> http://www.ustream.tv/recorded/12650934
> http://www.ustream.tv/recorded/12651036
>
> On 12 Feb 2011, at 19:09, Björnke von Gierke wrote:
>
> > Hi
> >
> > The event will start within the hour.
> >
> > Please be advised that there is a change in schedule. My presentation
> will be shortened, and Chris will then show the things he was unable to do
> two weeks ago:
> >
> > Chris Innanen will discuss RESTful web API's and will demonstrate some
> applications he worked on that use them.
> >
> >
> > On 11 Feb 2011, at 16:33, Björnke von Gierke wrote:
> >
> >> Hello everyone
> >>
> >> The Event returns for a jubilee time (but without party). Watch it on
> www.livecode.tv.
> >>
> >> Bjoernke (me) will show some progress and problems in getting BvG Docu 2
> done.
> >>
> >> Calvin will do an introductionary presentation on some things to keep in
> mind when doing a presentation. Also, he will be looking for specific
> feedback about how well he presented.
> >>
> >> Finally, David will take a break from his government-suggested weekend
> code marathon, and explain how he's saving the world and stuff.
> >>
> >> Oh and Jim went trough a tremendous amount of time to create a complete
> package of stuff about his presentation from event #9. He even re-recorded
> the whole thing! That man's insane:
> >>
> >> The Video:
> >> http://jimthewebmaster.com/livecode/LCDemoWindowShapePart1.mp4
> >> http://jimthewebmaster.com/livecode/LCDemoWindowShapePart2.mp4
> >>
> >> His stacks:
> >> http://jimthewebmaster.com/livecode/LivecodeDemoFeb2011Part1.rev
> >> http://jimthewebmaster.com/livecode/LivecodeDemoFeb2011Part2.rev
> >>
> >> Trevors stacks:
> >> http://jimthewebmaster.com/livecode/alien_spheres.rev
> >> http://jimthewebmaster.com/livecode/weather.rev
> >>
> >>
> >> For event #10 here's the gist:
> >>
> >> As usual on Saturday:
> >> Zurich: 20:00
> >> Buenos Aires: 16:00
> >> New York:  14:00
> >> San Francisco: 11:00
> >> Sydney: 06:00
> >>
> >> Make sure to use ChatRev during the happening, otherwise you might miss
> when you'll need to change to the other streams:
> >> http://bjoernke.com?target=chatrev
> >> or:
> >> go stack URL "http://bjoernke.com/chatrev/chatrev1.3b3.rev";
> >>
> >> If you want to get private, regular notification of this event, please
> subscribe to the rss feed of the blog (about 2 updates per week):
> >> feed://livecode.tv/feed/
> >>
> >> See also the following page for the same information:
> >> http://livecode.tv
> >>
> >> --
> >>
> >> official ChatRev page:
> >> http://bjoernke.com?target=chatrev
> >>
> >> Chat with other RunRev developers:
> >> go stack URL "http://bjoernke.com/chatrev/chatrev1.3b3.rev";
> >>
> >> ___
> >> 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
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
htt

Re: How to hilite a checkbox with send mouseup?

2011-02-15 Thread Jim Ault



On Feb 15, 2011, at 7:07 AM, Tiemo Hollmann TB wrote:


Hello,

when sending:  send "mouseup" to btn "test" the button gets the  
mouseUp

command, but doesn't hilite, though it's property Autohilite is true.

Do I really have to set additionally the hilite of that button by  
script?


I also have "pass mouseUp" in the buttons mouseUp handler and I am  
getting

"exit" as the result in the message box

What am I missing? Why do I get "exit" in the message box?


mouseUp is a LCode message, not an event.

just as 'mouseUpIwantToTrap' is a message you could send to an object,  
or a stack script, or a back script, etc.


Clicking on a checkbox will both send the message and perform the event.
   set the hilite of btn "chkboxStatus" to true

Sending the 'mouseUp' message will work just fine even if the check  
box is hidden, on a different card, or on a card in a different  
stack.  The same goes for setting the hilite.


send "mouseUp" to btn id 1022 of card id 1446 of stack "Survey  
Questions"


set the hilite of btn "chkboxStatus" of card id 1446 of stack "Survey  
Questions" to true



Hope this helps
-
Why not step through your code and see what happens in the flow of the  
script?

It sounds like 'pass mouseUp' is triggering the 'exit' string.

Hope this helps

Jim Ault
Las Vegas



___
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: LiveCode & google maps...

2011-02-15 Thread Peter Brigham MD

On Feb 15, 2011, at 8:41 AM, John Dixon wrote:



Could some please point me in the right direction...

I
would like to use the browser object in a stack to display a google
map… that I can do. I would like to be able to choose a postcode or  
the

name of a town or village from a list in a field in the stack to place
the two markers, showing the start and finish location, get the
direction drawn on the google map and the total distance put into
another field in the stack...

If someone could point me in the
the right direction (no pun intended !) of how to go about doing this
from within LiveCode… it would be appreciated as I don't know really  
where to start..


Here is a function I have used to fetch the total distance between two  
addresses from Google maps. The function returns the distance without  
displaying any map, but you could play with the script to also display  
the map.




function getMileage
   put "http://maps.googleapis.com/maps/api/directions/xml?"; & \
  "origin=&destination=&sensor=false" into tURL
   put fld "from" into tStart
   put fld "to" into tEnd
   replace "" with urlEncode(tStart) in tURL
   replace "" with urlEncode(tEnd) in tURL
   put URL tURL into t
   put lineoffsets("",t) into startSect
   put item -1 of startSect into startSect
   put lineoffsets("",t) into endSect
   put item -1 of endSect into endSect
   if startSect = 0 or endSect = 0 then
  beep
  exit to top
   end if
   put line startSect+1 to endSect-1 of t into tSect
   put lineoffset("",tSect) into dLine
   if dLine = 0 then
  beep
  exit to top
   end if
   put sr(line startSect + dLine of t) into tMiles
   --   3.6 mi
   replace "" with empty in tMiles
   delete word -1 of tMiles
   return tMiles
end getMileage

-- Peter

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




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


How to hilite a checkbox with send mouseup?

2011-02-15 Thread Tiemo Hollmann TB
Hello,

when sending:  send "mouseup" to btn "test" the button gets the mouseUp
command, but doesn't hilite, though it's property Autohilite is true.

Do I really have to set additionally the hilite of that button by script?

I also have "pass mouseUp" in the buttons mouseUp handler and I am getting
"exit" as the result in the message box

What am I missing? Why do I get "exit" in the message box?

Thanks

Tiemo

 

 

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


Re: Problem transferring focus to another object

2011-02-15 Thread dunbarx
Hi.


I am not exactly sure what you need, but I do something similar. I have a 
locked field "class" where I want to place one of several text options. I have 
an option button "class" that I reveal wherever I click the mouse down in the 
field. That button appears at the mouseLoc and I can then select something from 
it. The selected text is loaded into the proper line of the field. The button 
disappears. In the field script:




on mouseDown
   set the loc of btn "class" to the clickLoc
   put  item 2 of the loc of btn "class" into tLoc
   put trunc((tLoc - the top of me) / the textHeight of me) + 1 into tLine
   set the clickedLine of me to tLine --remember the line of recent interest
end mouseDown


on mouseUp
  show btn "class" at the clickLoc
  click at the loc of btn "class"
end mouseUp





And in the option button script:



on menuPick pItemName
   put  the clickedLine of fld "class" into tLine
   put pItemname into line tLine  of fld "class"
   hide me
end menuPick


on mouseRelease
  hide me
end mouseRelease



Works fine.


Craig Newman




-Original Message-
From: Peter Brigham MD 
To: How to use LiveCode 
Sent: Tue, Feb 15, 2011 7:56 am
Subject: Re: Problem transferring focus to another object


On Feb 14, 2011, at 8:24 PM, Terry Judd wrote: 
 
> Hi there - I’m trying to build a ‘fake’ optionmenu control where the > menu 
> is 
> a list field object that is popped up over the control. I have a > mouseMove 
> handler in the field to set the hilitedLines of the field and this > all 
> works 
> well provided the user clicks the control to popup the menu (field) > and 
> releases the mouse before selecting an option. However, if the mouse > is 
> held 
> down then the focus stays with the control and there doesn’t seem to > be any 
> way to hand it over to the menu (field). 
> 
> Any suggestions? 
 
Try grouping the control and the list field and putting the mousemove handler 
into the group script? 
 
-- Peter 
 
Peter M. Brigham 
pmb...@gmail.com 
http://home.comcast.net/~pmbrig 
 
 
___ 
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: datagrid: on closeeditor the accents are lost

2011-02-15 Thread Trevor DeVore
On Tue, Feb 15, 2011 at 7:42 AM, JosepM  wrote:

>
> SetDataOfIndex the dgIndex of me, the dgColumn of me, the text of
> pFieldEditor
>
> What is wrong? :(
>

The text of pFieldEditor is not UTF16 or UTF8. All of your other code is
expecting UTF8 so you should probably use this with SetDataOfIndex:

unidecode(the unicodeText of pFieldEditor, "utf8")

-- 
Trevor DeVore
Blue Mango Learning Systems
ScreenSteps: http://www.screensteps.com
LiveCode Resources for Developers: http://livecode.bluemangolearning.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


LiveCode & google maps...

2011-02-15 Thread John Dixon

Could some please point me in the right direction...

I
 would like to use the browser object in a stack to display a google 
map… that I can do. I would like to be able to choose a postcode or the 
name of a town or village from a list in a field in the stack to place 
the two markers, showing the start and finish location, get the 
direction drawn on the google map and the total distance put into 
another field in the stack...

If someone could point me in the 
the right direction (no pun intended !) of how to go about doing this 
from within LiveCode… it would be appreciated as I don't know really where to 
start..

thanks

John Dixon
  
___
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: Problem transferring focus to another object

2011-02-15 Thread Peter Brigham MD

On Feb 14, 2011, at 8:24 PM, Terry Judd wrote:

Hi there - I’m trying to build a ‘fake’ optionmenu control where the  
menu is
a list field object that is popped up over the control. I have a  
mouseMove
handler in the field to set the hilitedLines of the field and this  
all works
well provided the user clicks the control to popup the menu (field)  
and
releases the mouse before selecting an option. However, if the mouse  
is held
down then the focus stays with the control and there doesn’t seem to  
be any

way to hand it over to the menu (field).

Any suggestions?


Try grouping the control and the list field and putting the mousemove  
handler into the group script?


-- Peter

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



___
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: Stackfiles followup

2011-02-15 Thread Peter Brigham MD

On Feb 14, 2011, at 3:01 PM, Peter Haworth wrote:

The behaviors are specified in the form "button id 1234 of stack  
"xyzSub".  I tried adding "of stack "xyz" after the behavior  
specifications but the IDE simply removes that text.


Behavior references have to be in the form of a long id:

   set the behavior of btn "testBtn" to the long id of (button id  
1234 of stack "xyzSub")


Is that the problem?

-- Peter

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



___
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


datagrid: on closeeditor the accents are lost

2011-02-15 Thread JosepM

Hi,

I have a datagrid that use the UTF8 to store the data.

On FillData I have:

 set the unicodetext of me to uniencode(pData,"utf8")

If I load some value from the database that also use UTF8 the data are
showed fine. But when I edit some value all the accents and are lost.

In the EditValue I have:

set the dgTemplateFieldEditor["utf8text"] of the dgControl of me to
unidecode(the unicodetext of me,"utf8")
EditFieldText the long id of me, the dgIndex of me, the dgColumn of me

In the closeeditor I perform some checks but at end I have:

SetDataOfIndex the dgIndex of me, the dgColumn of me, the text of
pFieldEditor

What is wrong? :( 

I read the
http://lessons.runrev.com/spaces/lessons/manuals/datagrid/lessons/7337-How-Do-I-Save-Changes-The-User-Makes-In-An-Editor-Field-To-An-External-Data-Source-

But I don't see the problem.


Salut,
Josep M
-- 
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/datagrid-on-closeeditor-the-accents-are-lost-tp3306707p3306707.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