Page 1 of 1

Error in Mac runtime

Posted: Sat Sep 15, 2007 7:17 pm
by andyh1234
Im getting a few beta users that are reporting the following error:

Executing at 6:28:13 PM on Saturday, September 15, 2007
Type: Chunk: no such object
Object: button 'revGeometryBack' of group 'revGeometryBack' of card 'Login' of stack '/myapp.app/Contents/MacOS/myapp
Line Num: 323
Hint: revUpdateGeometry

It happens when the load the main stack.

I dont have button called revGeometryBack and never have had.

Any ideas???

Andy

Posted: Sat Sep 15, 2007 8:44 pm
by Mark
Hi Andy,

The button revGeometryBack is put into your mainstack by the standalone builder. It contains the script that allow the geometry manager to do its (bad) work.

I spent the last two days entirely on cleaning up the mess caused by the geometry manager in a stack of a client of mine. Of course, I have told this client not to use the geometry manager and I repeat this recommendation to you.

Do not use the geometry manager! It is not safe!

The error you describe is a weird one, because it looks like the button can't find its own scripts, which seems impossible to me. Possibly, the error message is incorrect.

Can you be more specific about the memoment when the error message occurs?

Best,

Mark

Posted: Sat Sep 15, 2007 9:33 pm
by andyh1234
Am I right in thinking the geo manager only get involved when you use the geometry option in the card inspector? Or does it get involved when I change the width or height of a stack from code?

If so, problem will be soon solved as I dont use geometry much at all, all the windows are fixed by their nature, but its possible ive put geometry in when playing so Ill go through and remove it all!

The error occurs on a stack load, in the preopencard handler. That stack is the main stack in the application, and its a login screen so it is fixed and not resizable which makes it even odder!!

Ive checked all the buttons and controls on the card as well, and none have geometry, but there is some geometry on a substack so I might look at that.

Posted: Sat Sep 15, 2007 10:07 pm
by Mark
Andy,

You are right, geometry is only involved in stacks with objects that have the geometry options set, but once you have used it, you can't get rid of it that easily. Here is a script that empties the relevant custom properties. Of course, you can also do it manually.

Code: Select all

on mouseUp
  repeat with x = 1 to number of cards
    repeat with y = 1 to number of controls of cd x
      set the customProperties["cRevGeometryCacheIDs"] of control y of cd x to empty
      set the customProperties["cRevGeometryCache"] of control y of cd x to empty
    end repeat
    set the customProperties["cRevGeometryCacheIDs"] of cd x to empty
    set the customProperties["cRevGeometryCache"] of cd x to empty
  end repeat
end mouseUp
This script doesn't delete the custom property sets but it does delete the properties in these sets. You might want to adjust the script to take substacks or all open mainstacks into account.

Best,

Mark

Posted: Sat Sep 15, 2007 11:52 pm
by andyh1234
Thanks Mark.

Can I ask one more thing, you definately seem to know all the answers!

At the moment im using the let revolution decide which libraries to include.

Is it worth using the specify libraries option so I can exclude the geometry there and just include the SQLite, Internet etc.

What do you think?

Andy

Posted: Sat Sep 15, 2007 11:56 pm
by Mark
Hi Andy,

Manually specifying which libraries to include avoids several nasty problems, but you need to be sure that you include everything you need, of course.

Best,

Mark

Posted: Sat Sep 15, 2007 11:58 pm
by andyh1234
Thanks Mark, its also decreasing the file size by over half a meg, so its looking good.

Just testing the new build on a virgin mac and pc now to see if I can crash it, just to see if ive missed any libraries.

Thanks again for all the help.

Andy