Cannot get the auto scaling and positioning to work after deployment

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
tluyben
Posts: 9
Joined: Fri Mar 23, 2018 12:58 am

Cannot get the auto scaling and positioning to work after deployment

Post by tluyben » Fri Mar 23, 2018 1:38 am

I am using 8.1.9 under Ubuntu (9 seems to be very unstable for me so far) and when I create automatic
scaling / positioning in the geometry manager everything works beautifully in the IDE, however when I deploy, it
is completely broken under all platforms (mac,linux,windows).

It is quite random why / how it happens, but the consistent thing is that it works well during development in the IDE; after export some controls just don't scale properly (or at all). It seems to happen more in complexer (multiple cards, more controls per card) projects.

Does this ring any bells? Anything I can check for that could create this behavior?

Edit: I don't mind paying someone to take a look as it must be something trivial...

bwmilby
Posts: 438
Joined: Wed Jun 07, 2017 5:37 am
Location: Henrico, VA
Contact:

Re: Cannot get the auto scaling and positioning to work after deployment

Post by bwmilby » Sat Mar 24, 2018 1:09 am

I’ve done some work on the PM/GM to make them available to mobile platforms. Not sure where the changes first appeared though (I know they are in 9RC1). There were a couple of things that were fixed, but none were due to differences in IDE/Stand-alone (other than it not working at all on mobile).

One thing that you can do (make a backup first) is:

Code: Select all

revcachegeometry true
On each card. This makes sure all of the geometry calculations are actually saved/updated. I’ve seen issues where controls are moved/changed but not updated correctly. I would also verify that the geometry settings are on the control.

For complex cards, just make sure you have the simplest path to each edge possible. Currently the ordering is on the total path count (kind of hard to explain in words), which could create situations where things don’t work as expected (but should act the same regardless of being in the IDE or not).

GM = Geometry Manager / PM = Profile Manager
Most comments in the forum seem to discourage their use but I am trying to use the code and improve it. Alas the one stack that had a bunch of controls (64 I think), I ended up coding by hand - SVG Icon Tool. The rest of the stack does use the GM.

Brian
Brian Milby

Script Tracker https://github.com/bwmilby/scriptTracker

tluyben
Posts: 9
Joined: Fri Mar 23, 2018 12:58 am

Re: Cannot get the auto scaling and positioning to work after deployment

Post by tluyben » Sat Mar 24, 2018 7:32 am

Thanks,

I tried what you said and for the Scrolling List Field, it fixed my issue, however for the Datagrid control I have, it's even worse now; it doesn't rescale in the IDE either anymore. So I tried it in code;

Code: Select all

on resizeStack pNewWidth, pNewHeight, pOldWidth, pOldHeight
   
   set the height of field "TagsList" to (pNewHeight - 160)
   set the top of field "TagsList" to 160
   
   set the height of field "LoggerGrid" to (pNewHeight - 48)
   set the width of field "LoggerGrid" to (pNewWidth - 218)
   set the top of field "LoggerGrid" to 48
   set the left of field "LoggerGrid" to 221
 end resizeStack
TagsList works fine; in IDE and outside (deployed). LoggerGrid (a DataGrid) just ignores anything. It just stays fixed in and outside the IDE; with geometry manager at least both scale in the IDE (but not outside). I am getting a bit desperate :) I am wondering why this works so strangely and obfuscated; if I set the width ;

Code: Select all

set the width of field "LoggerGrid" to 1000
it ignores it. Why would any software do that... I must be missing something, but the tutorials say it should work?

tluyben
Posts: 9
Joined: Fri Mar 23, 2018 12:58 am

Re: Cannot get the auto scaling and positioning to work after deployment

Post by tluyben » Sat Mar 24, 2018 7:54 am

Ouch. My beginner-ness is really showing! Changed field to group for LoggerGrid and now it works. Doesn't work with geometry manager, but it works in code, so that's great. It's horribly inconsistent (it's a group, sure, but it's also field, as it's between other fields on the palet). At least it works now. Thanks!

bwmilby
Posts: 438
Joined: Wed Jun 07, 2017 5:37 am
Location: Henrico, VA
Contact:

Re: Cannot get the auto scaling and positioning to work after deployment

Post by bwmilby » Sat Mar 24, 2018 3:15 pm

Data grids are a complex beast and I have not tried to use them with GM at all. They are implemented as a group so that is why they have to be addressed that way. The guide for the DG is a pretty good size read all by itself.
Brian Milby

Script Tracker https://github.com/bwmilby/scriptTracker

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”