DG outcomes on desktop vs mobile
phil at pdslabs.net
Fri Oct 23 22:02:37 EDT 2020
Well, I'm feeling pretty dumb about now. It's the architecture, stupid!
I overlooked the fact that, unlike on desktop systems, my mobile app
doesn't automagically have access to the test files that reside in the
app's dev environment on my Mac. During startup on the iPad, the app has
to populate its [Documents] subfolders with test files stored in the app
It's my first mobile app. At least there's that. And I can pretty much
guarantee I'll never again overlook the need to do this!
So that part of the app is working now. Thanks for the great ideas,
which will be useful when I stumble again -
On 10/23/20 3:06 PM, Bob Sneidar via use-livecode wrote:
> I got into the habit of setting the dgdata to empty before populating it because I ran into issues where my own code set the dgdata to something not an array, and this seems to bork the data grid. I think it was an empty array, or an empty record. This didn’t show up as a blank line however, the data displayed correctly, but the data grid became unresponsive. It didn’t show up in the text view of the property inspector either. I had to put the dgtext into the msg and then the blank line showed up.
> Bob S
> On Oct 23, 2020, at 5:19 AM, Andrew at MidWest Coast Media via use-livecode <use-livecode at lists.runrev.com<mailto:use-livecode at lists.runrev.com>> wrote:
> This happened to me, twice, in a project I just launched. I was in crunch so didn’t have time to properly document but something happened where the DG wasn’t loading. I could take the same dgData or dgText and load it to another DG fine. Being on mobile made this harder to debug because even with Remote Debugger I would still have to compile and launch to the simulator each time I tried a tweak.
> Because I was up against a deadline and since I wasted several hours trying to troubleshoot I just replaced the DG with a brand new: everything worked. Didn’t even bother to troubleshoot the 2nd time it happened, just immediately made a new DG and moved on.
> Not a definitive answer to your question but an acknowledgement of your problem.
> —Andrew Bell
> I'm building an iPad app that reads a bunch of files into an array and
> then sets the dgData of a form DG to that array. The array is
> well-formed for DG use. After setting the dgData of the DG, the result
> is empty. Only one problem: the DG now contains no data. (I also tried
> setting the dgText of the DG to a flat version of the same data and got
> the same outcome.)
> I can then create another array from custom property data and set the
> dgData of the same form DG to that array and it works.
> On the desktop, however, the same DG loading process never fails.
> The data being loaded is all text - nothing esoteric.
> Does anyone have any ideas how I can find & fix the problem(s)? Or have
> you run into this before?
> Thank you -
> Phil Davis
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode