Problem with script working in IDE but not in Standalone studio 4
J. Landman Gay
jacque at hyperactivesw.com
Sat Jul 3 13:53:34 EDT 2010
Steve King wrote:
> Hi
>
> I have a button scrip that did work in standalone, and always works in the
> IDE but now will not work in the standalone!
>
> The card has several fields in two sets that take action when data is
> entered, fields are set so that retunr gives Close Field message.
>
> I then have a radio button that selects either set 1 or set 2 fields, Each
> of the two buttons has the same script (below) that simply sends CloseField
> to each of the fields so that they update themselves.
>
> on mouseUp
> send CloseField to fld "18m"
> send CloseField to fld "15m"
> send CloseField to fld "12m"
> send CloseField to fld "9m"
> send CloseField to fld "6m"
> send CloseField to fld "3m"
> send CloseField to fld "ABT"
> send CloseField to fld "ABT_B"
> send CloseField to fld "RNT"
> send CloseField to fld "RNT_B"
> send CloseField to fld "Depth"
> send CloseField to fld "Depth_B"
> end mouseUp
>
> It works fine in the IDE but will not work when in a Standalone. Oddly, the
> Flds "18m" though to "3m" do seem to work, the others don't!
>
> For info script of fld "BT" is (which doesn't update fld "Image_depth"
>
> On CloseField
> if the highlight of button "Nominal" of group "Dive_Plan" then
> put fld "Depth" & "m" into fld "Image_Depth"
> else
> put fld "Depth_B" & "m" into fld "Image_Depth"
> end if
> end CloseField
>
> And script of fld "18m" is (which does update fld "Image_18m)
>
> on CloseField
> if the highlight of button "Nominal" of group "Dive_Plan" then
> put Nom_Stop & return into fld "Image_18m"
> else
> put Back_Stop into fld "Image_18m"
> end if
> end CloseField
>
> Anyone seen this before and have any suggestions??
I'm not sure why it would work one place and not another, but there is a
difference in how you are getting your content. In the one that works,
you're using a variable. In the one that doesn't you're using:
fld "Depth" & "m"
This may cause the engine to look for a field named "depthm" which
doesn't exist. Instead, try forcing the field name this way:
put (fld "Depth")& "m"
or you could use two lines:
get fld "Depth"
get it & "m"
Just a stab in the dark, probably won't matter, but it's worth a try.
There shouldn't be any difference in how the engine evaluates that
statement really.
Another thing to try is to get the result after each of the lines that
don't work, and if the result isn't empty, show it in an answer dialog.
That way you may see a reason for the failure.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list