Re: Target controls on a card that are *not* part of a placed groups
On 6/03/2016 2:54 pm, Sannyasin Brahmanathaswami wrote: I'm trying to customize some development tools. A typical use case it to be able to change the button style of all the buttons on a card, but I don't want to touch the style of buttons that are part of top and bottom nav bars that are placed on all cards. I need to be able to go into a review process and if someone says "Let's see what it looks like if we change the buttons to look like XYZ" I have this in a field of a tools stack: backgroundcolor|65,65,65 ink|blendHardLight opaque|true and a button with this script on mouseUp put fld "buttonProps" into tButtonProps split tButtonProps with cr and "|" set the defaultStack to the topstack repeat with x = 1 to (the number of buttons of this card) # what I really want to do here is skip all the buttons that are in groups # which are placed on all card (or more than one card repeat for each key y in tButtonProps set the y of btn x of this card to tButtonProps[y] end repeat end repeat end mouseUp You can check the "owner" of the button and see if it is a shared group or not. You can get a list of the shared groups that are being used on a card by using "get the sharedGroupNames of card xxx". For buttons that aren't in groups, the owner will be the card. If they are in a group, the owner of the button will be the group they are in. Cheers, Charles ___ 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
Target controls on a card that are *not* part of a placed groups
I'm trying to customize some development tools. A typical use case it to be able to change the button style of all the buttons on a card, but I don't want to touch the style of buttons that are part of top and bottom nav bars that are placed on all cards. I need to be able to go into a review process and if someone says "Let's see what it looks like if we change the buttons to look like XYZ" I have this in a field of a tools stack: backgroundcolor|65,65,65 ink|blendHardLight opaque|true and a button with this script on mouseUp put fld "buttonProps" into tButtonProps split tButtonProps with cr and "|" set the defaultStack to the topstack repeat with x = 1 to (the number of buttons of this card) # what I really want to do here is skip all the buttons that are in groups # which are placed on all card (or more than one card repeat for each key y in tButtonProps set the y of btn x of this card to tButtonProps[y] end repeat end repeat end mouseUp If you have a better way to tackle this.. it's something I've worked with for years and never came up with an easy solution. I also like the idea of selecting the buttons... then I can use this on mouseUp put fld "buttonProps" into tButtonProps split tButtonProps with cr and "|" set the defaultStack to the topstack put the number of lines of (the selectedObjects) into tObjects if tObjects = 0 then answer "Please select some controls" with "OK" exit to top end if repeat for each line x in (the selectedObjects) repeat for each key y in tButtonProps set the y of x to tButtonProps[y] end repeat end repeat end mouseUp Anyone have an even more efficient method? How do you handle this? BR ___ 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: HTML5 teaser
Colin Holgate wrote: > I may have missed a reply too. Which one covered the question of the PDF > remaining encrypted after the user has downloaded it? You added the following 5 requirements after my response containing the suggested implementation: 1. The PDF file itself is also to be encrypted with a password. 2. The PDF encryption is not to be performed beforehand using Acrobat. 3. The PDF encryption is to be performed on the server. 4. The PDF file is to remain encrypted upon receipt. 5. The user is to be prompted to enter the password to unlock it. With your above additional requirements in mind, the suggested implementation would be as follows: - Store the PDF on the server, somewhere outside the web folder so it can’t be loaded directly by web visitors. - Get the user to access the system via a HTTPS connection, which is needed for a secure login mechanism anyway. - The HTTPS connection does all of the encrypting and decrypting so you don’t have to code it yourself. - The user logs in via your LiveCode Server app, which handles the usual user authentication stuff using cookies and sessions. - When the logged in user asks for the PDF file, have your LiveCode Server app generate a new password and send it to a command line app that has the ability to encrypt PDF files, such as PDFtk: https://www.pdflabs.com/docs/pdftk-man-page/ - Have that command line app output the encrypted PDF file to a location outside the web folder so it can’t be loaded directly by web visitors. - Have your LiveCode Server app display the newly-generated password on a page in the web browser, with an accompanying download link which calls your LiveCode Server app. - When the user clicks the download link, have your LiveCode Server app read from the encrypted PDF file and write it out to the web browser (as with any other web content), and with the appropriate Content-Type HTTP header. - Since you’re having all data transmitted over a HTTPS connection, the user’s login details as well as the PDF file are encrypted whilst in transit. - Since your LiveCode Server app is the one deciding whether or not to display the PDF (and any other data) based on whether the user is signed in, access can be effectively limited to that user. Lyn ___ 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: HTML5 teaser
On 03/05/2016 01:46 PM, Colin Holgate wrote: I may have missed a reply too. Which one covered the question of the PDF remaining encrypted after the user has downloaded it? Sorry, I cleaned out my mailboxes earlier. Look for Lyn's longer reply about three levels back in this discussion. -- Mark Wieder ahsoftw...@gmail.com ___ 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
Argy-Bargy
I'm having some fun playing around with a properties palette to set control colours using RGB sliders: http://forums.livecode.com/viewtopic.php?f=7=26725=139233#p139233 Richmond. ___ 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: Release 6.7.10 RC 1 / 7.1.3 RC 1
Added to that, it is a very nice and very respectful attention of the livecode team to maintain these last builds that are still governed by the perpetual licenses that existed in the previous century. (sigh.. mine stopped at 6.6.5 sniff!) -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Release-6-7-10-RC-1-7-1-3-RC-1-tp4701938p4702055.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ 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: Release 6.7.10 RC 1 / 7.1.3 RC 1
Good work - results more or less confirmed here. Might be good to submit that script with an enhancement request in the bug DB to see if those use cases can be optimized. Previous requests with other commands and functions yielded good opportunities for speed boosts, bringing v8 much closer to v6. Whether the same can be done with the language features used here is something I don't know, but once in the queue the team can review and advise. -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.com -hh wrote: > hh wrote: > Will not work with LC 8 for a while, LC 6.7.10 is in average 16 times > faster here. And in average 10 times faster than LC 7. FourthWorld wrote: My own test are showing v8 rather close for v6 in performance, and much faster than 7. What script(s) are you running which get those results? Let's take a simple example that was recently here in the list. For your comfort the script is attached below. It is also a field, where LC 8 is said to be already optimized. Correct me if I'm wrong. Here are my results from a medium fast machine (Mac mini, i5-2.5GHz) Task (=1 x mouseUp): 100 repeats of find the minimum of 1000 integers Version: replaceText - replace - min() - sort 6.7.10-rc1: 0.30 - 0.07 - 0.06 - 0.21 (worst timing of 10 x mouseUp) 7.1.3 -rc1: 1.78 - 4.43 - 1.38 - 0.95 (best timing of 10 x mouseUp) 8.0.0-dp15: 1.94 - 4.69 - 1.49 - 0.94 (best timing of 10 x mouseUp) So the time needed is in relation for the "LC-given" min() ... LC 6: LC 7: LC 8 = 1:23:25 and better for the sort ... LC 6: LC 7: LC 8 = 1:5:5 taking the best of each row ... LC 6: LC 7: LC 8 = 1:16:16 Better don't force me to publish the results of animating large polygons. *** I left these timings out in averaging in order to acknowledge that *** LC 8 is still in alpha. I like LC 8 very much and I live with the speed loss I have when I use it (it's worth for me, if I do so). The speed loss is not the culprit of the dev team, it's the big bundle of shiny new things we wish to have ... The script used (by Thierry, slightly modified and expanded by me) on mouseUp repeat with i=1 to 1000 get random( 1000) put IT & cr after LinesOfNumbers put IT & comma after OneLineOfNumbers put IT into b[i] end repeat delete last char of LinesOfNumbers delete last char of OneLineOfNumbers put 100 into nRepeat put the milliseconds into _ct -- case 1 repeat nRepeat put min( replaceText( LinesOfNumbers, return,comma)) into min1 end repeat put (the milliseconds - _ct) / nRepeat into timing1 wait 1 ticks with messages put the milliseconds into _ct -- case 2 repeat nRepeat put LinesOfNumbers into nn replace return with comma in nn put min(nn) into min2 end repeat put (the milliseconds - _ct) / nRepeat into timing2 wait 1 ticks with messages put the milliseconds into _ct -- case 3 repeat nRepeat put min( OneLineOfNumbers) into min3 end repeat put (the milliseconds - _ct) / nRepeat into timing3 wait 1 ticks with messages put the milliseconds into _ct -- case 4 repeat nRepeat put LinesOfNumbers into nn sort nn numeric put line 1 of nn into min4 end repeat put (the milliseconds - _ct) / nRepeat into timing4 put cr & the version &": "& \ format( "%.2f - %.2f - %.2f - %.2f %s %s %s", \ timing1, timing2, timing3, timing4, min1 is min3, \ min2 is min3, min4 is min3) after fld 1 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: Use MouseLine() and still edit the same field?
Mark, I had a situation where it thought I was French. Go to your setups or preferences and look at language settings. I also find that asking Google for info is useful, even for questions about livecode. Bill William Prothero http://es.earthednet.org > On Mar 5, 2016, at 5:17 AM, Mark Mitchellwrote: > > Thanks to Devin, Terry and Matt > > I tweaked Devin’s code a bit, and went with a global variable as otherwise it > flashes and gives you an epileptic seizure! > > But, this works great: > on mouseWithin — seems to work better than mousemove > global PastWhichLine > > if pastWhichLine is empty then > put the mouseLine into pastwhichLine > end if > > put the mouseline into tThisLine >if tThisLine <> PastWhichLine then > > set the backgroundColor of pastwhichline to empty > set the backgroundColor of tThisLine to (220,220,250) > put tThisLine into PastWhichLine > end if > end mouseWithin > > Thanks folks! > > マーク.. (Apple mail has a bug that automatically changes my name to Japanese > and there is no way to stop it… sigh…) > >> >>> On Mar 4, 2016, at 1:08 PM, Mark Mitchell wrote: >>> >>> (Sorry Heather! I?m sending this message again from the ?proper? account..) >>> >>> I?m not sure how long it has been around, but I have just discovered the >>> ?mousewhithin? message combined with the mouseline() function? Awesome! >>> So, for those of you who don?t know, the ?mousewithin? message is sent to a >>> field periodically (5 times a second?) whenever the mouse is inside that >>> field. >>> >>> Then, the mouseline function returns whatever line of that field the mouse >>> is currently hovering over. I am currently using this to warn folks if >>> they have too many characters per line. And that works fine. >>> >>> But to make it more intuitive, I want to somehow hilite or indicate the >>> line that the mouse is over in the field, without disturbing the ability to >>> edit that field (copy, paste, type stuff) with ease. >>> >>> I have tried a few different ways of hiliting the line of the field >>> (selecting it, changing the color of the text of it, etc) but any sort of >>> repeat or recursive structure does not work, as the ?mousewithin? message >>> is simply sent far too often for any ?repeat? or recursion to work. >>> >>> Does anyone have any other ideas for highlighting a line in a field that >>> might work under these conditions? >> >> Mark, >> >> Have you tried setting the backgroundColor of the line, something like this: >> >> local sCurrLine >> >> on mouseWithin >> put the mouseline into tThisLine >> if tThisLine <> sCurrLine then >> set the backgroundColor of line 1 to -1 of me to empty >> set the backgroundColor of tThisLine to (220,220,250) >> put tThisLine into sCurrLine >> end if >> end mouseWithin >> >> on mouseLeave >> set the backgroundColor of line 1 to -1 of me to empty >> end mouseLeave >> >> It seemed to work okay here on LC 7.1.2. >> >> Devin >> >> Devin Asay >> Office of Digital Humanities >> Brigham Young University > > > ___ > 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
Set htmlText in LC8 Browser
There seems to be an issue with set htmlText in LC8 Browser. The code below generates a chart using amCharts. It works in Safari with either Open File… or drag and drop. It works in a LC8 Browser by drag and drop It DOES NOT work in LC8 Browser by set html text. Can someone advise please? Thanks Terry http://www.w3.org/TR/html4/strict.dtd;> amCharts examples var chart; var chartData = [ { account:"A", amount:100.51, color:"#C39953", }, { account:"B", amount:200.64, color:"#A17A74", }, { account:"C", amount:300, color:"#6D9BC3", }, { account:"D", amount:400.84, color:"#CD607E", }, { account:"E", amount:500.75, color:"#AD6F69", }, { account:"F", amount:600.23, color:"#2E2D88", }, { account:"F", amount:700.53, color:"#AB92B3", }, { account:"H", amount:800, color:"#676767", }, { account:"I", amount:900.76, color:"#6EAEA1", }, { account:"J", amount:1000, color:"#AE98AA", }, ]; AmCharts.ready(function () { // -- SPECIFY CHART AS SERIAL CHART chart = new AmCharts.AmSerialChart(); chart.dataProvider = chartData; chart.categoryField = "account"; chart.startDuration = 0.75; chart.sequencedAnimation = false; chart.startEffect = "bounce"; //chart.addTitle("Net Worth", 15, color, alpha, bold) chart.addTitle("NetWorth", 15); // CATEGORY OR XAXIS --- var categoryAxis = chart.categoryAxis; categoryAxis.labelRotation = 45; categoryAxis.fontSize = 13; categoryAxis.gridPosition = "start"; categoryAxis.title = "Account"; // VALUE OR YAXIS -- var valueAxis = new AmCharts.ValueAxis(); valueAxis.labelFunction = formatCurrency; valueAxis.title = "Amount(£)"; valueAxis.fontSize = 13; chart.addValueAxis(valueAxis); // -- SPECIFY GRAPH var graph = new AmCharts.AmGraph(); graph.valueField = "amount"; graph.balloonText = "[[category]]: £[[value]]"; graph.colorField = "color"; graph.type = "column"; graph.lineAlpha = 0; graph.fillAlphas = 0.8; graph.labelText = "£[[value]]"; graph.fontSize = 10; chart.addGraph(graph); // SPECIFY CURSOR --- var chartCursor = new AmCharts.ChartCursor(); chartCursor.cursorAlpha = 0; chartCursor.zoomable = false; chartCursor.categoryBalloonEnabled = false; chart.addChartCursor(chartCursor); //chart.creditsPosition = "top-right"; chart.write("chartdiv"); // --- }); //END OF AMCHARTS.READY // - FUNCTION TO FORMAT CURRENCY -- function formatCurrency(num,formattedValue, valueAxis) { num = num.toString().replace(/\$|\,/g,''); if(isNaN(num)) num = "0"; sign = (num == (num = Math.abs(num))); num = Math.floor(num*100+0.501); pennies = num%100; num = Math.floor(num/100).toString(); if(pennies<10) pennies = "0" + pennies; for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++) num = num.substring(0,num.length-(4*i+3))+','+ num.substring(num.length-(4*i+3)); return (((sign)?'':'-') + '£' + num + '.' + pennies); } // --- ___ 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: Use MouseLine() and still edit the same field?
Thanks to Devin, Terry and Matt I tweaked Devin’s code a bit, and went with a global variable as otherwise it flashes and gives you an epileptic seizure! But, this works great: on mouseWithin — seems to work better than mousemove global PastWhichLine if pastWhichLine is empty then put the mouseLine into pastwhichLine end if put the mouseline into tThisLine if tThisLine <> PastWhichLine then set the backgroundColor of pastwhichline to empty set the backgroundColor of tThisLine to (220,220,250) put tThisLine into PastWhichLine end if end mouseWithin Thanks folks! マーク.. (Apple mail has a bug that automatically changes my name to Japanese and there is no way to stop it… sigh…) > >> On Mar 4, 2016, at 1:08 PM, Mark Mitchellwrote: >> >> (Sorry Heather! I?m sending this message again from the ?proper? account..) >> >> I?m not sure how long it has been around, but I have just discovered the >> ?mousewhithin? message combined with the mouseline() function? Awesome! So, >> for those of you who don?t know, the ?mousewithin? message is sent to a >> field periodically (5 times a second?) whenever the mouse is inside that >> field. >> >> Then, the mouseline function returns whatever line of that field the mouse >> is currently hovering over. I am currently using this to warn folks if they >> have too many characters per line. And that works fine. >> >> But to make it more intuitive, I want to somehow hilite or indicate the line >> that the mouse is over in the field, without disturbing the ability to edit >> that field (copy, paste, type stuff) with ease. >> >> I have tried a few different ways of hiliting the line of the field >> (selecting it, changing the color of the text of it, etc) but any sort of >> repeat or recursive structure does not work, as the ?mousewithin? message is >> simply sent far too often for any ?repeat? or recursion to work. >> >> Does anyone have any other ideas for highlighting a line in a field that >> might work under these conditions? > > Mark, > > Have you tried setting the backgroundColor of the line, something like this: > > local sCurrLine > > on mouseWithin >put the mouseline into tThisLine >if tThisLine <> sCurrLine then >set the backgroundColor of line 1 to -1 of me to empty >set the backgroundColor of tThisLine to (220,220,250) >put tThisLine into sCurrLine >end if > end mouseWithin > > on mouseLeave >set the backgroundColor of line 1 to -1 of me to empty > end mouseLeave > > It seemed to work okay here on LC 7.1.2. > > Devin > > Devin Asay > Office of Digital Humanities > Brigham Young University > ___ 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: Activating tabs in a liveCode field
Hi Francis, if you convert the word document to a RTF document then you could drop it onto a field from the finder. The field would have this script - on dragDrop put the dragData["files"] into tFiles put line 1 of tFiles into tAFile set the itemDelimiter to "." if item - 1 of tAFile is "rtf" then put url ("binfile:" & tAFile) into tRTF set the rtftext of me to tRTF end if end dragDrop it even respects the tab positioning. Tested with a simple 2 line 3 columns text, for more complex documents it might differ. Note as of LC8 DP8 onwards the field object does not accept dragDrop from the Finder on MacOSX. Bug 17072 Kind regards Bernd -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/Activating-tabs-in-a-liveCode-field-tp4702048p4702050.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ 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: Activating tabs in a liveCode field
Look at https://livecode.com/products/thirdparty/currykenworthy/wordlib-2-0-0/ On 3/5/2016 6:19 AM, Francis Nugent Dixon wrote: > Hi from Beautiful Brittany, > > I have a Word file containing tab characters. > I want to drop it into a liveCode field, and have > the tabs respected (all texts lined up) > > Can I do this ? > > Thanks for any ideas. > > -Francis > > ___ > 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
Activating tabs in a liveCode field
Hi from Beautiful Brittany, I have a Word file containing tab characters. I want to drop it into a liveCode field, and have the tabs respected (all texts lined up) Can I do this ? Thanks for any ideas. -Francis ___ 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