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=11726=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=11726=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 & 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 & 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=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=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 & 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 & 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


Re: TestInStandalone v_100

2019-01-09 Thread Niggemann, Bernd via use-livecode
Hello Hermann,

this is a super HTML5 stack. It lets one easily test what works and does not 
work in HTML5 stacks.
Anyone interested in HTML5 stacks should at least have a look at it.

At times it is hard to believe that it is "just" a HTML5 stack, it seems like a 
little IDE in its own.

And also has code folding...

Thank you

Bernd



> hh via use-livecode Sun, 06 Jan 2019 20:00:25 -0800 wrote:
> 
> There is nearly no documentation in the dictionary what works (or works not)
> in HTML5 standalones. That's why I made this tool:
> 
> Here is "hhTestInStandalone", a HTML5 standalone that is ready for testing
> code snippets up to local libraries (script-only stacks).
> I use it to isolate critical script parts that run in the IDE but not in the
> HTML5 engine.
> 
> It has a LC-ScriptEditor (made in the browser) with a lot of features,
> especially it can access the system clipboard for copy and paste and it has
> code folding, colorising and indenting built-in.
> 
> • You can set the script of several buttons (or use these as text containers).
> • You can output to two fields and import images in order to work with them.
> 
> See
> (US) 
> http://hh.on-rev.com/html5/hhTestInStandalone-9.0.2hhX.html
> 
> (EU) 
> http://hyperhh.de/html5/hhTestInStandalone-9.0.2hhX.html
> 
> 
> Enjoy!
> 

___
use-livecode mailing list
use-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: Musings on Architect, MVC, Nested Behaviors

2018-12-28 Thread Niggemann, Bernd via use-livecode
Sannyasin Brahmanathaswami wrote


> BUT:  " A new developer may be more likely to see the chained behavior if the
>behaviors are explicitly assigned in code vs having to use vs going to the IDE
>to look up what the behavior chain is."
>
>That is a problem using "Navigator" (does not show nested behaviors) or the
>Project Browser which simply as (2)(1)(5) too obscure


"too obscure"... in Project Browser those are ordinal numbers and as such not 
very informative. But the tooltip shows you the actual script they are 
referencing.

https://github.com/livecode/livecode-ide/pull/1508
at the request of Sannyasin Brahmanathaswami
https://quality.livecode.com/show_bug.cgi?id=18176

maybe the tooltip helps.

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: Using the Compass / GPS features of LC

2018-12-21 Thread Niggemann, Bernd via use-livecode


Am 21.12.2018 um 11:25 schrieb Niggemann, Bernd 
mailto:bernd.niggem...@uni-wh.de>>:


Hi Mike,

>Mike for GDC via 
>use-livecode
> Thu, 20 Dec 2018 14:31:57 
>-0800

>I want to have the app show directions of how to return to the location after 
>walking away
>from it.  Not using google maps but instead using something like a "compass"
>app to direct the user to the location while always pointing to the
>destination


If I understand correctly what you want to do you might want to have a look a 
my "North" widget that you can use to indicate a direction.
I just updated it, look at the attachment in the third post.

http://forums.livecode.com/viewtopic.php?f=93=29486

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 alignment tool on ivecodeshare

2018-12-20 Thread Niggemann, Bernd via use-livecode
Thanks Tom, Matthias,

glad you like "bnGuides"


>Bob Sneidar via 
>use-livecode
> Thu, 20 Dec 2018 07:53:51 
>-0800

>Cool. Now I haven't tried it yet, but what would REALLY be cool is if it
>aligned a group based upon the contents of another group. That may be asking
>too much though.

>The way Illustrator goes about it is it tracks all points, then indicates
>whenever points align. Not sure how you did it though.



Thanks Bob,


Actually coming to think of it it would be easiest for you to just try 
"bnGuides".


When dealing with groups try with "Select Grouped" turned on and off. When 
turned on select the members of the group and click one control as the leading 
control.

When "Select Grouped" is turned off just select the group and drag it around 
and see how it deals with the members of the other group.


Note, the datagrid is just one group, the elements of the datagrid are not 
scanned.


for your convenience

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


or from "user samples" from within LC


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 alignment tool on ivecodeshare

2018-12-18 Thread Niggemann, Bernd via use-livecode
I have put a stack "bnGuides" on livecodeshare (or access it from "Sample 
Stacks" from within LC).
It is best used as a plugin.

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

It helps with visual guides to align objects. It complements the build-in 
alignment tool.
Feedback welcome.

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: Setting hidden of lines very slow

2018-11-30 Thread Niggemann, Bernd via use-livecode
Try

set the hidden of line 1 to - 1 of field 1 to false


Kind regards

Bernd


From: Kaveh Bazargan

I have a text field with some 3500 lines of text. I want to ensure all
lines are visible, as I have hidden some before. I use:

repeat with i = 1 the number of lines of fld 1
 set the hidden of line i of fld 1 to false
end repeat

This is taking over 1 minute to complete. I have tried removing all styling
from the text so e.g. backgroundcolor is empty, etc. Same result.

Any suggestions pls?

--
Kaveh Bazargan

___
use-livecode mailing list
use-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: Max number of columns in a datagrid?

2018-11-29 Thread Niggemann, Bernd via use-livecode
>From the dictionary p 59


Maximum length of a LINE in a field:

65,536 characters storage
No more than 32,786 pixels wide for display

Kind regards
Bernd


From: Geoff Canyon
I just checked, and (LC 8 on a Mac) indeed fields fail beyond a certain
width/character limit/???

This:

on mouseUp
  repeat with i = 1 to 1
 put char -10 to -1 of ("aa" & i & " ")  after x
  end repeat
  put x into fld 1
end mouseUp

results in a field that scrolls right only until it displays about "aa294
aa295 aa296 aa2" So, something like 3,000 characters wide.
Again, something that could be worked around, but basically whether it's a
field or the DG, some sort of virtualized display seems necessary.

___
use-livecode mailing list
use-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 offsets in Unicode Text fast

2018-11-12 Thread Niggemann, Bernd via use-livecode
Ben,

Please see my remarks out failing UTF-32 with some Icelandic characters. 
Currently I would not recommend offset(UTF-32 text) unless one knows which 
character set is suited to be used and is in control of that character set. The 
same goes for UTF-16.

I also thought that byteOffset would be faster for case-sensitive search in 
UTF-32 text. It turned out to be slower than offset(UTF-32 text).

>Ben Rubinstein via 
>use-livecode
> Mon, 12 Nov 2018 11:38:26 
>-0800

>Coming late to this discussion. Very excited by this approach of converting 
>everything to UTF-32 in order to do fast offsets.

>In the meantime I'd be suspicious about doing a case-insensitive search in 
>this way; but my guess would be that, if your use-case will accept 
>case->sensitivity, it would be safer (and faster?) to use byteOffset on the 
>UTF-32 data rather than offset.

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 offsets in Unicode Text fast

2018-11-12 Thread Niggemann, Bernd via use-livecode
Thank you Brian for putting the test stack up. It makes it easier to test 
various non-ASCII texts.

As your testing shows the UTF16 variant can be misleading.

Unfortunately I also found a case of UTF32 not working.

I copied from Icelandic Wikipedia from the entry about the capital Reykjavik 
some text as source (haystack) and put the Icelandic word for Reykjavik 
(Reykjavík) into the delimiter(needle).

Using UTF16 works but alas UTF32 does not find anything.

So now it seems that my attempt to fool the offset function into greater speed 
by using either UTF16 or UTF32 textEncoded versions of "needle" and "haystack" 
is not reliable.

Probably there is an explanation for this which eludes me.

Sorry to have to retract my proposition for being unreliable. Would have loved 
to use the speed gain for "offset" which is horribly slow for non-ASCII text.

Kind regards
Bernd



Am 12.11.2018 um 12:00 schrieb 
use-livecode-requ...@lists.runrev.com:

From: Brian Milby
To: How to use LiveCode 
mailto:use-livecode@lists.runrev.com>>
Subject: Re: How to find offsets in Unicode Text fast


I just tried one additional test.  Search for "åå" within "aaååÅÅååaa".
(On a Mac keyboard, the characters are made with A, Option-A, and
Shift-Option-A.)  The Offset UTF16 version does not return the correct
result if case sensitive is false (returns the same value as if it were
true: 3,7).  Every other version correctly performs the case folding
(3,4,5,6,7).

___
use-livecode mailing list
use-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 offsets in Unicode Text fast

2018-11-10 Thread Niggemann, Bernd via use-livecode
Hi Richmond


Richmond via 
use-livecode
 Sat, 10 Nov 2018 11:42:50 
-0800

>I don't know who told you that ð was an Icelandic d.


No one told me, I just made it up from the appearance of the letter.


I do know though that  Sunnudagu (Sunday) is different from Barðar (a male 
first name)


>The ð is called the "eth", and was used in Anglo-Saxon interchangeably with 
>thethorn to represent the 2 sounds that are now represented in English by digraph

As such Icelandic has retained the eth sign.
>In Icelandic the /d/ sound is represented by the letter d.



thank you for this very interesting information.

But I think that the actual topic of this thread could also interest the author 
of the famous "DevaWriter", may be only on a tangent.

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 offsets in Unicode Text fast

2018-11-10 Thread Niggemann, Bernd via use-livecode
That is what I alluded to,
UTF is  a wild country and I don't know my ways,
try
-
function allOffsets pDelim, pString, pCaseSensitive
   local tNewPos, tPos, tResult

   put textEncode(pDelim,"UTF32") into pDelim
   put textEncode(pString,"UTF32") into pString

   set the caseSensitive to pCaseSensitive is true
   put 0 into tPos
   repeat forever
  put offset(pDelim, pString, tPos) into tNewPos
  if tNewPos = 0 then exit repeat
  add tNewPos to tPos
  put tPos div 4 + tPos mod 4,"" after tResult
   end repeat
   if tResult is empty then return 0
   else return char 1 to -2 of tResult
end allOffsets
--

It teaches me to use UTF32 to be on the safe side, thank you.
But that should take care of it.

Kind regards
Bernd



Unfortunately, I just discovered that your solution doesn't produce correct
results. If I get the offsets of "aa" in
"↘܎aa↘܎a↘܎",

My code (and Brian Milby's) will return: 7,8,9,10

Your code will return: 9,10,11,12

As I understand it, textEncode transforms unicode text into binary data,
which has the effect of speeding things up because LC is no longer dealing
with variable-byte-length characters, just the underlying (fixed-length)
binary data that makes them up. Hence the above discrepancy. At least I
think so. Maybe there's a way to fix it?

gc



Am 11.11.2018 um 00:00 schrieb Geoff Canyon 
mailto:gcan...@gmail.com>>:

Unfortunately, I just discovered that your solution doesn't produce correct 
results. If I get the offsets of "aa" in "↘܎aa↘܎a↘܎",

My code (and Brian Milby's) will return: 7,8,9,10

Your code will return: 9,10,11,12

As I understand it, textEncode transforms unicode text into binary data, which 
has the effect of speeding things up because LC is no longer dealing with 
variable-byte-length characters, just the underlying (fixed-length) binary data 
that makes them up. Hence the above discrepancy. At least I think so. Maybe 
there's a way to fix it?

gc

On Sat, Nov 10, 2018 at 12:12 PM Niggemann, Bernd 
mailto:bernd.niggem...@uni-wh.de>> wrote:
I figured that the slowdown was due to UTF8, for each char it has to test if it 
is a compounded character. So I just tried with utf16 figuring, that now it 
just compares at the byte-level.

As it turned out it was indeed faster.

Now I don't understand unicode but as I understand for some 
languages/signs/characters you need UTF32 to display them correctly. I may be 
wrong on that. But if it is true then the overhead to use UTF32 in textEncoding 
only adds a small amount to processing time.

The nice thing is that UTF16 and UTF32 textencoding also support 
caseSensitivity.  ByteOffset() for UTF16 is probably always case-sensitive, but 
only saves a small amount of processing time.

Also, LC apparently has to turn ASCII into UTF8 as soon as there is one 
non-ASCII character in the source text. In my naive understanding LC could 
internally switch to UTF16/32 for offset() as soon as it realizes that UTF8 is 
in the source. Would make obsolete this workaround.


This is just how I "think" it works, the explanation may be all wrong.

Kind regards

Bernd

Am 10.11.2018 um 20:30 schrieb Geoff Canyon 
mailto:gcan...@gmail.com>>:

This is faster -- under some circumstances, much faster! Any idea why 
textEncoding suddenly fixes everything?

On Sat, Nov 10, 2018 at 5:13 AM Niggemann, Bernd via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:
This is a little late but there was a discussion about the slowness of simple 
offset() when dealing with text that contains Unicode characters.

Geoff Canyon and Brian Milby found a faster solution by setting the 
itemDelimiter to the search string.
They even provided a way to find the position of substrings in the search 
string which the offset() command does by design.

Here I propose a variant of the offset() form that uses UTF16 to search, easily 
adaptable to UTF32 if necessary.

To test (as in Brian's testStack) add a unicode character to the text to be 
searched e.g. at the end. Just any non-ASCII character to see the speed penalty 
of simple offset(). I used ð (Icelandic d) or use any chinese character.


Kind regards
Bernd

---
function allOffsets pDelim, pString, pCaseSensitive
   local tNewPos, tPos, tResult

   put textEncode(pDelim,"UTF16") into pDelim
   put textEncode(pString,"UTF16") into pString

   set the caseSensitive to pCaseSensitive is true
   put 0 into tPos
   repeat forever
  put offset(pDelim, pString, tPos) into tNewPos
  if tNewPos = 0 then exit repeat
  add tNewPos to tPos
  put tPos div 2 + tPos mod 2,"" after tResult
   end repeat
   if tResult is empty then return 0
   else return char 1 to -2 of tResult
end allOffsets

Re: How to find offsets in Unicode Text fast

2018-11-10 Thread Niggemann, Bernd via use-livecode
I figured that the slowdown was due to UTF8, for each char it has to test if it 
is a compounded character. So I just tried with utf16 figuring, that now it 
just compares at the byte-level.

As it turned out it was indeed faster.

Now I don't understand unicode but as I understand for some 
languages/signs/characters you need UTF32 to display them correctly. I may be 
wrong on that. But if it is true then the overhead to use UTF32 in textEncoding 
only adds a small amount to processing time.

The nice thing is that UTF16 and UTF32 textencoding also support 
caseSensitivity.  ByteOffset() for UTF16 is probably always case-sensitive, but 
only saves a small amount of processing time.

Also, LC apparently has to turn ASCII into UTF8 as soon as there is one 
non-ASCII character in the source text. In my naive understanding LC could 
internally switch to UTF16/32 for offset() as soon as it realizes that UTF8 is 
in the source. Would make obsolete this workaround.


This is just how I "think" it works, the explanation may be all wrong.

Kind regards

Bernd

Am 10.11.2018 um 20:30 schrieb Geoff Canyon 
mailto:gcan...@gmail.com>>:

This is faster -- under some circumstances, much faster! Any idea why 
textEncoding suddenly fixes everything?

On Sat, Nov 10, 2018 at 5:13 AM Niggemann, Bernd via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:
This is a little late but there was a discussion about the slowness of simple 
offset() when dealing with text that contains Unicode characters.

Geoff Canyon and Brian Milby found a faster solution by setting the 
itemDelimiter to the search string.
They even provided a way to find the position of substrings in the search 
string which the offset() command does by design.

Here I propose a variant of the offset() form that uses UTF16 to search, easily 
adaptable to UTF32 if necessary.

To test (as in Brian's testStack) add a unicode character to the text to be 
searched e.g. at the end. Just any non-ASCII character to see the speed penalty 
of simple offset(). I used ð (Icelandic d) or use any chinese character.


Kind regards
Bernd

---
function allOffsets pDelim, pString, pCaseSensitive
   local tNewPos, tPos, tResult

   put textEncode(pDelim,"UTF16") into pDelim
   put textEncode(pString,"UTF16") into pString

   set the caseSensitive to pCaseSensitive is true
   put 0 into tPos
   repeat forever
  put offset(pDelim, pString, tPos) into tNewPos
  if tNewPos = 0 then exit repeat
  add tNewPos to tPos
  put tPos div 2 + tPos mod 2,"" after tResult
   end repeat
   if tResult is empty then return 0
   else return char 1 to -2 of tResult
end allOffsets
-
___
use-livecode mailing list
use-livecode@lists.runrev.com<mailto:use-livecode@lists.runrev.com>
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

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

How to find offsets in Unicode Text fast

2018-11-10 Thread Niggemann, Bernd via use-livecode
This is a little late but there was a discussion about the slowness of simple 
offset() when dealing with text that contains Unicode characters.

Geoff Canyon and Brian Milby found a faster solution by setting the 
itemDelimiter to the search string.
They even provided a way to find the position of substrings in the search 
string which the offset() command does by design.

Here I propose a variant of the offset() form that uses UTF16 to search, easily 
adaptable to UTF32 if necessary.

To test (as in Brian's testStack) add a unicode character to the text to be 
searched e.g. at the end. Just any non-ASCII character to see the speed penalty 
of simple offset(). I used ð (Icelandic d) or use any chinese character.


Kind regards
Bernd

---
function allOffsets pDelim, pString, pCaseSensitive
   local tNewPos, tPos, tResult
   
   put textEncode(pDelim,"UTF16") into pDelim
   put textEncode(pString,"UTF16") into pString
   
   set the caseSensitive to pCaseSensitive is true
   put 0 into tPos
   repeat forever
  put offset(pDelim, pString, tPos) into tNewPos
  if tNewPos = 0 then exit repeat
  add tNewPos to tPos
  put tPos div 2 + tPos mod 2,"" after tResult
   end repeat
   if tResult is empty then return 0
   else return char 1 to -2 of tResult
end allOffsets
-
___
use-livecode mailing list
use-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: Where is the declarative border color setting in the property

2018-11-09 Thread Niggemann, Bernd via use-livecode
Keith,

I see "Border fill" when the preference setting is "Description of option" for 
a field. For an image I see "Border/grid Color" with the same setting.

Since I always have "Name of Livecode Property" set in Preferences I never 
noticed the difference.

Anyhow the tooltip shows the alternative option

Kind regards

Bernd


Thanks Bernd. That’s exactly what I was expecting, but see neither - 'Border
fill' is the only Border color property I see in the list?!?

Could I have accidentally set something to hide this?
Best,
Keith


Am 09.11.2018 um 12:13 schrieb berndnig 
mailto:bernd.niggem...@uni-wh.de>>:

Keith,

depending on your settings in Preferences -> General -> "Description of option" 
or "Name of Livecode Property" border color will show up in Properties 
Inspector in tab "Colors" as

"Border/grid Color" or "borderColor"

Kind regards
Bernd


Date: Fri, 09 Nov 2018 09:02:18 +
From: Keith Clarke

Folks,
Am I missing something - has border color been removed from the Property 
Inspector?s ?colors? tab or has one always had to code this?
Thanks,
Keith


___
use-livecode mailing list
use-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: Where is the declarative border color setting in the property

2018-11-09 Thread Niggemann, Bernd via use-livecode
Keith,

depending on your settings in Preferences -> General -> "Description of option" 
or "Name of Livecode Property" border color will show up in Properties 
Inspector in tab "Colors" as 

"Border/grid Color" or "borderColor"

Kind regards
Bernd


> Date: Fri, 09 Nov 2018 09:02:18 +
> From: Keith Clarke

> Folks,
> Am I missing something - has border color been removed from the Property 
> Inspector?s ?colors? tab or has one always had to code this?
> Thanks,
> Keith


___
use-livecode mailing list
use-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 offset of the last instance of a repeating character in a string? (Geoff Canyon)

2018-11-01 Thread Niggemann, Bernd via use-livecode
Hi Geoff,

thank you for this beautiful script.

I modified it a bit to accept multi-character search string and also for case 
sensitivity.

It definitely is a lot faster for unicode text than anything I have seen.

-
function offsetList D,S, pCase
   -- returns a comma-delimited list of the offsets of D in S
   -- pCase is a boolean for caseSensitive
   set the caseSensitive to pCase
   set the itemDel to D
   put the length of D into tDelimLength
   repeat for each item i in S
  add length(i) + tDelimLength to C
  put C - (tDelimLength - 1),"" after R
   end repeat
   set the itemDel to comma
   if char -1 of S is D then return char 1 to -2 of R
   put length(C) + 1 into lenC
   put length(R) into lenR
   if lenC = lenR then return 0
   return char 1 to lenR - lenC - 1 of R
end offsetList
--

Kind regards
Bernd





> 
> Date: Thu, 1 Nov 2018 00:15:37 -0700
> From: Geoff Canyon
> To: How to use LiveCode 
> Subject: Re: How to find the offset of the last instance of a
>   repeating   character in a string?
> 
> I was curious if using the itemDelimiter might work for this, so I wrote
> the below code out of curiosity; but in my quick testing with single-byte
> characters it was only about 30% faster than the above methods, so I didn't
> bother to post it.
> 
> But Ben Rubinstein just posted about a terrible slow-down doing pretty much
> this same thing for text with unicode characters. So I ran a simple test
> with 8000 character long strings that start with a single unicode
> character, this is about 15x faster than offset() with skip. For
> 100,000-character lines it's about 300x faster, so it seems to be immune to
> the line-painter issues skip is subject to. So for what it's worth:
> 
> function offsetList D,S
>   -- returns a comma-delimited list of the offsets of D in S
>   set the itemDel to D
>   repeat for each item i in S
>  add length(i) + 1 to C
>  put C,"" after R
>   end repeat
>   set the itemDel to comma
>   if char -1 of S is D then return char 1 to -2 of R
>   put length(C) + 1 into lenC
>   put length(R) into lenR
>   if lenC = lenR then return 0
>   return char 1 to lenR - lenC - 1 of R
> end offsetList
> 


___
use-livecode mailing list
use-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: starting the Project Browser

2018-10-24 Thread Niggemann, Bernd via use-livecode
Hi,

does this help?

revIDETogglePalette "Project Browser"

you can test if the Project Browser is visible

put revIDEPaletteIsVisible("project browser")

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: Sorting search results - solution needed

2018-10-24 Thread Niggemann, Bernd via use-livecode
here is my take, clumsy and not respecting all formatting requirements

Instead of

187.1
187.1.1
187.1.2
187.3
187.22
187.33
187.234

it sorts

187.1
187.1.1
187.1.2
187.22
187.234
187.3
187.33

Kind regards
Bernd




---
on mouseUp
   put field "fAlpha" into tData
   put "" into msg
   sort tData numeric by specialSort(each) 
   put tData into field "fSort"
end mouseUp

function specialSort pEach
   put pEach into tData
   --put word 1 to -1 of tData into tData
   put "0,1,2,3,4,5,6,7,8,9,." into tNumbers
   
   -- check for double colon like in 187.1.2
   put 0 into tSkip
   put 0 into tCounter
   repeat
  put offset(".", tData, tSkip) into tOffset
  if tOffset > 0 then
 add tOffset to tSkip
 add 1 to tCounter
  else
 exit repeat
  end if
   end repeat
   if tCounter > 1 then 
  --put tData && tCounter & cr after msg
  put empty into char tSkip of tData
  return tData
   end if
   
   repeat with i = 1 to the number of chars of tData
  if char i of tData is among the items of tNumbers then 
 put char i of tData after tNumberPart
  else
 exit repeat
  end if
   end repeat
   
   
   if tData = tNumberPart then
  return tNumberPart
   end if
   
   put length(tNumberPart) into tLength
   put char tLength + 1 to - 1 of tData into tRest
   if char tLength of tNumberPart = "." then put "." before tRest
   
   replace ")" with empty in tRest
   replace space with empty in tRest
   
   put toUpper(tRest) into tRest
   
   put true into tLeftBracket
   put 0 into tDecimal
   repeat with i = 1 to the number of chars of tRest
  
  put char i of tRest into tChar
  
  if tChar is a Number then
 add  tChar * .1 to tDecimal
 
  else if tChar is "(" then
 if tLeftBracket then
add .001 to tDecimal
put false into tLeftBracket
 end if
 
  else if tChar is "." then -- ASCII "." = 46
 add .1 to tDecimal
 
  else if charToNum(tChar) >= 65 then -- ASCII "A" = 65
 add (charToNum(tChar)-64) * .9 to tDecimal
  end if
   end repeat
   
   return tNumberPart + tDecimal
end specialSort
-

___
use-livecode mailing list
use-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: Best way to store videos

2018-08-27 Thread Niggemann, Bernd via use-livecode
J. Landman Gay via 
use-livecode
 Fri, 24 Aug 2018 14:11:29 
-0700

On 8/24/18 3:42 PM, Monte Goulding via use-livecode wrote:





On 25 Aug 2018, at 5:44 am, J. Landman Gay via use-livecode
mailto:use-livecode@lists.runrev.com>> wrote:



Search the LC 9 dictionary for
the commands that start with AWS and AWSS3 to see what it available to you.


Mac and iOS only though. :(


mergAWS is Mac and iOS but LC 9 has a script library that is cross platform.


Oh cool. :) I was trying out Tiny Dictionary and it isn't in there. Just found 
it in the main dictionary.


--
Jacqueline Landman Gay | 
jac...@hyperactivesw.com
HyperActive Software   | 
http://www.hyperactivesw.com



When using Tiny Dictionary in the option menu either choose "All" and search 
for "aws" or choose from the option menu "library.aws". If you start your 
search with a quote it will return whatever starts with "aws".
Of course this only works in versions of LC that offer that library. For the 
aws-library 9.0.

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: valueDiff for arrays?

2018-08-06 Thread Niggemann, Bernd via use-livecode
How embarrassing, again an error. I should go to sleep now.

 repeat pn mod 1
  put tYes after tIsItPrime <-- corrected line
   end repeat

Here is the hopfully truly truly last correction.

---
function get_primes pN -- bn modified brian
   local tMroot, tPrimes, tIsItPrime, tYes, tNo
   put numtobyte(66) into tYes
   put numtobyte(65) into tNo
   if pN < 2 then return empty
   if pN = 2 then return 2
   put 2 into tPrimes
   put trunc(sqrt(pN)) - 1 into tMroot
   
   if pN >= 1 then
  local tTenThousand
  repeat 1
 put tYes after tTenThousand
  end repeat
  
  repeat pn div 1
 put tTenthousand after tIsItPrime
  end repeat
   end if
   
   repeat pn mod 1
  put tYes after tIsItPrime
   end repeat
   
   repeat with i = 3 to tMroot step 2
  if byte i of tIsItPrime is tNo then next repeat
  put cr & i after tPrimes
  repeat with j = i^2 to pN step i
 put tNo into byte j of tIsItPrime
  end repeat
   end repeat
   repeat with i = tMroot + (tMroot + 1) mod 2 to pN - 1 step 2
  if byte i of tIsItPrime is tYes then put cr & i after tPrimes
   end repeat
   return tPrimes
end get_primes
--

at least it saves a couple of 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: valueDiff for arrays?

2018-08-06 Thread Niggemann, Bernd via use-livecode
There was an error in the code I posted.
It should read "if pN >= 1 then" instead of "if pN > 1"

this is the corrected version
-
function get_primes pN
   local tMroot, tPrimes, tIsItPrime, tYes, tNo
   put numtobyte(66) into tYes
   put numtobyte(65) into tNo
   if pN < 2 then return empty
   if pN = 2 then return 2
   put 2 into tPrimes
   put trunc(sqrt(pN)) - 1 into tMroot
   
   if pN >= 1 then
  local tTenThousand
  repeat 1
 put tYes after tTenThousand
  end repeat
  
  repeat pn div 1
 put tTenthousand after tIsItPrime
  end repeat
   end if
   
   repeat pn mod 1
  put tTenthousand after tIsItPrime
   end repeat
   
   repeat with i = 3 to tMroot step 2
  if byte i of tIsItPrime is tNo then next repeat
  put cr & i after tPrimes
  repeat with j = i^2 to pN step i
 put tNo into byte j of tIsItPrime
  end repeat
   end repeat
   repeat with i = tMroot + (tMroot + 1) mod 2 to pN - 1 step 2
  if byte i of tIsItPrime is tYes then put cr & i after tPrimes
   end repeat
   return tPrimes
end get_primes
---

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: valueDiff for arrays?

2018-08-06 Thread Niggemann, Bernd via use-livecode
This also helps a bit. Where is Hermann?

-
function get_primes pN
   local tMroot, tPrimes, tIsItPrime, tYes, tNo
   put numtobyte(66) into tYes
   put numtobyte(65) into tNo
   if pN < 2 then return empty
   if pN = 2 then return 2
   put 2 into tPrimes
   put trunc(sqrt(pN)) - 1 into tMroot
   
   if pN > 1 then
  local tTenThousand
  repeat 1
 put tYes after tTenThousand
  end repeat
  
  repeat pn div 1
 put tTenthousand after tIsItPrime
  end repeat
   end if
   
   repeat pn mod 1
  put tTenthousand after tIsItPrime
   end repeat
   
   repeat with i = 3 to tMroot step 2
  if byte i of tIsItPrime is tNo then next repeat
  put cr & i after tPrimes
  repeat with j = i^2 to pN step i
 put tNo into byte j of tIsItPrime
  end repeat
   end repeat
   repeat with i = tMroot + (tMroot + 1) mod 2 to pN - 1 step 2
  if byte i of tIsItPrime is tYes then put cr & i after tPrimes
   end repeat
   return tPrimes
end get_primes


This is a modified Brian´s version built upon Alex's version

Note that Brian seems to find one additional prime.

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: Datagrids and Nested Behaviors

2018-07-23 Thread Niggemann, Bernd via use-livecode
my solution would be to change private function _ResourceStack of stack 
RevDataGridLibraryBehaviorsDataGridButtonBehavior to

private function _ResourceStack
  local theStack, theCharNo
  put the behavior of me into theStack

  repeat
 if trueWord - 1 of theStack is "revDataGridLibrary" or theStack is empty 
then
exit repeat
 else
put the behavior of theStack into theStack
 end if
  end repeat

  if theStack is not empty then
 put offset(" of stack", theStack) into theCharNo
 delete char 1 to (theCharNo + 3) of theStack
  end if

  return theStack
end _ResourceStack


as far as speed is concerned it is probably slower than Brian's suggestion but 
one has only to change one handler. Then again it is only during initialization 
of the dataGrid

That way one could use Bob's setup

modified behavior button
|
|
existing behavior 1
|
|
existing behavior 2

and set the behavior of group "dataGrid x" to the long id of button "modified 
behavior button"

And all other instances of the dataGrid would use their default behaviors.

Kind regards

Bernd



> Am 23.07.2018 um 23:01 schrieb Brian Milby :
> 
> So that is something that could be fixed pretty easily. I’m thinking a script 
> local to store the value which will offset the additional work to figure it 
> out the first time.
> 
> Logic would be to check for some key object and if not found then move up the 
> behavior chain a level and look. Could either decide that only one could be 
> there or just keep going until there are no more. There is no error checking 
> now, so it could fail in the same manner.
> 
> A side effect would be that the call would be faster for every other use 
> since it would only be checking that the script local wasn’t empty and 
> returning the value.
> 
> Another option would be to just initialize the variable in _Initialize and 
> use it for the 10 places the function is currently used. That would be even 
> faster since it would eliminate the function call completely.
> 
> Thanks,
> Brian
> On Jul 23, 2018, 1:24 PM -0500, Niggemann, Bernd via use-livecode 
> , wrote:
>> The problem Bob Sneidar ran into by changing the order of the behaviors of a 
>> dataGrid is due to the initialization process of the dataGrid at start-up.
>> 
>> The behavior looks for a resourceStack by means of this handler.
>> 
>> private function _ResourceStack
>> local theStack, theCharNo
>> put the behavior of me into theStack
>> if theStack is not empty then
>> put offset(" of stack", theStack) into theCharNo <-- looks only at first 
>> behavior which is in Bob's case the wrong stack
>> delete char 1 to (theCharNo + 3) of theStack
>> end if
>> 
>> return theStack
>> end _ResourceStack
>> 
>> 
>> In Bob's case the function returns the stack the button his newly assembled 
>> behavior is placed on instead of stack "revdatagridlibrary.rev".
>> Then the initialization trys to set again behaviors of specific elements of 
>> the datagrid to scripts of the "correct" _ResourceStack.
>> 
>> This fails obviously and is the reason for Bob's approach to fail.
>> 
>> Further details of this on request, I don't want to bother the list with 
>> them.
>> 
>> Kind regards
>> 
>> Bernd
>> 
>> 
>> 
>> 
>> 
>> 
>> Richard Gaskin wrote:
>> 
>> The more I've explored this the more subclassing by inserting a custom 
>> behavior in between a custom control and its original behavior should work. 
>> It's curious that it doesn't here.
>> 
>> What exactly were the errors you encountered?
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode

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

Re: Datagrids and Nested Behaviors

2018-07-23 Thread Niggemann, Bernd via use-livecode
The problem Bob Sneidar ran into by changing the order of the behaviors of a 
dataGrid is due to the initialization process of the dataGrid at start-up.

The behavior looks for a resourceStack by means of this handler.

private function _ResourceStack
   local theStack, theCharNo
   put the behavior of me into theStack
   if theStack is not empty then
  put offset(" of stack", theStack) into theCharNo  <-- looks only at first 
behavior which is in Bob's case the wrong stack
  delete char 1 to (theCharNo + 3) of theStack
   end if

   return theStack
end _ResourceStack


In Bob's case the function returns the stack the button his newly assembled 
behavior is placed on instead of stack "revdatagridlibrary.rev".
Then the initialization trys to set again behaviors of specific elements of the 
datagrid to scripts of the "correct" _ResourceStack.

This fails obviously and is the reason for Bob's approach to fail.

Further details of this on request, I don't want to bother the list with them.

Kind regards

Bernd






Richard Gaskin wrote:

The more I've explored this the more subclassing by inserting a custom behavior 
in between a custom control and its original behavior should work. It's curious 
that it doesn't here.

What exactly were the errors you encountered?


___
use-livecode mailing list
use-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: Datagrids and Nested Behaviors

2018-07-21 Thread Niggemann, Bernd via use-livecode
Bob,

I also found that changing the behavior of group "dataGrid x" does not stick 
and after restart you have to set it again.

However if you want to use the convenience of a behavior you could set in your 
case as far as user interaction via doubleMouseUp is concerned you could set 
the behavior of group "dgListMask" of group "dataGrid x" to the button of your 
mouseDoubleUp handler. That will save the behavior with the specific group 
"dataGrid x" and you would only have to assign this  once to that group. If you 
want to go that route be careful to choose a control inside a specific dataGrid 
that has not already a behavior assigned.
e.g. group "dgList" of group "dataGrid x" already has a behavior assigned. In 
my testing this works for mouseDoubleUp

---
on mouseDoubleUp
   put the long name of the target into tTarget
   if tTarget begins with "field" then put the text of tTarget & cr & tTarget
   else put tTarget -- does not trigger
   pass mouseDoubleUp
end mouseDoubleUp
--- 

Maybe that is an easier way to solve the global scope problem you get when 
modifiying the behaviors of the group "dataGrid x" and also of "stickiness"

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: Datagrids and Nested Behaviors

2018-07-19 Thread Niggemann, Bernd via use-livecode
Bob,

if you want to use a a behavior for the datagrids make a button with 

on mouseDoubleUp
   put the long name of the target
end mouseDoubleUp

and then set the behavior of your datagrids like this

set the behavior of the behavior of the behavior of group "datagrid 1" to the 
long id of button "myButtonName"


this will put the "new" behavior at the top of the two behaviors of the 
datagrid group. Obviously that will not work with editable fields.

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: TextAlign not working in fields

2018-07-18 Thread Niggemann, Bernd via use-livecode
Hi Paul,

I hope that Edinburgh will fix the problem.

In the meantime you could try this workaround for your sample stack from QCC.

make a button with this script and use it whenever you change  textAlign or 
width of field "Cloud"

Here I assume you are using margins of 8.

---
on mouseUp
   lock screen
   set the margins of field "Cloud" to 8
   set the hScroll of field "Cloud" to 0
   put the left of field "Cloud" into tLeft
   put the leftMargin of field "Cloud" into tLeftM
   put the formattedRect of line 1 to -1 of field "Cloud" into tRect
   if item 1 of tRect < tLeft + tLeftM then
  subtract tLeft from item 1 of tRect
  set the leftMargin of field "Cloud" to item 1 of tRect * -1 + tLeftM * 2
  set the rightMargin of field "Cloud" to item 1 of tRect
   end if
   unlock screen
end mouseUp
---

I know it sounds weird but it worked for your sample stack.

Kind regards
Bernd


Paul Dupuis wrote:

I filed a bug yesterday: https://quality.livecode.com/show_bug.cgi?id=21426

This seems to me to be a pretty serious bug, however, Panos enlightened
me that there is a nearly identical bug from 2013 (see
https://quality.livecode.com/show_bug.cgi?id=11345). This bug - namely
if you have a long line of text in a field, whether wrap is on or off,
scrolling does not work as expected when the text is center or right
aligned. You can not scroll to see all the text. It is rendered outside
the boundaries of the scrollable areas of the field!

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


Re: Sort IP List

2018-06-30 Thread Niggemann, Bernd via use-livecode
Hermann,

I did not see Alex's solution until after I posted. I agree that inline is 
probably always faster.

And after I saw Alex's post I would not have thought that one could do it that 
way, thanks Alex. On top it is by far the fastest.

On the other hand sort by myFunction(each) is so powerful that you can do 
things that are probably not possible inline.

Kind regards
Bernd




hh via 
use-livecode
 Sat, 30 Jun 2018 03:12:55 
-0700
 wrote:


@Bernd
Depending on the function an inline computation (as Alex denoted)
may be even faster than the private function calls?
Here, with IPv4 addresses, it is faster.

___
use-livecode mailing list
use-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 IP List

2018-06-30 Thread Niggemann, Bernd via use-livecode
if you replace ip2dec with the same functionality as Hermann's (HH) function 
with

private function ip2dec2 x
   set the itemdel to "."
   return (item 4 of x) + (item 3 of x * 256) + (item 2 of x * 65536) + (item 1 
of x * 16777216)
end ip2dec2

then the special sort via function is faster than sorting the 4 items of the 
IPlist.

Note "private function" saves about 10 percent, overall Hermann's modified 
script saves about 20 percent compared to Bob's sort by item solution which was 
fastest up to now.

Tested 100.000 random IP addresses.

Kind regards
Bernd



hh via 
use-livecode
 Fri, 29 Jun 2018 16:43:38 
-0700
 wrote:

Your IP addresses [0-255].[0-255].[0-255].[0-255]
are the hex IP numbers converted to base 256.
So you may try the following sorting function that
converts the IPs from base 256 to base 10 (decimal).


function ip2dec x
  set itemdel to "."
  repeat with i=0 to 3
add (item 4-i of x)*256^i to y
  end repeat
  return y
end ip2dec

on mouseUp
  put fld "ips" into s
  sort s numeric by ip2dec(each) # <
  put s into fld "out"
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: Align baselines of 2 fields

2018-06-25 Thread Niggemann, Bernd via use-livecode
I rethought the alignment of baselines of 2 fields and did not like my previous 
solution to just move the fields

Here is a solution that uses the margins to do the alignment. The two fields 
should accommodate for the expected textSizes and should be horizontally 
aligned.
There are occasional differences in alignment usually 1 pixel off due to how 
fonts report their metrics. One could correct this but the only way to do it 
that I found was to use a snapshot and then adjust accordingly. Anyone 
interested in that feel free to mail me.


Kind regards 
Bernd


---
on mouseUp
   local tField1, tField2
   put the long id of field "field1" into tField1
   put the long id of field "field2" into tField2
   alignFieldBaselines tField1, tField2
end mouseUp

on alignFieldBaselines pField1, pField2
   local tDescent1, tDescent2, tRefVLoc
   local tFormatRect1, tFormatRect2, tDiff1, tDiff2
   local tDefaultMargin
   
   put 8 into tDefaultMargin
   
   lock screen
   -- make sure the margins are what is expected
   set the margins of pField1 to tDefaultMargin
   set the margins of pField2 to tDefaultMargin
   
   -- define a reference vertical position for field 1, both fields use it
   put the bottom of pField1 - (the height of pField1 div 4) into tRefVLoc
   
   -- get rect of text
   put the formattedRect of char 1 of pField1 into tFormatRect1
   put the formattedRect of char 1 of pField2 into tFormatRect2
   -- find baseline of text
   put item 4 of measureText(char 1 of pField1, pField1, "bounds") + 1 into 
tDescent1
   put item 4 of measureText(char 1 of pField2, pField2, "bounds") + 1 into 
tDescent2
   
   -- calculate offset 
   put tRefVLoc - (item 4 of tFormatRect1 - tDescent1) into tDiff1
   put tRefVLoc - (item 4 of tFormatRect2 - tDescent2) into tDiff2
   
   -- adjust topMargins to align text
   set the topMargin of pField1 to tDefaultMargin + tDiff1
   set the topMargin of pField2 to tDefaultMargin + tDiff2
   
   unlock screen
end alignFieldBaselines
---
___
use-livecode mailing list
use-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: Align baselines of 2 fields

2018-06-22 Thread Niggemann, Bernd via use-livecode
Hi Bob,

how about:


if pOffset is empty then put 0 into pOffset
--
if pOffset is not strictly an integer then put pOffset div 1 into pOffset  -- 
<-
--
catch theError


if pOffset is an integer nothing happens, if it is a floating point number div 
will turn it into an integer, if it is a string then it will throw an error.

Kind regards
Bernd


Actually that made me think, someone might try to pass a floating point number, 
so put pOffset div 1 into pOffset is a better test because it will convert 
pOffset to an integer.

Bob S


On Jun 21, 2018, at 14:18 , Bob Sneidar via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

But that won't throw an error in my try catch statement. :-)

Bob S


On Jun 21, 2018, at 13:23 , J. Landman Gay via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

On 6/21/18 2:58 PM, Bob Sneidar via use-livecode wrote:
Also, I check that pOffset is a number by adding 0 to it in a try/catch 
statement.

Or alternately, "if pOffset is a number..."
___
use-livecode mailing list
use-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: unicode & umlauts

2018-06-22 Thread Niggemann, Bernd via use-livecode
Hi Eric, 

I retested Scott's solution and it works like a charm. I must have made a 
mistake when copying the code initially.

It is a lot easier and more sensible than my solution.

this is Scott's script that works for me

--
on mouseup
   local theText, tResult, targetText
   repeat with i = 1 to the number of lines in card field "source"
  put URLEncode(textencode(line i of cd fld "source","utf-8")) into theText
  put  \

"https://translate.yandex.net/api/v1.5/tr.json/translate?key=trnsl.1.1.20180527T091305Z.7f33f9fb3f66f0bb.d573f1d9a6336a981504916600c45f49255938b3="&"=de-en=html;
 \
into tResult
  put URL tResult into tResult
  set the itemdelimiter to "["
  put the last item of tResult into targetText
  put textDecode(targetText,"UTF8") & return after cd fld "target"
   end repeat
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: unicode & umlauts

2018-06-21 Thread Niggemann, Bernd via use-livecode
Hi Eric,

it seems that urlEncode does not give the expected hex values for high ASCII 
characters. Yandex expects UTF8 hex values.

for example 

the german o-umlaut after urlEncode is 
%F6 
which is ASCII 154 in the extended ASCII table

yandex expects 

%C3%B6 
that is the utf8-urlEncode form. I don't know if Livecode can do that, I could 
not get it to work.


however yandex also accepts "html" as format

in my limited testing with your modified code it worked for me with german 
umlauts, maybe it also works with chinese.


--
on mouseup
   local theText, tResult, targetText
   repeat with i = 1 to the number of lines in card field "source"
  put the htmlText of line i of cd fld "source" into theText
  replace "" with "" in theText
  replace "" with "" in theText
  put URLEncode((theText)) into theText
  put  \

"https://translate.yandex.net/api/v1.5/tr.json/translate?key=trnsl.1.1.20180527T091305Z.7f33f9fb3f66f0bb.d573f1d9a6336a981504916600c45f49255938b3="&"=de-en=html;
 \
into tResult
  put URL tResult into tResult
  set the itemdelimiter to "["
  put the last item of tResult into targetText
  put targetText & return after cd fld "target"
   end repeat
end mouseup
-


Kind regards
Bernd


> Eric wrote:
> What doesn't work is calling the Yandex api to translate and then send the 
> translation to a livecode field. Even though I definitely have all the fonts 
> for Chinese and German installed Yandex returns a bunch of question marks to 
> the field. :/  
> Why is that? What must be done? Because yandex clearly send HTML readable 
> characters since the apis work on the web. What must I do to the text 
> returned? 

___
use-livecode mailing list
use-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: Align baselines of 2 fields

2018-06-21 Thread Niggemann, Bernd via use-livecode
Hi Marty, 

depending how liberal you are in letting users choose fonts and sizes you might 
get "unexpected" results by aligning to field 1


try this stress test


-
on mouseUp
   lock screen
   set the textfont of field 1 to any line of the fontNames
   set the textfont of field 2 to any line of the fontNames
   set the textSize of field 1 to random(20) + 10
   set the textSize of field 2 to random(20) + 10
  -- put the textFont of field 1 into field "Font1"
  -- put the textFont of field 2 into field "Font2"
   unlock screen
end mouseUp
-

then align via your script
Your layout can start "moving"

Additionally not all fonts report proper ascents and descents



Kind regards
Bernd

> Marty wrote:
> This works for me, assuming you want to leave field 1 where it is and align 
> field 2:
> 
> on alignFieldBaselines pField1, pField2
>  local tDescent1, tDescent2, tBot1, tBot2, tDiff1, tDiff2, tRef
>  local fFormattedBottom1, fFormattedBottom2
> 
>  put item 4 of the formattedRect of line 1 of fld pField1 into 
> fFormattedBottom1
>  put item 4 of the formattedRect of line 1 of fld pField2 into 
> fFormattedBottom2
> 
>  put item 4 of measureText(line 1 of fld pField1, fld pField1 ,"bounds") into 
> tDescent1
>  put item 4 measureText(line 1 of fld pField2, fld pField2 ,"bounds") into 
> tDescent2
> 
>  put the bottom of fld pField1 into tBot1
>  put the bottom of fld pField2 into tBot2
> 
>  put tBot1 - fFormattedBottom1 + tDescent1 into tDiff1
>  put tBot2 - fFormattedBottom2 + tDescent2 into tDiff2
> 
>  put the bottom of fld pField1 -(tDiff1 - tDiff2) into tRef
> 
>  set the bottom of fld pField2 to tRef   
> end alignFieldBaselines

___
use-livecode mailing list
use-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: Align baselines of 2 fields

2018-06-21 Thread Niggemann, Bernd via use-livecode
Hi Mary,

I suppose you want to center those fields around a common horizontal baseline.

You might try this if that is what you want. Should work with different fonts 
and sizes.

Two fields, one button.

Kind regards
Bernd

--
on mouseUp
   local tDescent1, tDescent2, tBot1, tBot2, tDiff1, tDiff2, tRef
   local fFormattedBottom1, fFormattedBottom2
   
   put 120 into tRef

   put item 4 of the formattedRect of line 1 of field 1 into fFormattedBottom1
   put item 4 of the formattedRect of line 1 of field 2 into fFormattedBottom2
   
   put item 4 of measureText(line 1 of field 1, field 1 ,"bounds") into 
tDescent1
   put item 4 measureText(line 1 of field 2, field 2 ,"bounds") into tDescent2

   put the bottom of field 1 into tBot1
   put the bottom of field 2 into tBot2
   
   put tBot1 - fFormattedBottom1 + tDescent1 into tDiff1
   put tBot2 - fFormattedBottom2 + tDescent2 into tDiff2
   
   set the bottom of field 1 to tRef + tDiff1
   set the bottom of field 2 to tRef + tDiff2
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


imagedata and alpha byte

2018-05-09 Thread Niggemann, Bernd via use-livecode
Correcting my previous post.

You don't have to set the imageData explicitly. I was confused by vanishing 
images.

Apparently if you want to set all of the imageData to numToByte(0) or 
numToByte(256) the image vanishes.

The workaround is to set it to 1 or 255 respectively. This is in LC 9 GM

Kind regards
Bernd

Here is the corrected script

---
on mouseUp
   local tAlphaData, tTransparent, tOpaque
   local tCollect, tLength
   
   -- not needed here but if you want to modify existing AD
   put the alphaData of image 1 into tAlphaData
   
   put numToByte(1) into tTransparent -- dont set to 0 or image vanishes
   put numToByte(255) into tOpaque -- dont set to 256 or image vanishes
   put the width of image 1 * the height of image 1 into tLength
   
   repeat tLength
  --put tTransparent after tCollect
  put tOpaque after tCollect
   end repeat
   
   set the alphaData of image 1 to tCollect
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: imagedata and alpha byte

2018-05-09 Thread Niggemann, Bernd via use-livecode
Hi,

please do not use numToChar in version 7.0 and up for image manipulation, use 
numToByte or byteToNum

NumToChar is deprecated. It might work but is horribly slow.

along the lines of Mike's example

--
on mouseUp
   local tAlphaData, tTransparent, tHalfTransparent
   local tImgData, tCollect, tLength
   
   put the imageData of image 1 into tImgData
   
   -- not needed here but if you want to modify existing AD
   put the alphaData of image 1 into tAlphaData
   
   put numToByte(0) into tTransparent
   put numToByte(127) into tHalfTransparent
   put the width of image 1 * the height of image 1 into tLength
   
   repeat tLength
  -- put tTransparent after tCollect
  put tHalfTransparent after tCollect
   end repeat
   
   -- in LC 9 you have to set imagedata again explicitly
   set the imageData of image 1 to tImgData
   
   set the alphaData of image 1 to tCollect
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: Has Anyone Got A Directory \\\"Walker\\\" Available

2018-05-06 Thread Niggemann, Bernd via use-livecode
>Which version of LC did you test with?

>I was under the impression that since LC switched to copy-on-write for all 
>>arguments we should no longer need to use "@" for performance, only for for
>logic.



Richard,

I tested using LC 9 GM, what kind of results do you get?


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: Has Anyone Got A Directory \"Walker\" Available

2018-05-06 Thread Niggemann, Bernd via use-livecode
Alex,

a combination of "private" and referenced variables (@) improves the speed of 
the calls somewhat.

Kind regards
Bernd

--
on mouseup
   local t1, t2
   constant K = 1000
   
   local x
   constant KX = 100
   
   put the millisecs into t1
   repeat K times
  put KX into x
  repeat
 if x = 0 then exit repeat
 subtract 1 from x
  end repeat
   end repeat
   put the millisecs into t2
   put t2 - t1 & CR after msg
   
   put the millisecs into t1
   repeat K times
  put KX into x
  repeat
 if x = 0 then exit repeat
 put myfunc(x) into x
  end repeat
   end repeat
   put the millisecs into t2
   put t2 - t1 & CR after msg
   
   put the millisecs into t1
   local tA, tB, tC, tD
   put 1 into tA
   put 2 into tB
   put "333" into tC
   put "444" into tD
   repeat K times
  put KX into x
  repeat
 if x = 0 then exit repeat
 put manyParameters(x, tA, tB, tC, tD) into x
  end repeat
   end repeat
   put the millisecs into t2
   put t2 - t1 & CR after msg
   
   put the millisecs into t1
   repeat K times
  put KX into x
  recursive x
  put the result into x
   end repeat
   put the millisecs into t2
   put t2 - t1 & CR after msg
end mouseup

private function myfunc @p
   return p-1
end myfunc

private function manyParameters @p, @p1, @p2, @p3, @p4
   return p-1
end manyParameters

private command recursive @p
   if p=0 then return 0
   subtract 1 from p
   recursive p
end recursive
--
___
use-livecode mailing list
use-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: Q on Accessing multi-dimension arrays.

2018-04-26 Thread Niggemann, Bernd via use-livecode

Alex Tweedly wrote:

>Is there some way or format to specify the array elements using the
>"path" of the keys, rather than each one at its own level) ?



If I understand correctly that you want then

-
put "style,hidden" into tPathToHidden
split tPathToHidden by comma

put "true" into tScriptA[i][tPathToHidden]

lets you put the constant part of the path into a variable


I learned this from Mark Wieder

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: Contributing to the IDE

2018-04-20 Thread Niggemann, Bernd via use-livecode
>Monte Goulding via 
>use-livecode
> Fri, 20 Apr 2018 01:49:50 
>-0700
> wrote


>I’m fairly sure Bernd implements stuff using his current install of LC locally
>then then makes a patch with that using the github web ui. Am I right Bernd? I
>think the web interface is significantly harder and more confusing to use
>personally but that could be just me. It’s also not possible to do things like
>fix up commit messages.



Yes, I use the github web ui. It is not really straightforward but after a 
while one gets used to it. And some things are not possible but one can always 
close a pull request and do a new one. E.g when doing a pull request against 
the wrong branch.

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: some thoughts on version 9.0.0

2018-04-19 Thread Niggemann, Bernd via use-livecode
Mark Wieder via use-livecode Thu, 19 Apr 2018 13:46:24 -0700
>
>On 04/19/2018 01:15 PM, Niggemann, Bernd via use-livecode wrote:
>
>the number 1 indicates that this is the first behavior. Behaviors can be 
>stacked and then you would have 2,3 or whatever up to ten behaviors. The 
>number 
>of lines is useful for the object but not so much for the behavior. The 
>tooltip 
>indicates the the name of the behavior, clicking on it opens the script of the 
>behavior.

Unless it's somehow possible for the displayed behaviors to get out of order, 
then the numbers seem somewhat useless. I think this is a big step backwards 
from displaying the number of lines in the behavior script
--
 Mark Wieder
 ahsoftw...@gmail.com


Hi Mark,

actually the problem was that if you use the number of lines of the behaviors 
and you have a couple of behaviors stacked then the space needed for the 
behaviors would run into the text. The current solution was the one which used 
the least space. If you look in the Project Browser at "Message Box" or 
"revIDEProjectBrowser" that have two behaviors that the spacing for between the 
behaviors is minimal to save space, also that is the reason why they are oval 
so you can reduce the spacing between behaviors.

I agree that counting from 1 to 10 is not really a big help, could have been 
greek letters instead, but what you gather from the number of lines of the 
behavior script escapes 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: some thoughts on version 9.0.0

2018-04-19 Thread Niggemann, Bernd via use-livecode
I use the Project Browser heavily ... one change in 9.0.0 I definitely DO NOT
like is the "new" way of indicating a "behavior" assignment on an object.
What's with the little oval with a "1" in it???  I used the (previous) line
counts to visually match to the "source" button line counts.. easy... now, I
have to open the Properties to see which object is the source behavior.. not
good, IMO

Hi Douglas,

the number 1 indicates that this is the first behavior. Behaviors can be 
stacked and then you would have 2,3 or whatever up to ten behaviors. The number 
of lines is useful for the object but not so much for the behavior. The tooltip 
indicates the the name of the behavior, clicking on it opens the script of the 
behavior.

Page 33 of the release notes states:

Show up to 10 nested behavior in the Project Browser

It is now possible to view up to 10 nested behaviors of an object in the PB. 
The behaviors are shown using oval graphics. Clicking on the graphic takes you 
to the script of the behavior. The tooltip of the graphic shows the long name 
of the behavior.

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

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: The coming of SVG

2017-11-04 Thread Niggemann, Bernd via use-livecode
for me "Picture" is a bit confusing.

We have "Image" for bitmaps, "Graphic" for vector graphics of a certain type 
and now we might have "Picture" for all kinds of elements.

However "Picture" is easily confused with "Image" or "Graphic" for a newcomer. 
The forum is full of synonyms that take a graphic for a bitmap and an image for 
a vector graphic.

Why not call the new widget something like "Blackboard"? Or something like 
that. It conveys the notion that you can put all sort of things onto a 
blackboard, regardless of their internal representation. It alludes to the 
container for those things not the result of what is displayed.

I like "Canvas" from LCB but unfortunately that is already taken. It would have 
been my favorite.

Logically "Image", "Graphic" and "Picture" are all elements of a class of 
"visuals", but now "Image" and "Graphic" become elements of the class 
"Picture". 

It is a bit fuzzy what the difference in logical hierarchy is. A new term could 
prevent a possible confusion that "Picture" is a new logical class with said 
elements but at the same time a picture could be considered a member of class 
"Picture". 

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] TinyDictionary updated to work also in LC 8.2.0 DP2 and LC 9 DP10

2017-10-24 Thread Niggemann, Bernd via use-livecode
Due to changes how LC organizes dictionary data in LC 8.2 DP2 and LC 9 DP 10 
tinyDictionary did not display LCB dictionary entries anymore.

TinyDictionary version 0.8.3 restores that functionality and is backwards 
compatible.
Thanks James Hale for the code for the acquisition of the dictionary array.

It has been uploaded to "Sample Stacks" = livecodeshare.

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

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: SE Gutter better scroll tracking [Bugfix-20140]

2017-07-23 Thread Niggemann, Bernd via use-livecode
Bernd wrote:


A very simple reproducible instance of the wandering red dot but only in LC 9

(tested in DP2, DP4 and DP8) is pasting.

make a button with

on mouseUp

   put x into y

   put y into v

end mouseUp

compile script

place the red dot at "end mouseUp"

now copy the body of the handler (2 lines)

and paste them after the existing 2 lines

watch red dot wander, repeat etc.

This kind of pasting does not make the red dot wander in 8.1.0 nor 8.1.5


I reported this as today as

http://quality.livecode.com/show_bug.cgi?id=20145


@Bob Hall

I installed your patch to my version of LC9 DP8

https://github.com/livecode/livecode-ide/compare/develop...bhall2001:bugfix-20140

In preliminary testing it works fine and is a lot faster for longer scripts. 
Gutter is in perfect sync to the field.

As a test case for scrolling I used "revIDELibrary" which has 12000 lines.


Additionally it fixes the wandering red dot breakpoint problem I described 
above (bug 20145)

Thank you very much for the patch

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: SE Gutter better scroll tracking [Bugfix-20140]

2017-07-23 Thread Niggemann, Bernd via use-livecode
A very simple reproducible instance of the wandering red dot but only in LC 9 
(tested in DP2, DP4 and DP8) is pasting.

make a button with

on mouseUp
   put x into y
   put y into v
end mouseUp

compile script

place the red dot at "end mouseUp"

now copy the body of the handler (2 lines)
and paste them after the existing 2 lines
watch red dot wander, repeat etc.

This kind of pasting does not make the red dot wander in 8.1.0 nor 8.1.5

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: Find some text characters

2017-07-17 Thread Niggemann, Bernd via use-livecode

Given this htmlText that may contain Chinese characters and/or some horizontal
tabs—



I want to know if this data contains Chinese characters, that is an entity with
5 numbers between the “#” and the “;”




according to google-translate this means "bold and strong"

maybe this is a way?


   set the htmlText of field 1 to 
""

   put the number of truewords of field 1 into field 2

   set the itemDelimiter to tab

   put cr & the number of items of field 1 after field 2

still doesn't tell you if is numbers or not though

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] a gauge widget

2017-06-10 Thread Niggemann, Bernd via use-livecode
Ali Lloyd via 
use-livecode
 Fri, 09 Jun 2017 13:40:50 
-0700

Bernd,
The problem with your OnSave / OnLoad handlers are that Point and Color are
types defined in the canvas module that the array-saving code does not know
about. These need to be converted to a core type, eg string or list.


Thanks Ali

I had just found out when you posted but the Nabble alert gave a wrong author.

Happy Birthday to you
(imagine Marily Monroe singing...)


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] a gauge widget

2017-06-09 Thread Niggemann, Bernd via use-livecode
The problem with saving has been solved and a new version of the Gauge widget 
has been uploaded to the edited first post.

http://forums.livecode.com/viewtopic.php?f=93=29348=154750

this version also adds a SVG icon to the widget.

Thanks everyone for your interest and hints.

Should have tested before posting of course, sorry.

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] a gauge widget

2017-06-09 Thread Niggemann, Bernd via use-livecode
> Check that all the vars which are saved into the props array have been
> assigned, and that the getRadiusAndCenterPoint() can't throw an error in
> that case.


thanks Mark for looking into this.

The problem was that onSave did not appreciate saving a variable of type Color, 
I had to do string conversions. Then 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: [ANN] a gauge widget

2017-06-09 Thread Niggemann, Bernd via use-livecode
On 2017-06-09 20:02, Matthias Rebbe via use-livecode wrote:


Another thing i noticed is that i cannot save the stack when the
widget is placed onto the stack.
I get the following error message:
“Can´t save stack … due to an error: Error writing stack (disk full?)"


That means that the OnSave handler in Bernd's widget is throwing an error in 
this case I think. What version of LiveCode are you trying the widget in?

The '?' at the end of the error message is important here - it is a suggestion 
that it *might* be that, but all the save methods in the engine only return a 
binary state IO_ERROR, or IO_NORMAL - so by the time things unwind back up to 
where the error can be reported, it can only say it failed.

Warmest Regards,

Mark.

--
Mark Waddingham ~ m...@livecode.com ~ 
http://www.livecode.com/
LiveCode: Everyone can create apps



Apologies, I did not try to save a stack with the widget. Should have done 
that, I see the same error in DP6 and 8.1.4 and 8.1.2

But I can not find what I did wrong in onSave. Still searching.

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] a gauge widget

2017-06-09 Thread Niggemann, Bernd via use-livecode
Thanks everybody for their kind words.

Livecode Builder takes a while to get into but then it is actually fun.

And you can do things that are not possible in Livecode Script



Matthias Rebbe wrote:

What i noticed is that the widget has a general
icon showing the text widget. Is there a way to add a custom icon? Would be
much easier to recognise it when several widgets with general icons are
installed.


I will add a SVG icon in the next version.

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