Re: Optimizing for small Android devices
Mark: Wow, yes, it does help! I hope you had a great Christimas and are refreshed ready to face all of us again (smile) Your entire email should be posted to some knowledge base somewhere! As for speed optimization: - Alternate images I will make 1 X images right away for my home "portal" screens heros which are now 2 X and rename the current ones to Looks like that should be h...@medium.jpg # exact size of the image object as defined in points/pixel in LC. hero@extra-high # for the 2X version Prepare (command): yes this could help in a number of instances, I will try it. -- Further questions … you are right, we are not doing a lot of intensive data processing. My quick run with script profiler showed that some operations I thought we hurting the app were in fact taking a trivial amount of time. which means we can focus on the graphics, clearly the "problem." . I scoured the dictionary, but could not find any method determine amt device RAM, which I suppose is mute since the user could open as many apps as he likes and push the device to the wall, leaving little for LC… and there is nothing we can do about that. RE: image cache? This is new info to me… Very unlikely we would exceed the default 64 MG for mobile. But that default makes one wonder. Because we are told that the max RAM allotted to an app on Android is 57MB…so if the total MB of images used on a card < 64… and we navigate to another stack or card in the same stack… does the cache retain images from the previous card, stack? If so then eventually the cached images will overtake the available RAM on the device if we leave it at the default. is that correct? If so, then it means we *should* be doing some calculations and lowering the cache limit for Android. which again is "new info…." Also what if you are heading into a module/stack which is graphic intensive ? Like our word puzzle in the app and other possible "mini games in a stack" … if all previous images are cached, would it make sense to deliberately flush the cache before we start creating our puzzle (takes snap shots of fields, saves these as images and then distributes them as "tiles" across the card… ) if so, how does one do that? I don't see a flush cache command… RE: Multiple Instances of same graphic/image on Card? OK we are generating "lists" using a Parent Group with subgroups as "rows" (like DataGrid) where these Rows" contain image… in some case we are using a SVG Widget to show a few icons in the row.. these are attached to a template group on card 2… replicated over and over again down the screen dynamically on cd 1… There may be contexts where the repeated grc is a) a button with file on disk assigned as icon b) or just an image referenced by the template group that is on disk. OK so now the card has 100 rows… with multiple instances of the exact same: SVG icon (as widget the same one icon) OR multiple button(s) with the same img file as icon OR a small image which has multiple instances on the card but each references the same, one only file on disk. I presume this question applies to the DataGrid as well. (which I have yet to use…) I think the question is obvious: are all these little visual reps of a single graphic a) occupying only the value of (1 X (their un compressed size) in RAM or does the RAM now hold ( N (number of appearances on the card) X (their uncompressed size) as a cumulative total in RAM? RE: images streamed to the app from a server in advance with "Load" ? …. are these cached automatically or should we load and prepare each one after it arrives? RE: acceleratedRendering, Navigation across stacks and Redraw issues? please see http://quality.livecode.com/show_bug.cgi?id=20810 which is rather urgent as we went live on Google Play and I need an update that fixes this asap. FWIW here is the entire handler that does almost all the work of navigation across many modules(stacks) (and many more to come) could you re-write this for us to what you would consider the optimal SOP/ best practice, using Go in window… where AcceleratedRending is a) one in the stack we are closing b) needs to be turned on in the stack we are opening… I could try myself, but frankly, I would rather you give us the "bottom line" method here if you would not mind as I'm getting a bit tired of wrestling with this on Android (over a year now!) impossible to debug when script run fine an d is works on iOS and desktop… command portal_GoStack cardOrStackObject put the short name of this stack into oStackName put "Siva-Siva-App,Journal,view_SivaSivaBrowser" into tNoGoBackStacks if (sLastStack="Journal") AND (cardOrStackObject <> "Journal") then # it means we are launching activity and we are not actually going # to the view the journal, in which case we have to be sure it closes put "Journal" into oStackName end if if (not (oStackName is among the
Re: screenloc not actually centered after changing scalefactor (was Screen Resolution for Desktop Apps)
> You may have to do some calculations based on the scalefactor, in order to adjust the visual location. Thanks Jacqueline, but still confused. To do "some calculations", I thought of comparing the loc to the scalefactor. So ran the standalone on three devices, but saw no consistent corelation between the differing locs and the scalefactor. So, still no clue what to use for these calculations... On a perhaps related topic. Every time I start LC on that devpt PC (Windows), the LC menu bar opens mostly hidden offscreen. So I have to drag it left to be fully onscreen. So, I guess if LC itself can't get it right, what hope is there for moi. ¡Feliz año nuevo! -- Nicolas Cueto ___ 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: delete the customproperty (of a card)
The answer for what I was after: set the customPropertySets of this card to empty Thanks all. Particularly, Glen Bojsza for the offlist sample stack and explanatory video. -- N. Cueto On 1 January 2018 at 10:14, Nicolas Cuetowrote: > The answer for what I was after: > > > On 1 January 2018 at 02:03, Richmond Mathewson via use-livecode < > use-livecode@lists.runrev.com> wrote: > >> Fegs! >> >> delete the customKeys of card id 1002 >> >> warked :-* >> >> Richmond. >> >> >> >> On 31/12/2017 6:59 pm, Richmond Mathewson wrote: >> >>> If you know the name of the customProp . . . >>> >>> one can EMPTY the customProp very easily indeed: >>> >>> set the "XYZ" of card id 1002 to empty >>> >>> that does, howeve, mean that the prop "XYZ" is still 'there': >>> I'm not sure whether that is important. >>> >>> In the DICTIONARY is states this: >>> >>> "You can delete an object's custom property sets by setting the object's >>> customPropertySets to empty." >>> >>> So I wonder why this: >>> >>> set the customPropertySets of card id 1002 to empty >>> >>> divn't work? >>> >>> At this point I would generally start sending 'slightly offensive' >>> remarks to Mark & Kevin, >>> but for a variety of reasons just the now I'll content mysen by sending >>> them >>> >>> "Hae a gae guid Hogmanay, chiels!" >>> >>> Yours aye, Richmond, >>> an Ah'll stick the knife intil ye in the new towmond ;-) >>> >>> >>> >>> >>> On 31/12/2017 6:02 pm, hh via use-livecode wrote: >>> Dictionary > customKeys ___ 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 >> > > ___ 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: delete the customproperty (of a card)
The answer for what I was after: On 1 January 2018 at 02:03, Richmond Mathewson via use-livecode < use-livecode@lists.runrev.com> wrote: > Fegs! > > delete the customKeys of card id 1002 > > warked :-* > > Richmond. > > > > On 31/12/2017 6:59 pm, Richmond Mathewson wrote: > >> If you know the name of the customProp . . . >> >> one can EMPTY the customProp very easily indeed: >> >> set the "XYZ" of card id 1002 to empty >> >> that does, howeve, mean that the prop "XYZ" is still 'there': >> I'm not sure whether that is important. >> >> In the DICTIONARY is states this: >> >> "You can delete an object's custom property sets by setting the object's >> customPropertySets to empty." >> >> So I wonder why this: >> >> set the customPropertySets of card id 1002 to empty >> >> divn't work? >> >> At this point I would generally start sending 'slightly offensive' >> remarks to Mark & Kevin, >> but for a variety of reasons just the now I'll content mysen by sending >> them >> >> "Hae a gae guid Hogmanay, chiels!" >> >> Yours aye, Richmond, >> an Ah'll stick the knife intil ye in the new towmond ;-) >> >> >> >> >> On 31/12/2017 6:02 pm, hh via use-livecode wrote: >> >>> Dictionary > customKeys >>> >>> ___ >>> 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 > ___ 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: lineHeight different Mac vs. Windows
On 12/31/2017 04:36 PM, Warren Samples via use-livecode wrote: and auto-show scrollbars this should say "or" auto-show scrollbars ___ 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: lineHeight different Mac vs. Windows
On 12/31/2017 03:11 PM, Peter Bogdanoff via use-livecode wrote: text sometimes flows off the bottom of the field. Changing the font size is too extreme a change and doesn’t fix widows. I’m trying to conceive of a method of somehow creating page metadata that reformats the Windows text—possibly adjusting field width, arbitrary carriage returns to move text, changing the text size of space characters, etc., all in an attempt to make the Windows version text display more of less the same as Mac. But the problem of line height difference is otherwise unfixable by me. Linux users also often face the problem where LC developers share stacks where multi-line text wraps below the bottom of fields with fixed height. Can you set the field height to the formattedHeight and auto-show scrollbars as necessary when you load the field's contents? That ordinarily solves the problem. I would protest efforts to mess with user font selection, be it fontface or size and suggest you try to make it adaptive. Fontface and size can be elements the user has good reasons to set for himself. Warren ___ 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
lineHeight different Mac vs. Windows
Hi, I thought I would bring this to the attention of the LiveCode team. I filed a bug on 2016-05-22 Bug 17707 - Line height different Mac vs. Windows in fields with fixedLineHeight set to false EXPECTED RESULT: I would have expected to see the line height of a field with fixedLineHeight set to false to be the same on Windows as Mac OS X OBSERVED RESULT: Windows text is rendered with the line height slightly larger. Panos : I confirm this difference between the two platforms, but I am not sure if this is something we can fix. I am setting this to EXPERT_REVIEW for further investigation. Is this not a fixable thing, and should I just try other solutions? Overview of my situation: My cross-platform music history eBook does not have text that auto flows from page to page for various reasons (searching, linking to specific pages). Windows text in Georgia renders slightly wider in Windows compared to MacOS. lineHeight when not fixed (which I must have since I use in-line images) is decidedly greater, so text sometimes flows off the bottom of the field. Changing the font size is too extreme a change and doesn’t fix widows. I’m trying to conceive of a method of somehow creating page metadata that reformats the Windows text—possibly adjusting field width, arbitrary carriage returns to move text, changing the text size of space characters, etc., all in an attempt to make the Windows version text display more of less the same as Mac. But the problem of line height difference is otherwise unfixable by me. Peter Bogdanoff ArtsInteractive ___ 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: delete the customproperty (of a card)
Fegs! delete the customKeys of card id 1002 warked :-* Richmond. On 31/12/2017 6:59 pm, Richmond Mathewson wrote: If you know the name of the customProp . . . one can EMPTY the customProp very easily indeed: set the "XYZ" of card id 1002 to empty that does, howeve, mean that the prop "XYZ" is still 'there': I'm not sure whether that is important. In the DICTIONARY is states this: "You can delete an object's custom property sets by setting the object's customPropertySets to empty." So I wonder why this: set the customPropertySets of card id 1002 to empty divn't work? At this point I would generally start sending 'slightly offensive' remarks to Mark & Kevin, but for a variety of reasons just the now I'll content mysen by sending them "Hae a gae guid Hogmanay, chiels!" Yours aye, Richmond, an Ah'll stick the knife intil ye in the new towmond ;-) On 31/12/2017 6:02 pm, hh via use-livecode wrote: Dictionary > customKeys ___ 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
Re: delete the customproperty (of a card)
If you know the name of the customProp . . . one can EMPTY the customProp very easily indeed: set the "XYZ" of card id 1002 to empty that does, howeve, mean that the prop "XYZ" is still 'there': I'm not sure whether that is important. In the DICTIONARY is states this: "You can delete an object's custom property sets by setting the object's customPropertySets to empty." So I wonder why this: set the customPropertySets of card id 1002 to empty divn't work? At this point I would generally start sending 'slightly offensive' remarks to Mark & Kevin, but for a variety of reasons just the now I'll content mysen by sending them "Hae a gae guid Hogmanay, chiels!" Yours aye, Richmond, an Ah'll stick the knife intil ye in the new towmond ;-) On 31/12/2017 6:02 pm, hh via use-livecode wrote: Dictionary > customKeys ___ 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
Re: delete the customproperty (of a card)
Dictionary > customKeys ___ 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: Optimizing for small Android devices
On 2017-12-27 06:04, Sannyasin Brahmanathaswami via use-livecode wrote: Any thoughts in this area? In terms of images / screen resolution etc... The first thing to ensure is that *all* your images objects use the filename property rather than embedding the image data in the stackfile via the 'text' property. One exception: if you are constructing images on the fly temporarily (i.e. for a single card) then the 'text' property is still the best choice. The size of the image files on disk is not really relevant - what matters is the amount of memory they use to render, which is 4 bytes per pixel. (You can have a 1Kb PNG which has a decompressed size which would require many gigabytes decompressed, for example). Filename referenced images are decompressed and cached on use - the size of the cache is determined by the 'imageCacheLimit' global property, and its current usage is the 'imageCacheUsage' property - both are in bytes. If your image cache is too small, then there will be a 'bump' whenever an image needs to be decompressed - you can ensure images are in the cache (assuming the cache is large enough) by using the 'prepare image' command. The engine understands @ suffixes to image filenames (before the extension!), which allow you to provide different sizes of images depending on the device pixel resolution of the device. For example, if you have lots of images which have been prepared for retina devices, then they will be being scaled down on lower resolution devices for no real gain, and will be taking more memory than need be on such devices - take a look at the (image) filename property in the dictionary which explains how that works. By default the engine maps 1 pixel in LiveCode space to 1 logical pixel in device space. A (original!) retina device will have 2 device pixels to 1 logical pixel, whereas a non-retina device will have 1 device pixel to 1 logical pixel. For retina devices you generally want images of 2x the horz and vert size compared to non-retina to ensure maximum display fidelity. So one thing to check is that all your images are not 'oversized' - i.e. they are the exact size needed to fit the pixel rect of the objects using them in LiveCode. Then provide @2x ones for higher resolution devices. Assuming your images are currently 'oversized' to ensure good display on high-res devices, this will save you 75% of the in-memory footprint when running on a lower-res device (i.e. not retina). In terms of accelerated rendering... The cache of 'tiles' used in acceleratedRendering is per-stack, and is reset on every card change. The cache is only 'in-memory' when the stack is opened. On mobile it is possible for more than one stack to be opened, they stack from most recently opened to least recently opened. So, in general, it is probably better to explicitly close stacks you are no longer using. Using the 'go in window' form of the go command (IIRC) does this for you - i.e. closes the old and opens the new, and is probably the most efficient means to move between stacks on mobile. The amount of memory which is used by acceleratedRendering (on any one stack) is always the compositorCacheLimit of the stack. If the stack requires more tiles to render than the cache-limit allows, acceleratedRendering will not be used, and the engine will fall back to normal rasterization. On mobile, if you are using OpenGL modes of acceleratedRendering, then (IIRC) the cache is actually the GPU RAM which is used, and not 'normal' RAM (if there is a difference these days with more flexible memory busses!). However, there is an overhead in generating the tiles - but that is only transient and is never more than the pixel size of the stack at device resolution (e.g. for a 800*600 stack non-retina - it would require a maximum temporary buffer of 800*600*4 bytes). In terms of memory, then the above two things are pretty much the largest 'memory hog' of any application - unless you are loading large amounts of data into memory (which I don't think you would be in the case of your app - we're talking more like doing analysis of 100,000s of points of data) then any memory issues will likely be due to graphics. Hope this helps! Warmest Regards, Mark. -- Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps ___ 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
DataGrid 2
It there anywhere an example how to use datagrid 2. I tried, but somehow I didn't mange to get in it. Antti ___ 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
delete the customproperty (of a card)
Very simple question, I guess. But from the documentation I've only figured out : set the customKeys["myCP"] of this card to empty How do I completely delete the customProp myCP itself? Bettery yet, how could I delete at once all customProps, even if I don't know their names?! Thanks. (And "akemashite omedeto!") -- Nicolas Cueto ___ 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