Re: CharToNum Depricated??

2024-09-17 Thread Niggemann, Bernd via use-livecode
Hi Bob,


Actually I think what I need to do is figure out what the original file
encoding is, and use that when I write out the export file.

I assume that the byte order mark (BOM) is for UTF-8

To see the BOM for UTF-8 make a button and a field named "fText"

Use this script for the button

-
on mouseUp
   local tPath, tContent, tBom, tCollect
   answer file "choose"
   if it is empty then exit mouseUp
   put it into tPath
   if the optionKey is down then
  put url ("binfile:" & tPath) into tContent
  delete line 2 to -1 of tContent
  put textEncode(tContent, "UTF-8") into tContent
   else
  put url ("file:" & tPath) into tContent
  delete line 2 to -1 of tContent
   end if
   put tContent into field "fText"
end mouseUp
-

and see if you see the BOM when you hold down the option key when opening the 
file
If you do not use the option key there should be no BOM at the beginning of the 
text and the text is automatically UTF-8 encoded
Apparently "put url ("file:" & tPath)" is also aware of the encoding of the 
file since it converts it omits the BOM.

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


Re: CharToNum Depricated??

2024-09-15 Thread Niggemann, Bernd via use-livecode
Hi Bob,

charToNum has been deprecated, I think since LC 7.0

It is replaced by nativeCharToNum() and byteToNum

(As of LC 10.0.0 charToNum maps to nativeCharToNum, see release notes)

This covers the ASCII range.

For unicode you use codepointToNum()

I suspect that the small difference you see in file size is a Byte Order Mark, 
BOM at the beginning of the Konica Minolta address book.

You could try to use "open file" to import the Konica Minolta address book.

open file tFilePath for read
read from file tFilePath until EOF
put it into tData
close file tFilePath

The dictionary states

>From 7.0, it's possible to specify an encoding for the file being
opened. By doing so, you can straight read or write to a file without
having to call textEncode or textDecode; the encoding supported by
open file are the same as these text encoding functions. If no encoding
is provided, then open file tries to read a Byte Order Mark (BOM) exists
at the beginning of the file. In success, the encoding is adapted and the
BOM is ignored.


If my assumption that there is a BOM is correct then after opening and reading 
from the file should give you the same length of the data since the BOM is not 
part of the data.
I guess that is also the reason why SublimeText sees both files as identical. 
It probably also ignores the BOM.

I am just guessing and I am not an expert for these matters but maybe this 
gives you an idea to try.

Kind regard
Bernd


Bob wrote

Also, if charToNum is deprecated, what do I use to compare t he ascii values of
two characters??

___
use-livecode mailing list
use-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: LivecodeShare/revOnline - How to upload?

2024-09-12 Thread Niggemann, Bernd via use-livecode
Hi Matthias,

If you are using LC 10.0.0 RC1 and then open "Sample Stacks" from within LC 
Sample Stacks have lost their "You are logged in" etc at the topRight of Sample 
Stacks.
However using LC 9.6.13 it shows up as usual.
This supposes that you were logged in. Otherwise it will give you the 
opportunity to log in.

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


Re: Date and time format question

2024-07-30 Thread Niggemann, Bernd via use-livecode
Similar to Bob's and Jaque's but includes the delimiters:

Additionally adds Minutes and +- offsets


E.g. Nepal is 5 Hours 45 Minutes ahead of GMT/UTC

--
   -- create UTC timestamp: -- format: "2013-07-20T00:00:00Z"
   put the internet date into tTime
   put char 1 of the last word of tTime into tAddSubtract

   if tAddSubtract is "-" then
  put true into tAdd
   end if

   put char 2 to 3 of the last word of tTime into tHoursOff
   put char 4 to 5 of the last word of tTime into tMinutesOff

   convert tTime to dateItems
   if tAdd then
  add tHoursOff to item 4 of tTime
  add tMinutesOff to item 5 of tTime
   else
  subtract tHoursOff from item 4 of tTime
  subtract tMinutesOff from item 5 of tTime
   end if
   convert tTime to dateItems

   set the numberformat to "00"
   put item 1 of tTime &"-"& (item 2 of tTime)+0 &"-"& (item 3 of tTime)+0 & 
"T" & (item 4 of tTime)+0 &":"& \
 (item 5 of tTime)+0 &":"& (item 6 of tTime)+0 & "Z" into tTimestamp
   put tTimeStamp
--

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


Re: use-livecode Digest, Vol 250, Issue 1

2024-07-28 Thread Niggemann, Bernd via use-livecode
Hi David,

Here is a script that lets you compare filter operations on lists or arrays. 
With and without unicode.

put it into a button and make a field "fRes" and hold down the option/alt key 
to test unicode, else it is ASCII.

-
on mouseUp
   put 1 into tHowMany
   -- hold down optionKey/altKey to use unicode
   put the optionKey is down into tUnicode
   if tUnicode then
  put "a horse is a horse,a chicken is a" &  \
" Höfuðborgarsvæðið,a dog is a dog" into tData ## with unicode
   else
  put "a horse is a horse,a chicken is a " &  \
"chicken,a dog is a dog" into tData ## without unicode
   end if
   
   repeat  tHowMany
  put any item of tData & cr after tCollect
   end repeat
   delete char - 1 of tCollect
   
   put tCollect into tList
   put tCollect into tForArray
   
   if tUnicode then
  put the milliseconds into t1
  filter tList with "*Höfuðborgarsvæðið*" ## with unicode
  put the milliseconds - t1 into tListTime
  
  put the milliseconds into t1 ## include split
  split tForArray by return
  -- put the milliseconds into t1 ## without split
  filter elements of tForArray with "*Höfuðborgarsvæðið*" ## with unicode
  combine tForArray by return
  put the milliseconds - t1 into tArrayTime
   else
  put the milliseconds into t1
  filter tList with "*dog*" ## without unicode
  put the milliseconds - t1 into tListTime
  
  -- put the milliseconds into t1 ## include split
  split tForArray by return
  put the milliseconds into t1 ## without split
  filter elements of tForArray with "*dog*" ## with unicode
  combine tForArray by return
  put the milliseconds - t1 into tArrayTime
  
   end if
   put "Unicode: " & tUnicode & ", Lines: " & tHowMany & cr & "List: " &  \
 tListTime & " ms" & cr & "Array: " & tArrayTime & " ms"  \
 & cr & the long time into field "fRes"
end mouseUp
-

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


[ANN] A new version of TinyDictionary

2024-07-16 Thread Niggemann, Bernd via use-livecode
A new version of TinyDictionary has been uploaded to Livecodeshare

https://livecodeshare.runrev.com/stack/825/TinyDictionary

or download it from within the IDE from "Sample Stacks"

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


Re: Snapshot question

2024-06-02 Thread Niggemann, Bernd via use-livecode
Neville wrote
Now while referenced images such as png’s can be
rotated (more precisely, have their angle set) they lose their scaling,
reverting to their native size; and rotated images cannot be scaled (why??

set the resizeQuality of the image to good or best depending on your image 
(images get a bit fuzzy when rotated)

you can resize a rotated image if you set the imageData of the rotated image to 
the imageData of the rotated image

 set the angle of image 1 to 15
 set the imageData of image 1 to the imageData of image 1

As soon as you set the imageData of the image it is not referenced anymore. But 
it can be resized.

I do not know your requirements exactly but if you want to set the angle 
repeatedly then it is best to store the original (non-rotated) text of the 
image and do your rotation every time from that starting point.

i.e.
store original
set angle
restore to origina
set next angle

Examples of rotating and resizing of image can be found in this topic of the 
Forum (old stuff but still working)

https://forums.livecode.com/viewtopic.php?f=27&t=8042

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


Re: Snapshot question

2024-06-02 Thread Niggemann, Bernd via use-livecode
Neville wrote
> Now while referenced images such as png’s can be 
> rotated (more precisely, have their angle set) they lose their scaling, 
> reverting to their native size; and rotated images cannot be scaled (why?? 

set the resizeQuality of the image to good or best depending on your image 
(images get a bit fuzzy when rotated)

you can resize a rotated image if you set the imageData of the rotated image to 
the imageData of the rotated image

  set the angle of image 1 to 15
  set the imageData of image 1 to the imageData of image 1

As soon as you set the imageData of the image it is not referenced anymore. But 
it can be resized.

I do not know your requirements exactly but if you want to set the angle 
repeatedly then it is best to store the original (non-rotated) text of the 
image and do your rotation every time from that starting point.

i.e. 
store original
set angle
restore to origina
set next angle

Examples of rotating and resizing of image can be found in this topic of the 
Forum (old stuff but still working)

https://forums.livecode.com/viewtopic.php?f=27&t=8042

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


Re: Snapshot question

2024-05-31 Thread Niggemann, Bernd via use-livecode
Export snapshot from object gives a nice image that can serve in place of the
graphic except that it has black spots at each corner outside the rounded
frame

Have you tried as "png"? It should make the black corners transparent.

export snapshot from graphic "g1" to image "iDest" as png

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


Re: Code Folding in LC

2024-05-15 Thread Niggemann, Bernd via use-livecode
A new version of Code Folding has been uploaded to the Forum

https://forums.livecode.com/viewtopic.php?f=9&t=38912&p=229971#p229971

It addresses a couple of bugs and has been tested to work from 9.6.9 up to 
9.6.12 (RC1) and 10.0.0 (DP8)

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


Help converting python one-liner...

2024-04-25 Thread Niggemann, Bernd via use-livecode
Hi David,

Are you sure that sImage contains the data you want?

What happens if instead of:

put url imageUrl into sImage

you do: put url("binfile:" & imageURL) into sImage

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


Code Folding in LC

2024-02-22 Thread Niggemann, Bernd via use-livecode
For all those interested in Code Folding a new version has been posted to the 
forum. Easier install and some minor bug fixes.

https://forums.livecode.com/viewtopic.php?f=9&t=38912&p=228244&sid=2a60c9420c1615aca35c5957252b7d8e#p228244

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


Code Folding in LC

2024-02-13 Thread Niggemann, Bernd via use-livecode
Dear list

I posted a stack on the Forum that temporarily installs Code Folding to LC 
version 9.6.9, 9.6.10, 9.6.11, or 10.0.0 DP 7. These changes are lost when 
closing LC
Future versions might make changes to the installation stack necessary 
depending on the IDE changes in those versions.

https://forums.livecode.com/viewtopic.php?f=9&t=38912

You can test drive it and decide if you like it.
There are instructions how to make this a permanent change for your specific 
copy of LC if you want to.

To Mike: Yes it still folds #< to #http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Bug 23507 - LC Clipboard Polling Failure

2024-01-17 Thread Niggemann, Bernd via use-livecode
Curry,

> Any progress to fix LC's Clipboard Polling Failure Bug?


I tried your code on MacOS Monterey using LC 9.6.11 and LC 10.0.0 DP-7.
I saw after a short time gibberish and at times empty clipboard content. No 
crash though.
I then changed to 'fullClipboardData' instead of 'ClipboardData' and that 
worked for without a hitch for minutes.

I realise that your main concern is Windows with crashes/freezes. But maybe 
that would help on Windows too.

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


Re: Property Inspector bug for keys with commas in the key name

2023-11-05 Thread Niggemann, Bernd via use-livecode
Hi Paul,

I forgot to add handler

editorUpdate

to the list that needs a 

"set the itemDelimiter to tab"

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


Re: Property Inspector bug for keys with commas in the key name

2023-11-05 Thread Niggemann, Bernd via use-livecode
Hi Paul,

I looked a bit further into the problem with commas in key names of custom 
properties.
It turns out that the widget "treeview" has the option to choose a delimiter 
for paths. Default is comma.

If you feel adventurous you could hack the properties inspector fairly easily 
to work with commas in the key names;

Recipe:

open any custom property in the PI

close the PI

Select from Menu "View": Show IDE Stacks in Lists

open Project Browser

Use the project browser to edit the script of 
com.livecode.pi.customprops.behavior

Now add to handler editorInitialize at the end

   -- more code
   set the pathDelimiter of widget 1 of me to tab -- add
end editorInitialize

Now add the line:

set the itemDelimiter to tab

to handlers:

setArrayDataOnPath
setArrayKeyOnPath
deleteArrayKeyOnPath
addArrayKeyOnPath
fetchArrayDataOnPath
keyChangedOnPath


To be sure you can do a search for "item" in the script and every handler that 
refers to "item" needs 

set the itemDelimiter to tab


Reopen the PI for a custom property containing comma in a key name and it 
should work to display key and value in PI and also lets you change the value.

If you want this change to be persistent for that particular version of LC you 
would have to save the changes to com.livecode.pi.customprops.behavior from the 
Script Editor.
Otherwise the next time you start that version of LC the changes would be gone.

I tested shortly and it worked for me. Maybe try this first on a LC version 
that is not your current working version.

I chose tab as delimiter since I doubt that tab will be used in a key name...


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


Property Inspector bug for keys with commas in the key name

2023-11-03 Thread Niggemann, Bernd via use-livecode
Hi Paul,

The problem with the comma in a customproperty name in the Properties Inspector 
(PI) arises because the PI uses a treeview to display the customproperties. 
More specifically the "hilitedElement" to retrieve the current selection and 
"hilitedElement" has the form:
"A comma delimited list of array keys."

Now you have a comma in your customproperty name and at that point the PI is 
confused as to what is the key and what is the value and fails to display both.

However I wonder if treeview or PI is to blame:

Page 145 of "Livecode User Guide" 9.6.10
Custom Property Names
The name of a custom property must consist of a single word and may contain any 
combination of letters, digits, and underscores (_). The first character must 
be either a letter or an underscore.

Page 113 of "Revolution User Guide 2.0" printed edition from 2004
Custom Property Names
The name of a custom property must consist of a single word and may contain any 
combination of letters, digits, and underscores (_). The first character must 
be either a letter or an underscore.

So I am afraid that treeview could not expect a comma in a customproperty name.

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


Re: Me and target of script widgets

2023-10-22 Thread Niggemann, Bernd via use-livecode
Hi David,

Stam Kapetanakis has done a script widget which can be found at

https://github.com/stam66/tristate/blob/main/com.sk.widget.tristate.livecodescript

Script Widgets are new and a bit special. Not as much as LCB but still.
You can use Stam's widget as a template of a working script widget.
I learned a lot from it.

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


Re: A spinner that keeps spinning

2023-05-02 Thread Niggemann, Bernd via use-livecode
Andreas Bergendal wrote:

> Inspired by some comment over at the forum, I embarked on building myself a 
> tool for crafting spinners animated in browser widgets, as those would 
> continue 
> spinning in a heavenly layer of its own, no matter what traffic jams occur 
> down 
> on LC ground level… 

Thank you for this amazing stack/WebApp.

It is very, very cool.

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


RE: card background color

2023-04-20 Thread Niggemann, Bernd via use-livecode
Douglas A. Ruisaard wrote:
> Hey!  ... half an answer is better than none at all.


BTW the background color used for stacks while dragging a control from the 
toolbar is supposedly the "Edition Color"
While I like the blue as "Edition Color" it is a little dark as background 
color.
Just wait until LC offers the "Black Edition"...

While testing the backgroundcolor of stacks when dragging a control from the 
toolbar I was again annoyed that when stacks overlap the target stack for the 
control (usually your frontmost stack = default stack) the background color 
only changes when you leave the rect of a partially overlapping stack although 
your mouse is within the rect of your default/target stack. That in my opinion 
is not the best user interface.
Since I work on a laptop the problem of overlapping stacks is not uncommon.

I had a look at it and made an enhancement request with a proposed fix.
https://quality.livecode.com/show_bug.cgi?id=24189

Anyone adventurous enough could test the proposed patch by applying it 
temporarily to stack "revTools" to handler "on mouseDown"

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


RE: card background color

2023-04-20 Thread Niggemann, Bernd via use-livecode
Douglas A. Ruisaard wrote:
> Thanks for the tip .. however, while the background setting *does* control
> the background color of the input field on the Message Box, it does NOT
> affect the dark blue "highlight" within the field when the Box display
> previous commands.

Sorry, I did not get that you meant the highlight color of the input field of 
the message box when the text is selected.

I see that you use Window. I am on a Mac. The highlight color for all text in 
LC on a Mac is controlled by "System Preferences" -> "General". and is applied 
system wide to all apps. 
No idea how this is handled on Windows Computers.

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


RE: card background color

2023-04-20 Thread Niggemann, Bernd via use-livecode
Douglas A. Ruisaard wrote:

> The input line (?) on the MessageBox is also that deep blue ... I scanned
> thru the C:\Program Files\RunRev\LiveCode 9.6.8 directory but couldn't find
> any obviously relevant reference

For me the backgroundcolor of the input line of the MessageBox is controlled by 
my setting of the backgroundColor of the Script Editor in LC Preferences.
That also changes the backgroundcolor of the input field of single line and 
multiline input field of the message box.

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


Re: card background color

2023-04-19 Thread Niggemann, Bernd via use-livecode
Bob Sneidar wrote:

> Won't that revert next time LC is downloaded and installed? 


 You could write a plug-in that patches the Home stack on every startUp of LC. 
That will work until that handler of stack "Home" is changed.

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


Re: card background color

2023-04-19 Thread Niggemann, Bernd via use-livecode
Douglas A. Ruisaard wrote

> 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.
> Anyone know how to adjust (or defeat) this "highlighting"
> feature?


In stack "Home" around line 1930 in

function revEnvironmentEditionProperty pProp, pEdition 

change the color to e.g.

---
case "color"
   return 180,191,200
---


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


Re: Scalefactor positioning

2023-03-08 Thread Niggemann, Bernd via use-livecode
> J. Landman Gay wrote
> I need to set the scalefactor of a stack and position it at the screenloc.


on mouseUp
   local tScaleFactor, tScreenLoc, tNewStackLoc
   put the scaleFactor of this stack into tScaleFactor
   put the screenLoc into tScreenLoc
   put item 1 of tScreenLoc / tScaleFactor into item 1 of tNewStackLoc
   put item 2 of tScreenLoc / tScaleFactor into item 2 of tNewStackLoc
   set the loc of this stack to tNewStackLoc
end mouseUp

This works for me

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


Re: Sort list alphabetically- ignoring first character if it is a space

2023-02-20 Thread Niggemann, Bernd via use-livecode
> David V Glasgow wrote:
> I am trying to alphabetically sort a list of unique strings, some of which 
> have 
> a leading space character.  I need these to sort as if the second character 
> is 
> the first character rather than all space prefixed strings being bunched 
> together.

Would 

sort tData ascending by word 1 to -1 of each

work for you?

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


Re: Maximum field size

2023-01-19 Thread Niggemann, Bernd via use-livecode
I tried to put text into a field on an arm MacBook Pro 32 GB memory, LC 9.6.9 
rc2 running natively. I realise that this is 64 bit.

I took a couple of lines of Lorem Ipsum and put it into a field. Then I put the 
formattedText of that field into the field to force lineFeeds at every visible 
line. 35 lines overall.

I then put that text a million times into a variable.
That variable was put into a field that was a little wider than the originating 
field to avoid line wrapping in the target field and also set the dontWrap of 
the target field to true.

The result:

35.000.000 Lines in the field
1.109.000.000 bytes, roughly 1.1 GigaBytes in the field
525.000.000 Pixel line 1 to -1 formattedHeight
160 seconds to fill field
App Memory Size went up to 17 GB, went down to 480 Mb after clearing the field.

The field could be scrolled although with a lot of Pizza spinning. After some 
fiddling with scrolling down to the end I was able to insert a return after the 
last line. (a bit of pizza)
Blinking cursor in field very slow.
LC slowed down but responded reasonably once the focus was away from the long 
field.

LC did not crash but did not really like that much text in a field. 

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


Re: Maximum field size

2023-01-19 Thread Niggemann, Bernd via use-livecode
>> 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,

>From the User Guide:

Maximum length of a line in a field:
65,536 characters storage
No more than 32,786 pixels wide for display

If you put lines longer above limits then LC will hang/crash

The amount of lines a field can hold is a lot higher provided the individual 
lines are not too long.

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


Re: Tab groups broken?

2023-01-17 Thread Niggemann, Bernd via use-livecode
I have to correct correct myself.


https://developer.apple.com/documentation/appkit/nstabview

shows the familiar blue hilited button in the screenshot of "Date and Time" in 
Preferences.

But if you look at a recent MacOS (12.6.2 Monterey) and go to Preferences and 
look at "Date and Time" you see that the hilited button of tabbiew is not blue 
anymore.
That was what I was looking at.

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


Re: Tab groups broken?

2023-01-17 Thread Niggemann, Bernd via use-livecode

>Mark Smith wrote:
>I wasn’t able to change the background of the highlighted tab to 
>blue as per the HIG. Were you?


Oh, I overlooked that the hilited button is supposed to be blue and that there 
seems no way to configure that for the tab group in Livecode

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


Re: Tab groups broken?

2023-01-17 Thread Niggemann, Bernd via use-livecode
Hi Geoff and Mark,

The tab group seems to be in line with Apple's current Human Interface 
Guidelines (HIG) for tabview.

https://developer.apple.com/documentation/appkit/nstabview

The tab group in the lesson Mark linked to is a prior version of the tabview.

What seems to be different from HIG is that the textColor of the selected 
button is not set to black (to change that set the backgroundColor of the tab 
group to black.)
Additionally the buttons are semi transparent which seems to deviate from the 
HIG. There they look opaque.

Kind regards
Bernd

PS mouse messages work for me in the tab buttons which is what I would expect
___
use-livecode mailing list
use-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: currentCard vs current card

2022-12-16 Thread Niggemann, Bernd via use-livecode
>> Yet, I can find no entry for the 'current' keyword in the Dictionary? Is 
>> this a Dictionary omission?


Paul,

"current" is a synonym of "this".

When you search for "current" you will see "this" among the hits. Click on 
"this" and you will find "current" as a synonym.

LC dictionary does not list the synonyms as separate entries. TinyDictionary 
lists the synonyms thanks to Brian Milby who had the idea and coded that part.
There are about 350 synonyms in LCS.

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


Re: ENTER in scripts

2022-11-07 Thread Niggemann, Bernd via use-livecode
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


Re: System Time Zone

2022-09-07 Thread Niggemann, Bernd via use-livecode
Bob Sneidar via use-livecode Wed, 07 Sep 2022 16:49:43 -0700

Isn't there some kind of function that will return the
current system's time zone?


Hi Bob,
there is a timeZone library in LC, maybe that is of help.

Please be aware that some entries in the timeZone library are deprecated.

https://quality.livecode.com/show_bug.cgi?id=23012

The bug report has a stack that uses the library.

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


Re: BN Guides

2022-08-29 Thread Niggemann, Bernd via use-livecode
> Richard Gaskin via use-livecode Mon, 29 Aug 2022 13:53:13 -0700
> so I'm curious: why this approach and not a frontScript?

I thought about why I used behaviors a little more.
What intrigued me was the idea that via a behavior a control was made aware of 
its neighbours. Be it a group or a control it knew where all the other objects 
were. Even dragged them along when needed.
And it worked semi autonomously with a little help from "the owner of this me".

I think that was my main fascination when using behaviors. It was a change of 
perspective from the central perspective to a decentralised perspective.


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


Re: BN Guides

2022-08-29 Thread Niggemann, Bernd via use-livecode
> Richard Gaskin via use-livecode Mon, 29 Aug 2022 13:53:13 -0700
> 
> Geoff Canyon wrote:
> 
> > Okay, so it looks like BN Guides works by assigning behaviors to
> > controls and temporarily adding controls to your stack as you drag
> > things. I think this is meant to be transient as you drag controls.
> 
> Instinctively I'd be inclined to try a frontscript before something as 
> intrusive as altering an object's behavior property for something this 
> transient.
> 
> But Bernd does good work, so I'm curious: why this approach and not a 
> frontScript?

Actually I was experimenting and wanted to use behaviors dynamically at the 
time when I wrote this. A proof of principle if you want. It worked 
surprisingly well.
That is why I sticked to behaviors. After fixing some edge cases it even 
removes the behaviors correctly...
At the time there were no guides available for LC.

But as of LC 10 Guidelines will be part of the IDE and that looks and works 
really well. (LC uses a backScript)

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


Re: BN Guides

2022-08-26 Thread Niggemann, Bernd via use-livecode
Hi Bob,

There is an alternative for guide right now

https://livecodeshare.runrev.com/stack/1002/DevGuides-Plugin-Installer

and 10.0.0 DP4 has guides built-in. They look and work really well.

I will not develop bnGuides further since starting LC 10 they will be part of 
the IDE.
I liked the idea to push the concept of behaviors for guides. But maybe a bit 
too far.

Nevertheless the version of bnGuides Matthias linked to  in the Forum is one 
version step ahead of the one in Livecodeshare/Sample Stacks.

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


Re: Referencing Livecode

2022-06-21 Thread Niggemann, Bernd via use-livecode
Alan Stenhouse via use-livecode wrote

> In a couple of my publications, I described developing apps with Livecode and 
> referred to www.livecode.org and www.livecode.com, but didn't include 
> anything 
> in the references as there was nothing (AFAICS at that time) that would 
> satisfy 
> scientific publication standards.
> See: https://www.sciencedirect.com/science/article/pii/S2351989420309173
> and
> https://www.sciencedirect.com/science/article/pii/S2351989421001761

Alan, that is really cool. Congratulations.

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


Re: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs

2022-06-20 Thread Niggemann, Bernd via use-livecode
Richmond wrote:

> In the standalone builder you have always separated
> Linux 32-bit and 64-bit builds, and the same with
> Windows: could you alter the MacOS standalones so we
> end up with one INTEL 64-bit standalone, and one ARM
> standalone, rather than a awkward sandwich?

In the current (see subject) versions the standalone
builder for Mac lets you build:

either Intel or Arm or both

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


Re: M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs

2022-06-18 Thread Niggemann, Bernd via use-livecode
Hi Matthias,

I should have added that to my previous post:

If you put "put the processor" into the message box it says

Rosetta: x86_64
Native: arm64

Startup time is also noticeably reduced when running native. Also is the 
footprint of LC in memory smaller according to activity monitor: about 260 vs 
500 MB

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


M1 Macs and LC 9.6.8 RCs and 10.0.0 RCs

2022-06-18 Thread Niggemann, Bernd via use-livecode
Sorry if this has been discussed before but I could not find it.

Yesterday I played around with LC 9.6.8 RC2 and 10.0.0 RC4 and wanted to see 
what difference the new Universal build does for speed.

After some testing I finally read the release notes and it states:
Note: Apple architecture support is currently experimental. To run the IDE 
using Apple architecture (on supported machines), you must toggle the Open 
using Rosetta option to off in the LiveCode.app bundle's Get Info pane in 
Finder. To build a standalone with native Apple architecture support you must 
explicitly choose the macOS Apple option in standalone settings.

For me the "Rosetta" box was not checked out of the box but LC ran in Rosetta 
mode.
Which means by default in the "Get Info" for the app "Use Rosetta" is unchecked 
but LC runs using Rosetta. You have to check "using Rosetta" and then right 
away uncheck "using Rosetta"
>From then on LC uses arm64.

I noticed some nice speed increase across all aspects of using LC: what used to 
take 10 seconds now takes 6.5 seconds. That is not bad for checking a box.

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


Re: Is it a bug?

2022-05-23 Thread Niggemann, Bernd via use-livecode
sounds a lot like

https://quality.livecode.com/show_bug.cgi?id=23693

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


Re: revOpenDatabase over SSH tunnel?

2022-03-10 Thread Niggemann, Bernd via use-livecode
There are two sentences in german:

Folgenden Befehl in der Kommandozeile des Win10 PCs ausführen:

Run the following command on the command line of the Win10 PC:



Bei dem „Vordergrund“ Befehl, sieht man nur einen blinkenden Cursor. Bei dem 
„Hintergrund“ Befehl erscheint ein neuer Prompt.

With the "Foreground" command, you only see a flashing cursor. With the 
"Background" command, a new prompt appears.

(Automatic translation courtesy MacOs)

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


Re: moveStack is not triggering

2022-03-08 Thread Niggemann, Bernd via use-livecode
Hi Bob,

try this in the card script of a new stack

on moveStack
   beep
end moveStack

That beeps when I move the stack.

I think the debugger does not fire when it is  invoked in a  moveStack handler 
as you test for in your bug report
https://quality.livecode.com/show_bug.cgi?id=23607

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


Re: variable window not applying changes

2021-11-24 Thread Niggemann, Bernd via use-livecode
> Craig Newman wrote
> @Bernd.
> " double-click on the icon in the varialble line:”
> 
> What icon? Do you mean the small box-with-arrow icon that appears when a 
> multi-line variable is present in the lower list?

Yes, that open rectangle with the right-upward pointing array

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


Re: variable window not applying changes

2021-11-24 Thread Niggemann, Bernd via use-livecode
> James Hale wrote:

> I have been tracing a script and while stepping through notice an error in a 
> variable.
> I double clicked on the value in the variable list at the bottom of the SE 
> window and brought up the variable window.
> Made the  correction and clicked "apply".
> Nothing happened.
> 
> This used to work, didn't it??

This only happens to me if I accidentally double-click on the icon in the 
varialble line: then two windows pop up at the same location.
Changes in the topmost window and "applying" them do not change the variable. 
Apparently the lower window with the old values prevents that.

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


Re: Script Editor Disassociation Bug - Seen it lately?

2021-11-04 Thread Niggemann, Bernd via use-livecode
On 11/4/21 4:18 AM, Curry Kenworthy via use-livecode wrote:


I'm checking up on the Script Editor Disassociation Bug,
described in this thread:






I don't know if this is a dissociation of the Script Editor but bug 22555 can 
fool you into thinking that the script is compiled although it is not. It only 
occurs if you have "Live Errors" unchecked. It is in "Edit" -> "Options" when 
Script Editor is open.

https://quality.livecode.com/show_bug.cgi?id=22555

I think that one is easy to fix and a proposed fix is in the bug report and has 
been made a pull-request
https://github.com/livecode/livecode-ide/pull/2117
Of course my proposed fix might not be the right fix but it works.

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


Re: OT: Facebook -> Meta (Damaged Infinity!)

2021-11-02 Thread Niggemann, Bernd via use-livecode
> Jim Lambert via use-livecode Sun, 31 Oct 2021 10:44:22 -0700

> > MarkW wrote:
> > From a Boingboing user comment...
> >
> > META: Making Evil Totally Acceptable

> LOL LOL LOL

If you want to see infinity in action

https://forums.livecode.com/viewtopic.php?f=10&t=36412&e=1&view=unread#p210094

as W. Allen remarked: eternity can be pretty long, especially towards the end.

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


Re: Accessing array custom properties

2021-10-26 Thread Niggemann, Bernd via use-livecode
> Neville Smythe via use-livecode Mon, 25 Oct 2021 20:20:34 -0700 wrote:
> 
> 4. BUT (annoyingly) this fails, giving an empty result: put the 
> pArrayName[pElementName]  of button “button”
> 
> Why? If 3 works, I would have thought the parser would substitute values for 
> all variables before getting the property using  the “special coding”


This is not the answer to "Why?" but it sort of does what you want

-
on mouseUp
   local tProperty, tValue, tTarget, tResult
   
   put "dropShadow" into tProperty
   put "color" into tValue
   put the long id of button "b1" into tTarget
   
   put fetchProperty(tProperty, tValue, tTarget) into tResult
   
   if the result is empty then
  answer "Property " & tProperty && tValue & " not found"
   else
  answer tProperty && tValue && tResult
   end if
end mouseUp

function fetchProperty pProperty, pValue, pTarget
   local tProp
   put the pProperty of pTarget into tProp
   if tProp is not an array then -- either single value (e.g. width) or empty
  return tProp
   else
  return tProp[pValue] -- either array value or empty
   end if
end fetchProperty
-

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


Re: dropShadow knockout

2021-10-20 Thread Niggemann, Bernd via use-livecode
> Neville Smythe via use-livecode Tue, 19 Oct 2021 15:37:33 -0700

> The knockout checkbox is missing from the graphic effect dropShadow edit 
> dialog

> in LC9.6.5 (Mac). The knockout property still works however.

> Further occasionally the edit box appear to become corrupted  - after a few

> launches the display is out of kilter, and eventually the edit box won’t open

> at all (or is invisible). Not recipe for this as yet.



> Further occasionally the edit box appear to become corrupted

This only happens to me when I accidentally close the edit box via the close 
decoration and not via the "OK" button.
The same happens with the edit box for editing gradients.

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


Re: [ANN] bnGuides has been updated

2021-10-11 Thread Niggemann, Bernd via use-livecode
> Bob Sneidar via use-livecode Mon, 11 Oct 2021 16:42:20 -0700
> 
> I see. I think I did not maky myself clear. With the object inspector open 
> and 
> the behavior tab selected, before dragging the object with the pointer tool, 
> there is no behavior registered. Upon dragging the object, the tool works as 
> advertised, and that is the coolest thing since sliced bread, however the 
> behavior for bnGuides is registered in the inspector, and remains registered 
> even after I stop dragging the object. 

Just in case I did not make it clear: the behavior is removed when the 
selection of the dragged is, well, deselected. Independend of dragging.

To see that in the Properties inspector you would have to lock the Properties 
Inspector for that object and after deselecting the object you would have to 
change the tab in the Properties Inspector and go back to the "Behavior" tab to 
see that the behavior is gone.

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


Re: [ANN] bnGuides has been updated

2021-10-11 Thread Niggemann, Bernd via use-livecode
> Bob Sneidar via use-livecode Mon, 11 Oct 2021 16:07:53 -0700
> 
> Sorry, no love. I made the change as you suggested, but the behavior property 
> of the object still retains the bnGuides behavior. 


Bob,
I assume that the behavior that sticks was added after you made the changes to 
bnGuides and that it is not a behavior that was added before you made the 
changes to bnGuides.
Maybe a short test with a new stack and a couple of controls that you inspect 
via Navigator while in Browse Mode.

Then I will have to investigate further because in my testing bnGuides does not 
add a behavior to a control when in "Browse" mode and Navigator or the Project 
Browser selects a control as a feedback for the target.

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


Re: [ANN] bnGuides has been updated

2021-10-11 Thread Niggemann, Bernd via use-livecode
Mark Wieder wrote:

On 10/11/21 3:38 PM, Niggemann, Bernd via use-livecode wrote:

if the tool <> "pointer tool" then
   exit revSelectedObjectChanged
end if


Wouldn't that still be a problem if something else (e.g. the Project Browser) 
selects an object?



Not that I can see. bnGuides just stays out of this if Navigator or the Project 
Browser selects a control when the tool is browse tool.
If you are in browse mode you will not and can not move controls around for 
layout.

But maybe I am not seeing all implications.

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


Re: [ANN] bnGuides has been updated

2021-10-11 Thread Niggemann, Bernd via use-livecode
> Bob Sneidar 
> 
>  wrote

> It was an old version so I imagine that was the issue. I got the new version
> and am testing it in my IDE. I'll let you know if there are any issues.



I think I know what is going on.

Navigator selects the object to indicate the target. That triggers a 
selectedObjectChanged message.

I naively assumed that would only happen when in "Edit mode" i.e. the tool is 
the "pointer tool"


If you add the following conditional to the card script in handler 
revSelectedObjectChanged



on revSelectedObjectChanged
   local tSelected, tSelectedOne

   ## dont set behavior if the tool is not "pointer tool"
   ## i.e. editing layout of controls
   if the tool <> "pointer tool" then
  exit revSelectedObjectChanged
   end if

you should be fine. I will have to put out a new version which catches that.

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


Re: [ANN] bnGuides has been updated

2021-10-11 Thread Niggemann, Bernd via use-livecode
> Bob Sneidar via 
> use-livecode
>  Mon, 11 Oct 2021 11:01:44 
> -0700

> Concerning the issue of the revNavigator item being red and unckickable, I
> found that the behavior had not been removed. It was a simple edit to remove
> the stranded behavior.



> On Oct 11, 2021, at 10:56 , Bob Sneidar 
> http://iotecdigital.com>> wrote:
>
> Where would I get the latest? I have rev .05, but I noted in your notes that
> "A behavior is temporarily attached to the object..." What happens to the
> existing behavior if there is one? I noticed that having selected a button
> with bnGuides open, revNavigator shows that object in a red color, and I can
> no longer double click the object in revNavigator to get the script object.
>

Bob,

the behavior used by bnGuides is set to a control. If that control already has 
a behavior/behaviors set then bnGuides
sets its behavior to the last in the chain of behaviors and removes it when the 
control is not selected anymore.

Do you have a recipe for an unremoved behavior set by bnGuides?

I have not tested bnGuides when revNavigator is in use. Maybe I should.

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


Re: [ANN] bnGuides has been updated

2021-10-11 Thread Niggemann, Bernd via use-livecode
Thank you Roger for the kind words.

I think I did not announce the update on the use-list. It fixes a bug when 
returning from "Edit Group" via "Stop Editing"

bnGuides is a plug-in that shows guides to place UI-objects.

I announced the update here:
https://forums.livecode.com/viewtopic.php?f=4&t=31920&p=209453&sid=3c72aae96597f167ba6cb9882dd8413d#p209370

and you can find bnGuides on livecodeshare

http://livecodeshare.runrev.com/stack/918/BnGuides

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


Re: oAuth2 window properties

2021-08-17 Thread Niggemann, Bernd via use-livecode
Hi Bob,

Have a look at "com.livecode.library.oauth2" in the Project Browser when "Show 
IDE Stacks in Lists" is on. That is the (library) stack that displays the 
information in a stack that is build on the fly.
It uses a browser widget to display.
You could change the dimensions of the browser widget. Additionally you could 
try to set the vScrollBar of the widget to false.
>From the dictionary for the browser widget
set the vScrollbar of widget to pEnabled

If you make changes to "com.livecode.library.oauth2" they will not stick: the 
next time you start Livecode they will be gone. If you want to make them 
permanent you would have to change the write permissions for that file in the 
app bundle on a Mac (Windows ??) and save your changes from the Script Editor.

I could not test my suggestions because I don't know anything about oauth2 but 
it should work.

Kind regards
Bernd

Bob wrote:


Is it possible to change any of the properties of the oAuth2 window? I'd like
to be able to set the size (and location) of the window to prevent a scroll bar
from showing with the service my App authenticates with.

___
use-livecode mailing list
use-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: Stacks not removed from memory?

2021-05-14 Thread Niggemann, Bernd via use-livecode
If the Project Browser is open then it may be related to

https://quality.livecode.com/show_bug.cgi?id=22460

Kind regards
Bern
___
use-livecode mailing list
use-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: rant: truewordOffset

2021-04-20 Thread Niggemann, Bernd via use-livecode
Mark Wieder wrote
You can't just say

put truewordOffset("font", tText) into tOffset
because it might encounter "fontTable" first.


If I set wholematches to true it works for me

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


Re: Checking the Milliseconds

2021-04-07 Thread Niggemann, Bernd via use-livecode
I tried this and got pretty constant results except for maybe  the first ten 
iterations. I figured if you just jump in with the milliseconds you would not 
be at the "beginning" of the milliseconds and added a repeat loop to mitigate 
that effect. Furthermore I appended the result to a variable.

---
local last_known_millisecond
local queries = 0
local report
local longSecs, tMs

on mouseUp
   lock screen
   put empty into report
   
   --let it start at a flip of the ms
   repeat
  put the milliseconds into tMs
  if char -1 of tMs is 0 then
 exit repeat
  end if
   end repeat
   
   repeat 1000 times
  put 0 into queries
  put the long seconds into longSecs
  put the milliseconds into last_known_millisecond
  repeat forever
 add 1 to queries
 if the milliseconds = last_known_millisecond  then
next repeat
 else
exit repeat
 end if
  end repeat
  put queries && (the long seconds - longSecs) * 1000  & cr after report
   end repeat
   
   unlock screen
   put report
end mouseUp
--
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Polygon fill algo?

2021-02-15 Thread Niggemann, Bernd via use-livecode
>Richard wrote
>a way to coerce discontiguous polygon regions to always be filled?

I assume you have set the opaque of the polygon graphic to true?
Without "opaque" I do not get any filling, with "opaque" true it always fills

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


Team-xAPI-in-LiveCode Update

2021-02-13 Thread Niggemann, Bernd via use-livecode
This url seems to work for the repository in xapi

https://github.com/xapicohort/lib_LC_LMS_LTI

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


Re: Smooth scrolling

2021-02-05 Thread Niggemann, Bernd via use-livecode
> Trevor wrote
>

> On macOS it is simple enough to get the true scroll values from the scroll
> event using NSEvent.scrollingDeltaX and NSEvent.scrollingDeltaY. It is
> possible to get those values using LCB as demonstrated in the
> mac_scroll_wheel.lcb extension that is included with the DataView control
> I've made available. Here is a link to the source code:
>
> https://github.com/trevordevore/levurehelper-dataview/blob/develop/mac_scroll_wheel.lcb


> .
> Ideally any engine improvements would tap into the

> scroll wheel values provided by the OS.

Thank you Trevor for making this available. After testing your library i 
realize what an improvement it is.
And I agree that "ideally any engine improvents would tap into the scroll wheel 
values provided by the OS"


I don't see any difference regarding lineSize. Maybe 
"ObjC_NSEventHasPreciseScrollingDeltas" is true.
Anyway in the comments of the LCB file you mention "row height"
Do you mean "effectiv lineSize" (synonym of borderSize) or "effective 
textHeight"?

I added hScroll to your script (again this is Mac only and needs Trevor's 
library installed)


---
on rawKeyDown pKey
   -- if the optionKey is down then pass rawKeyDown -- just to test scrolling 
of LC and library
   if pKey = "65308" or pKey = "65309" then
  set the vscroll of me to the vscroll of me \
   - item 2 of macCurrentEventScrollValues(the effective linesize of me)
   else if pKey is in "65310,65311" and the hScrollbar of me then
  set the hscroll of me to the hscroll of me  \
  - item 1 of macCurrentEventScrollValues(the effective linesize of me)
   else
  pass rawKeyDown
   end if
end rawKeyDown


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


Re: Is the DateFormat read only?

2021-01-31 Thread Niggemann, Bernd via use-livecode
Alex Tweedly via 
use-livecode
 Sat, 07 Nov 2020 07:29:15 
-0800

I tested out the TimeZone library with a couple of randomly chosen timezones - 
and they all came back incorrect (i.e. unchanged from UTC even though the 
timezones should have been different). I know that if you pass in a timezone 
that is not in the local machine's database, it will silently return the UTC 
value - but that's not the case here.

I've now looked at it more closely - some of these timezones give the right 
answer, some give the wrong answer - though they are all in the TimeZones() 
list.


Alex,

After you mentioned the problems with the timezone library I had a look and it 
turns out that some of the timezones on the TimeZones() list are deprecated and 
they resolve to UTZ.
I forgot to post that I bug reported the problem in case anyone runs into it.

https://quality.livecode.com/show_bug.cgi?id=23012

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


Re: opened socket in IDE prevents script changes

2021-01-15 Thread Niggemann, Bernd via use-livecode
Hi Bernard,

I have seen similar behavior of the apply button indicating "clean"  when the 
script was "dirty"/had compile errors. That was without sockets.

https://quality.livecode.com/show_bug.cgi?id=22555

maybe your problem is related

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


Re: Trying to use the Segmented Control

2020-12-04 Thread Niggemann, Bernd via use-livecode
>Ralf Bitter wrote

>See: https://github.com/revig/universal-button-widget/releases/tag/1.0.1


Thank you Ralf for this brilliant widget.

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


Re: Script colorization not working

2020-11-18 Thread Niggemann, Bernd via use-livecode
panagiotis merakos via 
use-livecode
 Wed, 18 Nov 2020 13:28:22 
-0800

Hello Devin,

A rough guess is that she is on Big Sur. There is a known issue where
colorization is lost if the default font (Source Code Pro) is used. If this
is the case, she can try switching to a different font, and the issue will
be fixed.

Kind regards,
Panos

It  seems there is a new release of Source Code Pro that removes an 
experimental offending "SVG table with colored glyphs" from the font that 
causes the problem on Big Sur.

https://github.com/adobe-fonts/source-code-pro/releases/tag/2.032R-ro%2F1.052R-it%2F1.012R-VAR

The discussiion of the problem is here

https://github.com/adobe-fonts/source-code-pro/issues/250

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


Re: Bug: jumping stack windows (when supress messages is off)

2020-10-11 Thread Niggemann, Bernd via use-livecode
Hi David,

I am sorry, I did not look at  the video.  That is quite  impressive.
I have never experienced anything like that in the IDE. (LC 9.6.1 MacOS Mojave)

Did you have a look at your plug-ins? Or have you tried to remove your 
preference file temporarily?

Kind regards
Bernd



David Bovill via 
use-livecode
 Sun, 11 Oct 2020 05:30:43 
-0700

Hi Bernd, the bug is not to do with the standard window snap. This is
unresponsive try to any mouse clicks and a big jump across half the screen
without any other windows present. Check the video to see.


___
use-livecode mailing list
use-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: Bug: jumping stack windows (when supress messages is off)

2020-10-10 Thread Niggemann, Bernd via use-livecode
Hi David,

What I see on Mojave is that e.g. TextEdit or Safari show a similar behavior.
Open  2 windows in TextEdit.  Move one close to the other and they will snap 
into place, if the tops of those two windows are almost horizontally aligned 
they will snap into place.

Same goes for Safari with two windows open. And the  same happens in  the IDE.
If that is what you describe on a single monitor setup then it is an operating 
system thing.

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


Re: Scroll a field to a specified line number

2020-08-17 Thread Niggemann, Bernd via use-livecode
Hi Michael,

This is because the "fixedLineHeight" is turned off by default since a couple 
of versions.

So you either turn "fixedLineHeight" on for the field or you change your code 
to something like

 -- one line
set the vScroll of fld 1 to the formattedtop of line 60 of field 1 - (the top 
of field 1 + the borderwidth of field 1)


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


Re: Animation Engine: speed tips

2020-07-02 Thread Niggemann, Bernd via use-livecode
Thank you Mark,

Glad you enjoyed it.

If you feel like it you could set the markerPoints of graphic gSand to a ball, 
still running at 22 frames/sec with 500 of them, filled. 

--
0,-13
3,-13
6,-12
8,-11
10,-9
12,-6
13,-3
13,0
13,3
12,6
10,9
8,11
6,12
3,13
0,13
-3,13
-6,12
-8,11
-10,9
-12,6
-13,3
-13,0
-13,-3
-12,-6
-10,-9
-8,-11
-6,-12
-3,-13
0,-13
-

Kind regards
Bernd

> Mark Talluto via use-livecode Wed, 01 Jul 2020 20:55:00 -0700
> 
> This is completely awesome!  Thank you Bernd.
> 
> -Mark Talluto
> Canela Software
> 
> On Wed, Jul 1, 2020 at 8:27 AM Niggemann, Bernd via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
> > While not exactly what David asked for but on the topic  of animating
> > multiple objects with acceptable speed:
> >
> > http://forums.livecode.com/viewtopic.php?f=10&t=11726&hilit=sand#p56253



___
use-livecode mailing list
use-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: Animation Engine: speed tips

2020-07-01 Thread Niggemann, Bernd via use-livecode
While not exactly what David asked for but on the topic  of animating multiple 
objects with acceptable speed:

http://forums.livecode.com/viewtopic.php?f=10&t=11726&hilit=sand#p56253

The original poster asked for "sand" particles that should have some sort of 
collision detection and should react to a mouseDown to either attract the 
objects or pushes them away.

It uses _one_ polygon graphic and sets individual points of that graphic 
(separated by an empty line). The points are just x,y coordinates and markers 
make the visual objects of the moving parts.

It manages to animate quite some number of objects depending on the size of the 
markers and some other features that are optional (dropshadow, ounteglow, 
markers filled and antialiasing)

The stack is completely useless but perfect for a rainy day at home. 
Depending on the complexity of the marker graphic it manages to animate 
smoothly (frame rate 18 and up)  from 150 to 1500 (small) objects (you can 
change appearance while the objects are moving.

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


Re: Script profiler

2020-06-07 Thread Niggemann, Bernd via use-livecode
Jacques wrote

> Does anyone with a business license use the script profiler? I'm having 
> trouble interpreting what it reports. According to the lesson in the LC 
> Lessons, it looks like the most recent handler is recorded on top of the 
> output but I'm getting output that is all mixed up without any order that I 
> can see.
> I also deliberately repeated a user action three times, and the stack 
> responded correctly, but I only see one instance of the handler in the 
> profiler. Is that normal? Or should it list every occurance?
> I am trying to track down an inexplicable lag in responsiveness in my app.

For me Script profiler returns the handlers in order of time consumed, the top 
one used the most time

Then it reports the number of calls and the cumultive time for each line that 
was called. The times are relative to each other, not the real times without 
the overhead of the profiler. 
But they give a good indication of where the bottlenecks are.

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


Re: Map Widget - how does it actually work?

2020-05-26 Thread Niggemann, Bernd via use-livecode
Unfortunately polylines stoppt working in recent versions of LC

https://quality.livecode.com/show_bug.cgi?id=22377

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


Re: Another widget grumble

2020-04-28 Thread Niggemann, Bernd via use-livecode


> Alex Tweedly wrote:
> How do you tell whether a widget is "part of the main product" ?
> Or, conversely, how do you find out what other source it came from ?

If you look at a widget in the Properties Inspector in the "basic" pane you 
will find its name and then "Kind"

for the Cock widget:
name: clock 
kind: com.livecode.widget.clock

 com.livecode.widget tells you that it is a, well, livecode widget.

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


Re: Go to card has become slow

2020-04-08 Thread Niggemann, Bernd via use-livecode
Saving the 300 cards 8.x MB stack on a 2017 MacBook Pro SSD:

0.127276 seconds

Same stack saving as binfile:

0.013656 seconds

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


Re: DataGrid question: Suggestions for further enhancements

2020-04-03 Thread Niggemann, Bernd via use-livecode
Roland wrote Thu, 02 Apr 2020 04:08:51 -0700:

Thank you Roland for your detailed list of possible improvements to 
modTableField


> + Selecting columns:
> 
> marking selected columns

I will have to think about that

> + Dragging and dropping columns and rows

presently it is possible to drag line = rows if you set

put true into pBool
dispatch "mtfAllowLineDragging" to group "modTableField 1" with pBool

Or set it from the helper stack tab "data"

You have to press the optionKey while dragging

Whereas you can extract columns from the data field but you can not set them 
nor drag them.
Again I will have to experiment to see how to eventually implement this.



> + Freezing rows and/or columns:

I am not sure what that is. Are you talking about a spreadsheet like behavior 
with fixed left column and top row?


> + Field display formats

For sorting you can specify the sort.
However until now I felt that the developer is in control of the format of the 
data.
A predetermined format for a column would mean a lot of error checking on data 
input. I am not sure if it is not better to leave that to the developer.

If you plan to use modTableField in a project feel free to email me and I can 
see if we can work out some modification.

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


Re: DataGrid question...

2020-04-03 Thread Niggemann, Bernd via use-livecode


> Bernard Devlin via use-livecode Fri, 03 Apr 2020 11:23:08 -0700
> Reminds me of the work of the late great Eric Chatonet


Thanks Bernhard for your kind words. But Eric is in my memory such a super 
coder and his code was crystal clear. Whereas my code is, um, less so.


> I see only one slight problem: after I click into a cell a trace of the I 
> beam is left behind on leaving the cell (this becomes visible on selecting 
> another row). I guess this is a LC bug. If I click away (e.g. on the 
> "examples" tabbed button) the trace vanishes. If I click on the column header 
> to sort and re-sort, the I beam trace is still there in the field in which I 
> clicked. If I click in the output field that also does not remove the I beam 
> vestige.


I am only using a Mac and I have never seen this. This must be something 
Windows 10 related. I do not have access to Windows 10.
I wonder if anyone has seen this on Windows 10?

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


Re: How to find the column and row of a basic tableField

2020-04-02 Thread Niggemann, Bernd via use-livecode
Sean,

The idea for the script I posted was to be independent of the Livecode provided 
tableField.

My use case was that tab-delimited data was provided in a _regular_ field and 
the user clicks on a cell and the developer wants to know which cell was 
clicked to take action upon that information. That is what modTableField is all 
about. modTableField has an option for the user to fill/change cells within the 
provided tab-delimited matrix.
http://berndniggemann.on-rev.com/mtf/modTableField.zip

To make such a field you use the standard field and set its hGrid and vGrid to 
true. The revtablelibrary frontscript knows nothing about such a field and 
keeps out of it.

If however you want to use the built-in tableField to let the user enter data 
(that is what I gather from your comment) be aware that revTableField is not 
free of bugs.

https://quality.livecode.com/show_bug.cgi?id=21679

That bug may be of interest to you if you want to let the user enter 
information at arbitrary not yet created cells in a revTableField

But then again I may not understand your use case. If I can be of help feel 
free to mail me.

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


How to find the column and row of a basic tableField

2020-04-01 Thread Niggemann, Bernd via use-livecode
There was a long thread regarding the dataGrid which somehow touched getting 
the row and column of a basic tableField.
I posted this solution also there. Mike Doub found some problems that turned 
out to be due to the fact that "cellEdit" was set to true for the table object.
If "cellEdit" is true then a front script takes over and creates a temporary 
field.

To post my solution to the problem again I start this new thread for clarity. 
The script is an elaboration on a sketchy script by Jacque.

The basic tableField is a regular field which has the option of "cellEditing". 
Apart from that it is a field that uses tab-delimited data to display it in a 
table form. 
hGrid and vGrid show horizontal and vertical dividers.

To get at the column number and the row number to determine the cell the user 
clicked on when the field's lockText is true here is a script that works well 
for me.

To test this make a regular field, name it "tf" and a second field for the 
result named "fRes". Make sure that "cellEdit" of the field is set to false 
(tab "table" in Properties Inspector)

set the script of field "tf" to 

---
on mouseUp
   put word 2 of the clickLine into tLine
   put getColumn(the clickH) into tItem
   put "Row:" && tLine into tRow
   put "Col:" && tItem into tColumn
   set the itemDelimiter to tab
   if tItem is not empty then
  put tRow &cr& tColumn & cr & "ClickH: " & the clickH & cr & "content: " & 
item tItem of line tLine of me & cr  into field "fRes"
   else
  put "No Item" into tItem
  put tRow &cr& tColumn & cr & "ClickH: " & the clickH & cr & "content: " & 
tItem  into field "fRes"
   end if
end mouseUp

function getColumn pClickH
   put the tabstops of me into tTabs
   put the num of items in tTabs into tNumStops
   if tNumStops > 1 then
  put last item of tTabs - item -2 of tTabs into tTabWidth
   else
  put item 1 of tTabs into tTabWidth
   end if
   set the itemdel to tab
   put the num of items in line 1 of me into tColumns
   if tNumStops < tColumns then -- add missing tabstops
  repeat with x = tNumStops+1 to tColumns
 put comma & (tTabWidth * x) after tTabs
  end repeat
   end if
   set the itemdel to comma
   put the hScroll of me into tHScroll
   put the borderwidth of me into tBrdr -- tested from 0 to 4
   put the leftMargin of me - 3 into tLeftMarg -- tested from 4 to 12
   put the left of me + tBrdr into tLeftAndBorder
   put tLeftAndBorder - tHScroll - tLeftMarg into tLeftOfItem
   put tLeftAndBorder - tHScroll + tLeftMarg + 1 into tRightOfItem
   put 0 & comma before tTabs
   repeat with x = 1 to the num of items in tTabs
  if pClickH > (item x of tTabs) + tLeftOfItem and \
pClickH < (item x+1 of tTabs) + tRightOfItem then
 return x
  end if
   end repeat
   return empty
end getColumn
--

add a button to the card with the following script for test data

--
on mouseUp
   put "1,2,3,4,5,6" into tLine
   put empty into field "tf"
   replace comma with tab in tLine
   set the itemDelimiter to tab
   repeat 6
  put tLine & cr after tCollect
  repeat with i = 1 to 6
 add 6 to item i of tLine
  end repeat
   end repeat
   delete last char of tCollect
   lock screen
   put tCollect into field "tf"
   set the hGrid of field "tf" to true
   set the vGrid of field "tf" to true
   set the vScrollbar of field "tf" to true
   set the tabStops of field "tf" to 77
   set the lockText of field "tf" to true
   unlock screen
end mouseUp

--

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


Re: DataGrid question...

2020-04-01 Thread Niggemann, Bernd via use-livecode
Hello Mike,

I cannot reproduce the scrolling nor the failing of reporting.

What I did notice is when I changed the size of the field via the mouse in 
editMode at times switching back to browse mode via command-option-tab the 
field did not focus when clicking on it and it did not report anything. 
Apparently because it is not focused.

Make sure the field is focused by e.g. clicking on the card after resizing and 
then the field.
But there is nothing in the code that I can see that would take focus away from 
the field, nor does the code trigger scrolling.

Kind regards
Bernd



Mike Doub via 
use-livecode<https://www.mail-archive.com/search?l=use-livecode@lists.runrev.com&q=from:%22Mike+Doub+via+use%5C-livecode%22>
 Wed, 01 Apr 2020 08:07:17 
-0700<https://www.mail-archive.com/search?l=use-livecode@lists.runrev.com&q=date:20200401>

There is an interesting interaction between the scrolling function, the size of
the field, mouseUp or Down.  For my test, when I click the 6th column,
scrolling occurs and the function returns nothing.  If I size the field such
that no scrolling occurs, all works as expected.   If I change the mouseUp to
mouseDown, all works as expected.   I have not spent the time to figure out
what is going on, but these are my observations.

-= Mike

On Apr 1, 2020, 9:29 AM -0400, Niggemann, Bernd via use-livecode
mailto:use-livecode@lists.runrev.com>>, wrote:
> This is a modification of Jaque's script to get the row and column of a
> locked tableField when the user clicks in a cell.
>
> Use tableField whose lockText is true. Set its script to
>
>
> 
> on mouseUp
> put "Row:" && word 2 of the clickline into tRow
> put "Col:" && getColumn(the clickH) into tColumn
> set the itemDelimiter to tab
> put tRow &cr& tColumn & cr & "ClickH: " & the clickH into field "fRes"
> end mouseUp
>
> function getColumn pClickH
> put the tabstops of me into tTabs
> put the num of items in tTabs into tNumStops
> if tNumStops > 1 then
> put last item of tTabs - item -2 of tTabs into tTabWidth
> else
> put item 1 of tTabs into tTabWidth
> end if
> set the itemdel to tab
> put the num of items in line 1 of me into tColumns
> if tNumStops < tColumns then -- add missing tabstops
> repeat with x = tNumStops+1 to tColumns
> put comma & (tTabWidth * x) after tTabs
> end repeat
> end if
> set the itemdel to comma
> put the hScroll of me into tHScroll
> put the borderwidth of me into tBrdr -- tested from 0 to 4
> put the leftMargin of me - 3 into tLeftMarg -- tested from 4 to 12
> put the left of me + tBrdr into tLeftAndBorder
> put tLeftAndBorder - tHScroll - tLeftMarg into tLeftOfItem
> put tLeftAndBorder - tHScroll + tLeftMarg + 1 into tRightOfItem -- + 1 is a
> fudge
> put 0 & comma before tTabs
> repeat with x = 1 to the num of items in tTabs
> if pClickH > (item x of tTabs) + tLeftOfItem and \
> pClickH < (item x+1 of tTabs) + tRightOfItem then
> return x
> end if
> end repeat
> return empty
> end getColumn
> 
>
>
> In my testing it works for changed borderWidth and margins, hscrolls and
> vScrolls
>
> If you want to test it take a regular field, set its name to "tf", set its
> script to above script
>
> and from a button apply this
>
>
> -
> on mouseUp
> put "1,2,3,4,5,6" into tLine
> put empty into field "tf"
> replace comma with tab in tLine
> set the itemDelimiter to tab
> repeat 6
> put tLine & cr after tCollect
> repeat with i = 1 to 6
> add 6 to item i of tLine
> end repeat
> end repeat
> delete last char of tCollect
> lock screen
> put tCollect into field "tf"
> set the hGrid of field "tf" to true
> set the vGrid of field "tf" to true
> set the hScrollbar of field "tf" to true
> set the tabStops of field "tf" to 77
> set the lockText of field "tf" to true
> unlock screen
> end mouseUp
>
> -

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


Re: DataGrid question...

2020-04-01 Thread Niggemann, Bernd via use-livecode
This is a modification of Jaque's script to get the row and column of a locked 
tableField when the user clicks in a cell.

Use tableField whose lockText is true. Set its script to



on mouseUp
   put "Row:" && word 2 of the clickline into tRow
   put "Col:" && getColumn(the clickH) into tColumn
   set the itemDelimiter to tab
   put tRow &cr& tColumn & cr & "ClickH: " & the clickH into field "fRes"
end mouseUp

function getColumn pClickH
   put the tabstops of me into tTabs
   put the num of items in tTabs into tNumStops
   if tNumStops > 1 then
  put last item of tTabs - item -2 of tTabs into tTabWidth
   else
  put item 1 of tTabs into tTabWidth
   end if
   set the itemdel to tab
   put the num of items in line 1 of me into tColumns
   if tNumStops < tColumns then -- add missing tabstops
  repeat with x = tNumStops+1 to tColumns
 put comma & (tTabWidth * x) after tTabs
  end repeat
   end if
   set the itemdel to comma
   put the hScroll of me into tHScroll
   put the borderwidth of me into tBrdr -- tested from 0 to 4
   put the leftMargin of me - 3 into tLeftMarg -- tested from 4 to 12
   put the left of me + tBrdr into tLeftAndBorder
   put tLeftAndBorder - tHScroll - tLeftMarg into tLeftOfItem
   put tLeftAndBorder - tHScroll + tLeftMarg + 1 into tRightOfItem -- + 1 is a 
fudge
   put 0 & comma before tTabs
   repeat with x = 1 to the num of items in tTabs
  if pClickH > (item x of tTabs) + tLeftOfItem and \
pClickH < (item x+1 of tTabs) + tRightOfItem then
 return x
  end if
   end repeat
   return empty
end getColumn



In my testing it works for changed borderWidth and margins, hscrolls and 
vScrolls

If you want to test it take a regular field, set its name to "tf", set its 
script to above script

and from a button apply this


-
on mouseUp
   put "1,2,3,4,5,6" into tLine
   put empty into field "tf"
   replace comma with tab in tLine
   set the itemDelimiter to tab
   repeat 6
  put tLine & cr after tCollect
  repeat with i = 1 to 6
 add 6 to item i of tLine
  end repeat
   end repeat
   delete last char of tCollect
   lock screen
   put tCollect into field "tf"
   set the hGrid of field "tf" to true
   set the vGrid of field "tf" to true
   set the hScrollbar of field "tf" to true
   set the tabStops of field "tf" to 77
   set the lockText of field "tf" to true
   unlock screen
end mouseUp

-



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


Re: DataGrid question...

2020-03-30 Thread Niggemann, Bernd via use-livecode


>Peter Bogdanoff wrote:

>Does anyone have a link to obtain Bernd's modTableField ?

Here is a link to the latest version of modifiedTableField

berndniggemann.on-rev.com/mtf/modTableField.zip

there is a zip of a demo stack with a helper stack and a .rtf document with the 
API

Use the demo stack to explore modTableField. Have a little patience to explore. 
It shows many options. Please have a look at the API document to get a feeling 
how to address and query modTableField.

If you want to use modTableField in a project copy the group "modTableField 1" 
from the demo stack to your stack and use the API to work with it.

This version is HTML5 safe. There was a superfluous wait in former versions. 
Hermann used tinyDict with his HTML5 demo of an IDE.

tinyDictionary uses modTableField

There are a couple of users that seem quite content with modTableField (thanks 
Jerry for mentioning it)

I would be happy to know if anybody uses modTableField in a project. (aside 
from the people that mailed me before).

If you have questions please feel free to email me.

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


Re: Translate metadata to field content

2020-02-21 Thread Niggemann, Bernd via use-livecode
Hi Jacque,

Jacque wrote:


 > put the styledText of fld 1 into tDataA
 > put 0 into tTotalChars
 > put 0 into tStartChar
  >repeat with i = 1 to the number of elements in tDataA
>put tDataA[i]["runs"] into tRunsA
>repeat with j = 1 to the number of elements in tRunsA
> put tRunsA[j] into tRunA
  >add the num of chars in tRunA["text"] to tTotalChars
 > if tRunA["metadata"] is pTag then
>if tStartChar = 0 then
 > put tTotalChars - len(tRunA["text"]) + 3 into tStartChar
   > end if
  >else if tStartChar > 0 then
>put tTotalChars - len(tRunA["text"]) into tEndChar
>select char tStartChar to tEndChar of fld 1
>select empty
>set the backcolor of char tStartChar to tEndChar of fld 1 to "yellow"
>return tStartChar & comma & tEndChar
 >end if
>end repeat
  >end repeat


the styledArray does not include the returns at the end of a line. You have to 
add them if you address chars/codeUnits of the whole text. Initializing 
tTotalChars with -1 lets you add 1 to tTotalChars in each iterations of the 
outer repeat loop. -1 because the first line is not has no preceding return.
Also add 1 to calculate tStartChar otherwise you point to the last char of 
preceding run.

  put -1 into tTotalChars -- note -1
  put 0 into tStartChar
  repeat with i = 1 to the number of elements in tDataA
add 1 to tTotalChars -- account for returns
put tDataA[i]["runs"] into tRunsA

-- note add 1
put tTotalChars - len(tRunA["text"]) +1 into tStartChar -- mark char 1 of target

Additionally in your implementation if the target run with the metadata you 
look for is the last run of the array nothing is returned.

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


Re: Translate metadata to field content

2020-02-20 Thread Niggemann, Bernd via use-livecode
In reply to Mark Waddingham's comments


Thank you Mark Waddingham for the improved scripts and the hints as to why they 
improve speed.

I adapted Mark's version for unique occurrence, changed how the position of the 
target word is determined in the target line.
It is not safe to assume that the sum of words of the runs is the number of 
words of the line up to the target word. The reason is that runs are depending 
on formatting and formatting can create a new run in the middle of a word and 
thus increase word count.
I did not opt for Mark's use of codeunits because I had the impression it was 
not faster and makes the code less obvious.

--
local tTextOfRuns
repeat for each key i in tDataA
   local tRunsA
   put tDataA[i]["runs"] into tRunsA
   repeat for each key j in tRunsA
  if tRunsA[j]["metadata"] is tSearchText then
 repeat with m = 1 to j
put tRunsA[m]["text"] after tTextOfRuns
 end repeat
 put the number of words of tTextOfRuns into tNumWords
 put true into tFlagExit
 exit repeat
  end if
   end repeat
   if tFlagExit then
  exit repeat
   end if
end repeat
--
select word tNumWords of line i of field "x"

text consists of 96881 words and 23161 lines of heavily formatted text
(it is the script of RevDataGridLibraryBehaviorsDataGridButtonBehavior copied 
twice into a field as described before)

word# old new version, times in ms

96881 240 110
8 220 100
6 180  60
3 120 125
1  85 125
 1000  50  90
1  50  60

Timing this is a bit tricky. For "repeat with I = 1 to item 2 of the extents" 
it is obvious that time increases with increasing the target word number.

For "repeat for each key I in tDataA" it is not sequential but faster. However 
that also makes for variations in speed depending on the internal state of the 
array structure.

All timings are estimated averages of 5 to 10 measurements . Variability is 
typically about +-5 to 10 milliseconds with outliers.

However the overall speed gain is quite impressive and well worth the change.
I learned a lot about handling larger datasets using arrays, than you.

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


Re: Translate metadata to field content

2020-02-19 Thread Niggemann, Bernd via use-livecode



>J. Landman Gay wrote:
>I haven't converted Bernd's script to use formattedStyledText yet but that 
>looks like the way to go.

There is no difference to using styledText for this use case. The number of 
lines and the number of words are the same between the  two.

You mentioned that you want to apply this to a huge text field.

I tested with the script of RevDataGridLibraryBehaviorsDataGridButtonBehavior 
which I copied twice into a field. That is about 23,000 lines and about 130,000 
runs.
This found a specific metadata of a word towards the end of the text in word 
80,000 of roughly 100,000 words in about 250 milliseconds (this excludes 
loading but includes hiliting of word and setting scroll, each about 25 ms).

However the loading time of styledText a little more than 300 milliseconds (no 
difference between styledText and formattedStyledText, but htmlText loading of 
this heavily formatted text is 800 ms). 

If you can manage preloading of the styledText into e.g. a script local 
variable at startUp or openCard or first run it would save more than half of 
the processing time.

here is Richard's script which I changed to get the number of words of the line 
with the tagged word, the number of lines are taken from the array.

The tagged word is then: word tNumWords of line (current array key)

-
put item 2 of the extents of tDataA into tExtents
   repeat with i = 1 to tExtents
  put item 2 of the extents of tDataA[i]["runs"] into tCounter
  repeat with j = 1 to tCounter
 if tDataA[i]["runs"][j]["metadata"] is tSearchText then
repeat with m = 1 to j
   add the number of words of tDataA[i]["runs"][m]["text"] to 
tNumWords
end repeat
put true into tFlagExit
exit repeat
 end if
  end repeat
  if tFlagExit then exit repeat
   end repeat
-

select word tNumWords of line i of field "x"

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


RE: Translate metadata to field content

2020-02-19 Thread Niggemann, Bernd via use-livecode
My previous post was accidentally marking a part of my response as quoting 
Ralph's question.



This is my response to Ralph's question about the difference between

styledText versus formattedStyledText



>From what I tested it behaves the same as formattedText. I.e. if you have
wrapped text in a field it will keep the wraps when transferring to another
field although the destination field is wide enough to hold the text
unwrapped. Of course formattedText is on raw text and does not include styling.

Whereas formattedText inserts returns at the wrapping formattedStyledText
inserts vertical tabs = ASCII 11.

Thus the number of lines returns the same value when using formattedStyledText
whereas formattedText increases the number of lines if there is any wrapping.

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


RE: Translate metadata to field content

2020-02-19 Thread Niggemann, Bernd via use-livecode


>Ralph DiMola wrote:

>What is the difference between styledText and formattedStyledText? A quick test
>yielded identical results. StyledText is in the dictionary.

>From what I tested it behaves the same as formattedText. I.e. if you have 
>wrapped text in a field it will keep the wraps when transferring to another 
>field although the destination field is large enough to hold the text 
>unwrapped. Of course formattedText is on raw text and does not include styling.

Whereas formattedText inserts returns at the wrapping formattedStyledText 
inserts vertical tabs = ASCII 11.

Thus the number of lines returns the same value when using formattedStyledText 
whereas formattedText increases the number of lines if there is any wrapping.

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


Re: Nested numeric lists that include number of parent list item

2020-02-11 Thread Niggemann, Bernd via use-livecode
I am not aware that listStyle decimal can show other then 1. No further sub 
numbering.

However one could hack it. Although I know you are not particularly fond of 
those hacks...

The code assumes that the listStyle of a field is set (any) will be "skip" 
afterwards and list depth is also set.


--
on mouseUp
   local tDepthValue, tTab, tDepth, tLastDepthValue
   local tIndex, tLeadingSpaces
   lock screen
   put space & space into tLeadingSpaces
   put numToCodePoint(9) into tTab -- not used

   put 0 into tDepthValue
   put 0 into tLastDepthValue

   set the listStyle of line 1 to -1 of field 1 to "skip"

   repeat with i = 1 to the number of lines of field 1
  if line i of field 1 is empty then next repeat
  put the listDepth of line i of field 1 into tDepth
  add 1 to item tDepth of tDepthValue
  if tDepth < the number of items of tLastDepthValue then
 delete item tDepth + 1 to -1 of tDepthValue
  end if
  put tDepthValue into tIndex
  replace comma with "." in tIndex
  put "." after tIndex
  put tIndex & tLeadingSpaces before line i of field 1
  put tDepthValue into tLastDepthValue
   end repeat
end mouseUp


to remove the hack

-
on mouseUp
   set the itemDelimiter to "." & space & space
   lock screen
   repeat with i = 1 to the number of lines of field 1
  if the number of items of line i of field 1 > 1 then
 delete item 1 of line i of field 1
  end if
   end repeat
   unlock screen
end mouseUp
-

It prepends the text with a decimal index. I started with tab as separator but 
it does not look well. Now it is two spaces. One could use non-breaking spaces 
as separators.

Kind regards
Bernd



>Trevor wrote


>I would like to get the following output but I'm not seeing a property that
>enables it. Am I missing something or is not possible using listStyle and
>listDepth?

>1. asdf ajsdf asf
>   1.1. adsfasdfasdf
>  1.1.1. asdfasdfasdf


___
use-livecode mailing list
use-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: Diff?

2020-02-01 Thread Niggemann, Bernd via use-livecode
Richard,

Library com.livecode.library.diff was introduce in 9.0

>From the release notes:
diff library
A new library has been implemented for computing diffs between text sources and 
applying those diffs to text.

https://github.com/livecode/livecode/blob/develop/extensions/script-libraries/diff/diff.livecodescript

I have used it occasionally and it worked well once you get the syntax right 
and find out what it does.
Especially in

DiffCompare(pFrom,pTo,pContext)

how pContext works. It takes a little experimentation.

Kind regards
Bernd

>Richard wrote:
>I just discovered three very interesting functions in the Dictionary:
>
>DiffCompare
>DiffCompareFiles
>DiffPatch

___
use-livecode mailing list
use-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: OMG text processing performance 6.7 - 9.5

2020-01-31 Thread Niggemann, Bernd via use-livecode
Ben,

If you have access to a business-license you could use "script profiling" on a 
small but representative sample of your data and see where the bottlenecks are. 
If you find any you could try to optimize that part.

"script profiling" adds its own overhead to the processing time (roughly 
doubles it) but if you keep the sample small it is well worth it in my 
experience.

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


Re: html5Player

2020-01-30 Thread Niggemann, Bernd via use-livecode
Hermann,

This is magic.

I always have to remind myself that it is Livecode running in a browser. It 
feels like some dedicated app.

I suggest that anybody who is interested in what is possible with Livecode 
HTML5 to have a look at Hermann's examples.

https://hyperhh.de/html5/html5Player.html

and

https://hyperhh.de/html5/html5IDE.html

Take a little time to explore the multitude of features.

Thank you for making this available

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


Re: Focus on customproperty inspector

2020-01-11 Thread Niggemann, Bernd via use-livecode
The bug is reported here:

https://quality.livecode.com/show_bug.cgi?id=22199

the proposed bug fix is here:

https://github.com/livecode/livecode-ide/pull/2079


Kind regards
Bernd


Hello,

With livecode 9.6 I have a strange behavior, when the custom property inspector 
is open, and the script window is open too, the focus shifts from time to time 
to the property title (which I previously displayed). If I don't pay attention, 
I replace the property title with the script I'm writing!

With LV 9.0, I didn't notice this behavior.

I?m the only one with this bug ?

Thanks (and Happy New year !) !

Ludovic

___
use-livecode mailing list
use-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: "empty" background in printed pdf is actually grey

2019-11-02 Thread Niggemann, Bernd via use-livecode
What happens when you set the opaque of group "oGrp" to false?



Richard E. Hawkins, Esq. wrote:


I’m printing each LC page with

set the backgroundColor of otCd to empty
set the opaque of group "oGrp" to true
set the blendlevel of group "oGrp" to 100
set the blendlevel of otCd to 100

print otCd from otTl to otBr into 18,18,576+18,756


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


Re: Access Resource Files

2019-09-20 Thread Niggemann, Bernd via use-livecode


answer specialfolderpath("resources")
...
in the standalone and check if that is the folder you manually copied the 
file(s) to!



specialfolderpath("resources") was introduced in LC 6.7.5 (from the dictionary)


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


Re: Resuscitation of Scott Raney Paint Tools

2019-06-22 Thread Niggemann, Bernd via use-livecode
do what Hermann suggested but add a line to the mouseUp handler

script of colorPalette of grp "palette" of cd id 1002 of stack 
"HAColorChooser":

on mouseUp
   set the selectedColor2 of me to the mouseColor --<--- add this
   setcolor the selectedColor2 of me
end mouseUp

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


Re: Filter an array by content

2019-06-21 Thread Niggemann, Bernd via use-livecode


Am 21.06.2019 um 09:01 schrieb 
use-livecode-requ...@lists.runrev.com:

From: "J. Landman Gay"

I spoke too soon. When I tested, I hard-coded a value as the filter
string. But when I use a variable, it fails as it did before. The
elements of the array all start with a 4-character string followed by an
underscore, for example:  ER01_some text here

My variable contains "ER01":

  put tVar & "_*" into tFilter
  filter elements of sArray with tFilter into tNewArray

No go. I've tried a few different iterations. However, this works:

  filter elements of sArray with "ER01_*" into tNewArray


This works for me in 9.0.4 and 9.5 DP1


on mouseUp
   local tErr = "ER01"
   local tArray, tVar, tNewArray

   put (tErr & "_*") into tVar

   repeat with i = 1 to 17
  if i mod 2 is 1 then
 put tErr & "_" & i into tArray[i]
  else
 put i into tArray[i]
  end if
   end repeat
   breakpoint
   filter elements of tArray with tVar into tNewArray
   breakpoint
   filter elements of tArray with tVar
   breakpoint
end mouseUp


may be O <> zero?

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


[ANN] bnGuides has been updated

2019-03-28 Thread Niggemann, Bernd via use-livecode
bnGuides a tool to visually aid in alignment of controls has been updated to 
version 0.5.0

if fixes some instances where bnGuides did not delete temporary graphics on the 
target stack.

Additionally it adds the optional display of distances to nearest neighbors. 
(capsLock-key toggles display of distances)
Thanks to bogs from the forum for suggesting "distances" and beta testing.

You can download it from within Livecode -> Sample Stacks
or 
http://livecodeshare.runrev.com/stack/918/BnGuides

see also 
https://forums.livecode.com/viewtopic.php?p=178245#p178244

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


Re: Fastest Frame Rate?

2019-03-23 Thread Niggemann, Bernd via use-livecode
Hi Rick,

rename your red and blue  graphic according to this script or change the names 
in this script and try this. It works quite well for me.


---
local sRed = "255,0,0"
local sBlue = "17,137,255"
local sRunning = false

on mouseUp
   if not sRunning then
  put true into sRunning
  set the backgroundColor of grc "gRed" to sRed
  set the backgroundColor of grc "gBlue" to sBlue
  goRun
   else
  put false into sRunning
   end if
end mouseUp

on goRun
   if not sRunning then exit goRun
   if "goRun" is among the lines of the pendingMessages then exit goRun
   lock screen -- pushes screen refresh after handler
   if the layer of grc "gRed" > the layer of grc "gBlue" then 
  set the layer of grc "gBlue" to top
   else
  set the layer of grc "gRed" to top
   end if
   send "goRun" to me in 16 milliseconds
end goRun
---

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


Re: Shoutout to Bernd Niggeman

2019-01-31 Thread Niggemann, Bernd via use-livecode
Roger wrote:

> This is to praise Bernd for his TinyDictionary!

Kaveh wrote:

> I second that.


Thank you Roger and Kaveh,

it was my pleasure.

By the way my current version has some additional features that are mostly of 
interest to people writing widgets:
You can import a temporary version of the inline dictionary of a .lcb file. 
Useful when editing the inline documentation of your widget.
Addtitionally you can import the current dictionary from a .json file. The 
advantage is that you get an up-to-date dictionary for wigdets that you install 
in the current session.
The downside is that it takes twice as long to import the dictionary.
If anybody is interested in this version please mail me and I will send it. If 
there is enough demand I will update tinyDict on Livecodeshare. Otherwise I 
will update tinyDict when there are more changes/bugfixes.
Currently there is only a fix for a minor display glitch. Not really worth an 
update.

Otherwise please report issues/bugs and I will see if I can fix 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


  1   2   >