Setting script in object not working...

Glen Bojsza gbojsza at gmail.com
Wed Mar 21 18:25:14 EDT 2012


Thanks Alex, I will try the behavior path...

The funny thing is I swear that this was working in earlier versions. I
even created a new simple stack with two buttons and a field.

the stack has a customproperty call mymessage

mymessage is

on mouseUp
put "hello" into fld tOut
end mouseUp

button "start" has the following script

on mouseUp
set the script of btn "test" to the mymessage of stack tmirror
end mouseUp

Pressing button "start" sets the script of button "test" with the
customproperty.

Pressing button "test" puts "hello" into fld tOut

It works for both ide and the application.

So some how my main project stack has something that changes when made into
an application... I confirmed this with adding a test button to output the
images' scripts... they were all empty?

It is hard to trouble shoot an app if it works in the ide.

The behavior path is a good idea as it might point to where the issue lies.

thanks,

Glen


On Wed, Mar 21, 2012 at 4:11 PM, Alex Tweedly <alex at tweedly.net> wrote:

> Sounds like you're running into something to do with scriptlimits (though
> I don't see why when you have a very simple short script).
>
> It's not clear from your description whether the script you want to set is
> known ahead of time and simply stored in custom property, or whether it is
> genuinely dynamic. Would you be able to, rather than set the script of each
> image, simply set the behaviour of the image to some (pre-created) button
> with the appropriate script already in place?
>
> -- Alex.
>
>
> On 21/03/2012 22:01, Glen Bojsza wrote:
>
>> Hello,
>>
>> I have a stack where I generate a series of images.
>>
>> I then set the script of each image to a script that is stored in a custom
>> property.
>>
>> In the ide the script works when you click an image and when you inspect
>> the image's script in the script editor it is there.
>>
>> But when I take the stack and make it into an application it looks as if
>> the images contain no script because when an image is clicked nothing
>> happens.
>>
>> I have tried making the script very simple ie
>>
>> on mouseUp
>> answer "Success" with "OK"
>> end mouseUp
>>
>> Again this works in the ide but not in the final application?
>>
>> I have tried several other methods such as adding a button that I can
>> manually test in the application to copy a script to an image but this
>> fails?
>>
>> Has anybody experienced this before or have any suggestions?
>>
>> thanks,
>>
>> Glen
>> ______________________________**_________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/**mailman/listinfo/use-livecode<http://lists.runrev.com/mailman/listinfo/use-livecode>
>>
>>
>
> ______________________________**_________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/**mailman/listinfo/use-livecode<http://lists.runrev.com/mailman/listinfo/use-livecode>
>



More information about the use-livecode mailing list