Standalone opens stack and then quits

Bill Vlahos bvlahos at mac.com
Wed Oct 13 02:01:22 EDT 2004


Ken,

Thanks for the suggestion but it still has the same problem.

Bill Vlahos

On Oct 12, 2004, at 10:51 PM, Ken Ray wrote:

> On 10/13/04 12:30 AM, "Bill Vlahos" <bvlahos at mac.com> wrote:
>
>> I have a standalone which is built primarily to be the engine so it 
>> can
>> open a stack which can save its data. If I build a standalone with the
>> following in the stack script it works fine as long as the "stack.rev"
>> file is at the same level as the standalone:
>>
>> on OpenStack
>>    open stack "stack.rev"
>> end OpenStack
>>
>> However, what I want to do is have the standalone give me the ability
>> to select which stack(s) I want it to open. It does, in fact, open it,
>> but then it immediately quits taking both the standalone and the stack
>> down. I can't figure out why it is quitting. There is no quit stack
>> command and it does correctly open the stack I select.
>>
>> Stack Script:
>> on OpenStack
>>    set the defaultFolder to "DataFolder" -- data folder at same level 
>> of
>> standalone
>>    put the files into field "fListFiles" -- puts a list of files in a
>> list field
>> end OpenStack
>>
>> Button Script:
>> on mouseUp
>>    put the hilitedLines of fld "fListFiles" into tList -- the selected
>> line(s) in the field
>>    repeat with x = 1 to the number of items in tList
>>      put (line (item x of tList) of field "fListFiles") into tpath
>>      open stack tPath
>>    end repeat
>> end mouseUp
>>
>> This is driving me crazy. It actually opens the file I want (I can see
>> it flash) but then quits.
>
> Bill - I think what's happening is that when you open another stack, it
> kicks off the openStack handler above in the standalone and you get 
> into a
> loop until it dies.
>
> So I'd change your handler to:
>
> on openStack
>   if the owner of the target is me then
>     set the defaultFolder to "DataFolder"
>     put the files into field "fListFiles"
>   else
>     pass openStack
>   end if
> end openStack
>
> Ken Ray
> Sons of Thunder Software
> Web site: http://www.sonsothunder.com/
> Email: kray at sonsothunder.com
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution



More information about the use-livecode mailing list