Search found 3316 matches

by bn
Sat Feb 15, 2020 1:42 pm
Forum: LiveCode Builder
Topic: How do I deal with Code Blocks?
Replies: 26
Views: 1721

Re: How do I deal with Code Blocks?

Hi Simon, I _think_ what is confusing is public foreign handler type CallbackType(in pContext as Pointer) returns CBool especially public foreign handler type CallbackType That is a special beast that I understand every time I look at it for about half a millisecond. For a discussion of it look at h...
by bn
Fri Feb 14, 2020 10:44 am
Forum: LiveCode Builder
Topic: How do I deal with Code Blocks?
Replies: 26
Views: 1721

Re: How do I deal with Code Blocks?

Hi Simon, I don't understand anything about this. But it seems Paul McClernan wrestled with the same questions. In case you have not seen this: https://github.com/PaulMcClernan/LCB_AppleAVMidiPlayer/blob/master/AVMIDIPlayer.lcb Maybe it gives you some ideas. I admire your courage and persistence. Ki...
by bn
Sat Feb 01, 2020 3:01 am
Forum: Talking LiveCode
Topic: Changing fields properties with script
Replies: 6
Views: 607

Re: Changing fields properties with script

Hi Tom, the point I wanted to make is that you put the name of the field into a variable which you build on the fly. That is all fine. The important point is how you address the field set the property of field dfld to someValue note there is not quotes and no ampersand in the quotes. As soon as you ...
by bn
Sat Feb 01, 2020 2:24 am
Forum: Talking LiveCode
Topic: Changing fields properties with script
Replies: 6
Views: 607

Re: Changing fields properties with script

Hi Tom,

try

Code: Select all

on mouseUp
   put "ab" into dfld
   put dfld & "1" into dfld
   set the visible of field dfld to not the visible of field dfld
end mouseUp
Kind regards
Bernd
by bn
Tue Jan 28, 2020 11:59 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Demo of putting thumbnail icon on txt file (MAC users)
Replies: 2
Views: 623

Re: Demo of putting thumbnail icon on txt file (MAC users)

Hi Michael, that is a nifty workaround. I had to add a second delay tell application "Finder" activate open information window of file POSIX file "filePath" tell application "System Events" to key code 48 delay 1 tell application "System Events" to keystroke "v" using command down delay 1 close info...
by bn
Tue Dec 10, 2019 9:46 pm
Forum: Linux
Topic: menu checkmark on linux
Replies: 12
Views: 1049

Re: menu checkmark on linux

Hi slowmaker, I think an optionMenu is not a good place to have checkMarks. The menu choice is already apparent in the label of the option menu. So no use to actually put a check mark in front of it. Especially if you allow for multiple checkmarks the use would have to click on it to see the current...
by bn
Thu Dec 05, 2019 4:28 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: importing date from text file and storing in sqlite
Replies: 10
Views: 1239

Re: importing date from text file and storing in sqlite

By the way, what datatype should the date be in? TEXT? That is really a sqlite-question. a quick google search for "sqlite date format" turns up useful information. https://www.sqlite.org/lang_datefunc.html https://stackoverflow.com/questions/17227110/how-do-datetime-values-work-in-sqlite Kind rega...
by bn
Thu Dec 05, 2019 12:14 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: importing date from text file and storing in sqlite
Replies: 10
Views: 1239

Re: importing date from text file and storing in sqlite

Hi nicoloose, There are some problems with your code regarding the date format you pass. After your switch statement you do put tYear & "-" & tMonth & "-" & tDay into theRec that is not a recognized format for date in LC (see date in dictionary) change that to put tMonth & "/" & tDay & "/" & tYear i...
by bn
Wed Nov 13, 2019 8:29 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Here's how to drag-reorder lines in a list field
Replies: 13
Views: 1359

Re: Here's how to drag-reorder lines in a list field

This is a version of drag-reorder that also keeps formatting of textStyles this time using htmlText It is functionally equivalent to the version above that uses styledText. local sClicked, sMovingText, sLastLineNum on mousedown put word 2 of the mouseLine into sClicked put the htmlText of line sClic...
by bn
Tue Nov 12, 2019 9:52 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Here's how to drag-reorder lines in a list field
Replies: 13
Views: 1359

Re: Here's how to drag-reorder lines in a list field

If you want to preserve styles (like bold, underline, italic etc) when reordering then this script might be helpful local sClicked, sArray, sMovingText, sLastLineNum on mousedown put word 2 of the mouseLine into sClicked put the styledText of me into sArray put sArray[sClicked] into sMovingText put ...
by bn
Sun Nov 03, 2019 2:07 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Can't get a border around a button
Replies: 38
Views: 4016

Re: Can't get a border around a button

Bernd, All of the graphics effects are already arrays, and like any array, you can set any individual key of that array. For example - set the outerGlow["color"] of button 1 to "red" works just as well as putting a whole new array together :wink: Thanks bogs, I always used arrays, but that is a goo...
by bn
Sun Nov 03, 2019 12:20 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Can't get a border around a button
Replies: 38
Views: 4016

Re: Can't get a border around a button

(6) Try to resurrect the border again: "set the outerglow["color"] of graphic myGraphic to silver" >> Error: "Can't set object property." Give up. LC is a really weird mixture of super easy and ridiculously difficult. Michael, you have to set the color or any other property of outerglow by filling ...
by bn
Mon Oct 21, 2019 2:46 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Preventing duplicate input
Replies: 27
Views: 2040

Re: Preventing duplicate input

Hi Jeff,

in the stack script

Code: Select all

   wait 500 milliseconds
   get flushEvents("all") -- <-- ADD This
   doGoNextItem tThisItemNum
end doLickertResponseBtn
seems to do the trick

Kind regards
Bernd
by bn
Sun Oct 20, 2019 10:54 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Mark menu item as checked
Replies: 53
Views: 3606

Re: Mark menu item as checked

Hmmm...perhaps what LC renders as a bullet here on Ubuntu renders a diamond on macOS. I haven't read the macOS HIG in a while; it the diamond is on spec we may be well covered as-is. Have you seen a diamond in other Mac apps? No, I have not seen the diamond in other Mac apps. I looked at a couple o...
by bn
Sun Oct 20, 2019 8:31 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Mark menu item as checked
Replies: 53
Views: 3606

Re: Mark menu item as checked

The diamond is from Motif. Most OSes now use a dash. A bullet may be allowed in some of those cases, but I don't think that's quite up to spec.
Livecode 9.5 is using diamond on MacOS X (in my case 12.6) in Tools menu to indicate the "Browse Tool" or "Pointer Tool"

Kind regards
Bernd

Go to advanced search