Search found 3371 matches

by bn
Mon Sep 14, 2020 5:02 pm
Forum: Talking LiveCode
Topic: Get value of function with variable
Replies: 19
Views: 523

Re: Get value of function with variable

I don't know exactly why you use "value" but would'nt this do the trick? Note you have to change the function to a command on card 2, it does not work with functions. -- On cd 2, btn "function_btn": command test what -- note changed from function to command return "Test: " & what && the milliseconds...
by bn
Fri Sep 11, 2020 1:38 am
Forum: Talking LiveCode
Topic: Max capacity of a field
Replies: 11
Views: 317

Re: Max capacity of a field

This started with another thread in this pane: http://forums.livecode.com/viewtopic.php?f=9&t=34623 I made a test stack, one button and two fields, with this in the button script: on mouseUp put the seconds into tStart put "1234567890" into temp -- ten chars repeat 100000 -- a 1,000,000 char test p...
by bn
Sun Sep 06, 2020 9:39 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Whole numbers
Replies: 26
Views: 985

Re: Whole numbers

on mouseUp if "3" is an integer then beep 2 end mouseUp Hm, works here, macOS 10.14.6 and LC 9.6.1, as advertized! Means it beeps twice after my click. Regarding "is strictly" you would test for if 3 is strictly an integer then beep 2 If you put 3 in quotes it is a string from the message box this ...
by bn
Sun Sep 06, 2020 7:42 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Whole numbers
Replies: 26
Views: 985

Re: Whole numbers

As of LC 8.0 there is an "is strictly" operator. value is strictly { nothing | a boolean | an integer | a real | a string | a binary string | an array } Unfortunately I can not get it to work with integers. It probably reflects the internal state of LC or how it currently views value. Maybe someone ...
by bn
Fri Sep 04, 2020 10:54 pm
Forum: LiveCode Builder
Topic: Composed Widgets limitations
Replies: 15
Views: 894

Re: Composed Widgets limitations

Well the ( current ) click button IS in the dictionary but I just tried to use the 'current' form and it throws this message: executing at 4:11:14 PM LCB Error 'the current click button' is not implemented yet Object Tests LCB File multioctavepianotest2.lcb LCB Line 224 What if you would handle all...
by bn
Tue Sep 01, 2020 5:48 pm
Forum: Talking LiveCode
Topic: Oh no another speed test : read thumbnail from raw
Replies: 18
Views: 830

Re: Oh no another speed test : read thumbnail from raw

Hi Simon,

glad it works for you.

Additionally reading in chunks of e.g. 256 or any other size stands a slight chance to cut through your target string/byte sequence by chance.

Kind regards
Bernd
by bn
Tue Sep 01, 2020 5:14 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Removing extra spaces and or hyphens
Replies: 8
Views: 221

Re: Removing extra spaces and or hyphens

Hallo Thierry, ??? using the code snippet of shawn regex gives -replace-"-"-with-"-"-in-gFilename -replace-"-"-with-"-"-in-gFilename -replace-"-"-with-"-"-in-gFilename -replace-"-"-with-"-"-in-gFilename -replace-"-"-with-"-"-in-gFilename -replace-"-"-with-"-"-in-gFilename -replace-"-"-with-"-"-in-gF...
by bn
Tue Sep 01, 2020 4:56 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Removing extra spaces and or hyphens
Replies: 8
Views: 221

Re: Removing extra spaces and or hyphens

What I do is: put the length of gFileName into tLength repeat replace " " with " " in gFileName if the length of gFileName = tLength then exit repeat end if put the length of gFileName into tLength end repeat put the length of gFileName into tLength repeat replace "--" with "-" in gFileName if the l...
by bn
Tue Sep 01, 2020 10:11 am
Forum: Talking LiveCode
Topic: Oh no another speed test : read thumbnail from raw
Replies: 18
Views: 830

Re: Oh no another speed test : read thumbnail from raw

Simon, How about this on mouseUp pMouseButton put empty into image "Thumbnail" put the milliseconds into tStart put field "FileName" into tNameOfImageFile Constant FF = 255 Constant D8 = 216 Constant DB = 219 Constant D9 = 217 put numToByte(FF) & numToByte(D9) into tEndJPG Open File tNameOfImageFile...
by bn
Tue Sep 01, 2020 9:10 am
Forum: Talking LiveCode
Topic: Oh no another speed test : read thumbnail from raw
Replies: 18
Views: 830

Re: Oh no another speed test : read thumbnail from raw

Simon,

I just noticed that I fell afoul of image caching. The first time around it is slow because the whole image is read, second time around it is fast because the cached image.

Kind regards
Bernd
by bn
Tue Sep 01, 2020 8:58 am
Forum: Talking LiveCode
Topic: Oh no another speed test : read thumbnail from raw
Replies: 18
Views: 830

Re: Oh no another speed test : read thumbnail from raw

Hi Simon, I tried using byteOffset in handler ReadJpegFromRaw of button "Search1" of your second stack. I commented-out the unused code part. I could only test on JPEGs but it should also work on Raw. Function ReadJpegFromRaw @pImage --put empty into field "debug" --put ReadImageOrientation (pImage)...
by bn
Sun Aug 23, 2020 11:45 am
Forum: Off-Topic
Topic: Spelling mistakes
Replies: 25
Views: 1237

Re: Spelling mistakes

In addition to

https://github.com/livecode/livecode/bl ... to_docs.md

here is a video from Trevor Devore how to contribute to documentation in Livecode

https://www.youtube.com/watch?v=ULN9aavFrrA

Kind regards
Bernd
by bn
Fri Aug 21, 2020 11:54 am
Forum: Databases
Topic: CouchDB Library
Replies: 26
Views: 7111

Re: CouchDB Library

Hi Alberto,

have a look here

https://github.com/madpink/couchdb4livecode

Kind regards
Bernd
by bn
Fri Aug 21, 2020 10:12 am
Forum: Talking LiveCode
Topic: Table field: Title Row & no input
Replies: 9
Views: 421

Re: Table field: Title Row & no input

Hi Simon, since Thierry mentioned it: modTableField is a table field with an api, i.e. you can instruct it to do certain things. If you have ever used tinyDictionary then you have used modTableField. http://livecodeshare.runrev.com/stack/825/TinyDictionary It is not as powerful as the datagrid table...
by bn
Tue Aug 18, 2020 9:23 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: sorting an array by word length
Replies: 9
Views: 318

Re: sorting an array by word length

Hi Hendricus, here is something along the lines of what Craig said on openCard put "Aaron,Abel,Abigail,Abraham,Enoch,Jeroboam,Benjamin,Dorcas,Isaac,Ishmael," &\ "Job,Joseph,Lazarus,Luke,Mark,Mary,Miriam,Moses,Noah,Reuben,Nehemiah," &\ "Jezebel,Jehovah,Jethro,Judas,Laban,Samuel,Saul,Solomon,Thomas,Ti...

Go to advanced search