Re: Revisiting Lock Screen

2024-03-28 Thread Craig Newman via use-livecode
Bob.

I have no idea what you are facing with such a basic issue. To be sure, please, 
somewhere in the stack you are having the issue, make a button and a field and 
run this:

on mouseup

lock screen  —comment out for the first run

repeat 3

put random(999) into fld 1

wait 20

end repeat

end mouseup



Do you see the two scenarios above working normally? That is, with the lock 
screen disabled, you see three numbers in succession, and with it enabled, you 
only see the last one?

Craig


> On Mar 28, 2024, at 8:13 AM, Alex Tweedly via use-livecode 
>  wrote:
> 
> Hi Bob,
> 
> I'm not sure from your description how / when you are seeing the (unexpected) 
> changes happening.
> 
> Remember that lockscreen is automatically set to false when there is no 
> handler running, so unlerss you have an intensive handler running, you will 
> see these changes.
> 
> If it's not that - could you describe how you are verifying the effect of 
> lockscreen in more detail. Thanks.
> 
> Alex.
> 
> On 27/03/2024 22:55, Bob Sneidar via use-livecode wrote:
>> Hi all.
>> 
>> I read in the dictionary that Lock Screen does not work in Script Debug 
>> mode. Okay so I turn it off, put the command “Lock Screen” at the entry 
>> point to a selectionChanged handler which goes on to do a number of things 
>> that change the appearance of the screen. The screen is decidedly NOT 
>> LOCKED! The things I go on to do are things like changing the hilitedItems 
>> of a tab widget which in turn shows and hides a number of objects, and also 
>> changes the selection in a number of datagrids. Every action that alters the 
>> screen is visible after I issue the Lock Screen command.
>> 
>> Is Lock Screen completely hosed? Am I missing something??
>> 
>> Bob S
>> 
>> ___
>> 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: Dropping file on an LC standalone...

2024-03-22 Thread Craig Newman via use-livecode
Klaus.

AHA. I did, but did not see past the fact that the “$” keyword took parameters.

Craig

> On Mar 22, 2024, at 8:56 AM, Klaus major-k via use-livecode 
>  wrote:
> 
> Hi Craig,
> 
>> Am 22.03.2024 um 13:44 schrieb Craig Newman via use-livecode 
>> mailto:use-livecode@lists.runrev.com>>:
>> 
>> What on earth is the “1$ special variable”?
> 
> well, 1$ sounds like a good bargain for a "special variable"! :-D
> 
> Actually it is -> $1
> Look up $ in the dictionary for further information.
> 
>> Craig
>> 
>>> On Mar 21, 2024, at 6:58 PM, Bob Sneidar via use-livecode 
>>>  wrote:
>>> 
>>> Wow I just read that and it didn’t even make sense to me!
>>> 
>>> Basically with Windows, dragging a file onto a taskbar icon only adds the 
>>> file to the icon’s Pinned items. Dragging a file onto an open window of an 
>>> App will try and open the file in that app. If the app’s window(s) are 
>>> hidden, dragging and hovering over the app’s shortcut will cause the app to 
>>> show it’s window(s) whereupon you can drop the file onto the open window.
>>> 
>>> Bob S
>>> 
>>> 
>>> On Mar 21, 2024, at 3:46 PM, Bob Sneidar via use-livecode 
>>>  wrote:
>>> 
>>> Does it have to be the icon? If I drag a file onto an app in the Windows 
>>> Tack Bar it does nothing, even if the file belongs to the app I am dragging 
>>> the file onto. If however I HOVER on the icon and the app is running, it 
>>> will bring the app to the front and show the frontmost window if it is 
>>> hidden.
>>> 
>>> If I drag the file onto the open Window, the app will open it. Case in 
>>> point, drag an Excel spreadsheet onto the Excel icon in the task bar. All 
>>> it will do is add a shortcut to the Excel icon for that file. But launch 
>>> Excel, open a blank spreadsheet, then drag an excel file onto the icon, 
>>> hover, then drop onto the blank Excel Spreadsheet. In THIS case it will 
>>> open the spreadsheet in a new window.
>>> 
>>> Because of this you may be able to use a Drag / Drop handler in your card 
>>> script. The caveat is that the card itself will not accept a drag/drop 
>>> action, but if you drag anything on top of an actual object, THEN the card 
>>> will get the message.
>>> 
>>> So to handle this, add an opaque rectangle the size of the card behind 
>>> everything else (if the opacity is set to 99 it will appear transparent for 
>>> all intents and purposes). The rectangle (or any other object on the card 
>>> that doesn’t have a dragDrop handler) will get the message and it will fall 
>>> through to the card where you can handle it.
>>> 
>>> This in my card script:
>>> 
>>> on dragEnter
>>> set the dragAction to "link" -- for files
>>> pass dragEnter
>>> end dragEnter
>>> 
>>> on dragDrop
>>> put the dragData into tDragData
>>> set the dragData to empty
>>> -- do something with tDragData
>>> end dragDrop
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> https://www.major-k.de <https://www.major-k.de/>
> https://www.major-k.de/bass
> kl...@major-k.de <mailto:kl...@major-k.de>
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com <mailto: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: Dropping file on an LC standalone...

2024-03-22 Thread Craig Newman via use-livecode
What on earth is the “1$ special variable”?

Craig

> On Mar 21, 2024, at 6:58 PM, Bob Sneidar via use-livecode 
>  wrote:
> 
> Wow I just read that and it didn’t even make sense to me!
> 
> Basically with Windows, dragging a file onto a taskbar icon only adds the 
> file to the icon’s Pinned items. Dragging a file onto an open window of an 
> App will try and open the file in that app. If the app’s window(s) are 
> hidden, dragging and hovering over the app’s shortcut will cause the app to 
> show it’s window(s) whereupon you can drop the file onto the open window.
> 
> Bob S
> 
> 
> On Mar 21, 2024, at 3:46 PM, Bob Sneidar via use-livecode 
>  wrote:
> 
> Does it have to be the icon? If I drag a file onto an app in the Windows Tack 
> Bar it does nothing, even if the file belongs to the app I am dragging the 
> file onto. If however I HOVER on the icon and the app is running, it will 
> bring the app to the front and show the frontmost window if it is hidden.
> 
> If I drag the file onto the open Window, the app will open it. Case in point, 
> drag an Excel spreadsheet onto the Excel icon in the task bar. All it will do 
> is add a shortcut to the Excel icon for that file. But launch Excel, open a 
> blank spreadsheet, then drag an excel file onto the icon, hover, then drop 
> onto the blank Excel Spreadsheet. In THIS case it will open the spreadsheet 
> in a new window.
> 
> Because of this you may be able to use a Drag / Drop handler in your card 
> script. The caveat is that the card itself will not accept a drag/drop 
> action, but if you drag anything on top of an actual object, THEN the card 
> will get the message.
> 
> So to handle this, add an opaque rectangle the size of the card behind 
> everything else (if the opacity is set to 99 it will appear transparent for 
> all intents and purposes). The rectangle (or any other object on the card 
> that doesn’t have a dragDrop handler) will get the message and it will fall 
> through to the card where you can handle it.
> 
> This in my card script:
> 
> on dragEnter
>  set the dragAction to "link" -- for files
>  pass dragEnter
> end dragEnter
> 
> on dragDrop
>  put the dragData into tDragData
>  set the dragData to empty
>  -- do something with tDragData
> end dragDrop
> 
> ___
> 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: disabled buttons still receive events, they just process them, later?

2024-02-21 Thread Craig Newman via use-livecode
Mike.

In a new stack I placed a button with this:

on mouseUp
  beep 2
end mouseUp

If I click on the button I hear two clicks. I disabled the button and clicked 
on it. I enabled the button. No clicks. I did this all by hand. Did you?

Craig

> On Feb 21, 2024, at 4:07 PM, Mike Kerner via use-livecode 
>  wrote:
> 
> alright, i'm a little surprised to notice this:
> i have a button. i disabled the button.
> then i clicked on the button
> then i re-enabled the button
> the click, from the period while the button was disabled, is received and
> processed by the button.
> that seems problematic, to me. how would one cause clicks to be discarded,
> permanently? hide the button? overlay it with a transparent control that
> will absorb and ignore the clicks?
> 
> -- 
> On the first day, God created the heavens and the Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a few hours,
>   and did a little diving.
> And God said, "This is good."
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
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: Nasty filter bug

2024-01-24 Thread Craig Newman via use-livecode
Brian.

So the inclusion of “[“ would have matched nothing in the original string 
""aaa[bbb””? That is, even though the bracketed string was not “closed” with 
“]”, did it try to find a string that began with “b”, failed, and therefore 
returned the original string untouched?

Craig

> On Jan 24, 2024, at 4:37 PM, Brian Milby via use-livecode 
>  wrote:
> 
> I just want to clarify that this isn’t the regex version of filter but the 
> wildcard pattern version.  It is much less complicated than regex.  Square 
> brackets are used to group characters to be matched so you can use [abc]* to 
> match any item that starts with a, b, or c.  The dictionary entry for this is 
> pretty good.
> 
> Brian Milby
> br...@milby7.com <mailto:br...@milby7.com>
> 
>> On Jan 24, 2024, at 3:35 PM, Craig Newman via use-livecode 
>> mailto:use-livecode@lists.runrev.com>> wrote:
>> 
>> Brian.
>> 
>> The original post tried to filter a string by filtering (without) that 
>> actual string, and was interested in why that did not yield empty. 
>> Intuitively, the result of such a filter operation ought always to be empty. 
>> The presence of the char “[“ is the “culprit”. That is as far as I took it.
>> 
>> Anyway, you state that the char “[“ is a regex special character, which 
>> explains a lot. The other two, “?” and “*” filter without issue, though, and 
>> I guess one has to be a regex user to see why.
>> 
>> I am not.
>> 
>> Craig
>> 
>>> On Jan 24, 2024, at 2:53 PM, Brian Milby via use-livecode 
>>> mailto:use-livecode@lists.runrev.com>> 
>>> wrote:
>>> 
>>> Your test misses the actual issue:
>>> 
>>> on mouseup
>>> local tStr
>>> local tFilter
>>> put "a*b" into tFilter
>>> put "anything bold" into tStr
>>> filter tStr with tFilter
>>> put tStr
>>> end mouseup
>>> 
>>> Will yield "anything bold"
>>> 
>>> while using the following 2 lines:
>>> put "a?b" into tFilter
>>> put "a*b" into tStr
>>> will yield "a*b"
>>> 
>>> Finally, using the following 2 lines:
>>> put "a[?]b" into tFilter
>>> put "a?b" into tStr
>>> will  yield "a?b"
>>> 
>>> The point is that you can end up with issues if you are counting on "*" and
>>> "?" to filter literally.  They don't - they are wildcards and can match
>>> anything (multiple char or single char respectively).  The "[" is also
>>> special.
>>> 
>>> To ensure that your filters work properly if you do not want to use any
>>> wildcards (i.e. match * and ? literally) would require you to change *, ?,
>>> and [ to [*], [?], and [[].
>>> 
>>>> On Wed, Jan 24, 2024 at 1:19 PM Craig Newman via use-livecode <
>>>> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>> 
>>>> wrote:
>>>> 
>>>> OK, instead of working I did this:
>>>> 
>>>> on mouseUp
>>>> 
>>>> repeat with y = 1 to 255
>>>> 
>>>> put "XX" & numToChar(y) & "XX"  into temp
>>>> 
>>>> filter temp without temp
>>>> 
>>>> if temp <> "" then put y & return after accum
>>>> 
>>>> end repeat
>>>> 
>>>> answer accum
>>>> 
>>>> end mouseUp
>>>> 
>>>> There are two characters that prevent the filter command from doing its
>>>> job: ASCII 91 (“[“) and ASCII 10, the return char.
>>>> 
>>>> 
>>>> 
>>>> Craig
>>>> 
>>>> 
>>>>> On Jan 24, 2024, at 12:51 PM, Craig Newman via use-livecode <
>>>> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>> 
>>>> wrote:
>>>>> 
>>>>> Brian.
>>>>> 
>>>>> Nope. Those two chars pass through the filter, er, filtered.
>>>>> 
>>>>> Again, I did not test the entire character set.
>>>>> 
>>>>> Craig
>>>>> 
>>>>>> On Jan 24, 2024, at 11:05 AM, Brian Milby via use-livecode <
>>>> use-livecode@lists.runrev.com> wrote:
>>>>>> 
>>>>>> The only other two that would cause issues are ? and * which are single
>>>> 

Re: Nasty filter bug

2024-01-24 Thread Craig Newman via use-livecode
Brian.

The original post tried to filter a string by filtering (without) that actual 
string, and was interested in why that did not yield empty. Intuitively, the 
result of such a filter operation ought always to be empty. The presence of the 
char “[“ is the “culprit”. That is as far as I took it.

Anyway, you state that the char “[“ is a regex special character, which 
explains a lot. The other two, “?” and “*” filter without issue, though, and I 
guess one has to be a regex user to see why.

I am not.

Craig

> On Jan 24, 2024, at 2:53 PM, Brian Milby via use-livecode 
>  wrote:
> 
> Your test misses the actual issue:
> 
> on mouseup
>   local tStr
>   local tFilter
>   put "a*b" into tFilter
>   put "anything bold" into tStr
>   filter tStr with tFilter
>   put tStr
> end mouseup
> 
> Will yield "anything bold"
> 
> while using the following 2 lines:
>   put "a?b" into tFilter
>   put "a*b" into tStr
> will yield "a*b"
> 
> Finally, using the following 2 lines:
>   put "a[?]b" into tFilter
>   put "a?b" into tStr
> will  yield "a?b"
> 
> The point is that you can end up with issues if you are counting on "*" and
> "?" to filter literally.  They don't - they are wildcards and can match
> anything (multiple char or single char respectively).  The "[" is also
> special.
> 
> To ensure that your filters work properly if you do not want to use any
> wildcards (i.e. match * and ? literally) would require you to change *, ?,
> and [ to [*], [?], and [[].
> 
> On Wed, Jan 24, 2024 at 1:19 PM Craig Newman via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> OK, instead of working I did this:
>> 
>> on mouseUp
>> 
>> repeat with y = 1 to 255
>> 
>> put "XX" & numToChar(y) & "XX"  into temp
>> 
>> filter temp without temp
>> 
>> if temp <> "" then put y & return after accum
>> 
>> end repeat
>> 
>> answer accum
>> 
>> end mouseUp
>> 
>> There are two characters that prevent the filter command from doing its
>> job: ASCII 91 (“[“) and ASCII 10, the return char.
>> 
>> 
>> 
>> Craig
>> 
>> 
>>> On Jan 24, 2024, at 12:51 PM, Craig Newman via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>> 
>>> Brian.
>>> 
>>> Nope. Those two chars pass through the filter, er, filtered.
>>> 
>>> Again, I did not test the entire character set.
>>> 
>>> Craig
>>> 
>>>> On Jan 24, 2024, at 11:05 AM, Brian Milby via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>>> 
>>>> The only other two that would cause issues are ? and * which are single
>> and multiple char wildcards respectively.
>>>> 
>>>> Brian Milby
>>>> br...@milby7.com
>>>> 
>>>>> On Jan 24, 2024, at 10:21 AM, Craig Newman via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>>>> 
>>>>> I did not test the ASCII set exhaustively, but the culprit is the
>> char “[“ (ASCII 91). Any other char (including “]”) in the string works
>> correctly, that is, nothing is left after the filter command executes.
>>>>> 
>>>>> I do not know enough to say whether that particular char  does
>> something to the filter command, which may use regex somehow in its inner
>> workings.
>>>>> 
>>>>> Craig
>>>>> 
>>>>> Craig
>>>>> 
>>>>>> On Jan 23, 2024, at 9:45 PM, Brian Milby via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>>>>> 
>>>>>> Not sure this is really a bug.  The default is to match a
>> wildcardPattern.  If you want to match [ then you must use [[] in the
>> pattern.
>>>>>> 
>>>>>> Brian Milby
>>>>>> br...@milby7.com
>>>>>> 
>>>>>>>> On Jan 23, 2024, at 9:02 PM, Neville Smythe via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>>>>>> 
>>>>>>> Try this in the msg box:
>>>>>>> 
>>>>>>> put "aaa[bbb" into tStr; put line 1 of tStr into tLine; filter tStr
>> without tLine; put tStr
>>>>>>> I get (using MacOS, LC 9.6.11)
>>>>>>> 
>>>>>>> aaa[bbb
>>>>

Re: Nasty filter bug

2024-01-24 Thread Craig Newman via use-livecode
OK, instead of working I did this:

on mouseUp

repeat with y = 1 to 255

put "XX" & numToChar(y) & "XX"  into temp

filter temp without temp

if temp <> "" then put y & return after accum

end repeat

answer accum

end mouseUp

There are two characters that prevent the filter command from doing its job: 
ASCII 91 (“[“) and ASCII 10, the return char.



Craig


> On Jan 24, 2024, at 12:51 PM, Craig Newman via use-livecode 
>  wrote:
> 
> Brian.
> 
> Nope. Those two chars pass through the filter, er, filtered.
> 
> Again, I did not test the entire character set.
> 
> Craig
> 
>> On Jan 24, 2024, at 11:05 AM, Brian Milby via use-livecode 
>>  wrote:
>> 
>> The only other two that would cause issues are ? and * which are single and 
>> multiple char wildcards respectively.
>> 
>> Brian Milby
>> br...@milby7.com
>> 
>>> On Jan 24, 2024, at 10:21 AM, Craig Newman via use-livecode 
>>>  wrote:
>>> 
>>> I did not test the ASCII set exhaustively, but the culprit is the char “[“ 
>>> (ASCII 91). Any other char (including “]”) in the string works correctly, 
>>> that is, nothing is left after the filter command executes.
>>> 
>>> I do not know enough to say whether that particular char  does something to 
>>> the filter command, which may use regex somehow in its inner workings.
>>> 
>>> Craig
>>> 
>>> Craig
>>> 
>>>> On Jan 23, 2024, at 9:45 PM, Brian Milby via use-livecode 
>>>>  wrote:
>>>> 
>>>> Not sure this is really a bug.  The default is to match a wildcardPattern. 
>>>>  If you want to match [ then you must use [[] in the pattern.
>>>> 
>>>> Brian Milby
>>>> br...@milby7.com
>>>> 
>>>>>> On Jan 23, 2024, at 9:02 PM, Neville Smythe via use-livecode 
>>>>>>  wrote:
>>>>> 
>>>>> Try this in the msg box:
>>>>> 
>>>>> put "aaa[bbb" into tStr; put line 1 of tStr into tLine; filter tStr 
>>>>> without tLine; put tStr
>>>>> I get (using MacOS, LC 9.6.11)
>>>>> 
>>>>> aaa[bbb
>>>>> 
>>>>> That is to say, the line is not filtered out.
>>>>> 
>>>>> And:
>>>>> 
>>>>> put "aaa[bbb" into tStr; filter tStr with tStr; put tStr
>>>>> 
>>>>> produces an empty string instead of the original string.
>>>>> 
>>>>> The bug occurs if the line contains the character “[“ anywhere; any lines 
>>>>> containing that character are ignored by both filter with and filter 
>>>>> without.
>>>>> 
>>>>> This is really serious, because I rely on the filter command a lot, as I 
>>>>> would think do many other developers!
>>>>> 
>>>>> Don’t know if it occurs with other characters, but I have never seen it 
>>>>> before. I discovered it when filtering lines with regular expressions. 
>>>>> Other special regexp characters I have tested do not trigger the bug.
>>>>> 
>>>>> Neville Smythe
>>>>> 
>>>>> 
>>>>> 
>>>>> ___
>>>>> 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
> 
> 
> ___
> 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: Nasty filter bug

2024-01-24 Thread Craig Newman via use-livecode
Brian.

Nope. Those two chars pass through the filter, er, filtered.

Again, I did not test the entire character set.

Craig

> On Jan 24, 2024, at 11:05 AM, Brian Milby via use-livecode 
>  wrote:
> 
> The only other two that would cause issues are ? and * which are single and 
> multiple char wildcards respectively.
> 
> Brian Milby
> br...@milby7.com
> 
>> On Jan 24, 2024, at 10:21 AM, Craig Newman via use-livecode 
>>  wrote:
>> 
>> I did not test the ASCII set exhaustively, but the culprit is the char “[“ 
>> (ASCII 91). Any other char (including “]”) in the string works correctly, 
>> that is, nothing is left after the filter command executes.
>> 
>> I do not know enough to say whether that particular char  does something to 
>> the filter command, which may use regex somehow in its inner workings.
>> 
>> Craig
>> 
>> Craig
>> 
>>> On Jan 23, 2024, at 9:45 PM, Brian Milby via use-livecode 
>>>  wrote:
>>> 
>>> Not sure this is really a bug.  The default is to match a wildcardPattern.  
>>> If you want to match [ then you must use [[] in the pattern.
>>> 
>>> Brian Milby
>>> br...@milby7.com
>>> 
>>>>> On Jan 23, 2024, at 9:02 PM, Neville Smythe via use-livecode 
>>>>>  wrote:
>>>> 
>>>> Try this in the msg box:
>>>> 
>>>> put "aaa[bbb" into tStr; put line 1 of tStr into tLine; filter tStr 
>>>> without tLine; put tStr
>>>> I get (using MacOS, LC 9.6.11)
>>>> 
>>>> aaa[bbb
>>>> 
>>>> That is to say, the line is not filtered out.
>>>> 
>>>> And:
>>>> 
>>>> put "aaa[bbb" into tStr; filter tStr with tStr; put tStr
>>>> 
>>>> produces an empty string instead of the original string.
>>>> 
>>>> The bug occurs if the line contains the character “[“ anywhere; any lines 
>>>> containing that character are ignored by both filter with and filter 
>>>> without.
>>>> 
>>>> This is really serious, because I rely on the filter command a lot, as I 
>>>> would think do many other developers!
>>>> 
>>>> Don’t know if it occurs with other characters, but I have never seen it 
>>>> before. I discovered it when filtering lines with regular expressions. 
>>>> Other special regexp characters I have tested do not trigger the bug.
>>>> 
>>>> Neville Smythe
>>>> 
>>>> 
>>>> 
>>>> ___
>>>> 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


___
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: Nasty filter bug

2024-01-24 Thread Craig Newman via use-livecode
I did not test the ASCII set exhaustively, but the culprit is the char “[“ 
(ASCII 91). Any other char (including “]”) in the string works correctly, that 
is, nothing is left after the filter command executes.

I do not know enough to say whether that particular char  does something to the 
filter command, which may use regex somehow in its inner workings.

Craig

Craig

> On Jan 23, 2024, at 9:45 PM, Brian Milby via use-livecode 
>  wrote:
> 
> Not sure this is really a bug.  The default is to match a wildcardPattern.  
> If you want to match [ then you must use [[] in the pattern.
> 
> Brian Milby
> br...@milby7.com
> 
>> On Jan 23, 2024, at 9:02 PM, Neville Smythe via use-livecode 
>>  wrote:
>> 
>> Try this in the msg box:
>> 
>> put "aaa[bbb" into tStr; put line 1 of tStr into tLine; filter tStr without 
>> tLine; put tStr
>> I get (using MacOS, LC 9.6.11)
>> 
>> aaa[bbb
>> 
>> That is to say, the line is not filtered out.
>> 
>> And:
>> 
>> put "aaa[bbb" into tStr; filter tStr with tStr; put tStr
>> 
>> produces an empty string instead of the original string.
>> 
>> The bug occurs if the line contains the character “[“ anywhere; any lines 
>> containing that character are ignored by both filter with and filter without.
>> 
>> This is really serious, because I rely on the filter command a lot, as I 
>> would think do many other developers!
>> 
>> Don’t know if it occurs with other characters, but I have never seen it 
>> before. I discovered it when filtering lines with regular expressions. Other 
>> special regexp characters I have tested do not trigger the bug.
>> 
>> Neville Smythe
>> 
>> 
>> 
>> ___
>> 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: LockLoc and grab

2024-01-23 Thread Craig Newman via use-livecode
Aha.

I did not see that you meant a single button in its own group. But it would not 
matter if I did the same with a control within a larger group of controls. And 
it does not matter if the lockLoc of the group is set or not.

So is your question “Why does the control disappear when it is dragged outside 
the group rect?” In other words, "why does it not just keep going in full view?”

I am not sure, but maybe being outside its group means it is nowhere at all?

Craig



> On Jan 22, 2024, at 8:02 PM, David Epstein via use-livecode 
>  wrote:
> 
> A group with lockLoc set to false does not resize itself when an object in it 
> is moved by a “grab” command.  Is this a bug?  Is there a simple workaround?
> 
> Recipe using 10.0.0 dp6 on an intel Mac:  
> 
> Create a button with this script:  
> on mouseDown; grab me; end mouseDown.  
> Group the button.  Confirm that the group’s lockLoc property is false.  Then 
> with the browse tool, drag the button past the edge of the group.  The button 
> disappears.
> 
> David Epstein
> ___
> 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: LockLoc and grab

2024-01-23 Thread Craig Newman via use-livecode
David.

I could not understand your issue, so I made the controls you mentioned. The 
thing that matters is not the lockLoc property, but rather the “opaque” 
property.

A group of controls is just a, er, group of controls. The “group” itself can, 
however, take on a life of its own if, as in this exercise, something like the 
opaque property is set. In that case, dragging a control with a lower layer 
number will disappear behind the group rect, regardless of whether or not there 
is a child control in front.

Am I getting your problem at all?

Craig 

> On Jan 22, 2024, at 8:02 PM, David Epstein via use-livecode 
>  wrote:
> 
> A group with lockLoc set to false does not resize itself when an object in it 
> is moved by a “grab” command.  Is this a bug?  Is there a simple workaround?
> 
> Recipe using 10.0.0 dp6 on an intel Mac:  
> 
> Create a button with this script:  
> on mouseDown; grab me; end mouseDown.  
> Group the button.  Confirm that the group’s lockLoc property is false.  Then 
> with the browse tool, drag the button past the edge of the group.  The button 
> disappears.
> 
> David Epstein
> ___
> 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: Anyone ever put a token into the Apple Wallet and Play (Android) wallet?

2023-12-22 Thread Craig Newman via use-livecode
Could not help myself from being unhelpful.

I am positive LC can do this, whatever you meant.

Craig

> On Dec 22, 2023, at 10:43 AM, Mark Rauterkus via use-livecode 
>  wrote:
> 
> Hi,
> 
> Wondering if there is a way to make a LiveCode app that can then generate a
> membership card thingie / ticket for inclusion into the wallet of mobile
> devices.
> 
> ???
> 
> We need an affordable way to make an ID card. Needs to expire. Verification
> doesn't need to be so iron-clad nor block-chain enabled.
> 
> Similar commercial app:
> https://cuseum.com/
> 
> https://passkit.com/
> https://help.passkit.com/
> 
> Might be more universal to have the membership card in your Apple Wallet or
> Google thing on your Android phone.
> 
> They charge pennies per card. Then hook it to a backend database.
> 
> Wondering if this could be done with LiveCode too?
> ___
> 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: Application disappears unexpectedly (goes into background)

2023-12-22 Thread Craig Newman via use-livecode
Bob.

Certainly, and I suppose that would be the place where Jacque's proposed “hide” 
commands might, er, hide.

Craig

> On Dec 22, 2023, at 11:30 AM, Bob Sneidar via use-livecode 
>  wrote:
> 
> Well, resumeStack would trigger, wouldn’t it? 
> 
> Bob S
> 
> 
>> On Dec 22, 2023, at 5:55 AM, Craig Newman via use-livecode 
>>  wrote:
>> 
>> Clicking on a titlebar sends no messages to LC, only to the OS, essentially 
>> saying “bring me to the front”.
>> 
>> The fact that all the card windows reappear when you do that seems very odd 
>> to me. If I hide a stack and then go somewhere else on my computer, that 
>> stack does not reappear just because I brought LC back to the front. Hidden 
>> stacks stay hidden until explicitly made visible, as they should.
>> 
>> Jacque’s  suggestion seems reasonable, but it seems like a long shot.
>> 
>> Have you tried restarting?
>> 
>> Can’t wait to hear how this (hopefully) resolves.
>> 
>> Craig
>> 
>>> On Dec 22, 2023, at 1:45 AM, J. Landman Gay via use-livecode 
>>>  wrote:
>>> 
>>> Have you done a global search for the word "hide" in the scripts?
>>> 
>>> --
>>> Jacqueline Landman Gay | jac...@hyperactivesw.com
>>> HyperActive Software | http://www.hyperactivesw.com
>>> On December 21, 2023 7:55:47 PM Alan Stenhouse via use-livecode 
>>>  wrote:
>>> 
>>>> I've got a MacOS LC standalone that opens a stackfile external to the 
>>>> application. Whenever I click inside one of the stack windows which 
>>>> doesn't have current focus, all the stack windows disappear and reappear 
>>>> only when I switch to another application and back again. Activating a 
>>>> stack window by clicking on the window title bar works normally (i.e. does 
>>>> not disappear).
>>>> 
>>>> Has anyone else seen this at all? Any suggestions for tracking possible 
>>>> causes?
>>>> 
>>>> MacOS Ventura
>>>> Laptop M1
>>>> LC 10 dp... and LC9.11
>>>> 
>>>> 
>>>> Thanks a lot for any pointers!
>>>> 
>>>> cheers
>>>> Alan
>>>> ___
>>>> use-livecode mailing list
>>>> use-livecode@lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your 
>>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>>> 
>>> 
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> ___
>> 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: Application disappears unexpectedly (goes into background)

2023-12-22 Thread Craig Newman via use-livecode
Clicking on a titlebar sends no messages to LC, only to the OS, essentially 
saying “bring me to the front”.

The fact that all the card windows reappear when you do that seems very odd to 
me. If I hide a stack and then go somewhere else on my computer, that stack 
does not reappear just because I brought LC back to the front. Hidden stacks 
stay hidden until explicitly made visible, as they should.

Jacque’s  suggestion seems reasonable, but it seems like a long shot.

Have you tried restarting?

Can’t wait to hear how this (hopefully) resolves.

Craig

> On Dec 22, 2023, at 1:45 AM, J. Landman Gay via use-livecode 
>  wrote:
> 
> Have you done a global search for the word "hide" in the scripts?
> 
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
> On December 21, 2023 7:55:47 PM Alan Stenhouse via use-livecode 
>  wrote:
> 
>> I've got a MacOS LC standalone that opens a stackfile external to the 
>> application. Whenever I click inside one of the stack windows which doesn't 
>> have current focus, all the stack windows disappear and reappear only when I 
>> switch to another application and back again. Activating a stack window by 
>> clicking on the window title bar works normally (i.e. does not disappear).
>> 
>> Has anyone else seen this at all? Any suggestions for tracking possible 
>> causes?
>> 
>> MacOS Ventura
>> Laptop M1
>> LC 10 dp... and LC9.11
>> 
>> 
>> Thanks a lot for any pointers!
>> 
>> cheers
>> Alan
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
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: Which is faster...

2023-12-15 Thread Craig Newman via use-livecode
This is why LCMark gets the big bucks.

Craig

> On Dec 15, 2023, at 10:00 AM, Mark Waddingham via use-livecode 
>  wrote:
> 
> On 2023-12-14 21:22, Paul Dupuis via use-livecode wrote:
>> Which is faster or more efficient (from an engine performance perspective)?
>> To retrieve an array from a property?
>> As in:
>> command someHandler -- in an objects script
>>   get the cMyArray from me -- cMyArray is some multi-dimensional array
>>   ...
>> end someHandler
>> OR
>> To retrieve an array from a script local variable?
>> As in:
>> local sMyArray -- script local variable in some objects script
>> command someHandler -- in an objects script
>>   get sMyArray
>>   ...
>> end someHandler
>> Anyone know?
> 
> Fetching a value directly from a variable will always be faster than any 
> other method - as it essentially reduces to fetching or storing a value from 
> a (integer indexed) table.
> 
> In contrast, fetching a custom property will require a message send unless 
> lock messages is set, and then an array lookup (to actually get the 
> property's value).
> 
> Custom property sets are stored using the same data structure internally as 
> livecode arrays so getting `the cMyArray of me` eventually reduces to the 
> same as objectsCurrentPropertySet["cMyArray"] - the latter lookup is more 
> work than just fetching a value from an internal table.
> 
> UPSHOT:
> 
> Fetching a value directly from a variable is a constant time operation.
> 
> If lock messages is false, then the time it takes to fetch a custom property 
> value will be somewhat proportional to the length of the message path from 
> the point of view of the object you are accessing - i.e. how many 
> frontscripts, backscripts, stacks in use, and parent objects/behaviors the 
> object has.
> 
> If lock messages is true, then the time it takes to fetch a custom property 
> value will be pretty much the same as doing an LC array key lookup.
> 
> Now whether or not this actually matters in any one case will largely depend 
> on how often such access is being done - if its a few times in the context of 
> UI-related code then it probably won't be appreciable; if, however, you are 
> fetching a custom property 10's of times in a tight loop and the rest of 
> the loop is only doing small amounts of work, you'll definitely notice a 
> difference.
> 
> SIMPLE BENCHMARK:
> 
> ```
> 
> on mouseUp
> local sMyArray
> 
> on mouseUp
>   set the cMyArray of me to [ 1, 2, 3 ]
>   put empty
> 
>   local tTime
>   put the milliseconds into tTime
>   repeat 100 times
>  get the cMyArray of me
>   end repeat
>   put "CUSTOM PROP:" && the milliseconds - tTime & return after msg
> 
>   put the milliseconds into tTime
>   lock messages
>   repeat 100 times
>  get the cMyArray of me
>   end repeat
>   unlock messages
>   put "CUSTOM PROP (LOCKED OUTSIDE):" && the milliseconds - tTime & return 
> after msg
> 
>   put the milliseconds into tTime
>   repeat 100 times
>  lock messages
>  get the cMyArray of me
>  unlock messages
>   end repeat
>   put "CUSTOM PROP (LOCKED INSIDE):" && the milliseconds - tTime & return 
> after msg
> 
>   local tMyProps
>   put [ 1, 2, 3 ] into tMyProps["cMyArray"]
>   put the milliseconds into tTime
>   repeat 100 times
>  get sMyArray["cMyArray"]
>   end repeat
>   put "ARRAY ELEMENT:" && the milliseconds - tTime & return after msg
> 
>   put the milliseconds into tTime
>   lock messages
>   repeat 100 times
>  get sMyArray
>   end repeat
>   unlock messages
>   put "SCRIPT LOCAL:" && the milliseconds - tTime & return after msg
> end mouseUp
> end mouseUp
> ```
> 
> RESULTS (1 million iterations):
> 
> CUSTOM PROP: 2006
> CUSTOM PROP (LOCKED OUTSIDE): 116
> CUSTOM PROP (LOCKED INSIDE): 125
> ARRAY ELEMENT: 80
> SCRIPT LOCAL: 38
> 
> ANALYSIS:
> 
> The above results are run in the IDE which is important to mention because 
> the message path in the IDE is typically longer than that in standalones (as 
> the all extension libraries are loaded, and the IDE inserts its own 
> front/back/stacks into the message path).
> 
> Accessing custom properties with messages locked is nearly 10x faster than 
> without (again that multiplier will be vary with the length of the message 
> path).
> 
> Using lock/unlock messages for every custom property access has a (quite 
> negligible) 10% overhead - and the message path overhead (in the IDE) is 
> about 40% of the total (the array element fetch will be the rest).
> 
> Accessing a script local is
>  - about 50x faster than accessing a custom property when messages are sent
>  - about 3x faster than accessing a custom property when messages are not sent
>  - about 2x faster than accessing an array element
> 
> Just to reiterate - these figures are for 1,000,000 accesses done in a tight 
> loop (in the IDE). If you do it for (say) 1000 iterations then the 
> differences are within the margin of error of measuring a millisecond.
> 
> Overall, my suggestion 

Re: Which is faster...

2023-12-15 Thread Craig Newman via use-livecode
OK, I see what you mean.

I set a custom property of the card to the array I used earlier. It takes 
almost no time at all to put the contents of that property into a variable. It 
is not relevant whether it is a script local variable or not.

Bottom line, I do not think it makes any difference whether one uses a custom 
property or a variable to hold data in terms of the speed in which that data is 
retrieved.

Craig

> On Dec 14, 2023, at 7:33 PM, Bob Sneidar via use-livecode 
>  wrote:
> 
> That is not exactly the test he was looking for. He wants to compare 
> retrieving an array from a script local variable vs. getting a property of an 
> object like a stack, that contains the same array. At least I think that is 
> the question. 
> 
> Now I’d like to discuss virtual properties. It takes the form: 
> 
> Local lValueA
> 
> setProp myVirtualProperty, pValueA
>   Put pValueA into lValueA
> End setProp
> 
> The reason this is really handy is because if pValueA is an array, you can 
> then use the form: 
> 
> getProp myVirtualProperty [pKey]
>   If pKey is not empty then 
>  Return lValueA [pKey]
>   Else
>  Return tValueA
> End getProp
> 
> In other words, you can get elements of the array without getting the entire 
> array itself i.e.:
> 
> Put the myVirtualProperty [“companyname”] of myLivecodeObject into 
> tCompanyName
> 
> I use this quite extensively. I have a single card which contains all the 
> currently queried database data for caching purposes, along with the 
> currently selected indexes for each datagrid, and the currently selected 
> primary keys. I call the getProp and setProp handlers maingriddata. So I can:
> 
> Get the maingriddata [“hilitedkeys”] of tMainCard
> Get the maingriddata [“hilitedindexes”] of tMainCard
> Get the maingriddata [“customers”]
> Put the queriedCustomersA into tMainGridDataA
> Set the maingriddata to tMainGridDataA
> 
> And so forth. Any kind of logic can be used in the getProp and setProp 
> handlers. 
> 
> Bob S
> 
>> On Dec 14, 2023, at 2:25 PM, Craig Newman via use-livecode 
>>  wrote:
>> 
>> Anything to distract me from my day job.
>> 
>> An array with 100,000 elements and a variable with 100,00 lines take the 
>> same time to place into a field.
>> 
>> The only time that took a while was building them. Each took 10 milliseconds.
>> 
>> Craig
>> 
>>> On Dec 14, 2023, at 4:55 PM, Paul Dupuis via use-livecode 
>>>  wrote:
>>> 
>>> Bob,
>>> 
>>> Thank you. I could script a timing test but sometime just asking the list 
>>> or forums is easier. You asnwered well before I would have had the time to 
>>> write a basic test script. Thanks!
>>> 
>>> 
>>> On 12/14/2023 4:45 PM, Bob Sneidar via use-livecode wrote:
>>>> I think the confusion comes from thinking so much of a stack as an object 
>>>> that has substance, when really all the properties are places in memory 
>>>> just like a memory variable is. I asked this some years back and the 
>>>> answer I got was that there is no appreciable difference.
>>>> 
>>>> One could always devise a test though…
>>>> 
>>>> Bob S
>>>> 
>>>> 
>>>> On Dec 14, 2023, at 1:22 PM, Paul Dupuis via use-livecode 
>>>>  wrote:
>>>> 
>>>> Which is faster or more efficient (from an engine performance perspective)?
>>>> 
>>>> To retrieve an array from a property?
>>>> As in:
>>>> command someHandler -- in an objects script
>>>> get the cMyArray from me -- cMyArray is some multi-dimensional array
>>>> ...
>>>> end someHandler
>>>> 
>>>> OR
>>>> 
>>>> To retrieve an array from a script local variable?
>>>> As in:
>>>> local sMyArray -- script local variable in some objects script
>>>> 
>>>> command someHandler -- in an objects script
>>>> get sMyArray
>>>> ...
>>>> end someHandler
>>>> 
>>>> Anyone know?
>>>> 
>>>> ___
>>>> 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@l

Re: Which is faster...

2023-12-14 Thread Craig Newman via use-livecode
Laziness in the last post.

BOTH took 10 mS to fill an ordinary variable.

Craig

> On Dec 14, 2023, at 5:32 PM, Craig Newman  wrote:
> 
> Typo in the last post. BOTH had 100,000 elements or lines.
> 
> Craig
> 
>> On Dec 14, 2023, at 5:25 PM, Craig Newman  wrote:
>> 
>> Anything to distract me from my day job.
>> 
>> An array with 100,000 elements and a variable with 100,00 lines take the 
>> same time to place into a field.
>> 
>> The only time that took a while was building them. Each took 10 milliseconds.
>> 
>> Craig
>> 
>>> On Dec 14, 2023, at 4:55 PM, Paul Dupuis via use-livecode 
>>>  wrote:
>>> 
>>> Bob,
>>> 
>>> Thank you. I could script a timing test but sometime just asking the list 
>>> or forums is easier. You asnwered well before I would have had the time to 
>>> write a basic test script. Thanks!
>>> 
>>> 
>>> On 12/14/2023 4:45 PM, Bob Sneidar via use-livecode wrote:
 I think the confusion comes from thinking so much of a stack as an object 
 that has substance, when really all the properties are places in memory 
 just like a memory variable is. I asked this some years back and the 
 answer I got was that there is no appreciable difference.
 
 One could always devise a test though…
 
 Bob S
 
 
 On Dec 14, 2023, at 1:22 PM, Paul Dupuis via use-livecode 
  wrote:
 
 Which is faster or more efficient (from an engine performance perspective)?
 
 To retrieve an array from a property?
 As in:
 command someHandler -- in an objects script
 get the cMyArray from me -- cMyArray is some multi-dimensional array
 ...
 end someHandler
 
 OR
 
 To retrieve an array from a script local variable?
 As in:
 local sMyArray -- script local variable in some objects script
 
 command someHandler -- in an objects script
 get sMyArray
 ...
 end someHandler
 
 Anyone know?
 
 ___
 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: Which is faster...

2023-12-14 Thread Craig Newman via use-livecode
Typo in the last post. BOTH had 100,000 elements or lines.

Craig

> On Dec 14, 2023, at 5:25 PM, Craig Newman  wrote:
> 
> Anything to distract me from my day job.
> 
> An array with 100,000 elements and a variable with 100,00 lines take the same 
> time to place into a field.
> 
> The only time that took a while was building them. Each took 10 milliseconds.
> 
> Craig
> 
>> On Dec 14, 2023, at 4:55 PM, Paul Dupuis via use-livecode 
>>  wrote:
>> 
>> Bob,
>> 
>> Thank you. I could script a timing test but sometime just asking the list or 
>> forums is easier. You asnwered well before I would have had the time to 
>> write a basic test script. Thanks!
>> 
>> 
>> On 12/14/2023 4:45 PM, Bob Sneidar via use-livecode wrote:
>>> I think the confusion comes from thinking so much of a stack as an object 
>>> that has substance, when really all the properties are places in memory 
>>> just like a memory variable is. I asked this some years back and the answer 
>>> I got was that there is no appreciable difference.
>>> 
>>> One could always devise a test though…
>>> 
>>> Bob S
>>> 
>>> 
>>> On Dec 14, 2023, at 1:22 PM, Paul Dupuis via use-livecode 
>>>  wrote:
>>> 
>>> Which is faster or more efficient (from an engine performance perspective)?
>>> 
>>> To retrieve an array from a property?
>>> As in:
>>> command someHandler -- in an objects script
>>>  get the cMyArray from me -- cMyArray is some multi-dimensional array
>>>  ...
>>> end someHandler
>>> 
>>> OR
>>> 
>>> To retrieve an array from a script local variable?
>>> As in:
>>> local sMyArray -- script local variable in some objects script
>>> 
>>> command someHandler -- in an objects script
>>>  get sMyArray
>>>  ...
>>> end someHandler
>>> 
>>> Anyone know?
>>> 
>>> ___
>>> 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: Which is faster...

2023-12-14 Thread Craig Newman via use-livecode
Anything to distract me from my day job.

An array with 100,000 elements and a variable with 100,00 lines take the same 
time to place into a field.

The only time that took a while was building them. Each took 10 milliseconds.

Craig

> On Dec 14, 2023, at 4:55 PM, Paul Dupuis via use-livecode 
>  wrote:
> 
> Bob,
> 
> Thank you. I could script a timing test but sometime just asking the list or 
> forums is easier. You asnwered well before I would have had the time to write 
> a basic test script. Thanks!
> 
> 
> On 12/14/2023 4:45 PM, Bob Sneidar via use-livecode wrote:
>> I think the confusion comes from thinking so much of a stack as an object 
>> that has substance, when really all the properties are places in memory just 
>> like a memory variable is. I asked this some years back and the answer I got 
>> was that there is no appreciable difference.
>> 
>> One could always devise a test though…
>> 
>> Bob S
>> 
>> 
>> On Dec 14, 2023, at 1:22 PM, Paul Dupuis via use-livecode 
>>  wrote:
>> 
>> Which is faster or more efficient (from an engine performance perspective)?
>> 
>> To retrieve an array from a property?
>> As in:
>> command someHandler -- in an objects script
>>   get the cMyArray from me -- cMyArray is some multi-dimensional array
>>   ...
>> end someHandler
>> 
>> OR
>> 
>> To retrieve an array from a script local variable?
>> As in:
>> local sMyArray -- script local variable in some objects script
>> 
>> command someHandler -- in an objects script
>>   get sMyArray
>>   ...
>> end someHandler
>> 
>> Anyone know?
>> 
>> ___
>> 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: greying out columns in a dataGrid

2023-12-01 Thread Craig Newman via use-livecode
Zyrip.

Almost, and very good, since I do not understand DG’s at all.

I changed your offering to:


on mouseUp

dispatch "DG_ColorColumn" to grp "datagrid 1" with "col 2", "211,211,211"

—srcCopy  —no such command

end mouseUp


on DG_ColorColumn pColName, pColor, yellow

   set the opaque of grp pColName of me to (pColor is not empty)

   set the backcolor of grp pColName of me to pColor

   set the ink of grp 1 of me to blendSrcIn

end DG_ColorColumn



Craig




> On Nov 30, 2023, at 7:46 PM, zryip theSlug via use-livecode 
>  wrote:
> 
> Hi Hershel,
> 
> A possible solution consists to add this handler in the datagrid group
> script:
> 
> *command* DG_ColorColumn pColName, pColor, pInk
> *  set* the opaque of grp pColName of me to (pColor is not empty)
>  set the backcolor of grp pColName of me to pColor
>  set the ink of grp pColName of me to pInk
> *end* DG_ColorColumn
> 
> Then, call this handler that way:
> 
> *on* mouseUp
>  dispatch "DG_ColorColumn" to grp "datagrid 1" with "col 2", "211,211,211",
> "srcCopy"
> *end* mouseUp
> 
> 
> Best Regards,
> 
> On Thu, 30 Nov 2023 at 22:49, Paul Dupuis via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> On 11/30/2023 4:41 PM, Hershel F via use-livecode wrote:
>>> sorry my mistake. does not have to be greyed out should be a gray color.
>>> or to rephrase the question properly, how the change the color to gray?
>> 
>> Ah! I am pretty sure it can be done, but I do not know how to do it
>> exactly. By guess is that you will probably need to edit the row
>> template to add a "grey" background behind the columns your may want to
>> grey and then for those columns in the Property inspector, create a
>> custom column behavior to show or hide that grey background graphic
>> based on whatever calculation your want.
>> 
>> That is a guess though.
>> ___
>> 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
>> 
> 
> 
> -- 
> Zryip TheSlug
> http://www.aslugontheroad.com
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

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


Re: resizeControl wishes...

2023-11-30 Thread Craig Newman via use-livecode
Paul.

“reSizeControl” is a message. What I mean by that is if you are already running 
under script control, why do you need to send such a message at all? Can’t your 
handler do whatever you needed to if the user did the actual resize action?

Craig

> On Nov 30, 2023, at 11:05 AM, Paul Dupuis via use-livecode 
>  wrote:
> 
> resizeControl is sent "only sent when the user resizes a control by dragging 
> its handles. It is not sent if a handler changes the size of a control by 
> changing its properties (width, height, and so on)."
> 
> Does anyone else really really wish that resizeControl was set when the 
> control's size is changed via script? I sure do!
> 
> For example, I have cards with multiple groups of objects on them. Each of my 
> groups (and sometimes sub-groups) have resizeControl handlers that position 
> everything in the groups appropriately. I do this for portability. If I copy 
> the group to somewhere else, the handler (resizeControl) that knows how 
> everything is to be moved and resized goes with the copied group.
> 
> My card script has a "resizeStack" handler that just sets the rects of the 
> top level groups and dispatches resizeControl to each group on the card after 
> changing its rect. I really wish I could eliminate these "dispatch" (or send) 
> commands. I forget to include them some times, simple expecting (even though 
> I know better) that if I change the size (rect) of a control with a 
> "resizeControl" handler, that that resizeControl handler should execute!
> 
> Anyone else wish that resizeControl would get executed if a control's size is 
> changed by script? It just seems counter-intuitive that it does not.
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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


Re: [OT] The Fall of the British Empire???

2023-11-21 Thread Craig Newman via use-livecode
“... the bulk of Europe used French as the common language.”

That is where the term “Lingua Franca” came from. Before that in Europe, which 
was the center of the universe, learned people used Latin. Just ask Newton or 
any cleric.

English took over when the world got smaller. The US was the "bomb" in 1945, 
(can’t wait to see how that comes back) and ten years later consumed nearly a 
third of the planets energy. That plus Rock and Roll made English the only 
language that made sense.

Still does.

Craig

> On Nov 20, 2023, at 4:29 PM, Bob Sneidar via use-livecode 
>  wrote:
> 
>  the bulk of Europe used French as the common language.

___
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] The Fall of the British Empire???

2023-11-20 Thread Craig Newman via use-livecode
I did not mean “British” English, just English. And true, the hegemony that the 
US had and still has on this planet, commerce, popular culture, sheer weight 
and all that implies, forced everyone else to learn English. The internet is 
the prime example,

Americans are smug in that we do not need to learn other languages, because 
everyone else speaks English. I am not sure I am proud of that…

Craig

> On Nov 20, 2023, at 12:59 PM, doc hawk via use-livecode 
>  wrote:
> 
> British English was never the *lingua franca*.

___
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] The Fall of the British Empire???

2023-11-20 Thread Craig Newman via use-livecode
Apparently a commonwealth does not an empire make.

But whatever you think about empires overall, you have to give that tiny island 
credit…

Craig

> On Nov 18, 2023, at 6:37 PM, Ben Rubinstein via use-livecode 
>  wrote:
> 
> > When exactly did the British Empire fall??
> Just like Hemingway's bankruptcy: slowly at first, then suddenly.
> 
> Lost the American colonies 1776-1783.
> 
> Canada 1867 - 1931
> 
> Australia and New Zealand 1901 - 1931
> 
> South Africa 1910- 1931
> Ireland (mostly) 1919-1937
> 
> Egypt 1922
> 
> Iraq 1932
> 
> 1940s
> India, Pakistan, Burma, Sri Lanka
> 
> 1950s
> Malaya, Singapore, Palestine
> 
> 1960s
> Most of the colonies in Africa, Jamaica, Barbados, Trinidad and Tobago, 
> Maldives, Aden, Cyprus, Malta
> 
> 1970s
> Bahrain, Qatar, Trucial States (UAE), Fiji, rest of the Caribbean
> 
> 1984
> Hong Kong
> 
> On 17/11/2023 17:20, Bob Sneidar via use-livecode wrote:
>> Excerpt from The Livecode Team newsletter:
>> Several members of our team have been enjoying the Empire podcast recently 
>> with William Dalrymple and Anita Anand. This explores how empires rise, why 
>> they fall and how they have shaped the world around us today. The series 
>> covers THE RISE AND FALL OF THE BRITISH EMPIRE as well as the Ottoman 
>> Empire, with episodes around iconic events such as the fall of 
>> Constantinople and the Indian Mutiny among many others.
>> When exactly did the British Empire fall?? I thought it was still a thing?
>> Bob S
>> ___
>> 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: [OT] The Fall of the British Empire???

2023-11-17 Thread Craig Newman via use-livecode
Empires these days are strictly economic. In fact, it was always that way.

Forget California, which has the 6th largest GDP in the world. Texas and New 
York combined would also come in at #6, and just beat GB.

England was #1 until 1916, when guess who took over.

Craig

> On Nov 17, 2023, at 2:21 PM, Richmond Mathewson via use-livecode 
>  wrote:
> 
> The English think so. After all:  Wales, Scotland, N Ireland, do appear to
> constitute an Empire if you look at them from isolationist, Brexitland.
> 
> Ask Boris Johnson: if you stand behind him at waist height you'll recieve
> an answer in suitably rumbling Churchillian terms.
> 
> On Fri, 17 Nov 2023, 19:21 Bob Sneidar via use-livecode, <
> use-livecode@lists.runrev.com> wrote:
> 
>> Excerpt from The Livecode Team newsletter:
>> 
>> Several members of our team have been enjoying the Empire podcast recently
>> with William Dalrymple and Anita Anand. This explores how empires rise, why
>> they fall and how they have shaped the world around us today. The series
>> covers THE RISE AND FALL OF THE BRITISH EMPIRE as well as the Ottoman
>> Empire, with episodes around iconic events such as the fall of
>> Constantinople and the Indian Mutiny among many others.
>> 
>> When exactly did the British Empire fall?? I thought it was still a thing?
>> 
>> Bob S
>> 
>> ___
>> 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: [OT] The Fall of the British Empire???

2023-11-17 Thread Craig Newman via use-livecode
When the United States took over. 1945.

The only thing that remained is that the Lingua Franca of the world is English. 
I have a French friend who is constantly annoyed at that fact.

Craig

> On Nov 17, 2023, at 2:05 PM, Ralph DiMola via use-livecode 
>  wrote:
> 
> "When exactly did the British Empire fall?? I thought it was still a thing?"
> 
> +1
> 
> 
> Ralph DiMola
> IT Director
> Evergreen Information Services
> 
> -Original Message-
> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf
> Of Bob Sneidar via use-livecode
> Sent: Friday, November 17, 2023 12:20 PM
> To: How to use LiveCode
> Cc: Bob Sneidar
> Subject: [OT] The Fall of the British Empire???
> 
> Excerpt from The Livecode Team newsletter:
> 
> Several members of our team have been enjoying the Empire podcast recently
> with William Dalrymple and Anita Anand. This explores how empires rise, why
> they fall and how they have shaped the world around us today. The series
> covers THE RISE AND FALL OF THE BRITISH EMPIRE as well as the Ottoman
> Empire, with episodes around iconic events such as the fall of
> Constantinople and the Indian Mutiny among many others.
> 
> When exactly did the British Empire fall?? I thought it was still a thing?
> 
> Bob S
> 
> ___
> 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: What to set the clipboardData to for exchanging styled text with a 3rd party app

2023-11-13 Thread Craig Newman via use-livecode
Hi.

I always use the “htmlText”.

Of course this encodes the original text with HTML tags, so you cannot just:

set the clipBoardData to the htmlText of fld 1
set the text of fld 2 to the clipBoardData

you have to:  set the htmltext of fld 2 to the clipBoardData



Craig


> On Nov 13, 2023, at 12:18 PM, Paul Dupuis via use-livecode 
>  wrote:
> 
> Hivemind,
> 
> Recommendation as to what is best to set the clipboardData property to, when 
> you want to copy styled text from a field to the clipboard for exchange with 
> a 3rd party (any 3rd party) application that supports some form of styled 
> text, that can include text in multiple languages (i.e. Unicode)?
> 
> Examples:
> 1) set the clipboardData["rtf"] to the rtfText of fld "X"
> 2) set the clipboardData["html"] to the htmlText of fld "X"
> 3) set the clipboardData["text"] to the text of fld "X" -- since the text in 
> field since LC7 is unicode
> 4) set the clipboardData["unicode"] to the textEncode(fld "X","UTF-16")
> 
> Something else? Should fullClipboardData or rawClipboardData be used instead? 
> Looking for best practice recommendation.
> 
> 
> ___
> 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: Filter with wildcards

2023-10-30 Thread Craig Newman via use-livecode
Have not played with a method of keeping it all in one line. But can you filter 
twice, storing the first result and then running it again?

Craig

> On Oct 30, 2023, at 1:17 PM, David Glasgow via use-livecode 
>  wrote:
> 
> Hi folks,
> 
> I am doing the above and struggling with an oddity that I can’t find guidance 
> on on Livecode or wider wildcard stuff
> 
> A simple example is I am searching text messages for 'with you' or 'with u’
> 
> so I use the wildcard form
> 
> *with [you,u]*
> 
> That finds all examples of both just fine.  However, it also finds ‘with 
> unlimited cheese’ and 'with us’, ‘with yours’ etc.  so I want a space after 
> both u
> 
> When I put two spaces inside the square brackets after each string, the 
> search still works but spaces seem to be ignored (so still finds the above 
> resamples I don’t want).
> 
> If I put a single space after the brackets the first bracketed string is 
> ignored and the filter only finds “with u “
> 
> Hope someone can help me stop pulling my baffled face
> 
> Cheers
> 
> David Glasgow
> 
> 
> ___
> 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: Oddity in 'currentCard' function?

2023-10-25 Thread Craig Newman via use-livecode
Paul.

The construction "answer this card of stack “X” does not work if you are not on 
stack “X”:

answer the  currentCard of stack  “X”  —works

answer the name of this card of stack “X —works

answer this card of stack “X”—Nope



Craig




> On Oct 25, 2023, at 8:57 AM, Paul Dupuis via use-livecode 
>  wrote:
> 
> On 10/25/2023 12:34 AM, Mark Waddingham via use-livecode wrote:
>> 
>> If you want to do stuff with the current card of a stack, then don't use the 
>> currentCard property - 'this card of stack ...' *is* a chunk reference and 
>> thus it doesn't care whether the card has a name or not.
>> 
> 
> Okay, I get that  id  is a legacy return value when there is 
> no name.
> 
> I'd just like to confirm that:
> 
> this card of stack "X"
> and
> the currentCard of stack "X"
> 
> refer to the same card, even if in different ways (actual object reference vs 
> short name)?
> 
> If so, I will switch to using "this card of stack". I had thought that the 
> 'this card' was always the card in the object hierarchy of the object the 
> script was running in and had forgotten that you could say 'this card of 
> stack ...' to reference the active card in another stack.
> 
> 
> ___
> 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: Oddity in 'currentCard' function?

2023-10-24 Thread Craig Newman via use-livecode
NitPicking within myself, but I have always isolated variables in “do” 
constructions:
do "set the myProperty of" && tCardName && "to" && tValue

Craig

> On Oct 24, 2023, at 1:59 PM, Craig Newman  wrote:
> 
> Paul.
> 
> Having a more complete description seems right to me. You are essentially 
> saying that if you use the moniker “the currentCard” that LC should know what 
> you are intending, the is, the current “card”, and not the current “something 
> else”.
> 
> It has to be one of those cases where, as Danny Goodman once said, “If a line 
> of code seem like it ought to work but does not, try using a “do” 
> construction to force another layer of resolution;
> 
> on mouseUp
> put the currentCard of stack "Untitled 1" into tCardName
> 
> do "set the myProperty of" && tCardName && "to tValue"
> 
> end mouseUp
> 
> This works, and shows that the referencing of these sorts of things in LC, 
> like in HC, is not quite as they read like.
> 
> Craig
> 
> 
>> On Oct 24, 2023, at 1:00 PM, Paul Dupuis via use-livecode 
>>  wrote:
>> 
>> I think I found a oddity in the "currentCard" property.
>> 
>> The documentation states that the currentCard property return the short name 
>> of the current card of a stack:
>> 
>> for example: put the currentCard of stack "Untitled 1" into tCardName
>> 
>> You can then execute code such as: set the myProperty of cd tCardName of 
>> stack "Untitled 1" to tValue
>> 
>> However, if the card does not have a name set, then current card returns 
>> "card id ", example: card id 1002 and the above 2 lines of code 
>> return a runtime error of 'can't find card'
>> 
>> put the currentCard of stack "Untitled 1" into tCardName
>> set the myProperty of cd tCardName of stack "Untitled 1" to tValue
>> 
>> WORKS for cards with a name
>> FAILS for cards without a name (where currentCard returns 'card id > 
>> I think currentCard should just return 'id 1002' rather than 'card id 1002' 
>> if a card has no name.
>> 
>> Trying to execute: set the myProperty of cd tCardName of stack "Untitled 1" 
>> to tValue WHEN tCardName contain 'card id 1002' produces a run time error
>> 
>> But trying to execute: set the myProperty of cd id 1002 of stack "Untitled 
>> 1" to tValue works.
>> 
>> Oddly, set the myProperty of cd tCardName of stack "Untitled 1" to tValue 
>> FAILS if tCardName contains "id 10001" (and yes that card with that ID 
>> exists)
>> 
>> Oddly again, set the myProperty of the currentCard of stack "Untitled 1" to 
>> tValue DOES WORK whether they have a name or not
>> 
>> But again, breaking that example above (set the myProperty of the 
>> currentCard of stack "Untitled 1" to tValue) into 2 lines:
>> put the currentCard of stack "Untitled 1" into tCardName
>> set the myProperty of cd tCardName of stack "Untitled 1" to tValue
>> FAILS if the card has no name.
>> 
>> Something just seems off here?
>> 
>> ___
>> 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: Oddity in 'currentCard' function?

2023-10-24 Thread Craig Newman via use-livecode
Paul.

Having a more complete description seems right to me. You are essentially 
saying that if you use the moniker “the currentCard” that LC should know what 
you are intending, the is, the current “card”, and not the current “something 
else”.

It has to be one of those cases where, as Danny Goodman once said, “If a line 
of code seem like it ought to work but does not, try using a “do” construction 
to force another layer of resolution;

on mouseUp
put the currentCard of stack "Untitled 1" into tCardName

do "set the myProperty of" && tCardName && "to tValue"

end mouseUp

This works, and shows that the referencing of these sorts of things in LC, like 
in HC, is not quite as they read like.

Craig


> On Oct 24, 2023, at 1:00 PM, Paul Dupuis via use-livecode 
>  wrote:
> 
> I think I found a oddity in the "currentCard" property.
> 
> The documentation states that the currentCard property return the short name 
> of the current card of a stack:
> 
> for example: put the currentCard of stack "Untitled 1" into tCardName
> 
> You can then execute code such as: set the myProperty of cd tCardName of 
> stack "Untitled 1" to tValue
> 
> However, if the card does not have a name set, then current card returns 
> "card id ", example: card id 1002 and the above 2 lines of code 
> return a runtime error of 'can't find card'
> 
> put the currentCard of stack "Untitled 1" into tCardName
> set the myProperty of cd tCardName of stack "Untitled 1" to tValue
> 
> WORKS for cards with a name
> FAILS for cards without a name (where currentCard returns 'card id  
> I think currentCard should just return 'id 1002' rather than 'card id 1002' 
> if a card has no name.
> 
> Trying to execute: set the myProperty of cd tCardName of stack "Untitled 1" 
> to tValue WHEN tCardName contain 'card id 1002' produces a run time error
> 
> But trying to execute: set the myProperty of cd id 1002 of stack "Untitled 1" 
> to tValue works.
> 
> Oddly, set the myProperty of cd tCardName of stack "Untitled 1" to tValue 
> FAILS if tCardName contains "id 10001" (and yes that card with that ID exists)
> 
> Oddly again, set the myProperty of the currentCard of stack "Untitled 1" to 
> tValue DOES WORK whether they have a name or not
> 
> But again, breaking that example above (set the myProperty of the currentCard 
> of stack "Untitled 1" to tValue) into 2 lines:
> put the currentCard of stack "Untitled 1" into tCardName
> set the myProperty of cd tCardName of stack "Untitled 1" to tValue
> FAILS if the card has no name.
> 
> Something just seems off here?
> 
> ___
> 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: sort bug

2023-09-07 Thread Craig Newman via use-livecode
Bob,

If you remove the “numeric” the result is “2,3,4,6,a”.

To me this implies that ASCII values are used as the sortKey. But that begs the 
issue why, as in your post, with “numeric” included, the “a” appears first. 
What makes the “a” a lower "numeric" value than “2”?

Craig

> On Sep 7, 2023, at 11:19 AM, Bob Sneidar via use-livecode 
>  wrote:
> 
> put "4,2,a,3,6" into tList;sort items of tList numeric ascending;put tList

___
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: Sort bug and also multilevel sorting

2023-09-07 Thread Craig Newman via use-livecode
Neville.

My example was only to show that the sort command still maintains the ability 
to accept concatenated sort criteria. This allows a single line of code to do 
the work, and obviates the need for multiple sorts.  In that sense it was a bad 
example to use character "places" in a string. This would not be an issue when 
using an explicit delimiter of some sort, typically what any sane coder would 
automatically do.

Padding with zeros or spaces is the sort of kludge even I would blanch at.

Craig

> On Sep 6, 2023, at 7:57 PM, Neville Smythe via use-livecode 
>  wrote:
> 
> Ralph: Interesting. Your code works as you present it, sorting the given 
> items by the sortkey function f1 which adds 1 to each item. I do get the 
> “sorting failed” dialog.
> 
> But if I try the same thing using myVal modified as you suggest, which adds 
> the first and second items of each line of data and then adds 1 to the global 
> s1, I get the bug I reported: the handler simply exits without showing either 
> the “sorting failed” or the “Done” answer dialog.
> 
> I would have thought the two methods would generate the same error code, an 
> incorrect operand in a sum, so this is strange! The function definitely 
> returns on the error line, the value of s1 is not changed in the next line in 
> either your f1 or my myVal. So perhaps the bug occurs when the processing 
> returns to the sort code. Not something we can solve here, one for the 
> engineers to sort out (!)
> 
> Mark Waddingham says the sortKey function is intended to be tolerant of 
> errors, simply returning the original value of ‘each’ - in your case each 
> item, in my case each line. So it should either 
> 
> 1. Continue with the (undocumented) sort order  OR 
> 
> 2a. exit to top AND 2b. drop into the debugger/errorDialog. In my example it 
> is doing  2a but not 2b.
> 
> Craig: The missing bit is that your method won’t work if the integers you are 
> sorting by having different string lengths
> 
> The lines
> 2,7
> 1,99
> 
> should, when sorted by numeric ascending (item 1 of each, item 2 of each) - 
> which would be the appropriate syntax for a multilevel sort tho not in LC - 
> result in
> 1.99
> 2,7
> 
> But if sorted by (item 1 of each & item 2 of each) - which concatenates as 
> strings - gives sort keys 199 and 27 to result in
> 2,7
> 1,99
> This can be fixed by formatting the numbers  so they have the same length by 
> padding with 0s, as MW noted. Once they have the same length you could 
> actually sort lexically which may be a lot faster than sorting numerically 
> (although my guess is using 2 separate sorts may be faster still at least for 
> short lists).
> 
> The concatenation method also won’t work if sorting real numbers:
> 1.0,0.2
> 1.0,0.1
> since after concatenation the second decimal place would be ignored in a 
> numeric sort.
> 
> 
> Neville Smythe
> 
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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


Re: Sorting by item ... of each and item ... of each

2023-09-06 Thread Craig Newman via use-livecode
Matthias.

I do not have your original data. But try using “&” instead of “and”.

Craig

> On Sep 5, 2023, at 5:05 PM, Ralph DiMola via use-livecode 
>  wrote:
> 
> You can at least detect if the sorting function has failed using a global
> variable.
> 
> global s1
> 
> command test1
>   local t1
> 
>   --put "10,9,8,7,6,5,4,3,2,1" into t1 -- This line will not show an error
>   put "10,9,8,7a,6,5,4,3,2,1" into t1 -- This line will show an error
> 
>   put 0 into s1
>   sort items of t1 numeric by f1(each)
> 
>   if s1 <> the number of items in t1 then answer "Sort Function failed"
>   put t1 & cr & s1
> 
> end test1
> 
> 
> function f1 pEach
>   local tEach
>   put pEach into tEach
>   add 1 to tEach
>   add 1 to s1
>   return tEach
> end f1
> 
> Ralph DiMola
> IT Director
> Evergreen Information Services
> rdim...@evergreeninfo.net
> 
> -Original Message-
> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf
> Of matthias rebbe via use-livecode
> Sent: Saturday, September 02, 2023 9:03 PM
> To: How to use LiveCode
> Cc: matthias_livecode_150...@m-r-d.de
> Subject: Re: Sorting by item ... of each and item ... of each
> 
> Of course my "not working" sort code look like this
> 
> set the itemdelimiter to  ";"
> sort lines of tList numeric by item 3 of each and item 2 of each.
> 
> 
> 
> 
>> Am 03.09.2023 um 02:59 schrieb matthias_livecode_150...@m-r-d.de:
>> 
>> Maybe i do not see the forest for the trees
>> 
>> I have a tab delimited list which i want to sort. I am using this code to
> sort it by item 3 and  item 2
>> 
>> set the itemdelimiter to tab
>> sort lines of tList numeric by item 3 of each and item 2 of each.
>> 
>> But that code does not sort as i expected it. Column 2 is not sorted
> correctly.
>> The following list is the result. 
>> 
>> 113254;8420;3016365
>> 113254;8423;3016365
>> 113254;8422;3016365
>> 113254;8420;3016365
>> 113254;8420;3016365
>> 113254;8420;3016365
>> 113254;8421;3016365
>> 203212;8420;3016366
>> 203212;8423;3016366
>> 203212;8422;3016366
>> 203212;8420;3016366
>> 
>> 
>> My expectation for example  was that for value 3016365 in column 3 the
> values in Col 2 would be sorted like this
>> 
>> 113254;8423;3016365
>> 113254;8422;3016365
>> 113254;8421;3016365
>> 113254;8420;3016365
>> 113254;8420;3016365
>> 113254;8420;3016365
>> 113254;8420;3016365
>> 
>> Tried also'by item 2 of each and item 3 of each', but the sort result
> is the same?
>> 
>> Am i missing something?
>> 
>> Regards,
>> Matthias
>> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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


Re: Sorting by item ... of each and item ... of each

2023-09-05 Thread Craig Newman via use-livecode
I should have given better context. I one only sorts the same field numeric, 
one gets:

123

132

213

231

312

321

Which is correct given the list of whole numbers in question. The stable sort 
allows one to then sort by char 3 of each, to get the result in the “compound” 
sort below.

So am I missing something in all this?

Craig


> On Sep 5, 2023, at 10:29 AM, Craig Newman via use-livecode 
>  wrote:
> 
> I may be simply misunderstanding…
> 
> Since HC days, one could concatenate sort criteria using the “&” character, 
> and obtain multiple stable sorts in one go. In LC as well, since given, in a 
> field 1:
> 
> 231
> 
> 312
> 
> 123
> 
> 213
> 
> 321
> 
> 132
> 
> and in a button somewhere:
> 
> on mouseUp
> 
> get fld 1
> 
> sort it numeric by char 1 of each & char 3 of each
> 
> answer it
> 
> end mouseUp
> 
> We get:
> 
> 132
> 
> 123
> 
> 231
> 
> 213
> 
> 321
> 
> 312
> 
> 
> 
> Craig
> 
> 
> 
> 
>> On Sep 3, 2023, at 8:29 AM, matthias rebbe via use-livecode 
>>  wrote:
>> 
>> Hello Mark,
>> 
>> thanks for explanation and also for your solution. I will try. 
>> 
>> Maybe i should get my book "regular expressions"  from  Jeffrey E.F.Friedl 
>> from the shelf and should finish reading it, so i could make use of regular 
>> expressions  in Livecode more often. 
>> 
>> Regards,
>> Matthias
>> 
>>> Am 03.09.2023 um 11:49 schrieb Mark Waddingham via use-livecode 
>>> :
>>> 
>>> On 2023-09-03 10:26, panagiotis m via use-livecode wrote:
>>>> Hello Matthias,
>>>> I do not think that the syntax "sort  by sortKey1 and sortKey2"
>>>> is supported
>>> 
>>> Heh technically it 'is' - and does do something but it won't be what you 
>>> expected...
>>> 
>>> So the syntax for sort in this case is:
>>> 
>>> sort  by 
>>> 
>>> This works by iterating over the elements in , passing each 
>>> through the expression to generate a sort key list, sorting that list and 
>>> then reordering the original list.
>>> 
>>> Expressions can contain the boolean 'and' operator, so:
>>> 
>>> sort  by X and Y
>>> 
>>> Means that the sort key is evaluated as 'X and Y' for each element - 
>>> meaning sort ends up sorting a list of 'true' and 'false' values.
>>> 
>>> As Panos says, if you want to sort by separate fields with decreasing 
>>> priority you need to do multiple sorts from least priority to most - this 
>>> works because 'sort' is stable (if two elements compare the same, then the 
>>> order of them in the output list is the same as the first).
>>> 
>>> The alternative is to work out a sort expression which combines the two 
>>> parts of the element you want to sort so that the sort keys sort in that 
>>> order. This can be quite tricky, but (for example) - let's say your 
>>> container has elements of the form:
>>> 
>>> ,
>>> 
>>> So you want things in the 'obvious' sorted order - then you could use:
>>> 
>>> sort tSections ascending text by format("%08d%08d", item 1 of each, item 2 
>>> of each)
>>> 
>>> Here the sortkey is defined so that the text sort of the sort keys is that 
>>> same as sorting first by sub-section number and then by section number.
>>> 
>>> Warmest Regards,
>>> 
>>> Mark.
>>> 
>>> -- 
>>> Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
>>> LiveCode: Build Amazing Things
>>> 
>>> ___
>>> 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: Sorting by item ... of each and item ... of each

2023-09-05 Thread Craig Newman via use-livecode
I may be simply misunderstanding…

Since HC days, one could concatenate sort criteria using the “&” character, and 
obtain multiple stable sorts in one go. In LC as well, since given, in a field 
1:

231

312

123

213

321

132

and in a button somewhere:

on mouseUp

get fld 1

sort it numeric by char 1 of each & char 3 of each

answer it

end mouseUp

We get:

132

123

231

213

321

312



Craig




> On Sep 3, 2023, at 8:29 AM, matthias rebbe via use-livecode 
>  wrote:
> 
> Hello Mark,
> 
> thanks for explanation and also for your solution. I will try. 
> 
> Maybe i should get my book "regular expressions"  from  Jeffrey E.F.Friedl 
> from the shelf and should finish reading it, so i could make use of regular 
> expressions  in Livecode more often. 
> 
> Regards,
> Matthias
> 
>> Am 03.09.2023 um 11:49 schrieb Mark Waddingham via use-livecode 
>> :
>> 
>> On 2023-09-03 10:26, panagiotis m via use-livecode wrote:
>>> Hello Matthias,
>>> I do not think that the syntax "sort  by sortKey1 and sortKey2"
>>> is supported
>> 
>> Heh technically it 'is' - and does do something but it won't be what you 
>> expected...
>> 
>> So the syntax for sort in this case is:
>> 
>>  sort  by 
>> 
>> This works by iterating over the elements in , passing each 
>> through the expression to generate a sort key list, sorting that list and 
>> then reordering the original list.
>> 
>> Expressions can contain the boolean 'and' operator, so:
>> 
>>  sort  by X and Y
>> 
>> Means that the sort key is evaluated as 'X and Y' for each element - meaning 
>> sort ends up sorting a list of 'true' and 'false' values.
>> 
>> As Panos says, if you want to sort by separate fields with decreasing 
>> priority you need to do multiple sorts from least priority to most - this 
>> works because 'sort' is stable (if two elements compare the same, then the 
>> order of them in the output list is the same as the first).
>> 
>> The alternative is to work out a sort expression which combines the two 
>> parts of the element you want to sort so that the sort keys sort in that 
>> order. This can be quite tricky, but (for example) - let's say your 
>> container has elements of the form:
>> 
>>  ,
>> 
>> So you want things in the 'obvious' sorted order - then you could use:
>> 
>>  sort tSections ascending text by format("%08d%08d", item 1 of each, item 2 
>> of each)
>> 
>> Here the sortkey is defined so that the text sort of the sort keys is that 
>> same as sorting first by sub-section number and then by section number.
>> 
>> Warmest Regards,
>> 
>> Mark.
>> 
>> -- 
>> Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
>> LiveCode: Build Amazing Things
>> 
>> ___
>> 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: Merging PDF pages

2023-08-25 Thread Craig Newman via use-livecode
Richmond.

Did I mention this was a bit clunky?

Craig

> On Aug 25, 2023, at 9:39 AM, Craig Newman via use-livecode 
>  wrote:
> 
> Hmmm.
> 
> Rereading, did you want to be able to collect existing pdf documents, read 
> them, and then output a single new PDF?   If so, I guess you can import those 
> documents as images on successive cards, and do what I posted earlier.
> 
> Seems clunky, but then you are asking LC to do something clunky.
> 
> Craig
> 
>> On Aug 25, 2023, at 9:33 AM, Craig Newman via use-livecode 
>>  wrote:
>> 
>> Hi.
>> 
>> Sure. Try this in a button on card 1 of a new stack with, say, three cards:
>> 
>> on mouseUp
>> 
>> get the desktop folder
>> 
>> open printing to pdf it & "/" & “yourNamehere" & ".pdf"
>> 
>> repeat with x = 1 to 3
>> 
>> print card x
>> 
>> end repeat
>> 
>> close printing
>> 
>> end mouseUp
>> 
>> 
>> 
>> And I wonder if the new pdf widget has that built in.
>> 
>> 
>> 
>> Craig
>> 
>> 
>>> On Aug 25, 2023, at 9:10 AM, Eller, Roger via use-livecode 
>>>  wrote:
>>> 
>>> It's been a while since I've posted a question here.  Is it possible to use 
>>> livecode script to merge multiple 1-page PDFs into a multipage PDF without 
>>> using Acrobat or other 3rd party software?
>>> 
>>> Thanks.
>>> 
>>> ~Roger
>>> 
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> ___
>> 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: Merging PDF pages

2023-08-25 Thread Craig Newman via use-livecode
Hmmm.

Rereading, did you want to be able to collect existing pdf documents, read 
them, and then output a single new PDF?   If so, I guess you can import those 
documents as images on successive cards, and do what I posted earlier.

Seems clunky, but then you are asking LC to do something clunky.

Craig

> On Aug 25, 2023, at 9:33 AM, Craig Newman via use-livecode 
>  wrote:
> 
> Hi.
> 
> Sure. Try this in a button on card 1 of a new stack with, say, three cards:
> 
> on mouseUp
> 
> get the desktop folder
> 
> open printing to pdf it & "/" & “yourNamehere" & ".pdf"
> 
> repeat with x = 1 to 3
> 
> print card x
> 
> end repeat
> 
> close printing
> 
> end mouseUp
> 
> 
> 
> And I wonder if the new pdf widget has that built in.
> 
> 
> 
> Craig
> 
> 
>> On Aug 25, 2023, at 9:10 AM, Eller, Roger via use-livecode 
>>  wrote:
>> 
>> It's been a while since I've posted a question here.  Is it possible to use 
>> livecode script to merge multiple 1-page PDFs into a multipage PDF without 
>> using Acrobat or other 3rd party software?
>> 
>> Thanks.
>> 
>> ~Roger
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> 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: Merging PDF pages

2023-08-25 Thread Craig Newman via use-livecode
Hi.

Sure. Try this in a button on card 1 of a new stack with, say, three cards:

on mouseUp

get the desktop folder

open printing to pdf it & "/" & “yourNamehere" & ".pdf"

repeat with x = 1 to 3

print card x

end repeat

close printing

end mouseUp



And I wonder if the new pdf widget has that built in.



Craig


> On Aug 25, 2023, at 9:10 AM, Eller, Roger via use-livecode 
>  wrote:
> 
> It's been a while since I've posted a question here.  Is it possible to use 
> livecode script to merge multiple 1-page PDFs into a multipage PDF without 
> using Acrobat or other 3rd party software?
> 
> Thanks.
> 
> ~Roger
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
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: Variable Watcher disappeared

2023-08-08 Thread Craig Newman via use-livecode
What happens if you set the top of the SE window a bit higher than current?

I have a gadget that locates the SE on my portrait monitor on command. I could 
easily make its top anything I want, and I bet that would display the hidden 
bottom of the window.

Craig

> On Aug 8, 2023, at 1:39 PM, Bob Sneidar via use-livecode 
>  wrote:
> 
> Resetting prefs fixed it. Should be a better way than starting from scratch 
> though. 
> 
> Bob S
> 
> 
>> On Aug 8, 2023, at 10:28 AM, Bob Sneidar  wrote:
>> 
>> That was a good suggestion, but alas no cookie. The entire window is 
>> visible, but the handle to resize is not visible. The handle for the 
>> handlers pane is visible, but is lower than halfway down the window, clueing 
>> me into the likelihood that something has gone horribly awry with my script 
>> editor. Quitting and relaunching does not fix it. 
>> 
>> I checked the forums and bug reports, nothing I can find. I’ll contact 
>> support I guess. 
>> 
>> Bob S
>> 
>> 
>>> On Aug 8, 2023, at 10:22 AM, Dick Kriesel via use-livecode 
>>>  wrote:
>>> 
>>> Hi, Bob. The bottom pane reappears to show search results, so search for 
>>> something.
>>> — Dick
>>> 
 On Aug 8, 2023, at 9:28 AM, Bob Sneidar via use-livecode 
  wrote:
 
 Hi all. 
 
 Not sure how I did it but I can no longer see the variables while 
 debugging. The bottom pane has disappeared and nothing I can find can get 
 it back. Any ideas? 
 
 Bob S
 
 
 ___
 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: Reorder fields

2023-07-28 Thread Craig Newman via use-livecode
Why does, as Paul suggests, changing the layer order in the Project Browser 
work, whereas changing the layer order explicitly does not? We know that layers 
cannot be assigned to a particular object class (like fields) but include all 
controls at once. Is it possible that the layer order of the fields only was 
not properly grokked?

Craig

> On Jul 28, 2023, at 10:19 AM, Mark Smith via use-livecode 
>  wrote:
> 
> Thanks Paul. That is one of those super helpful tips that is hard to discover 
> on your own. 1 day we need an easily searchable wiki for all this acquired 
> wisdom (but for now I have tucked it away for future reference). Thanks for 
> replying.
> 
> Mark
> 
> 
>> On 28 Jul 2023, at 3:00 pm, Paul Dupuis via use-livecode 
>>  wrote:
>> 
>> You can change the layer (order) in the Project Browser in the IDE by just 
>> dragging the objects up or down the list of objects on the card.
>> 
>> 
>> On 7/28/2023 6:19 AM, Mark Smith via use-livecode wrote:
>>> How do you reorder fields? I have a form (prebuilt) with 3 fields (a,b,c) 
>>> in positions 9, 15, 12 (as indicated by the Layer field in the Position 
>>> tab). Tabbing cause these fields to be visited in the order a, c, b whereas 
>>> I would prefer a, b, c. I have tried all manner of editing the Layer field 
>>> to make them be in that order with no success, I’ve variously tried new 
>>> orders: 9,10,11 or 14,15,16 or even 20,21,22 but nothing seems to affect 
>>> their order. It always returns to 9, 15, 12. Lock size and position is not 
>>> checked. I’ve even tried doing this with the Number field in the Advanced 
>>> tab, also without success. Ok, I did find a solution but while it was easy 
>>> for me, it might not be as easy on a more complicated form. I deleted all 3 
>>> fields. Recreated field A (which was given the starting position of 11) 
>>> then copy pasted two more times creating fields 12 and 13. So this 
>>> satisfies my reorder interest, but seems to me a rather cumbersome and 
>>> unnecessary procedure (if for no other reason than deleting fields also 
>>> deletes all of the “custom” settings on the fields which doubles or triples 
>>> the amount of effort involved). Maybe I am missing something more obvious?
>>> 
>>> Thanks
>>> 
>>> 
>>> ___
>>> 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: Reorder fields

2023-07-28 Thread Craig Newman via use-livecode
I was sloppy, as usual. Trap the message in the card, and use the target to 
know where you are and where to go next.

Craig

> On Jul 28, 2023, at 9:36 AM, Craig Newman via use-livecode 
>  wrote:
> 
> Hi.
> 
> Not sure why the tabbing order seems to be out of whack, but you can always 
> force the issue by trapping the tabKey message in each field, and directing 
> it to the next one of you own choice.
> 
> Craig
> 
>> On Jul 28, 2023, at 6:19 AM, Mark Smith via use-livecode 
>>  wrote:
>> 
>> How do you reorder fields? I have a form (prebuilt) with 3 fields (a,b,c) in 
>> positions 9, 15, 12 (as indicated by the Layer field in the Position tab). 
>> Tabbing cause these fields to be visited in the order a, c, b whereas I 
>> would prefer a, b, c. I have tried all manner of editing the Layer field to 
>> make them be in that order with no success, I’ve variously tried new orders: 
>> 9,10,11 or 14,15,16 or even 20,21,22 but nothing seems to affect their 
>> order. It always returns to 9, 15, 12. Lock size and position is not 
>> checked. I’ve even tried doing this with the Number field in the Advanced 
>> tab, also without success. Ok, I did find a solution but while it was easy 
>> for me, it might not be as easy on a more complicated form. I deleted all 3 
>> fields. Recreated field A (which was given the starting position of 11) then 
>> copy pasted two more times creating fields 12 and 13. So this satisfies my 
>> reorder interest, but seems to me a rather cumbersome and unnecessary 
>> procedure (if for no other reason than deleting fields also deletes all of 
>> the “custom” settings on the fields which doubles or triples the amount of 
>> effort involved). Maybe I am missing something more obvious?
>> 
>> Thanks
>> 
>> 
>> ___
>> 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: Reorder fields

2023-07-28 Thread Craig Newman via use-livecode
Hi.

Not sure why the tabbing order seems to be out of whack, but you can always 
force the issue by trapping the tabKey message in each field, and directing it 
to the next one of you own choice.

Craig

> On Jul 28, 2023, at 6:19 AM, Mark Smith via use-livecode 
>  wrote:
> 
> How do you reorder fields? I have a form (prebuilt) with 3 fields (a,b,c) in 
> positions 9, 15, 12 (as indicated by the Layer field in the Position tab). 
> Tabbing cause these fields to be visited in the order a, c, b whereas I would 
> prefer a, b, c. I have tried all manner of editing the Layer field to make 
> them be in that order with no success, I’ve variously tried new orders: 
> 9,10,11 or 14,15,16 or even 20,21,22 but nothing seems to affect their order. 
> It always returns to 9, 15, 12. Lock size and position is not checked. I’ve 
> even tried doing this with the Number field in the Advanced tab, also without 
> success. Ok, I did find a solution but while it was easy for me, it might not 
> be as easy on a more complicated form. I deleted all 3 fields. Recreated 
> field A (which was given the starting position of 11) then copy pasted two 
> more times creating fields 12 and 13. So this satisfies my reorder interest, 
> but seems to me a rather cumbersome and unnecessary procedure (if for no 
> other reason than deleting fields also deletes all of the “custom” settings 
> on the fields which doubles or triples the amount of effort involved). Maybe 
> I am missing something more obvious?
> 
> Thanks
> 
> 
> ___
> 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: Determine the screen DPI

2023-07-26 Thread Craig Newman via use-livecode
Hi.

The “screenrect” gives you the factor required directly. If you measure the 
actual width, say, of the screen and divide that into the difference between 
item 3 and item 1 of the screenRect, you will get the number of pixels per inch.

Craig

> On Jul 26, 2023, at 2:23 PM, Bob Sneidar via use-livecode 
>  wrote:
> 
> Hi all.
> 
> I am trying to convert size in inches to size in pixels given a certain 
> monitor in use. To do that I need to obtain the DPI of the current monitor. 
> So for example let’s say I want to set the card size to 4x6 in inches. The 
> monitor may be 72 dpi, 96 dpi or something else depending on the resolution. 
> Is there an LC way to do this, or will I have to use terminal to grok it? 
> 
> Bob S
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

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


Re: What is your best practice for setting a script in a script?

2023-07-21 Thread Craig Newman via use-livecode
Paul.

I assume you have a blueprint of what will become a stack with at least one 
card? And that stack will possibly contain other cards, controls, scripts and 
behaviors?

But since all objects have properties, including scripts, and since LC has the 
“create” command, whatever you want to do seems straightforward, if not simple.

You must have the IDE open to even start, of course, so you are already “in” 
LC. Why not just do it the old fashioned way? The end result will be a stack, 
correct? What is the advantage of not starting with a stack?


Craig

> On Jul 21, 2023, at 12:10 PM, Paul Dupuis via use-livecode 
>  wrote:
> 
> As some people on this list and the forums have explored in the past, I have 
> a interest in creating a Livecode application (stack) entirely from a (text 
> only) single script. So there are initially no Livecode objects to place a 
> behavior script in. There are initially no buttons, fields, cards, stacks, or 
> anything else.
> 
> Yes, one of the values of Livecode is an interactive IDE for UI design (and 
> refinement), but for this specific interest, it is all about creating the UI 
> - in fact the whole app - from a single script.
> 
> 
> ___
> 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: Field highlited

2023-07-13 Thread Craig Newman via use-livecode
Paul.

I think that Bob S. is correct. The change in focus is sort of built into the 
engine, and a field cannot “remember” such a thing.

A fun kludge would be to create one or more overlays, however you like those to 
look, and apply them to the field of interest. These overlays can be managed in 
terms of their rects, depending on the formatted properties of the hilted line 
or lines. They can be shown and hidden as well.

I am struggling not to do this just for fun. So you do it, because I bet that 
the team has bigger fish to fry.

Craig

> On Jul 13, 2023, at 11:27 AM, Bob Sneidar via use-livecode 
>  wrote:
> 
> I do not see how that could work. In Windows, buttons can have the focus, 
> which means a field would always lose it. 
> 
> What I do when I need something like this is I save the selection (or 
> selectedChunk or some such thing) as a property of the field upon exitField. 
> You could even put that in a frontScript and reference the target. Then in 
> the field script re-select the text upon enterField. 
> 
> Bob S
> 
> 
>> On Jul 12, 2023, at 3:21 PM, Paul Dupuis via use-livecode 
>>  wrote:
>> 
>> I have a LC9 field object - just a scrolling field (not a list field) with a 
>> lot of text. The user selects some text and then click a button near the 
>> field. I want the selection to remain highlighted, but when you click 
>> outside the field the highlight goes away.
>> 
>> Any simple solutions to this. Some property I am just blanking on? In 
>> another app, I've used the "selectionChanged" message to (1) set the 
>> background color of the selection to a highlight color and store the start 
>> and end characters as custom properties of the field. I'm hoping there is an 
>> easier way I am just missing.
>> 
>> OR
>> 
>> There should be a feature enhancement: set the preserveHighlight of field X 
>> to true
>> That keeps the highlighted selection unless or until you make a new one in 
>> that field
> 
> 
> ___
> 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: Answer dialog text missing in standalone 9.6.9

2023-06-30 Thread Craig Newman via use-livecode
Matthias makes a point. Sometimes trying with a brand new stack will show that 
there is something amiss, even corrupted, with the stack of interest. If the 
new stack works, it likely means that LiveCode works, and the problem lies 
within the recalcitrant stack.

Craig

> On Jun 30, 2023, at 8:35 AM, matthias rebbe via use-livecode 
>  wrote:
> 
> Did you already try it with a new stack just with a button which includes 
> only a   mouseup script with only the answer command?
> 
>> Am 30.06.2023 um 14:29 schrieb General 2018 via use-livecode 
>> :
>> 
>> Windows 10
>> LC 9.6.9
>> 
>> Regards
>> Camm
>> 
>>> On 30 Jun 2023, at 12:13, panagiotis m via use-livecode 
>>>  wrote:
>>> 
>>> Hello Camm,
>>> 
>>> In which platform? Seems to work as expected here (MacOS).
>>> 
>>> Cheers,
>>> Panos
>>> --
>>> 
>>>> On Fri, 30 Jun 2023 at 09:54, General 2018 via use-livecode <
>>>> use-livecode@lists.runrev.com> wrote:
>>>> 
>>>> Hi,
>>>> 
>>>> Just the “Yes” , “No”
>>>> 
>>>> “Some Text” missing.
>>>> 
>>>> Works fine in IDE and previous standalones.
>>>> 
>>>> Regards
>>>> Camm
>>>> 
>>>>> On 29 Jun 2023, at 23:13, Craig Newman via use-livecode <
>>>> use-livecode@lists.runrev.com> wrote:
>>>>> 
>>>>> Hi.
>>>>> 
>>>>> I assume you mean the standard “Answer” command. There is no “Answer
>>>> Text”.
>>>>> 
>>>>> So if you:
>>>>> 
>>>>> answer “Some Text" with “Yes" or “No"
>>>>> what exactly pops up?
>>>>> 
>>>>> 
>>>>> 
>>>>> Craig
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>>> On Jun 29, 2023, at 4:21 PM, General 2018 via use-livecode <
>>>> use-livecode@lists.runrev.com> wrote:
>>>>>> 
>>>>>> Hi,
>>>>>> 
>>>>>> Answer Text missing in standalone , the icon and buttons (with text)
>>>> appear but no dialog text.
>>>>>> All okay in IDE.
>>>>>> 
>>>>>> Checked inclusions - all seems okay.
>>>>>> 
>>>>>> 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
>>>> ___
>>>> 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


___
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: Answer dialog text missing in standalone 9.6.9

2023-06-29 Thread Craig Newman via use-livecode
Hi.

I assume you mean the standard “Answer” command. There is no “Answer Text”.

So if you:

answer “Some Text" with “Yes" or “No"
what exactly pops up?



Craig




> On Jun 29, 2023, at 4:21 PM, General 2018 via use-livecode 
>  wrote:
> 
> Hi,
> 
> Answer Text missing in standalone , the icon and buttons (with text) appear 
> but no dialog text.
> All okay in IDE.
> 
> Checked inclusions - all seems okay.
> 
> 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


Re: Can Xavvi generate sensible text output as well as code?

2023-05-18 Thread Craig Newman via use-livecode
In Jacque’s “test” AI first had to create a list of ten “people”, garnered, I 
assume, from research into our planet’s knowledge base. It knew what a “name” 
should be. That is cool.

That list could have been a list of actual humans, derived from, say, the staff 
of a particular bank. 

If the list alone was in hand, it would take just a handful of LC code to 
create the string associated with each name.

How to integrate the AI part with the LC part? Again, one could acquire just 
the list, and then let LC generate the output string. But at least all would 
end up in a handler, fully in LC, where I assume additional “real” work would 
then be done.

What I mean is, how can one best integrate the “outside” AI work with the 
“inside” LC work? That is what I have to get my head around.

 Lurking in the background,I do not want AI to put LC out to pasture. I did 
that once with HC, and still have not gotten over it.

Craig

> On May 17, 2023, at 8:26 PM, J. Landman Gay via use-livecode 
>  wrote:
> 
> On 5/17/23 5:38 PM, Terry Judd via use-livecode wrote:
>> Let’s say I have a whole lot of input statements/info, some of which is 
>> generic but some of which varies according by user. Any thoughts on whether 
>> it might be possible to leverage Xavvi to process and combine that info into 
>> useful prose summaries for each user in a way that I can’t already do in 
>> Livecode - ie generative AI text rather than merging into template text)?
> 
> Well, I'd expect so since Bard can do it, if I understand what you mean. 
> Here's my test. (Bard thinks it's code.)
> 
> My prompt: Make a list of 10 people with first and last names. Combine each 
> one into this sentence: "Hello firstname, I'm exploring the family tree of 
> your lastname relatives." Substitute "firstname" with each person's first 
> name and substitute "lastname" with their last name. Return a list, one 
> person per line.
> 
> Bard says:
> 
> Here is a list of 10 people with first and last names, along with the 
> sentence "Hello firstname, I'm exploring the family tree of your lastname 
> relatives." with each person's first and last name substituted in:
> Code snippet
> 
> Name | Sentence
> --- | 
> John Smith | Hello John, I'm exploring the family tree of your Smith 
> relatives.
> Mary Jones | Hello Mary, I'm exploring the family tree of your Jones 
> relatives.
> Michael Brown | Hello Michael, I'm exploring the family tree of your Brown 
> relatives.
> David Williams | Hello David, I'm exploring the family tree of your Williams 
> relatives.
> Susan White | Hello Susan, I'm exploring the family tree of your White 
> relatives.
> James Green | Hello James, I'm exploring the family tree of your Green 
> relatives.
> Sarah Black | Hello Sarah, I'm exploring the family tree of your Black 
> relatives.
> Peter Brown | Hello Peter, I'm exploring the family tree of your Brown 
> relatives.
> Jessica Smith | Hello Jessica, I'm exploring the family tree of your Smith 
> relatives.
> 
> -- 
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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


Re: Am I using the best mail client?

2023-05-11 Thread Craig Newman via use-livecode
Thank you all.

I will stick with the Mac client.

The reason I like the forums better is what I see as a far more helpful UI. We 
all know how it works.

Enough said of this.

Craig

> On May 11, 2023, at 2:02 PM, Richmond Mathewson via use-livecode 
>  wrote:
> 
> I use Betterbird, an improved split off from Thunderbird.
> 
> On Thu, 11 May 2023, 20:37 Phil Davis via use-livecode, <
> use-livecode@lists.runrev.com> wrote:
> 
>> Thunderbird for me as well, for all the reasons Jacque stated.
>> 
>> Phil Davis
>> 
>> 
>> On 5/11/23 10:27 AM, J. Landman Gay via use-livecode wrote:
>>> I use Thunderbird. Like Matthias, I set up a rule to move list mail
>>> into a subfolder where I can sort by date, author,, subject, or any
>>> other attribute. It supportsl threading. There are several layouts you
>>> can use depending on how you like to organize and view mail. You can
>>> color-code emails automatically on arrival, or manually if you want to
>>> mark one for special reasons. You can drag-drop mail from one folder
>>> to another even across accounts.
>>> 
>>> There are a lot of options so you can customize it however you want.
>>> 
>>> --
>>> Jacqueline Landman Gay | jac...@hyperactivesw.com
>>> HyperActive Software | http://www.hyperactivesw.com
>>> On May 11, 2023 11:33:31 AM Craig Newman via use-livecode
>>>  wrote:
>>> 
>>>> Since I got real help here, and not on the forum(hmph), I am
>>>> wondering if the eMail client I am using is one reason I do not
>>>> prefer this venue.
>>>> 
>>>> I am using the native Mac “Mail’ client. Are there much better ones?
>>>> 
>>>> Craig
>>>> ___
>>>> 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
>> 
>> --
>> Phil Davis
>> (503) 307-4363
>> 
>> 
>> ___
>> 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


Am I using the best mail client?

2023-05-11 Thread Craig Newman via use-livecode
Since I got real help here, and not on the forum(hmph), I am wondering if the 
eMail client I am using is one reason I do not prefer this venue.

I am using the native Mac “Mail’ client. Are there much better ones?

Craig
___
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: Cannot make a standalone after upgrading to Mac Mini and Ventura

2023-05-11 Thread Craig Newman via use-livecode
What a GREAT community this is here on the use-list.

Craig

> On May 10, 2023, at 4:58 PM, Ralph DiMola via use-livecode 
>  wrote:
> 
> I had this happen when I had more than one license. One old and a new with
> "pro". I picked the one(default) without the "pro" features and had only a
> couple of platforms. I relicensed selected "pro" and had all platforms.
> 
> Ralph DiMola
> IT Director
> Evergreen Information Services
> rdim...@evergreeninfo.net
> 
> 
> -Original Message-
> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf
> Of Craig Newman via use-livecode
> Sent: Wednesday, May 10, 2023 4:51 PM
> To: How to use LiveCode
> Cc: Craig Newman
> Subject: Cannot make a standalone after upgrading to Mac Mini and Ventura
> 
> All.
> Help
> I got a new Mac Mini a month ago. Lovely. Working with LC on it. Lovely.
> 
> I tried to make a windows standalone from the same project I have for years.
> In the Applications Settings I cannot select the Windows pane. It is
> essentially disabled, and looks like it.
> 
> In fact, I cannot select any pane except the Mac one. The Mac standalone
> proceeds as usual, but there is nothing done on the Windows side.
> 
> I made a brand new stack. Same issue; only the Mac pane is accessible.
> 
> Before I put the splash stack and the mainStack on a thumb drive and reload
> them back on my old iMac to make an updated standalone, is it me or Ventura?
> 
> Craig
> 
> ___
> 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: Cannot make a standalone after upgrading to Mac Mini and Ventura

2023-05-11 Thread Craig Newman via use-livecode
Heather.

THANK YOU. That worked.

Not that I care much, but was it Ventura or the new machine itself that 
required re-licensing? 

Ralph.

Thanks to you as well.

Craig

> On May 11, 2023, at 4:09 AM, Heather Laine via use-livecode 
>  wrote:
> 
> You probably need to switch licenses. This lesson may be helpful:
> 
> https://lessons.livecode.com/m/4072/l/1542014-i-have-a-valid-license-but-lc-says-it-is-expiring
>  
> <https://lessons.livecode.com/m/4072/l/1542014-i-have-a-valid-license-but-lc-says-it-is-expiring>
> 
> If that doesn't solve it please email support :)
> 
> Best Regards,
> 
> Heather
> 
> Heather Laine
> Customer Services Manager
> LiveCode Ltd
> www.livecode.com
> 
> 
> 
>> On 10 May 2023, at 21:51, Craig Newman via use-livecode 
>>  wrote:
>> 
>> All.
>> Help
>> I got a new Mac Mini a month ago. Lovely. Working with LC on it. Lovely.
>> 
>> I tried to make a windows standalone from the same project I have for years. 
>> In the Applications Settings I cannot select the Windows pane. It is 
>> essentially disabled, and looks like it.
>> 
>> In fact, I cannot select any pane except the Mac one. The Mac standalone 
>> proceeds as usual, but there is nothing done on the Windows side.
>> 
>> I made a brand new stack. Same issue; only the Mac pane is accessible.
>> 
>> Before I put the splash stack and the mainStack on a thumb drive and reload 
>> them back on my old iMac to make an updated standalone, is it me or Ventura?
>> 
>> Craig
>> 
>> ___
>> 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


Cannot make a standalone after upgrading to Mac Mini and Ventura

2023-05-10 Thread Craig Newman via use-livecode
All.
Help
I got a new Mac Mini a month ago. Lovely. Working with LC on it. Lovely.

I tried to make a windows standalone from the same project I have for years. In 
the Applications Settings I cannot select the Windows pane. It is essentially 
disabled, and looks like it.

In fact, I cannot select any pane except the Mac one. The Mac standalone 
proceeds as usual, but there is nothing done on the Windows side.

I made a brand new stack. Same issue; only the Mac pane is accessible.

Before I put the splash stack and the mainStack on a thumb drive and reload 
them back on my old iMac to make an updated standalone, is it me or Ventura?

Craig

___
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: opencard and visual effect

2023-05-03 Thread Craig Newman via use-livecode
Klaus.

I never use visual effects, though I played with them a lot in about 1988. They 
are “blocking” in some sense, so I think you are beat served by losing them 
entirely in your planning.

Craig

> On May 3, 2023, at 2:59 PM, Klaus major-k via use-livecode 
>  wrote:
> 
> Hi Jim,
> 
>> Am 03.05.2023 um 20:18 schrieb Jim Lambert via use-livecode 
>> :
>> 
>>> Problem for me ist to measure the time until the user hits a key after a 
>>> question 
>>> appears on the screen on the card. 
>>> And I start this on "opencard", so the VISUAL effect, what the user really 
>>> sees,
>>> MUST have been terminated, but obviously "opencard" does not respect this.
>> If the visual effect may be compromising your very critical timing perhaps 
>> you should eliminate the visual effect.
>> Just go card and start timing upon opencard.
> 
> you may have missed this in my last posting:
> ...
> As a workaround I'll leave the visual effect out, temporarily.
> ...
> :-)
> 
>> Jim Lambert
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> https://www.major-k.de
> https://www.major-k.de/bass
> kl...@major-k.de
> 
> 
> ___
> 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: opencard and visual effect

2023-05-03 Thread Craig Newman via use-livecode
Klaus.

That was fun.

Oh yes, the point of this thread.  To me it seems that preOpenCard is sent 
before, and openCard is sent after the effect terminates. The fact that you 
have 0 and 3 ticks is no different than having 0 and 125 ticks, The speed of 
the visual effect is not pertinent.

Well, except for the speed of the visual effect. -;)

Note pitiful “wink” emoji above.

Craig

> On May 3, 2023, at 8:25 AM, Klaus major-k via use-livecode 
>  wrote:
> 
> Hi all,
> 
>> 
>>> Am 02.05.2023 um 18:59 schrieb J. Landman Gay via use-livecode 
>>> :
>>> 
>>> Open the message watcher and compare its report to what you see on screen. 
>>> That might help.
>> 
>> I did and see this:
>> ...
>> preopencard 7:01:46 PM (0)
>> opencard 7:01:46 (3)
>> ...
>> I may be a bit slow, but what does the three millisecs difference tell me? 
>> 8-)
>> That everyting (pre- and opencard) does in fact happen AFTER the visual 
>> effect?
> 
> any hints still welcome...
> 
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> https://www.major-k.de
> https://www.major-k.de/bass
> kl...@major-k.de
> 
> 
> ___
> 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: opencard and visual effect

2023-05-02 Thread Craig Newman via use-livecode
Klaus.

It is a works-much-better thing. Script samples and quotes can be separated 
from the main body of text. One can attach stacks and, for Richmond at least, 
silly photos and art layouts. One can edit past posts, or even delete them.

One can search threads in many ways.  MANY.

I was going to attach an emoji, but, well, we are in the use-list.

Otherwise, nothing significant.

Craig

> On May 2, 2023, at 1:28 PM, Klaus major-k via use-livecode 
>  wrote:
> 
> Hi Craig,
> 
>> Am 02.05.2023 um 19:17 schrieb Craig Newman via use-livecode 
>> :
>> 
>> Klaus.
>> 
>> Come back from the dark side.
> 
> I have no idea why you are so possessed by the forum, is it a fetish thing? 
> :-D
> 
> Here on the list I already see more than 10 postings to my question, try to 
> outgun
> this with the forum. 8-)
> 
>> If you do I will send you the stack I made that seems to indicate that 
>> “openCard” is sent after the visual effect terminates.
> 
> Thank you, but I do not need any other example stack, I want to know it with 
> my stack and I also want to know 
> why there are differences between the two ways of going to the next card with 
> a visual effect. See my last mails...
> 
>> Craig
>>> On May 2, 2023, at 1:08 PM, Klaus major-k via use-livecode 
>>>  wrote:
>>> Hi Jacque,
>>>> Am 02.05.2023 um 18:59 schrieb J. Landman Gay via use-livecode 
>>>> :
>>>> Open the message watcher and compare its report to what you see on screen. 
>>>> That might help.
>>> I did and see this:
>>> ...
>>> preopencard 7:01:46 PM (0)
>>> opencard 7:01:46 (3)
>>> ...
>>> I may be a bit slow, but what does the three millisecs difference tell me? 
>>> 8-)
>>> That everyting (pre- and opencard) does in fact happen AFTER the visual 
>>> effect?
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> https://www.major-k.de
> https://www.major-k.de/bass
> kl...@major-k.de
> 
> 
> ___
> 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: opencard and visual effect

2023-05-02 Thread Craig Newman via use-livecode
Jacque.

Go to the forum. I did just that, and the “openCard” message appears in the 
message watcher exactly after the visual effect finishes.

Craig

> On May 2, 2023, at 1:08 PM, Klaus major-k via use-livecode 
>  wrote:
> 
> Hi Jacque,
> 
>> Am 02.05.2023 um 18:59 schrieb J. Landman Gay via use-livecode 
>> :
>> 
>> Open the message watcher and compare its report to what you see on screen. 
>> That might help.
> 
> I did and see this:
> ...
> preopencard 7:01:46 PM (0)
> opencard 7:01:46 (3)
> ...
> I may be a bit slow, but what does the three millisecs difference tell me? 8-)
> That everyting (pre- and opencard) does in fact happen AFTER the visual 
> effect?
> 
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> https://www.major-k.de
> https://www.major-k.de/bass
> kl...@major-k.de
> 
> 
> ___
> 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: opencard and visual effect

2023-05-02 Thread Craig Newman via use-livecode
Klaus.

Come back from the dark side. If you do I will send you the stack I made that 
seems to indicate that “openCard” is sent after the visual effect terminates.

Craig

> On May 2, 2023, at 1:08 PM, Klaus major-k via use-livecode 
>  wrote:
> 
> Hi Jacque,
> 
>> Am 02.05.2023 um 18:59 schrieb J. Landman Gay via use-livecode 
>> :
>> 
>> Open the message watcher and compare its report to what you see on screen. 
>> That might help.
> 
> I did and see this:
> ...
> preopencard 7:01:46 PM (0)
> opencard 7:01:46 (3)
> ...
> I may be a bit slow, but what does the three millisecs difference tell me? 8-)
> That everyting (pre- and opencard) does in fact happen AFTER the visual 
> effect?
> 
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> https://www.major-k.de
> https://www.major-k.de/bass
> kl...@major-k.de
> 
> 
> ___
> 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: opencard and visual effect

2023-05-02 Thread Craig Newman via use-livecode
Klaus.

Why aren’t you doing this in the forum???

I made a stack with two cards. Card 1 has a button on it:

global tTime

on mouseUp

put the ticks into tTime

visual effect "checkerBoard" slow

go cd 2

end mouseUp



In the card 2 script:

global tTime

on openCard

put the ticks - tTime into fld 2

end openCard



I get about 60 ticks, so it seems the message is sent AFTER the visual effect 
completes. Know that with “preOpenCard” I get 0 ticks; the message is sent 
before the visual effect.

Craig


> On May 2, 2023, at 10:21 AM, Klaus major-k via use-livecode 
>  wrote:
> 
> Hi Craig,
> 
>> Am 02.05.2023 um 16:05 schrieb Craig Newman via use-livecode 
>> :
>> 
>> Klaus.
>> 
>> I would guess that as soon as the card was navigated to, that is, before any 
>> visual effect starts or finishes.
>> Not sure how to test this since I am not sure what messages or properties 
>> might be set before, during or after a visual effect runs.
>> 
>> Craig
> 
> thank you, but I need certainty! :-)
> 
> My scenario:
> ...
> lock screen for visual effect
> set the effectrate to 300
> go next cd
> unlock screen with visual wipe left very slow
> ...
> 
> and on the "next card"  I need to measure the time until the 
> user hits a certain key (1 or 2) on the keyboard like this:
> -
> ## Script of the "next" card:
> local tMillisecs
> 
> on opencard
>   put the millisecs into tMillisecs
> end opencard
> 
> on keydown tKey
> if tKey = 1 OR tKey = 2 then
>   put the millisecs - tMillisecs into tDuration
> ...
> 
> You get the picture, so I need to measure this precisely!
> 
> 
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> https://www.major-k.de
> https://www.major-k.de/bass
> kl...@major-k.de
> 
> 
> ___
> 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: opencard and visual effect

2023-05-02 Thread Craig Newman via use-livecode
Klaus.

I would guess that as soon as the card was navigated to, that is, before any 
visual effect starts or finishes.

Not sure how to test this since I am not sure what messages or properties might 
be set before, during or after a visual effect runs.

Craig

> On May 2, 2023, at 9:06 AM, Klaus major-k via use-livecode 
>  wrote:
> 
> Hi friends,
> 
> quick question:
> Will "opencard" be sent to a card AFTER the card was navigated to
> with a visual effect or already during the effect?
> 
> I cannot tell actually in my stack.
> 
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> https://www.major-k.de
> https://www.major-k.de/bass
> kl...@major-k.de
> 
> 
> ___
> 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: Custom property retrieval incorrect

2023-04-27 Thread Craig Newman via use-livecode
Jacque.

Have you tried another name, Like “XYZ”?

Craig

> On Apr 27, 2023, at 3:50 PM, J. Landman Gay via use-livecode 
>  wrote:
> 
> I have a custom stack property called "cVersion" that is used to determine 
> update availability and is shown in an About stack. In LC 9.6.7, 9.6.9, and 
> 10.0.0 dp 5 the custom property is returned incorrectly.
> 
> I set the cVersion of the stack to 3.0.0 in the property inspector and also 
> tried from the message box and from a handler. In both the message box and in 
> a script it returns 3.0.9. I saved the stack, quit LC, relaunched and opened 
> the stack and it then reported 1.0.4. I don't know where these numbers are 
> coming from.
> 
> There are three substacks but none of them have any custom properties at all. 
> When I open the stack property inspector it does correctly say "3.0.0".
> 
> I deleted the custom property completely and then re-entered it. It still 
> says 3.0.9 on a new launch.
> 
> I created a new custom property called "cVers" and it does report 3.0.0 as 
> specified. Other custom stack properties also retrieve correctly, it is only 
> this particular one that fails.
> 
> Anyone seen this? Is there something special about a custom prop named 
> "cVersion"? This used to work fine, but that was about 2 years ago.
> 
> -- 
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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


Re: Weird window behavior

2023-04-19 Thread Craig Newman via use-livecode
Marty.

No more than I. I lead both the forum and this list for personally directed 
oddities. Nobody can touch me…

Craig

> On Apr 19, 2023, at 2:25 PM, Marty Knapp via use-livecode 
>  wrote:
> 
> Ever since I updated to Ventura on my Mac I've had this weird behavior both 
> in the IDE and in two different standalones - if I have more than one stack 
> open, when I click on a stack that is behind another stack to bring it to the 
> front, it very briefly comes to the front (flashes), then goes back behind 
> everything, even windows from other apps. If I click on the title bar it does 
> not do this. In the menubar is still indicates that I'm in my app. It's not 
> happening with any non-Livecode apps and it's occurring on two different 
> Macs. I’m not seeing this behavior on OSes previous to Ventura.
> 
> Am I going crazy?
> 
> Marty
> ___
> 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: card background color

2023-04-19 Thread Craig Newman via use-livecode
Doug.

I also find this annoying. But I have never found a property to disable it. Of 
course, I never asked, so let us both see what turns up.

Craig

> On Apr 19, 2023, at 2:04 PM, Douglas A. Ruisaard via use-livecode 
>  wrote:
> 
> Using LC v9.6.8 Business on Windows 10.  When I drag a new object from the
> Tools Palette onto a card, as the object "enters" the destination card, the
> background of that card turns a VERY dark blue . making the visibility of
> the object-being-dragged very difficult to see until I release the mouse
> button.  Additionally, the background/highlight color of the entry field on
> the Message Box is, similarly, very dark blue after I enter a command .
> making the text (again) very difficult to read.
> 
> 
> 
> I've look thru LC's Preferences and tried adjusting Windows colors.. but to
> no avail.  Anyone know how to adjust (or defeat) this "highlighting"
> feature?
> 
> 
> 
> Doug
> 
> 
> 
> 
> 
> ___
> 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: test

2023-04-06 Thread Craig Newman via use-livecode
Mike.

Why a failure? i see you.

Craig

> On Apr 6, 2023, at 8:22 AM, Mike Kerner via use-livecode 
>  wrote:
> 
> and it's a great, big, gigantic failburger
> end of line.
> 
> On Tue, Apr 4, 2023 at 11:33 AM Bob Sneidar via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> This is a test of the use list.
>> 
>> Bob S
>> 
>> ___
>> 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
>> 
> 
> 
> -- 
> On the first day, God created the heavens and the Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a few hours,
>   and did a little diving.
> And God said, "This is good."
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
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 loop through stacks with same name?

2023-04-04 Thread Craig Newman via use-livecode
Bi.

There has been much discussion on the forum why, if the “destroyStack” property 
is set to “true”, there still seems to be remnants of that stack that linger 
when the “close stack” command is given.

Nonetheless, have you established that this property is set? If not, set it, 
and let us know if that worked.

Craig

> On Apr 4, 2023, at 11:18 AM, Paul Dupuis via use-livecode 
>  wrote:
> 
> I believe there is a IDE handler you can call to unload a stack - something 
> like "revUnloadStack" or similar, but I do not recall the exact API name.
> 
> Hopefully, some one else on the list has the exact API details. 
> Alternatively, contact supp...@livecode.com and ask what the IDE API is to 
> unload a stack.
> 
> 
> 
> On 4/4/2023 10:22 AM, Håkan Liljegren via use-livecode wrote:
>> When my students turn in their assignments all their individual stacks 
>> usually have the same name. If I try to loop through all of them there seems 
>> to be no way to close one stack and move on to the next one (with the same 
>> name) without getting the dialog asking if I want to save, purge or cancel 
>> the previous stack?!
>> 
>> I have tried to:
>> 
>> close stack tStack
>> delete stack tStack
>> 
>> That didn't work
>> 
>> I then thought that it might be that the IDE needed some more time to clean 
>> up so I added a loop:
>> delete stack tStack
>> repeat while tStack is among the lines of the openStacks
>>wait for 100 milliseconds with messages
>> end repeat
>> 
>> That didn’t work either as the next time I try to open a stack with the same 
>> name I get the dialog again
>> 
>> I then thought that maybe the handler needs to be finished before the 
>> cleanup is done so I tried to rewrite using a system where I added all files 
>> that should be crawled into a local variable and added the current stack 
>> into another and created a system using the send command:
>> 
>> local sFileList  # A text with one file path per line for all 
>> files that should be crawled
>> local sCurrentStack# The name of the currently crawled stack
>> 
>> on stackCrawl
>>if sCurrentStack is among the lines of the openstacks then
>>   send “stackCrawl” to me in 500 milliseconds
>>else if sCurrentStack is not empty then
>>   # Now we now that the sCurrentStack is not among the open stacks (I.e 
>> closed and deleted)
>>   put empty into sCurrentStack
>>   if sFileList is empty then
>>  # All stacks crawled => We are finished!
>>   else
>>  send “stackCrawl” to me in 0 milliseconds
>>   end if
>>else # sCurrentStack is empty so we should move on to the next stack in 
>> the file list!
>>   put line 1 of sFileList into tFile
>>   delete line 1 of sFileList
>>   put the openStacks into tStackList
>>   open stack tFile
>>   repeat for each line aStack in the openStacks
>>  if aStack is not among the lines of tStackList then
>> put aStack into sCurrentStack
>> exit repeat
>>  end if
>>   end repeat
>>   # Do needed operations on sCurrentStack
>>   delete sCurrentStack
>>  send “stackCrawl” to me in 500 milliseconds
>>end if
>> end stackCrawl
>>  This also gives the same result. Then I realised that the stacks I have 
>> also have sub stacks so I also tried:
>> 
>>   put the substacks of stack sCurrentStack into tSubStacks
>>   lock messages
>>   repeat for each line tSubStack in tSubstacks
>>  close stack tSubStack
>>   end repeat
>>   delete stack sCurrentStack
>>   unlock messages
>> 
>> I even found a call to revIDEHandleObjectDeleted by peeking into the IDE 
>> itself. Added a call to that function but still no luck!
>> 
>> Even if I loop through all my stacks (by clicking purge for each stack) and 
>> then do a "put the openStacks” I can see that the last stack is not among 
>> the the open stacks. But, if I now try to open the first stack in the list 
>> again I still get a dialog asking me about what I want to do with the last 
>> stack in the list (save, purge or cancel)!
>> 
>> So as soon as a stack I opened via script there is no way to close it via 
>> script and also remove it from the internal workings of the IDE. Is there 
>> ANY way to really delete the stack from the IDE memory so I can open a stack 
>> with the same name without a dialog popping up?!
>> 
>> I’ve reported this as a bug 
>> (https://quality.livecode.com/show_bug.cgi?id=24163), but is still 
>> interested if anyone has at least a workaround…
>> 
>> ___
>> 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 

Re: Bard AI

2023-03-24 Thread Craig Newman via use-livecode
Jacque.

They say that?

Whether human or machine, where else would any of “us” glean information???

Craig

> On Mar 24, 2023, at 3:34 PM, J. Landman Gay via use-livecode 
>  wrote:
> 
> So much for Google's claim it doesn't directly pull from existing text.
> 
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
> On March 24, 2023 7:55:58 AM Craig Newman via use-livecode 
>  wrote:
> 
>> We are ether doomed or blessed. We shall see...
>> 
>> One small snippet from Jacques “new response” query:
>> 
>> "and are typed at compile time based purely on context.”
>> 
>> was a line I wrote in Wikipedia many years ago. It just made me realize how 
>> such engines comb the entire universe for pertinent content, and then use AI 
>> to compose.
>> 
>> Craig
>> 
>>> On Mar 23, 2023, at 4:35 PM, J. Landman Gay via use-livecode 
>>>  wrote:
>>> 
>>> and are typed at compile time based purely on context.
>> 
>> ___
>> 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: Bard AI

2023-03-24 Thread Craig Newman via use-livecode
We are ether doomed or blessed. We shall see...

One small snippet from Jacques “new response” query:

"and are typed at compile time based purely on context.”

was a line I wrote in Wikipedia many years ago. It just made me realize how 
such engines comb the entire universe for pertinent content, and then use AI to 
compose.

Craig

> On Mar 23, 2023, at 4:35 PM, J. Landman Gay via use-livecode 
>  wrote:
> 
> and are typed at compile time based purely on context.

___
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: Is it possible to use a reverse direction for offset

2023-03-23 Thread Craig Newman via use-livecode
Fun, fun…

So if you collect ALL the opening and closing strings, and hopefully these 
never overlap, then each pair can be “ordered”. Now identifying each is just a 
matter of thinking in terms of “pairs” of offsets. You can then identify each 
by their “paired” position in the forward direction.

Or am i missing it still?

Craig

> On Mar 23, 2023, at 12:29 PM, François via use-livecode 
>  wrote:
> 
> An example of when a backwards search would be useful is the following:
> 
> In the app, you have to find command environments. Environments are delimited 
> by an opening string and a closing string.
> 
> Usually, I search forward for the opening string, then search for the closing 
> string afterwards. Once this occurrence is processed, the app goes on with a 
> forward search.
> 
> Now another problem: I want to see in which environment a text position is 
> in, i.e. finding the enclosing opening and closing strings.
> 
> Looking for the closing string is a no brainer. Looking for the opening 
> string is no more difficult if I can do a backwards search.
> 
> However, if I can only search forward, I must start the search at the 
> beginning of the text to scan all the occurrences of the opening string that 
> stand before the text position (if any). The complexity of this approach is 
> not the same as in the case where a backwards search is available.
> 
> François
> 
>> Le 23 mars 2023 à 16:48, Craig Newman via use-livecode 
>>  a écrit :
>> 
>> Francois.
>> 
>> I am sure you know what you have and what you need.
>> 
>> But just for my curiosity, if I had to do what you want, I would have used 
>> the “offset” function and its “charsToSkip” parameter to find all instances 
>> of the text to find, and then use those values in sequence to work 
>> backwards. But then how do you know when to stop?
>> 
>> Craig
>> 
>>> On Mar 23, 2023, at 11:30 AM, François via use-livecode 
>>>  wrote:
>>> 
>>> The text source is not very big.
>>> 
>>> However I implement transcoding from one language to another and I do an 
>>> VERY large amount of search and replace.
>>> 
>>> I think I have quite optimized my LC code but transcoding can take 5 
>>> minutes to do, and I need the whole process to chase unexpected bugs. This 
>>> is using the forward search (offset) most of the time.
>>> 
>>> Using a standalone app takes the time down to 4 minutes, which is not a 
>>> sufficient gain for my usage.
>>> 
>>> François
>>> 
>>>> Le 23 mars 2023 à 16:21, Craig Newman via use-livecode 
>>>>  a écrit :
>>>> 
>>>> Francois.
>>>> 
>>>> Who wouldn’t?
>>>> 
>>>> But unless you are working with VERY large datasets, I bet a handler would 
>>>> process quickly.
>>>> 
>>>> Craig
>>>> 
>>>>> On Mar 23, 2023, at 10:58 AM, François via use-livecode 
>>>>>  wrote:
>>>>> 
>>>>> @Ben
>>>>> 
>>>>> Too bad…
>>>>> 
>>>>> @ Craig
>>>>> 
>>>>> I would rather have an optimized version, I do a lot of text processing 
>>>>> in my app.
>>>>> 
>>>>> Thanks to both of you!
>>>>> François
>>>>> 
>>>>>> Le 23 mars 2023 à 14:43, Craig Newman via use-livecode 
>>>>>>  a écrit :
>>>>>> 
>>>>>> @Ben.
>>>>>> 
>>>>>> 20 years! Congratulations!.
>>>>>> 
>>>>>> @Francois
>>>>>> 
>>>>>> This can be scripted easily. Do you need help with that?
>>>>>> 
>>>>>> Craig
>>>>>> 
>>>>>>> On Mar 23, 2023, at 8:21 AM, Ben Rubinstein via use-livecode 
>>>>>>>  wrote:
>>>>>>> 
>>>>>>> https://quality.livecode.com/show_bug.cgi?id=584 (20th anniversary this 
>>>>>>> September!)
>>>>>>> 
>>>>>>> Also
>>>>>>> https://quality.livecode.com/show_bug.cgi?id=8353
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> On 23/03/2023 11:35, François via use-livecode wrote:
>>>>>>>> I would like to search for a string within another string, starting at 
>>>>>>>> a given position, but backward.
>>>>>

Re: Is it possible to use a reverse direction for offset

2023-03-23 Thread Craig Newman via use-livecode
Francois.

I am sure you know what you have and what you need.

But just for my curiosity, if I had to do what you want, I would have used the 
“offset” function and its “charsToSkip” parameter to find all instances of the 
text to find, and then use those values in sequence to work backwards. But then 
how do you know when to stop?

Craig

> On Mar 23, 2023, at 11:30 AM, François via use-livecode 
>  wrote:
> 
> The text source is not very big.
> 
> However I implement transcoding from one language to another and I do an VERY 
> large amount of search and replace.
> 
> I think I have quite optimized my LC code but transcoding can take 5 minutes 
> to do, and I need the whole process to chase unexpected bugs. This is using 
> the forward search (offset) most of the time.
> 
> Using a standalone app takes the time down to 4 minutes, which is not a 
> sufficient gain for my usage.
> 
> François
> 
>> Le 23 mars 2023 à 16:21, Craig Newman via use-livecode 
>>  a écrit :
>> 
>> Francois.
>> 
>> Who wouldn’t?
>> 
>> But unless you are working with VERY large datasets, I bet a handler would 
>> process quickly.
>> 
>> Craig
>> 
>>> On Mar 23, 2023, at 10:58 AM, François via use-livecode 
>>>  wrote:
>>> 
>>> @Ben
>>> 
>>> Too bad…
>>> 
>>> @ Craig
>>> 
>>> I would rather have an optimized version, I do a lot of text processing in 
>>> my app.
>>> 
>>> Thanks to both of you!
>>> François
>>> 
>>>> Le 23 mars 2023 à 14:43, Craig Newman via use-livecode 
>>>>  a écrit :
>>>> 
>>>> @Ben.
>>>> 
>>>> 20 years! Congratulations!.
>>>> 
>>>> @Francois
>>>> 
>>>> This can be scripted easily. Do you need help with that?
>>>> 
>>>> Craig
>>>> 
>>>>> On Mar 23, 2023, at 8:21 AM, Ben Rubinstein via use-livecode 
>>>>>  wrote:
>>>>> 
>>>>> https://quality.livecode.com/show_bug.cgi?id=584 (20th anniversary this 
>>>>> September!)
>>>>> 
>>>>> Also
>>>>> https://quality.livecode.com/show_bug.cgi?id=8353
>>>>> 
>>>>> 
>>>>> 
>>>>> On 23/03/2023 11:35, François via use-livecode wrote:
>>>>>> I would like to search for a string within another string, starting at a 
>>>>>> given position, but backward.
>>>>>> In some languages, you can achieve that by providing a negative number 
>>>>>> for the initial position of the search.
>>>>>> Is this possible in LiveCode?
>>>>>> TIA
>>>>>> François
>>>>>> ___
>>>>>> 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
>> 
>> 
>> ___
>> 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: Is it possible to use a reverse direction for offset

2023-03-23 Thread Craig Newman via use-livecode
Francois.

Who wouldn’t?

But unless you are working with VERY large datasets, I bet a handler would 
process quickly.

Craig

> On Mar 23, 2023, at 10:58 AM, François via use-livecode 
>  wrote:
> 
> @Ben
> 
> Too bad…
> 
> @ Craig
> 
> I would rather have an optimized version, I do a lot of text processing in my 
> app.
> 
> Thanks to both of you!
> François
> 
>> Le 23 mars 2023 à 14:43, Craig Newman via use-livecode 
>>  a écrit :
>> 
>> @Ben.
>> 
>> 20 years! Congratulations!.
>> 
>> @Francois
>> 
>> This can be scripted easily. Do you need help with that?
>> 
>> Craig
>> 
>>> On Mar 23, 2023, at 8:21 AM, Ben Rubinstein via use-livecode 
>>>  wrote:
>>> 
>>> https://quality.livecode.com/show_bug.cgi?id=584 (20th anniversary this 
>>> September!)
>>> 
>>> Also
>>> https://quality.livecode.com/show_bug.cgi?id=8353
>>> 
>>> 
>>> 
>>> On 23/03/2023 11:35, François via use-livecode wrote:
>>>> I would like to search for a string within another string, starting at a 
>>>> given position, but backward.
>>>> In some languages, you can achieve that by providing a negative number for 
>>>> the initial position of the search.
>>>> Is this possible in LiveCode?
>>>> TIA
>>>> François
>>>> ___
>>>> 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


___
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: Is it possible to use a reverse direction for offset

2023-03-23 Thread Craig Newman via use-livecode
@Ben.

20 years! Congratulations!.

@Francois

This can be scripted easily. Do you need help with that?

Craig

> On Mar 23, 2023, at 8:21 AM, Ben Rubinstein via use-livecode 
>  wrote:
> 
> https://quality.livecode.com/show_bug.cgi?id=584 (20th anniversary this 
> September!)
> 
> Also
> https://quality.livecode.com/show_bug.cgi?id=8353
> 
> 
> 
> On 23/03/2023 11:35, François via use-livecode wrote:
>> I would like to search for a string within another string, starting at a 
>> given position, but backward.
>> In some languages, you can achieve that by providing a negative number for 
>> the initial position of the search.
>> Is this possible in LiveCode?
>> TIA
>> François
>> ___
>> 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: REGRESSION in LC 9.6.9rc2

2023-03-07 Thread Craig Newman via use-livecode
Paul.

Hi.

What modal dialog has a dropDown menu?

Craig

> On Mar 7, 2023, at 12:58 PM, Paul Dupuis via use-livecode 
>  wrote:
> 
> Sadly, I just found another serious regression in LC 9.6.9rc2 that seems to 
> cause dropdown menus in modal dialogs to fail.
> 
> Code that works in LC 9.6.8 does not work at all in 9.6.9rc2
> 
> See https://quality.livecode.com/show_bug.cgi?id=24133
> 
> I am hoping LC can fix this for 9.6.8rc3 or, like the last regression in rc2 
> I found, can provide a script fix I can apply to rc2
> 
> 
> 
> 
> ___
> 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: Chat and textarea formatting

2023-02-14 Thread Craig Newman via use-livecode
Hi.

Not sure I understand.

You have an editable field that you cannot type into? Do you get a blinking 
cursor in that field if you click inside it?

Perhaps some properties for that field are such that LC is preventing access?

Craig

> On Feb 14, 2023, at 3:35 PM, harrison--- via use-livecode 
>  wrote:
> 
> Greetings LC List Members,
> 
> I have to create a little chat program with LiveCode on a LiveCode server.
> Currently I have a textarea text box to accept the user’s input, but it won’t
> keep any formatting at all, not even carriage returns, line feeds, or bold
> faced text.  I also have to put that information into a database, so I can
> pull it out later.
> 
> How are you handling such things with LiveCode?  One would think that
> by this time we would have something simple that would deal with this!
> It has to be a common problem, and one would think their would be a
> common solution to it.
> 
> Suggestions?
> 
> Thanks,
> 
> Rick 
> ___
> 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: Training the AI to write better LiveCode

2023-02-06 Thread Craig Newman via use-livecode
A = -25
B = -20
C = -15

So, -60.

Craig

> On Feb 6, 2023, at 9:03 AM, Mike Kerner via use-livecode 
>  wrote:
> 
> there was also a thread on twitter this weekend, which was roughly this:
> A - A - A = 25
> B - B - B = 20
> C - C - C = 15
> A + B + C = ?
> It's still early.
> 
> On Sun, Feb 5, 2023 at 8:57 AM Mark Rauterkus via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Medium article: Guy uses Chat GPT to program home assistant.
>> 
>> 
>> https://matemarschalko.medium.com/chatgpt-in-an-ios-shortcut-worlds-smartest-homekit-voice-assistant-9a33b780007a
>> 
>> 
>> 
>> --
>> Ta.
>> 
>> 
>> Mark Rauterkus   m...@rauterkus.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
>> 
> 
> 
> -- 
> On the first day, God created the heavens and the Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a few hours,
>   and did a little diving.
> And God said, "This is good."
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
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: ChatGPT examples

2023-01-20 Thread Craig Newman via use-livecode
Geoff.

Startling, and beautifully presented.

I had no idea ChatGPT was that powerful and knowledgeable.

We are doomed.

Craig

> On Jan 20, 2023, at 8:05 AM, Alex Tweedly via use-livecode 
>  wrote:
> 
> Fascinating. Thank you so much for that Geoff.
> 
> I've been afraid to play with ChatGPT so far - too worried abut getting 
> sucked in and spending way too much time 
> 
> I did take a look at your third example (since I can never resist a 
> performance challenge :-)
> 
> There are a number of minor tweaks that could be made to improve performance
> 
> 1. set initial value to infinity rather than calculating a distance between 
> the first two points.
> 
> 2. "number of elements in pPoints" is unvarying within any one call - so 
> extract it to a variable at the start
> 
> 3. use the square of the distance rather than the actual distance - save N**2 
> calls to sqrt
> 
> 4. use "DX * DX" rather than "DX ^ 2" (about 25% faster)
> 
> 5. calculate distance in-line rather than call a function
> 
> but those all add up to maybe 10% performance improvement (or less - I didn't 
> test it). That's useful - but not enough.
> 
> For a modest number of points (2000 random points), this takes approx 16.5 
> seconds !!
> 
> We need a better algorithm. If we use a "linear scan", we can change it from 
> essentially Order(N**2) to approx Order(N).
> 
> Summary:
> 
>  - sort the points by X coordinate
> 
>  - while scanning the inner loop, as soon as the difference in Xcoord from 
> the 'outer' point exceeds the minDist so far, you can reject not just this 
> point, but all subsequent points, and hence exit the inner loop immediately.
> 
> This brings the time down from 16500 millisecs to 25 millisecs.
> 
> BUT - I have no clue how I'd go about describing this to ChatGPT :-)
> 
> NB I changed the input parameter to be the list of points rather than the 
> array.
> 
> Code:
> 
> function closestPointsSQ pLines
>sort pLines by item 1 of each
>put pLines into pPoints
>split pPoints by CR
>put infinity into minDist
>put the number of elements in pPoints into N
>repeat with i = 1 to N-1
>   repeat with j = i + 1 to N
>  put item 1 of pPoints[j] - item 1 of pPoints[i] into t1
>  if t1 * t1 > minDist then exit repeat
>  put item 2 of pPoints[j] - item 2 of pPoints[i] into t2
>  put t1 * t1 + t2 * t2 into dist
>  if dist < minDist then
> put dist into minDist
> put pPoints[i] & " " & pPoints[j] into closestPoints
>  else if dist = minDist then
> put return & pPoints[i] & " " & pPoints[j] after closestPoints
>  end if
>   end repeat
>end repeat
>return closestPoints
> end closestPointsSQ
> 
> -- Alex.
> 
> On 20/01/2023 06:02, Geoff Canyon via use-livecode wrote:
>> I tested three use cases, with variations, using ChatGPT for (live)code
>> generation. There was a lot of back and forth. In the end, I solved all the
>> problems I set, but in some cases I had to hold ChatGPT's hand pretty
>> tightly.
>> 
>> That said, I learned some things as well -- about LiveCode. ChatGPT's code
>> for Fizz Buzz was faster than mine.
>> 
>> My code was faster for reversing lines. But ChatGPT, when asked to "make
>> the code faster" gave several suggestions, some of which were wrong or
>> impossible, but one of them was my method, and when I said "write that
>> option" it did, with only a few corrections needed.
>> 
>> And one of the ideas, while wrong, caused me to think of a different way to
>> solve the problem, and that way ended up being faster than my original
>> solution by over 3x on reversing 10k lines. Getting ChatGPT to write this
>> new method was *hard*.
>> 
>> In any case, I wrote it all down in a google doc
>> .
>> If you're curious, have a read. That URL is open for comments/edit
>> suggestions. If you have any I'd love to hear them.
>> 
>> Thanks!
>> 
>> Geoff
>> ___
>> 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: Maximum field size

2023-01-19 Thread Craig Newman via use-livecode
Richard.

As I mentioned, I wanted to make sure the field had scroll capabilities. ;-)

> On Jan 19, 2023, at 12:54 PM, Richard Gaskin via use-livecode 
>  wrote:
> 
> David Epstein wrote:
> 
> > How many rows or columns or characters can reasonably be displayed
> > in a LiveCode field?  A 1.39 GB text file seems pretty clearly to
> > surpass the limit, but how much do I need to subdivide it?
> 
> Jacque noted the machine limits, but I'm curious about a human question:
> 
> At an average of ~3,000 characters per printed page, if I'm doing the math 
> right then 1.3 GB of text = 433,333 pages worth of content.
> 
> For comparison, the entire text of the KJV Bible from the Gutenberg Project 
> is 4.5 MB.
> 
> What are you displaying for the user to read during the session?
> 
> -- 
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for the Desktop, Mobile, and the Web
> 
> ambassa...@fourthworld.comhttp://www.FourthWorld.com
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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


Re: Maximum field size

2023-01-19 Thread Craig Newman via use-livecode
Guys, (and Jacque)

I made my test with lines of 14 chars. Lots of lines.   LC crashes.

Craig

> On Jan 19, 2023, at 10:10 AM, Craig Newman  wrote:
> 
> The stack I made to test this became corrupted after a couple of runs. I 
> guess the way to do this is to increase the length until a crash, not 
> decrease.
> 
>> On Jan 19, 2023, at 10:09 AM, Craig Newman  
>> wrote:
>> 
>> But I assume that there is a value where a field can be loaded and display a 
>> large amount of text. It would be simple to find that value if LC didn’t 
>> crash each time it was attempted along the way.
>> 
>> Craig
>> 
>>> On Jan 19, 2023, at 10:06 AM, Craig Newman  
>>> wrote:
>>> 
>>> David.
>>> 
>>> You want to display 1.39 GB in a field? Will it scroll?
>>> 
>>> I made a quick test stack that created a variable with a length of 1.4 GB. 
>>> No problem.
>>> 
>>> But when I tried to put that variable into a field, LC crashed. When I 
>>> tried to put 140 MB into a field, same crash. I did not continue to reduce 
>>> the length of that variable until the field could be loaded.
>>> 
>>> Craig
>>> 
 On Jan 18, 2023, at 7:46 PM, Paul Dupuis via use-livecode 
  wrote:
 
 I thought the theoretical limit was 4GB (32bits of characters) but I may 
 be wrong or there may be practical limits below that threshold.
 
 
 On 1/18/2023 7:29 PM, David Epstein via use-livecode wrote:
> How many rows or columns or characters can reasonably be displayed in a 
> LiveCode field?  A 1.39 GB text file seems pretty clearly to surpass the 
> limit, but how much do I need to subdivide it?
> 
> David Epstein
> ___
> 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: Maximum field size

2023-01-19 Thread Craig Newman via use-livecode
The stack I made to test this became corrupted after a couple of runs. I guess 
the way to do this is to increase the length until a crash, not decrease.

> On Jan 19, 2023, at 10:09 AM, Craig Newman  wrote:
> 
> But I assume that there is a value where a field can be loaded and display a 
> large amount of text. It would be simple to find that value if LC didn’t 
> crash each time it was attempted along the way.
> 
> Craig
> 
>> On Jan 19, 2023, at 10:06 AM, Craig Newman  
>> wrote:
>> 
>> David.
>> 
>> You want to display 1.39 GB in a field? Will it scroll?
>> 
>> I made a quick test stack that created a variable with a length of 1.4 GB. 
>> No problem.
>> 
>> But when I tried to put that variable into a field, LC crashed. When I tried 
>> to put 140 MB into a field, same crash. I did not continue to reduce the 
>> length of that variable until the field could be loaded.
>> 
>> Craig
>> 
>>> On Jan 18, 2023, at 7:46 PM, Paul Dupuis via use-livecode 
>>>  wrote:
>>> 
>>> I thought the theoretical limit was 4GB (32bits of characters) but I may be 
>>> wrong or there may be practical limits below that threshold.
>>> 
>>> 
>>> On 1/18/2023 7:29 PM, David Epstein via use-livecode wrote:
 How many rows or columns or characters can reasonably be displayed in a 
 LiveCode field?  A 1.39 GB text file seems pretty clearly to surpass the 
 limit, but how much do I need to subdivide it?
 
 David Epstein
 ___
 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: Maximum field size

2023-01-19 Thread Craig Newman via use-livecode
But I assume that there is a value where a field can be loaded and display a 
large amount of text. It would be simple to find that value if LC didn’t crash 
each time it was attempted along the way.

Craig

> On Jan 19, 2023, at 10:06 AM, Craig Newman  wrote:
> 
> David.
> 
> You want to display 1.39 GB in a field? Will it scroll?
> 
> I made a quick test stack that created a variable with a length of 1.4 GB. No 
> problem.
> 
> But when I tried to put that variable into a field, LC crashed. When I tried 
> to put 140 MB into a field, same crash. I did not continue to reduce the 
> length of that variable until the field could be loaded.
> 
> Craig
> 
>> On Jan 18, 2023, at 7:46 PM, Paul Dupuis via use-livecode 
>>  wrote:
>> 
>> I thought the theoretical limit was 4GB (32bits of characters) but I may be 
>> wrong or there may be practical limits below that threshold.
>> 
>> 
>> On 1/18/2023 7:29 PM, David Epstein via use-livecode wrote:
>>> How many rows or columns or characters can reasonably be displayed in a 
>>> LiveCode field?  A 1.39 GB text file seems pretty clearly to surpass the 
>>> limit, but how much do I need to subdivide it?
>>> 
>>> David Epstein
>>> ___
>>> 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: Maximum field size

2023-01-19 Thread Craig Newman via use-livecode
David.

You want to display 1.39 GB in a field? Will it scroll?

I made a quick test stack that created a variable with a length of 1.4 GB. No 
problem.

But when I tried to put that variable into a field, LC crashed. When I tried to 
put 140 MB into a field, same crash. I did not continue to reduce the length of 
that variable until the field could be loaded.

Craig

> On Jan 18, 2023, at 7:46 PM, Paul Dupuis via use-livecode 
>  wrote:
> 
> I thought the theoretical limit was 4GB (32bits of characters) but I may be 
> wrong or there may be practical limits below that threshold.
> 
> 
> On 1/18/2023 7:29 PM, David Epstein via use-livecode wrote:
>> How many rows or columns or characters can reasonably be displayed in a 
>> LiveCode field?  A 1.39 GB text file seems pretty clearly to surpass the 
>> limit, but how much do I need to subdivide it?
>> 
>> David Epstein
>> ___
>> 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: Move in Reverse

2023-01-17 Thread Craig Newman via use-livecode
Roger.

I will bet that you have to get the points, write a short routine to reverse 
them, and then use that “inverted” list.

Craig

> On Jan 17, 2023, at 3:06 PM, Roger Guay via use-livecode 
>  wrote:
> 
> Hi all,
> 
> is there a simple way to move a grc to the points of a polygon in reverse? 
> Or, does one have to manipulate the points list to its inverse?
> 
> Thanks,
> 
> Roger
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
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: Anyone else experience this bug?

2023-01-04 Thread Craig Newman via use-livecode
I have been plagued by arbitrary crashes forever. Probably a few times per 
month. But since I cannot post a repeatable example, I have nothing but 
sympathy from the forum members. Note though that those members generally do 
NOT see this issue at all.

Craig

> On Jan 4, 2023, at 5:20 AM, Sean Cole via use-livecode 
>  wrote:
> 
> I am not noticing this using LC quite extensively over the holidays. Is
> there any code or library common to both codesets that utilises mouseUp
> messages in the stack or card script? This would be my first place to look.
> 
> Sean Cole
> *Pi Digital Productions Ltd*
> 
> eMail Ts & Cs    Pi Digital
> Productions Ltd is a UK registered limited company, no. 5255609
> 
> 
> On Wed, 4 Jan 2023 at 04:22, Tom Glod via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Hi Folks,
>> 
>> I work with 2 completely different codebases every week.
>> On both I and (we) experience hard crashes to desktop, where livecode
>> process just goes poof
>> Usually it is triggered by either a mouseUp or mouseDown ... most likely
>> UP.
>> The bug is not consistent and does not happen when clicking anything in
>> particular.
>> There are days it does not happen, and days when it does multiple times.
>> On the exact same, doing the exact same things.
>> It happens both in IDE and in standalone
>> On both windows and mac.
>> (Come to think of it, it has happened less on  Windows 11 than 10.)
>> Running latest stable and latest RC1
>> 
>> Has anyone else experienced it?
>> 
>> Bug report from QC
>> 
>> https://quality.livecode.com/show_bug.cgi?id=23989
>> 
>> Getting pretty desperate to find it., I need it out of my life.
>> '
>> Thanks,
>> 
>> Tom
>> ___
>> 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: ChatGPT

2022-12-20 Thread Craig Newman via use-livecode
Somehow that last was mixed up with the concept of any number being able to be 
expressed by a string of prime factors. So 77 can be resolved to ’11” and ”7”.  
 “42” by “7’, “3” and”2’.

> On Dec 9, 2022, at 4:54 PM, Jim Lambert via use-livecode 
>  wrote:
> 
> Even more interesting I issued the same chat request a few hours later and 
> got an entirely different coding approach. 
> It even helpfully put the code into formatted, copy-able blocks. (formatting 
> not shown here.)
> 
> ME: Write a calendar app in livecode
> 
> CHATGPT:
> Here is an example of how you could implement a simple calendar app in 
> LiveCode:
> 
> Copy code
> -- Set the default date to the current date put the short date into 
> currentDate 
> 
> -- Create the calendar UI 
> create calendar 
> set the date of calendar to currentDate 
> set the rect of calendar to the rect of this card  
> 
> -- Function to handle date changes in the calendar 
> on dateChanged pNewDate 
> put pNewDate into currentDate 
> end dateChanged
> 
> This script creates a calendar widget and sets its default date to the 
> current date. It also defines a dateChanged handler that is called whenever 
> the selected date in the calendar changes. In this handler, the currentDate 
> variable is updated with the new selected date.
> 
> You can then add other UI elements and functions to your app to allow the 
> user to view and manage events for the selected date. For example, you could 
> add a list widget to display the events for the current date, and buttons to 
> add and remove events.
> 
> Here is an example of how you could add a list widget to display the events 
> for the current date:
> 
> Copy code
> -- Create a list widget to display the events for the current date 
> create field "eventsList" 
> set the rect of "eventsList" to 100,100,200,200 
> set the text of "eventsList" to "No events for this date" 
> 
> -- Function to update the events list 
> on updateEventsList 
> -- Clear the events list 
> put empty into field "eventsList" 
> 
> -- Retrieve the events for the current date from a database or file 
> put the events for currentDate from database or file into events 
> 
> -- Add the events to the list 
> repeat for each event in events 
> put event & cr after field "eventsList"
> end repeat 
> end updateEventsList
> 
> This script creates a list widget called eventsList, and defines an 
> updateEventsList function that retrieves the events for the current date from 
> a database or file and adds them to the list.
> 
> You can then call the updateEventsList function whenever the date in the 
> calendar changes, so that the list of events is updated to show the events 
> for the new selected date. You can do this by adding the following code to 
> the dateChanged handler:
> 
> Copy code
> on dateChanged pNewDate 
> put pNewDate into currentDate 
> updateEventsList 
> end dateChanged
> 
> You can also add buttons to allow the user to add and remove events. For 
> example, you could add the following code to create "Add" and "Remove" 
> buttons and define the corresponding event handlers:
> 
> Copy code
> -- Create "Add" and "Remove" buttons
> 
> But, of course, this code doesn't actually work. But it could be re-written 
> to work.
> 
> JimL
> ___
> 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: ChatGPT

2022-12-20 Thread Craig Newman via use-livecode
As Mark said…

So if you have, say, 22, which is divisible by the prime “11”, then it is also 
divisible by 7""???

Craig

> On Dec 19, 2022, at 8:10 PM, Mark Wieder via use-livecode 
>  wrote:
> 
> On 12/18/22 12:15, Richard Gaskin via use-livecode wrote:
>> A Twitter thread with ChatGPT botsplaining how 77 is a prime number:
>> https://twitter.com/bellafusari1/status/1603161415678046208
> 
> Wait what?
> 
> "To prove that 77 is a prime number, we can use the theorem that states that 
> if a number is divisible by a prime number, then it is also divisible by all 
> the prime numbers that are smaller than it."
> 
> -- 
> Mark Wieder
> ahsoftw...@gmail.com
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
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: Lock screen and animated gif

2022-12-20 Thread Craig Newman via use-livecode
Jbv.

"Every ten lines"???

Is your handler using a loop to massage each of those lines? If so update the 
scrollbar every 10 passes through.

So if you are using “repeat with…” you can do something like:

repeat with y = 1 to whatever
  if y mod 10 = 0 then updateYourThingie

And if you are using “repeat for” then you must add your own counter:

repeat for each line tLine in yourText
add 1 to counter
if counter mod 10 = 0 then updateYourThingie

Craig

> On Dec 20, 2022, at 8:43 AM, jbv via use-livecode 
>  wrote:
> 
> Le 2022-12-20 08:19, Brian Milby via use-livecode a écrit :
>> Could you make changes to htmlText in a variable and then assign all
>> at once back to the field?
> 
> I thought of that, but it makes other parts of the script more complicated.
> Finally I will chose a different strategy : instead of an animated gif, I'm
> gonna use a progress bar that will be updated every 10 lines as follows :
>  unlock screen
>  set currentvalue of scrollbar "progress" to x
>  lock screen
> It shouldn't slow down the script too much...
> 
> ___
> 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: Lock screen challenge

2022-11-21 Thread Craig Newman via use-livecode
Jacque.

Why aren’t you on the forum?

Cant you just loop through each line in your handlers, and find the ones that 
contain “lock screen”, both with and without the visual effect thing. Search 
downstream until you find the “unlock” line, That gives you the start and 
finish lines for each handler. Then you can just replace the start and finish 
lines with the new ones.

Am I missing this?

Craig

> On Nov 21, 2022, at 4:24 PM, J. Landman Gay via use-livecode 
>  wrote:
> 
> I'm updating a very old set of stacks that use old HC syntax for "lock 
> screen". A search with LC's Find utility says there are 723 instances that 
> may need to be changed. Right now they look like this:
> 
> lock screen
> -- do any number of things
> unlock screen with 
> 
> These all need to be changed to:
> 
> lock screen for visual effect
> -- do any number of things
> unlock screen with visual effect 
> 
> The challenge is that not all "lock screen" commands use a visual effect, 
> some are simple lock/unlock pairs. I need to automate this. The visual 
> effects are not all the same. Some handlers have multiple instances of 
> locking the screen with or without a visual effect.
> 
> I'd use a regex if I could, but back references aren't supported (or are they 
> now?) I really don't want to do this manually.
> 
> -- 
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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


Re: Return of Hilited text of Popup Menu items

2022-11-11 Thread Craig Newman via use-livecode
Nope

Grumman F6F.

> On Nov 11, 2022, at 12:03 PM, Bob Sneidar via use-livecode 
>  wrote:
> 
> Or the greatest WWII fighter plane ever made. 
> 
>> On Nov 11, 2022, at 08:56 , Craig Newman via use-livecode 
>>  wrote:
>> 
>> And a corsair is what a pirate aspires to.
>> 
>> Craig
>> 
>>> On Nov 11, 2022, at 11:11 AM, Bob Sneidar via use-livecode 
>>>  wrote:
>>> 
>>> A Curser is what I was as a sailor. A Cursor is the icon on your monitor 
>>> that indicates where the mouse is located. ;-)
>>> 
>>> Bob S
>>> 
>>> 
>>> On Nov 10, 2022, at 18:28 , Roger Guay via use-livecode 
>>> mailto:use-livecode@lists.runrev.com>> wrote:
>>> 
>>> Is there a way to return the hilited menu items of a popup menu button as 
>>> the curser is scrolled through the menu items?
>>> 
>>> Thanks for your help!
>>> 
>>> Roger
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> ___
>> 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: Return of Hilited text of Popup Menu items

2022-11-11 Thread Craig Newman via use-livecode
And a corsair is what a pirate aspires to.

Craig

> On Nov 11, 2022, at 11:11 AM, Bob Sneidar via use-livecode 
>  wrote:
> 
> A Curser is what I was as a sailor. A Cursor is the icon on your monitor that 
> indicates where the mouse is located. ;-)
> 
> Bob S
> 
> 
> On Nov 10, 2022, at 18:28 , Roger Guay via use-livecode 
> mailto:use-livecode@lists.runrev.com>> wrote:
> 
> Is there a way to return the hilited menu items of a popup menu button as the 
> curser is scrolled through the menu items?
> 
> Thanks for your help!
> 
> Roger
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
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: Return of Hilited text of Popup Menu items

2022-11-11 Thread Craig Newman via use-livecode
Roger.

No messages are sent while a menu is open. Further, a “mouseMove” handler in, 
say, the card script stops receiving messages while that menu is open.

Such a gadget, likely drawn by the underlying OS, seems to be blocking. So, I 
think, no.

Craig

> On Nov 10, 2022, at 9:28 PM, Roger Guay via use-livecode 
>  wrote:
> 
> Is there a way to return the hilited menu items of a popup menu button as the 
> curser is scrolled through the menu items?
> 
> Thanks for your help!
> 
> Roger
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
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: ENTER in scripts

2022-11-10 Thread Craig Newman via use-livecode
Hmmm.

Odd we have so many different actions. I am on a Mac, with an Apple keyboard. 
Enter works as advertised. I have a MacAlly keyboard, and Enter works there as 
well.

Focus, as I mentioned and expect, must been the SE.

Craig

> On Nov 10, 2022, at 12:17 PM, J. Landman Gay via use-livecode 
>  wrote:
> 
> I wonder if you could remap one to send the Mac key code for Enter.
> 
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
> On November 10, 2022 10:00:28 AM Bob Sneidar via use-livecode 
>  wrote:
> 
>> It does nothing, but to be fair I am using a Windows xternal keyboard (if 
>> there is such a thing these days,) on a MacOS laptop, and both "Enter" keys 
>> are called, "Enter." Neither does anything in terms of formatting the SE or 
>> compiling. It works for me though.
>> 
>> Bob S
>> 
>> 
>>> On Nov 9, 2022, at 16:59 , J. Landman Gay via use-livecode 
>>>  wrote:
>>> 
>>> I'm on a Mac and I've been using the enter key to compile for years (back 
>>> to MetaCard I think.) Are you sure it does nothing? Watch the dot in the 
>>> script tab and see if it turns green.
>>> 
>>> --
>>> Jacqueline Landman Gay | jac...@hyperactivesw.com
>>> HyperActive Software | http://www.hyperactivesw.com
>>> On November 9, 2022 4:19:36 PM Bob Sneidar via use-livecode 
>>>  wrote:
>>> 
>>>> Hmmm... On MacOS enter does nothing. Return inserts a carriage return. I 
>>>> use tab then cmd-save to format then comile the script.
>>>> 
>>>> Bob S
>>>> 
>>>> 
>>>>> On Nov 7, 2022, at 13:29 , Ralph DiMola via use-livecode 
>>>>>  wrote:
>>>>> 
>>>>> Well, you learn something exceedingly simple every day. OK I get it. 
>>>>> Enter is the same as clicking "Apply". Very convenient! Saves time typing 
>>>>> in the SE.
>>>>> 
>>>>> THANKS!
>>>>> 
>>>>> 
>>>>> Ralph DiMola
>>>>> IT Director
>>>>> Evergreen Information Services
>>>>> rdim...@evergreeninfo.net
>>>>> 
>>>>> 
>>>>> -Original Message-
>>>>> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On 
>>>>> Behalf Of Craig Newman via use-livecode
>>>>> Sent: Monday, November 07, 2022 2:08 PM
>>>>> To: How to use LiveCode
>>>>> Cc: Craig Newman
>>>>> Subject: Re: ENTER in scripts
>>>>> 
>>>>> All.
>>>>> 
>>>>> "Enter" has always worked for me. And focus has always been required to 
>>>>> be in the SE for it to do so.
>>>>> 
>>>>> This seems logical to me. It would not do for actions specific to certain 
>>>>> spaces to be affected, or effected, when not in that space.
>>>>> 
>>>>> Craig
>>>>> 
>>>>>> On Nov 7, 2022, at 1:07 PM, Martin Koob via use-livecode 
>>>>>>  wrote:
>>>>>> 
>>>>>> Do you mean does pressing the ENTER key does the same thing as clicking 
>>>>>> the ‘Apply’ button at the top left of the script editor?
>>>>>> 
>>>>>> The tool tip for the ‘APPLY’ button says.
>>>>>> 
>>>>>>  ‘compile and apply the current script (Enter, cmd+Return)’
>>>>>> 
>>>>>> I actually did not know there was a keyboard shortcut for the ‘Apply’ 
>>>>>> button.  That is a handy tip.
>>>>>> 
>>>>>> I tried it out and at first it did not work.  That time the focus was on 
>>>>>> the script field and the text cursor was there.
>>>>>> 
>>>>>> If I clicked on part of the card outside of the script field then the 
>>>>>> cmd+Return key combination worked.
>>>>>> 
>>>>>> If I clicked in another object like the ‘find’ text field or a handler 
>>>>>> in the list to the left of the text field or on the ‘MatchCase’ checkbox 
>>>>>>  CMD+Return would not work.
>>>>>> 
>>>>>> So it looks like it only works when there is no focus on a field or 
>>>>>> other object.
>>>>>> 
>>>>>> 
>>>>>> In any case it sounds like a bu

Re: ENTER in scripts

2022-11-07 Thread Craig Newman via use-livecode
All.

"Enter" has always worked for me. And focus has always been required to be in 
the SE for it to do so.

This seems logical to me. It would not do for actions specific to certain 
spaces to be affected, or effected, when not in that space.

Craig

> On Nov 7, 2022, at 1:07 PM, Martin Koob via use-livecode 
>  wrote:
> 
> Do you mean does pressing the ENTER key does the same thing as clicking the 
> ‘Apply’ button at the top left of the script editor?
> 
> The tool tip for the ‘APPLY’ button says.
> 
>   ‘compile and apply the current script (Enter, cmd+Return)’
> 
> I actually did not know there was a keyboard shortcut for the ‘Apply’ button. 
>  That is a handy tip.
> 
> I tried it out and at first it did not work.  That time the focus was on the 
> script field and the text cursor was there. 
> 
> If I clicked on part of the card outside of the script field then the 
> cmd+Return key combination worked.
> 
> If I clicked in another object like the ‘find’ text field or a handler in the 
> list to the left of the text field or on the ‘MatchCase’ checkbox   
> CMD+Return would not work.
> 
> So it looks like it only works when there is no focus on a field or other 
> object.
> 
> 
> In any case it sounds like a bug.   The key combination should work whether 
> the script field has focus or not.
> 
> 
> Since I have never used that key combo before I am not sure whether that 
> behaviour has changed or not.
> 
> 
> Martin Koob
> 
> 
>> On Nov 7, 2022, at 12:45 PM, Niggemann, Bernd via use-livecode 
>>  wrote:
>> 
>> Klaus wrote
>> 
>> 
>> is it only me or does the ENTER key nothing after hitting while in script
>> editor?
>> 
>> 
>> 
>> https://quality.livecode.com/show_bug.cgi?id=23999
>> 
>> Please note: in 9.6.9 rc 2 there is some more scriptifying of IDE stacks. 
>> Some of them have some quirks.
>> It is well worth to test 9.6.2 rc 2 to catch as many as possible and report 
>> them.
>> 
>> Kind regards
>> Bernd
>> ___
>> 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: Set behavior of standalone

2022-10-18 Thread Craig Newman via use-livecode
The script only stack behavior not only should be set before the standalone is 
built, it must not reside in the executable.

Craig

> On Oct 18, 2022, at 4:46 PM, Geoff Canyon via use-livecode 
>  wrote:
> 
> If you mean set the behavior *after* creating the standalone, that should
> be possible, but it won't stick. You would have to set it each time. If you
> mean set a behavior of a e.g. a stack or a card (or anything) before
> creating the standalone, then it should be possible and should be
> permanent. Is it possible you're seeing some sort of path issue?
> 
> On Mon, Oct 17, 2022 at 11:39 AM Marty Knapp via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Is it possible to set the behavior of a standalone to an external
>> script-only stack? I can't seem to get it to work. The goal is for me to be
>> able to modify the behavior of our customer database app without having to
>> recompile. What am I missing?
>> 
>> Marty
>> ___
>> 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: Control or right click to show popup menu

2022-10-03 Thread Craig Newman via use-livecode
Hi.

On a new card make a field and a pulldown menu button. Place a few lines of 
text in the field and lock it. In the field script:
on mouseUp

set the loc of btn 1 to the mouseloc

click at the mouseLoc

end mouseUp

The menu opens at the line clicked on. 

This has been discussed extensively in the forums, if you want to search there. 
That discussion mainly dealt with loading the contents of the button with the 
field contents, or the selection of a particular menuItem once the menu itself 
was open. 

Craig

> On Oct 1, 2022, at 5:08 AM, Richmond via use-livecode 
>  wrote:
> 
> Why does this make me have a funny feeling you are still using a one-button 
> mouse on a Macintosh?
> 
> Certainly, I would stick with
> 
> on mouseDown  MN
>   if MN is 3 then . . .
> 
> Best, Richmond.
> 
> On 1.10.22 11:17, Peter Bogdanoff via use-livecode wrote:
>> Hi,
>> 
>> I want to control or right click on a line of text in a field to show a 
>> popup menu. So I’ve set the popup menu button to the loc of the mouse and 
>> it’s showing in place when the  controlKey is down.
>> 
>> However, the menu items won’t show  while the control key is also down.
>> 
>> Maybe I’m doing this wrong. In my application, how do make this work:  the 
>> user holds down the control key or right click  to do editing via choices 
>> provided by some kind of popup menu? Both Mac and Windows.
>> 
>> Thanks,
>> ___
>> 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: Weird performance issue

2022-09-23 Thread Craig Newman via use-livecode
Something weird happened to my post.

I modified your handler to access only those stacks that appear when calling 
the function “the stacks”. In all those cases, the return time was only a few 
tenths of a second.

But “revNaviigator” does not appear on that list. So there must be a longer 
pathway for LC to find a stack that certainly must be in memory, but that does 
not appear in the “stacks” list?

Craig

> On Sep 22, 2022, at 3:58 PM, Geoff Canyon via use-livecode 
>  wrote:
> 
> I was testing something for Navigator and found the following:
> 
> put the long seconds into T
> repeat 1
>  get there is a card 1 of stack "untitled 1"
>  --get there is a card 1 of stack "revnavigator"
> end repeat
> put the long seconds - T into T
> put T
> -- puts 0.005 or so
> 
> put the long seconds into T
> repeat 1
>  --get there is a card 1 of stack "untitled 1"
>  get there is a card 1 of stack "revnavigator"
> end repeat
> put the long seconds - T into T
> put T
> -- puts 1.2
> 
> Why in the world would it take over 200x as long to identify that there is
> a card 1 of Navigator vs. a random stack I just created?
> 
> I just checked and:
> stack "message" -- over 3 seconds -- a second run was 0.4
> stack "revdictionary" -- 1.5 seconds
> stack "home" -- 0.02 seconds
> 
> I ran it across everything in the environment and got results from under a
> hundredth of a second to over a second, with stacks pretty smoothly across
> that range. No clue what's causing it.
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
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: Weird performance issue

2022-09-23 Thread Craig Newman via use-livecode
Geoff.

I get over 5 seconds for the “revNavigatior”

So I modified your handler just a bit, to only a

But “revNaviigator” does not appear on that list. So there must be a longer 
pathway for LC to find a stack that certainly must be in memory, but that does 
not appear in the “stacks” list?

Craig

> On Sep 22, 2022, at 3:58 PM, Geoff Canyon via use-livecode 
>  wrote:
> 
> put the long seconds into T
> repeat 1
>  get there is a card 1 of stack "untitled 1"
>  --get there is a card 1 of stack "revnavigator"
> end repeat
> put the long seconds - T into T
> put T
> -- puts 0.005 or so
> 
> put the long seconds into T
> repeat 1
>  --get there is a card 1 of stack "untitled 1"
>  get there is a card 1 of stack "revnavigator"
> end repeat
> put the long seconds - T into T
> put T
> -- puts 1.2

___
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: Shouldn't space or enter in a menu select the hilited item?

2022-08-16 Thread Craig Newman via use-livecode
Bob.

You can always roll your own,

Craig

> On Aug 15, 2022, at 6:16 PM, Bob Sneidar via use-livecode 
>  wrote:
> 
> I should also mention that menuPick IS getting triggered, but if I use 
> spacebar or return to select, the parameter for which item got picked is 
> empty. If I click then the parameter is NOT empty it's the item I clicked. 
> 
> Bob S
> 
> 
>> On Aug 15, 2022, at 15:03 , Bob Sneidar via use-livecode 
>>  wrote:
>> 
>> Hi Craig. It's not a popup menu it's a combo box. I do use popup menus and 
>> those work as advertized. 
>> 
>> When I click to expand a combo box menu, it I get the list of items, and if 
>> I click an item, it correctly selects that item. If however I use the arrow 
>> keys to hilite an item then use the space bar or return to select the 
>> hilited item, the hilited item is NOT selected, it retains it's previous 
>> label. 
>> 
>> Bob S
>> 
>> 
>>> On Aug 15, 2022, at 11:03 , Craig Newman via use-livecode 
>>>  wrote:
>>> 
>>> Hi, I was not complete. Once the arrow keys have found the menuItem of 
>>> interest, clicking Enter or Return executes the menuPick handler.
>>> 
>>> Craig
>>> 
>>>> On Aug 12, 2022, at 7:37 PM, Bob Sneidar via use-livecode 
>>>>  wrote:
>>>> 
>>>> Hi all. Very odd, I thought this worked. 
>>>> 
>>>> I am programmatically popping up a menu, then I want to be able to jse the 
>>>> arrow keys to traverse the selections available. If I click any of the 
>>>> choices, the menuPick handler gets the choice as the first parameter. If 
>>>> however I use the spacebar or the enterKey to select a choice, the 
>>>> parameter is empty in menuPick! That isn't right, is it??
>>>> 
>>>> MacOS 10.15.7 LC 9.6.9 rc1
>>>> 
>>>> Bob S
>>>> 
>>>> 
>>>> ___
>>>> 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


___
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: Shouldn't space or enter in a menu select the hilited item?

2022-08-16 Thread Craig Newman via use-livecode
Yes, the combo box does not return the “selected” menuItem. Likely something to 
do with its compound nature.

> On Aug 15, 2022, at 6:16 PM, Bob Sneidar via use-livecode 
>  wrote:
> 
> I should also mention that menuPick IS getting triggered, but if I use 
> spacebar or return to select, the parameter for which item got picked is 
> empty. If I click then the parameter is NOT empty it's the item I clicked. 
> 
> Bob S
> 
> 
>> On Aug 15, 2022, at 15:03 , Bob Sneidar via use-livecode 
>>  wrote:
>> 
>> Hi Craig. It's not a popup menu it's a combo box. I do use popup menus and 
>> those work as advertized. 
>> 
>> When I click to expand a combo box menu, it I get the list of items, and if 
>> I click an item, it correctly selects that item. If however I use the arrow 
>> keys to hilite an item then use the space bar or return to select the 
>> hilited item, the hilited item is NOT selected, it retains it's previous 
>> label. 
>> 
>> Bob S
>> 
>> 
>>> On Aug 15, 2022, at 11:03 , Craig Newman via use-livecode 
>>>  wrote:
>>> 
>>> Hi, I was not complete. Once the arrow keys have found the menuItem of 
>>> interest, clicking Enter or Return executes the menuPick handler.
>>> 
>>> Craig
>>> 
>>>> On Aug 12, 2022, at 7:37 PM, Bob Sneidar via use-livecode 
>>>>  wrote:
>>>> 
>>>> Hi all. Very odd, I thought this worked. 
>>>> 
>>>> I am programmatically popping up a menu, then I want to be able to jse the 
>>>> arrow keys to traverse the selections available. If I click any of the 
>>>> choices, the menuPick handler gets the choice as the first parameter. If 
>>>> however I use the spacebar or the enterKey to select a choice, the 
>>>> parameter is empty in menuPick! That isn't right, is it??
>>>> 
>>>> MacOS 10.15.7 LC 9.6.9 rc1
>>>> 
>>>> Bob S
>>>> 
>>>> 
>>>> ___
>>>> 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


___
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: Shouldn't space or enter in a menu select the hilited item?

2022-08-15 Thread Craig Newman via use-livecode
Hi, I was not complete. Once the arrow keys have found the menuItem of 
interest, clicking Enter or Return executes the menuPick handler.

Craig

> On Aug 12, 2022, at 7:37 PM, Bob Sneidar via use-livecode 
>  wrote:
> 
> Hi all. Very odd, I thought this worked. 
> 
> I am programmatically popping up a menu, then I want to be able to jse the 
> arrow keys to traverse the selections available. If I click any of the 
> choices, the menuPick handler gets the choice as the first parameter. If 
> however I use the spacebar or the enterKey to select a choice, the parameter 
> is empty in menuPick! That isn't right, is it??
> 
> MacOS 10.15.7 LC 9.6.9 rc1
> 
> Bob S
> 
> 
> ___
> 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: Shouldn't space or enter in a menu select the hilited item?

2022-08-15 Thread Craig Newman via use-livecode
Hi.

I am missing something. Make a popup menu button. Ina mouseUp handler in 
another button:

on mouseUp
  click at the loc of btn 1
end mouseUp

Once the menu is open, the up and down arrow keys navigate among the menuItems.

Craig

> On Aug 12, 2022, at 7:37 PM, Bob Sneidar via use-livecode 
>  wrote:
> 
> Hi all. Very odd, I thought this worked. 
> 
> I am programmatically popping up a menu, then I want to be able to jse the 
> arrow keys to traverse the selections available. If I click any of the 
> choices, the menuPick handler gets the choice as the first parameter. If 
> however I use the spacebar or the enterKey to select a choice, the parameter 
> is empty in menuPick! That isn't right, is it??
> 
> MacOS 10.15.7 LC 9.6.9 rc1
> 
> Bob S
> 
> 
> ___
> 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


  1   2   3   >