Search found 876 matches

by trevordevore
Thu Aug 09, 2018 1:54 pm
Forum: LiveCode Builder
Topic: Big bunch of questions
Replies: 7
Views: 340

Re: Big bunch of questions

Here are a couple of functions I've used. Fit text within a certain width. Add ... if it doesn't fit. public handler fitStringToRect(inout pString as String, in pFont as Font, in pMaxWidth as Number) returns nothing -- Now make sure that text will fit within the available width variable tTextRect as...
by trevordevore
Mon Aug 06, 2018 8:19 pm
Forum: LiveCode Builder
Topic: One extension with multiple native library implementations
Replies: 4
Views: 262

Re: One extension with multiple native library implementations

While I haven't tested it, I would think so. LiveCode doesn't try to resolve external code libraries until you actually call the function. You could probably do something like this: # Define private foreign handlers that access native libraries on Windows OS ... # Define private foreign handlers tha...
by trevordevore
Mon Aug 06, 2018 2:04 pm
Forum: LiveCode Builder
Topic: Canvas
Replies: 8
Views: 518

Re: Canvas

by trevordevore
Thu Aug 02, 2018 4:45 pm
Forum: LiveCode Builder
Topic: Canvas
Replies: 8
Views: 518

Re: Canvas

You need to define your OnPaint() handler as `public`. public handler OnPaint() put solid paint with color [1,1,1] into mTextPaint set the paint of this canvas to mTextPaint set the font of this canvas to font "FreeSans" at size 12 fill text gText at point [0,12] on this canvas end handler
by trevordevore
Thu Aug 02, 2018 2:04 pm
Forum: LiveCode Builder
Topic: Specifying supported platforms in Inclusions entry for LCB extension?
Replies: 7
Views: 578

Re: Specifying supported platforms in Inclusions entry for LCB extension?

Yes bwmilby, that is what I am looking to do. Great work!
by trevordevore
Thu Jul 26, 2018 3:45 pm
Forum: SQL Yoga
Topic: FileMaker to LiveCode with SQL Yoga
Replies: 4
Views: 1120

Re: FileMaker to LiveCode with SQL Yoga

In FileMaker, a global field has a single value for all records in the table. The global field is owned by the user for each session. Global fields can be any data type including a calculation. An example would be rpt_StartDate, a date field that can be set by each user for that one session of the ...
by trevordevore
Tue Jul 24, 2018 5:58 am
Forum: SQL Yoga
Topic: FileMaker to LiveCode with SQL Yoga
Replies: 4
Views: 1120

Re: FileMaker to LiveCode with SQL Yoga

Hi Eric,

I'm not very familiar with Filemaker so I don't know the specifics of what Unstored Calculations, Global Fields, and Summary Fields are. If you can describe what they are and how you use them then perhaps I can offer some suggestions.
by trevordevore
Tue Jul 10, 2018 4:00 am
Forum: LiveCode Builder
Topic: Specifying supported platforms in Inclusions entry for LCB extension?
Replies: 7
Views: 578

Specifying supported platforms in Inclusions entry for LCB extension?

I have some extensions that use FFI and are specific to a single platform. In the Standalone Builder > Inclusions tab I want the supported platform icons to represent the supported platform. Looking at revsblibrary.livecodescript I can see that extensions are hard coded to be supported on all platfo...
by trevordevore
Wed Jun 20, 2018 3:07 am
Forum: LiveCode Builder
Topic: Sparkle macOS App Updater extension for LC 9 [First Pass]
Replies: 0
Views: 700

Sparkle macOS App Updater extension for LC 9 [First Pass]

Hi all, I've been doing quite a bit of work with the Foreign Function Interface (FFI) in LiveCode Builder (LCB) lately. As I make the shift to a 64-bit app on macOS I want to convert most of the custom externals I use to LCB. I think they will be easier to improve going forward. Today I finished a f...
by trevordevore
Fri Jun 15, 2018 4:20 pm
Forum: LiveCode Builder
Topic: Help with macOS system status bar menu
Replies: 9
Views: 1046

Re: Help with macOS system status bar menu

I now have the code to the point where no crashing occurs. I'm not exactly sure how I got there. It seems I had to store some ObjcObjects in a handler local variable and then assign that variable to a script local. That seems odd but I'll figure that out later. I still can't get an icon to appear in...
by trevordevore
Fri Jun 15, 2018 2:36 pm
Forum: LiveCode Builder
Topic: CGWindowListCopyWindowInfo, CFArrayRef, NSArray, and __bridge
Replies: 6
Views: 702

Re: CGWindowListCopyWindowInfo, CFArrayRef, NSArray, and __bridge

For anyone interested, you can see the final implementation of CGWindowListCopyWindowInfo in the `NSWindowGetInfoForOpenWindows` handler in the following code:

https://github.com/trevordevore/lc-maco ... window.lcb
by trevordevore
Fri Jun 15, 2018 1:20 pm
Forum: LiveCode Builder
Topic: [Solved] Help wrapping `[NSRunningApplication runningApplicationWithProcessIdentifier: pid]
Replies: 4
Views: 587

Re: Help wrapping `[NSRunningApplication runningApplicationWithProcessIdentifier: pid]

@LCMark - Thanks, that fixed it! I had a similar problem with a handler I wrote early on in my experiments. I had defined a parameter in a foreign handler as Integer instead of CUInt. Nothing crashed but the handler didn't work. Once I noticed the problem everything magically fell into place.
by trevordevore
Thu Jun 14, 2018 6:48 pm
Forum: LiveCode Builder
Topic: [Solved] Crash when trying to access [NSCursor hotpot] and [NSImage size]
Replies: 3
Views: 470

Re: Crash when trying to access [NSCursor hotpot] and [NSImage size]

@LCMark - I forgot to update this thread after Monte helped me last night on Gitter. In the code I have working locally I am using qq. That works in 64-bit. It will crash if the engine is running in 32-bit mode. NN won’t crash in 32-but mode but it won’t return correct values. I added a note about t...

Go to advanced search