Page 1 of 1

Problem with compiled prog

Posted: Tue Mar 11, 2008 1:00 am
by bjb007
On two occasions recently a button
which worked in the IDE no longer
worked in the exe.

Checked the code - OK - and
recompiled and the button did
what it was supposed to do.

Any reason for this? Hope I
don't have to check the compiled
version before distribution.

http://snipurl.com/21htd [www_wikifortio_com]

Posted: Tue Mar 11, 2008 2:03 am
by malte
Guess what?







*RIGHT*

We will not be able to tell anything that might be the cause without seeing the code :-) There are a few things that *might* not work in a standalone (dynamic scripting for example), but without seeing what you are doing it is all wild speculation.

All the best,

Malte

Problem with compiled prog

Posted: Tue Mar 11, 2008 2:28 am
by bjb007
Don't think the code would help in this
case.

It's nothing clever - just an mouseUp
with generic code which is used by
a number of other buttons - which all
work. Just a matter of checking if the
label "12" is in a list "10,11,12" and
acting accordingly. It was in the list
and the other numbers were found.

As I said, it ran OK in the IDE so it's
something that happens during
compiling.

Might be something to do with not
having accepted Revs offer to "save
before compiling" as I'd made no changes.

Might be that changes are cached?

Posted: Tue Mar 11, 2008 10:52 am
by Mark
Sorry, bjb007, without code we can't see what's wrong. Please, post your script, so we'll at least have an idea of what's going on.

Mrak

Problem with compiled prog

Posted: Tue Mar 11, 2008 1:58 pm
by bjb007
As this is a commercial programme I'm
not going to post the script and since there's
no fault in the code looking at it won't do
any good.

Is there any know bug in the compiler
of 2.8.1 that would cause this?

Have a look at the exe.
On the first error button 31
didn't work, on the second
button 12 didn't work.

http://snipurl.com/21htd [www_wikifortio_com]

Posted: Tue Mar 11, 2008 3:03 pm
by Mark
bjb007,

I'm very sorry, but we can only guess about what "this" is (I assume I can speak for Malte and perhaps a few others in this forum). As far as I know, there are no bugs in the standalone builder that cause a stack to run fine in the IDE but not as a standalone.

Recently, I posted part of the code of Snapper Screen Recorder ( http://snapper.economy-x-talk.com ) and as a result I helped someone to develop his own, totally different product, received a great suggestion to improve my own product, and sold a few licenses. I'm not saying you must (obviously), but I don't think there is any harm in posting a small part of your code.

Best,

Mark

Posted: Tue Mar 11, 2008 3:35 pm
by mcgrath3
I don't think there is anything wrong with the compiler. We haven't seen compiler issues at all lately.

You may want to check the obvious causes:
Library not installed/included
SubStack not check for inclusion
Pathname changed (Static versus Dynamic)
If then (if the environment is "Development" then...)

Since your code is top secret maybe you can share what types of things you are doing behind the scenes with the code i.e. Loading a picture, URL, accessing an external data file, mySQL etc.

Tom McG

Posted: Tue Mar 11, 2008 3:36 pm
by Mark
Btw, turning on the error reporting feature in the standalone builder might help you.

Mark

Posted: Tue Mar 11, 2008 7:03 pm
by malte
I am not going to waste my time any longer trying to help you.

If we can not see what you are doing there is no way at all to help you with anything. You are complaining loudly all the time of this and that that would not work. Then you come here and ask for help, but with a question that is so vague that all that is left to the kind souls trying to get you up and running is doing wild speculations what could go wrong. And then you have he balls to come here and say "hey, this is commercial code I will not show but help me". You know what? If you do not get it working you won't sell a single copy. However the choice is up to you. If you want help, formulate your questions clearly. Post exact code portions that are not working. Ask for help then. Otherwise you will need to fix your stuff alone I am afraid.

Malte

Problem with compiled prog

Posted: Tue Mar 11, 2008 9:59 pm
by bjb007
The code is simple. The "mouseUp" is
the same for all 36 buttons.

on mouseUp
put label of me into aNumber
get functionList(aNumber)

do a couple of other things not relevant...
end mouseUp

functionList is in the stack script.

First function is getData which adds
aNumber to the field.

One button didn't do this, the other
35 did.

Code same for all buttons....

So the question is: "If it worked
for 35 buttons why not for 36?"

And "Why did 36 buttons work when
re-compiled with the same code?"

Malte: It is working.
Tom: Not doing any of those - I'm
not clever enough.

Posted: Tue Mar 11, 2008 10:29 pm
by mcgrath3
I would watch out for reserved words like get etc. as the first part of a function. But that is probably not the case here.
Have you tried walking through the script with the debugger on?

What about deleting and replacing the one button?

Since the problem is intermittent I would suspect an overlooked small change that at first looks right. I tend to have this happen to me. I 'swear' the objects are the same and then after frustration sets in I get the Oh there it is problem.

Problem with compiled prog

Posted: Tue Mar 11, 2008 10:48 pm
by bjb007
mcgrath3

As I mentioned above I looked
at the code, found nothing amiss
then re-compiled. Then the button
worked.

Guess it'll remain a mystery but as
it's happened twice I'll just have to
test the exe every time I compile.

Posted: Wed Mar 12, 2008 2:33 pm
by SparkOut
I wonder... and can only make a vague guess, for obvious reasons...

In the IDE it's easy to select objects, push them around, open properties, close properties, adjust things, which apparently have no effect on the look and operation.

You can affect the layer orders in doing this though.

I wonder if you had the button at a lower layer than some other object like a transparent image border, for example, which prevented the mouseDown/Up events from reaching the button object you wanted. When you had another look in the IDE, selected the button, checked it and recompiled, the position of the button may have been brought back to the fore again.