Re: select after text

2012-01-28 Thread Phil Davis

Is the autoHilite of the field is turned on? That might make a difference.

Phil Davis


On 1/27/12 11:17 PM, Serge Brami wrote:

This script in a focusable and not locked  field :

on openfield
put the long date after me
select after text of me
end openfield


simple but doesn't work : the insertion point is never placed at the end of the 
text ...
any idea ?
___
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



--
Phil Davis

PDS Labs
Professional Software Development
http://pdslabs.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


Looking for a "wait until x or timeout" design pattern..

2012-01-28 Thread Ken Corey
I've been working on a pinch library for a week or so, and I have 
complained about the jerkiness. I am thinking that the problem is that 
it's /too/ repsonsive.


The instant one touch moves, it's causing the pinchMove event to be 
generated.  This is fine if nothing else truly has moved, but if the two 
move events are sent back to back, they should both be handled before 
sending a pinchMove message...not two different pinchMove events.


The pinchMove event should only be sent once the status of all the 
touches have been updated...but of course, we have no guarantee that 
there's a touchMove coming for each point, nor the order in which they 
will come...


So, in pseudo code, what I'd like to do is:

on touchMove i,x,y
  store x,y into positionArray[i]  -- update the postition for a touch

  wait until (got touch events from all touches) or \
(30 milliseconds have passed)

  pinchMove blah,blah,blah
end touchMove

But the wait command seems to either wait 100 milliseconds or wait until 
, but not both.


Then I thought to provide a timeout with a 'send "timeout" in xx 
milliseconds', but cancel it if we got events on all touches first. 
Couldn't see how to cancel a pending send.


I guess I could break my timeout period down and do a series of shorter 
waits (sort of slow polling), with a fall-through at the end of the timeout.


Also, all other events still need to be handled in the normal 
way...can't lock the application for those 30 seconds.


Thoughts?

-Ken

___
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: select after text

2012-01-28 Thread Mark Schonewille
Serge,

on openField
  send "selectAfterMe" to me in 0 millisecs
end openField

on selectAfterMe
  put the long date after me
  select after text of me
end selectAfterMe

--
Best regards,

Mark Schonewille

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

Download the Installer Maker Plugin 1.7 for LiveCode here http://qery.us/za

On 28 jan 2012, at 08:17, Serge Brami wrote:

> This script in a focusable and not locked  field :
> 
> on openfield
>   put the long date after me
>   select after text of me
> end openfield
>   
> 
> simple but doesn't work : the insertion point is never placed at the end of 
> the text ...
> any idea ?


___
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: Looking for a "wait until x or timeout" design pattern..

2012-01-28 Thread Scott Rossi
You might try:

  wait 30 millisecs with messages

Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design



Recently, Ken Corey wrote:

> I've been working on a pinch library for a week or so, and I have
> complained about the jerkiness. I am thinking that the problem is that
> it's /too/ repsonsive.
> 
> The instant one touch moves, it's causing the pinchMove event to be
> generated.  This is fine if nothing else truly has moved, but if the two
> move events are sent back to back, they should both be handled before
> sending a pinchMove message...not two different pinchMove events.
> 
> The pinchMove event should only be sent once the status of all the
> touches have been updated...but of course, we have no guarantee that
> there's a touchMove coming for each point, nor the order in which they
> will come...
> 
> So, in pseudo code, what I'd like to do is:
> 
> on touchMove i,x,y
>store x,y into positionArray[i]  -- update the postition for a touch
> 
>wait until (got touch events from all touches) or \
> (30 milliseconds have passed)
> 
>pinchMove blah,blah,blah
> end touchMove
> 
> But the wait command seems to either wait 100 milliseconds or wait until
> , but not both.
> 
> Then I thought to provide a timeout with a 'send "timeout" in xx
> milliseconds', but cancel it if we got events on all touches first.
> Couldn't see how to cancel a pending send.
> 
> I guess I could break my timeout period down and do a series of shorter
> waits (sort of slow polling), with a fall-through at the end of the timeout.
> 
> Also, all other events still need to be handled in the normal
> way...can't lock the application for those 30 seconds.
> 
> Thoughts?
> 
> -Ken
> 
> ___
> 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: Alternate Form of printKeys()

2012-01-28 Thread Peter M. Brigham, MD
One little tweak:

instead of 

>if theKey is not a number then
>replace theKey with quote & theKey & quote in theKeyList
>end if

use 

if theKey is not a number then
   replace "[" & theKey & "]" with "[" & quote & theKey & quote & "]" in 
theKeyList
end if

I tried it with keys like [second][c][2] and your original replacement line 
gave me ["se"c"ond"] as one of the entries.

What I liked about the original handlers was that the previous altPrintKeys 
would output a textual representation of the array in an intuitive outline 
form, so you could see at a glance the structure and contents of the array. 
Your new function converts an array to a text string but it's really hard to 
tell by looking at the string how the array is structured, so it has limited 
value to me. For what purpose would you be using the new version of these 
functions?

-- Peter

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


On Jan 26, 2012, at 6:12 PM, Bob Sneidar wrote:

> Here are the functions. I have tested them and they seem to be fine, but any 
> bug reports would be appreciated. Note that there is another distinct 
> advantage of these functions over the original printKeys(): These functions 
> allow for returns and tabs in the values. I convert them to ascii(30) and 
> ascii(11) respectively when I return text and back again when I return an 
> array. 
> 
> Also bear in mind I do no error checking. Who knows what would happen if you 
> pass something other than what is expected. Hang on to your socks! :-)
> 
> function altPrintKeys @pArray, theKeyList, pFullData
>put numtochar(11) into vertTab
>put numtochar(30) into altCr
>put the keys of pArray into theKeys
>sort theKeys numeric
> 
>repeat for each line theKey in theKeys
>put "[" & theKey & "] " after theKeyList
>if theKey is not a number then
>replace theKey with quote & theKey & quote in theKeyList
>end if
>if pArray[theKey] is an array then
>put pArray[theKey] into theTempArray
>put altPrintKeys(theTempArray, theKeyList, pFullData) after theText
>put empty into the last word of theKeyList
>delete the last char of theKeyList
>put cr into the last char of theText
>else
>put "pArray " & the last word of theKeyList into theKeyName
>-- put "put " & theKeyName & " into theValue" into theCommand
>-- do theCommand
>put the value of theKeyName into theValue
>replace tab with vertTab in theValue
>replace return with altCr in theValue
>put theKeyList & tab & theValue & comma after theText
>put empty into the last word of theKeyList
>delete the last char of theKeyList
>end if
>end repeat
> 
>return theText
> end altPrintKeys
> 
> function altKeysToArray theText
>put numtochar(11) into vertTab
>put numtochar(30) into altCr
>repeat for each line theRecord in theText
>repeat for each item theKeyData in theRecord
>put the itemdelimiter into theOldDelim
>set the itemdelimiter to tab
>put item 1 of theKeyData into theKeyList
>put item 2 of theKeyData into theValue
>replace vertTab with tab in theValue
>replace altCr with return in theValue
>set the itemdelimiter to theOldDelim
>put "put " & quote & theValue & quote & " into theArrayA " & 
> theKeylist into theCommand
>do theCommand
>end repeat
>end repeat
> 
>return theArrayA
> end altKeysToArray
> ___
> 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


pointer tool on Macs

2012-01-28 Thread Art DiVito
My program uses many tools. The first time I use the Pointer tool, its icon is 
fine: tail-less arrow with a little plus sign. But then it reverts to the same 
icon as the Browse tool (arrow with tail). It still functions perfectly as the 
Pointer tool, but a user would be very confused. Ironically, this problem does 
not occur on a PC; only on Macs. Any ideas? Thanks. (Also, I could still use 
help making this thing a polished app. I am not a programmer.)
___
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: select after text

2012-01-28 Thread Phil Davis

Wrong - autoHilite doesn't make a difference.

Serge, your script works fine in a simple test stack, so I'm guessing some other 
script is getting in the way. Is that possible?


Phil


On 1/28/12 12:07 AM, Phil Davis wrote:

Is the autoHilite of the field is turned on? That might make a difference.

Phil Davis


On 1/27/12 11:17 PM, Serge Brami wrote:

This script in a focusable and not locked  field :

on openfield
put the long date after me
select after text of me
end openfield


simple but doesn't work : the insertion point is never placed at the end of 
the text ...

any idea ?
___
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





--
Phil Davis

PDS Labs
Professional Software Development
http://pdslabs.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: select after text

2012-01-28 Thread stephen barncard
Mark's script works perfectly, except I changed 'put the long date after me'
to into "put the long date into me" otherwise one gets two entries next
time.

on openField

  send "selectAfterMe" to me in 0 millisecs

end openField


on selectAfterMe

  put the long date into me

  select after text of me

end selectAfterMe


Livecode is so fast on some machines that one needs some delay that send
can provide.



On 28 January 2012 10:56, Phil Davis  wrote:

> Wrong - autoHilite doesn't make a difference.
>
> Serge, your script works fine in a simple test stack, so I'm guessing some
> other script is getting in the way. Is that possible?
>
> Phil
>
>
>
> On 1/28/12 12:07 AM, Phil Davis wrote:
>
>> Is the autoHilite of the field is turned on? That might make a difference.
>>
>> Phil Davis
>>
>>
>> On 1/27/12 11:17 PM, Serge Brami wrote:
>>
>>> This script in a focusable and not locked  field :
>>>
>>> on openfield
>>>put the long date after me
>>>select after text of me
>>> end openfield
>>>
>>>
>>> simple but doesn't work : the insertion point is never placed at the end
>>> of the text ...
>>> any idea ?
>>> __**_
>>> 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
>>>
>>>
>>
> --
> Phil Davis
>
> PDS Labs
> Professional Software Development
> http://pdslabs.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
>



-- 



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: iPad App development needed

2012-01-28 Thread Charles E Buchwald
Hi Todd,
I'm interested.

I'm a long time user of LC and its antecedents, with a small 
consulting/development business.
Lots more here: http://buchwald.ca
... and here: http://ca.linkedin.com/in/charlesbuchwald

I can work by the hour or by project quote. By the hour is usually less 
expensive.

Just curious: why not incorporate the "camera stack" directly into the app, 
instead of making it a separate app?

Cheers,
- Charles

On 2012-01-27, at 3:41 PM, Todd Geist wrote:

> Hello,
> 
> I need a very simple camera app built for the iPad.  I would do it myself,
> but I am just too busy. So I am hopeful I can find somebody who can get
> this thing built for me. This is to serve a small niche market. It will
> serve as a companion app to another product I am already selling.
> 
> Features:
> 
>   1. take a photo
>   2. downsize the photo
>   3. Base64 encode the image
>   4. Send the resulting string to another application through a specific
>   URL protocol
>   5. Needs to be launched from another App, probably using a URL protocol
>   that will need to be defined.
> 
> I am pretty sure that everything except #5 is pretty straightforward.  I
> will need the Livecode project back. I will handle getting built and
> submitted to the app store.
> 
> If this sounds interesting to you, please get in touch with me at
> t...@geistinteractive.com.
> 
> Thank you
> 
> Todd
> 
> -- 
> Todd Geist
> 
> 
> (805) 419-9382
> ___
> 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

--
Charles E. Buchwald
Charles Buchwald & Friends
"Simply better smartphone apps."
http://buchwald.ca

Toll Free US & Canada: 1-866-376-3842
email: char...@buchwald.ca
Skype: charles_buchwald

Vancouver • New York City • Mexico DF

Member of the 02 Global Network for Sustainable Design • Connect on LinkedIn • 
Follow me on Twitter • Read my blog • Connect on Facebook

Please consider the environment before printing this email.




___
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


Questions about screen and stack rectangle

2012-01-28 Thread Pete
I'm in the midst of dealing with adjusting stack sizes to fit within the
user's screen resolution.  I guess I'm looking for confirmation of a few
things since I've made assumptions in the past that turned out to be wrong!

Starting with the screenRect.  Dictionary says the working screenRect takes
account of screen decorations.  On a Mac, looks like that means the system
menu bar at the top of the screen (22 pixels).  It also mentions the dock,
but unless the dock is specified to be permanently visible it only allows 4
pixels for it.  If the dock is always visible, then it does seem to take
that into account.

Next I'm looking at the rectangle of a stack. Once again taking the
dictionary definition, it says a stack's rectangle is relative to the top
and left of the screen.  However, if I create a stack that is the full
height of the screen, with it's top aligned with the bottom of the Mac
system menu bar, the top of the stack  is reported to be 44, whereas the
working screenRect top is 22.  I'm concluding that the stack rectangle is
measured from the bottom of the stack decorations bar.

Finally, I'm wondering how running on a Windows machine affects any of
this.  For example, Windows includes a menu bar at the top of each window
right underneath the decorations bar.  Is the width of that menu bar taken
into account in the stack's rectangle, in addition to the decorations bar?

Thanks for any confirmation/enlightenment!


-- 
Pete
Molly's Revenge 
___
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: Questions about screen and stack rectangle

2012-01-28 Thread Phil Davis

Pete,

Check out the windowBoundingRect - that might help.

Phil


On 1/28/12 1:15 PM, Pete wrote:

I'm in the midst of dealing with adjusting stack sizes to fit within the
user's screen resolution.  I guess I'm looking for confirmation of a few
things since I've made assumptions in the past that turned out to be wrong!

Starting with the screenRect.  Dictionary says the working screenRect takes
account of screen decorations.  On a Mac, looks like that means the system
menu bar at the top of the screen (22 pixels).  It also mentions the dock,
but unless the dock is specified to be permanently visible it only allows 4
pixels for it.  If the dock is always visible, then it does seem to take
that into account.

Next I'm looking at the rectangle of a stack. Once again taking the
dictionary definition, it says a stack's rectangle is relative to the top
and left of the screen.  However, if I create a stack that is the full
height of the screen, with it's top aligned with the bottom of the Mac
system menu bar, the top of the stack  is reported to be 44, whereas the
working screenRect top is 22.  I'm concluding that the stack rectangle is
measured from the bottom of the stack decorations bar.

Finally, I'm wondering how running on a Windows machine affects any of
this.  For example, Windows includes a menu bar at the top of each window
right underneath the decorations bar.  Is the width of that menu bar taken
into account in the stack's rectangle, in addition to the decorations bar?

Thanks for any confirmation/enlightenment!




--
Phil Davis

PDS Labs
Professional Software Development
http://pdslabs.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: iPad App development needed

2012-01-28 Thread Todd Geist
Hi Charles,

The "other" app is not a Live Code app.  Its FileMaker Go.  FileMaker Go is
a version of FileMaker Pro that runs on iOS.  I will contact you back
channel about your offer.

Thanks very much for responding


Todd

On Sat, Jan 28, 2012 at 11:28 AM, Charles E Buchwald wrote:

> Just curious: why not incorporate the "camera stack" directly into the
> app, instead of making it a separate app?




-- 
Todd Geist


(805) 419-9382
___
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: Shade 3D for only $29 on MacZOT

2012-01-28 Thread Lynn Fredricks
Hi all,

If you are looking for a 3D modeller for making content for Franklin 3D for
LiveCode, you may want to check out the weekend offer on MacZOT of Shade
Basic for only $29, regularly $99. This offer ends Sunday night.

Best regards,

Lynn Fredricks
Mirye Software Publishing
http://www.mirye.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