Compare two lists (comparing fontName before/after)
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 346
- Joined: Mon Mar 01, 2010 7:13 pm
- Location: London, UK
- Contact:
Re: Compare two lists (comparing fontName before/after)
It’s quite simple - I first saw ‘start using font’ from a mailing list thread, so I started with that. Then when I saw revFontLoad it seemed to be exactly the same except for two factors: it's older (minor), and it’s less flexible.
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist
-
- Livecode Opensource Backer
- Posts: 9359
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Compare two lists (comparing fontName before/after)
Code: Select all
on mouseUp
put empty into fld "fDIFFS"
put empty into fld "fBEFORE"
put empty into fld "fAFTER"
put the fontNames into fld "fBEFORE"
revFontLoad "/Volumes/STORAGE_2/Free Fonts/Happy Clean/TTF/Happy Party.ttf"
put the fontNames into fld "fAFTER"
end mouseUp
Code: Select all
on mouseUp
put 1 into KOUNT
put 1 into QOUNT
put fld "fBEFORE" into CHKLIST
repeat until line KOUNT of fld "fAFTER" is empty
put line KOUNT of fld "fAFTER" into TOCHECK
if CHKLIST contains TOCHECK THEN
-- DO NIX
else
put TOCHECK into line QOUNT of fld "fDIFFS"
add 1 to QOUNT
end if
add 1 to KOUNT
end repeat
end mouseUp
-
- VIP Livecode Opensource Backer
- Posts: 7229
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Compare two lists (comparing fontName before/after)
Code: Select all
split pList1 by cr and null
split pList2 by cr and null
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 9824
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Compare two lists (comparing fontName before/after)
I'm on Linux where we haven't had a working Dictionary for several versions, so I'm operating at a disadvantage here until that gets fixed: what is the "as set" option, and when was it introduced?jacque wrote: ↑Tue Mar 27, 2018 7:15 pmInteresting, I never thought to do that. I usually do "split as set" but I suppose there are times when empty elements might be preferable.Code: Select all
split pList1 by cr and null split pList2 by cr and null
EDIT: Never mind - I was able to turn this up with a web search:
http://livecode.wikia.com/wiki/Split
I guess either could be used here. The two-delim method might be slightly leaner on memory, but not enough to care about.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Compare two lists (comparing fontName before/after)
Keep in mind there is also Brian's excellently quick web based version of the dictionary here.FourthWorld wrote: ↑Tue Mar 27, 2018 7:55 pmI'm on Linux where we haven't had a working Dictionary for several versions, so I'm operating at a disadvantage here until that gets fixed: what is the "as set" option, and when was it introduced?
-
- VIP Livecode Opensource Backer
- Posts: 9648
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Compare two lists (comparing fontName before/after)
Yep, and it was Bogs who turned me on to it. I NEVER use the built-in dictionary any longer.Keep in mind there is also Brian's excellently quick web based version of the dictionary here.
I just don't have the time. Silly, I think.
Craig
Re: Compare two lists (comparing fontName before/after)
For me, whenever I am in 8 or higher (rarely), *if* I am not using the stacks I pulled out of Mc (also rarely), then I rely on 3 sources the most heavily. In order they are -
- The excellently quick and very resizeable Tiny Dictionary from Bernd and friends (set to start when the IDE does).
- Max's wiki, which often goes in to more depth than the regular dictionary.
- Brian's web version of the dictionary, which is the fastest web dictionary I ever used.
-
- VIP Livecode Opensource Backer
- Posts: 7229
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Compare two lists (comparing fontName before/after)
Too bad it doesn't work on mobile. (Try it on Android Chrome.) When I'm in the IDE I use the native dictionary because I rely on the script integration. I read the forums on my tablet and that's where I usually need to look up a reference.Keep in mind there is also Brian's excellently quick web based version of the dictionary here.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 346
- Joined: Mon Mar 01, 2010 7:13 pm
- Location: London, UK
- Contact:
Re: Compare two lists (comparing fontName before/after)
That's a shame! It's exactly the kind of thing that would be superb to have on a 'second screen' device. It works fine on my iPad, but smaller screens seem to break the div setup.
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist
-
- VIP Livecode Opensource Backer
- Posts: 474
- Joined: Thu Sep 04, 2008 6:23 am
- Location: Melbourne Australia
Re: Compare two lists (comparing fontName before/after)
Intrigued by mention of RevFonLoad not being in the dictionary i thought i would check Brian’s online version. nope, no mention.
So i checked my Dash version (I am on my iPad away from my iMac).
Nope, no mention.
Went to github and searched the codebase.
Found this snippet from a release note.
As for accessing the dictionary on linux, you can use Zeal and read the Dash docset created for LiveCode. It is bsed on the current lc9rc1 release. Zeal details can be found at https://zealdocs.org
So i checked my Dash version (I am on my iPad away from my iMac).
Nope, no mention.
Went to github and searched the codebase.
Found this snippet from a release note.
The note was dated Nov 2016.RevFont has been removed
The revFont external library has been removed as it is no longer required.
The two commands provided by the revFont library have been superceded by commands that are built into the LiveCode engine. The replacements are:
revFontLoad -> start using font
revFontUnload -> stop using font
As for accessing the dictionary on linux, you can use Zeal and read the Dash docset created for LiveCode. It is bsed on the current lc9rc1 release. Zeal details can be found at https://zealdocs.org
-
- VIP Livecode Opensource Backer
- Posts: 9824
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Compare two lists (comparing fontName before/after)
For me not having the Dictionary is the small part. The root cause is a problem when SQLite init, so I don't get the suggested handlers in the Script Editor either, not anything else that needs SQLite.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Compare two lists (comparing fontName before/after)
Well, I guess I'll go take a look, surprising it wouldn't work on a tablet though. Maybe Brian will fix it I have a lot of confidence in that guy.jacque wrote: ↑Tue Mar 27, 2018 10:39 pmToo bad it doesn't work on mobile. (Try it on Android Chrome.) When I'm in the IDE I use the native dictionary because I rely on the script integration. I read the forums on my tablet and that's where I usually need to look up a reference.Keep in mind there is also Brian's excellently quick web based version of the dictionary here.
Re: Compare two lists (comparing fontName before/after)
Thanks! It is on my wish list. I’m actually using the same code as in the LC dictionary. Part of the speed is that it downloads the whole dictionary when loaded so everything is just filtered locally. I would like to fix the css so it works on phones. I do use it on my iPhone, but it is cumbersome (no access to filters, have to resize to see the hamburger icon, etc.). For me it works pretty good in landscape orientation on my iPad 3. I’m a few versions behind, so I need to get an update posted to align with RC1.
When I do get the css fixed, I’ll put in a PR to include with LC so the dictionary can be made narrower than today.
Brian Milby
Script Tracker https://github.com/bwmilby/scriptTracker
Script Tracker https://github.com/bwmilby/scriptTracker
-
- VIP Livecode Opensource Backer
- Posts: 7229
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Compare two lists (comparing fontName before/after)
Thanks Brian, that'd be terrific. Right now it's pretty messed up on Android but I'd love to use it.
I don't know where you get your energy but ours is not to question why.
I don't know where you get your energy but ours is not to question why.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Compare two lists (comparing fontName before/after)
Hmm, I borrowed a tablet and went to look at the site. It is a bit slower on the tablet (least the one I used), but it seemed functional for the most part, not some wretched mess like I was thinking you meant. Unfortunately, I don't think I could take browsing on a tablet very well.
Jacque (and anyone else that uses them), you must have the patience of a saint and the eyes of a hawk, or at least the corrective lenses that get you close enough.
I'll stick to my larger less portable devices.