open stack problem

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

open stack problem

Bob Hartley
Hi Al.

OK I haev a stack I haev created and I open this from a standalone.
Now I have a problem, when I try to open it the stack does not open. I have
not changed the code but it just wont work now. I have not changed the
version of runrev either.

At work I had the same problem and I copied and pasted in the same code and
it worked.

Can anyone spot the obvious mistake?

I have a button with this script

on mouseUp
  doFileOpen
end mouseUp

And in the stack script

on doFileOpen
    answer file "Select a database file:" \
        with filter "Armbase Database File" & return & "*.abd"
  if it is empty then exit to top
  toplevel stack it
end doFileOpen

I even commented out the if it is empty line with no luck either.

Is there a problem with this script?

I cant see any
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: open stack problem

Klaus major-k
Hi Bob,

> Hi Al.

although my name is not Al, I will try to answer ;-)

> OK I haev a stack I haev created and I open this from a standalone.
> Now I have a problem, when I try to open it the stack does not  
> open. I have
> not changed the code but it just wont work now. I have not changed the
> version of runrev either.
>
> At work I had the same problem and I copied and pasted in the same  
> code and
> it worked.
>
> Can anyone spot the obvious mistake?
>
> I have a button with this script
>
> on mouseUp
>   doFileOpen
> end mouseUp
>
> And in the stack script
>
> on doFileOpen
>     answer file "Select a database file:" \
>         with filter "Armbase Database File" & return & "*.abd"
>   if it is empty then exit to top
>   toplevel stack it
> end doFileOpen
>
> I even commented out the if it is empty line with no luck either.
>
> Is there a problem with this script?

Yep, the RETURN is wrong...

Try this:
...
with filter "Armbase Database File,*.abd"
...

> I cant see any

Regards

Klaus Major
[hidden email]
http://www.major-k.de

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: open stack problem

Bob Hartley
You wrote:

> Hi Bob,
>
> > Hi Al.
>
> although my name is not Al, I will try to answer ;-)

:-)

OK Hi all

> >
> > I have a button with this script
> >
> > on mouseUp
> >   doFileOpen
> > end mouseUp
> >
> > And in the stack script
> >
> > on doFileOpen
> >     answer file "Select a database file:" \
> >         with filter "Armbase Database File" & return & "*.abd"
> >   if it is empty then exit to top
> >   toplevel stack it
> > end doFileOpen
> >
> > I even commented out the if it is empty line with no luck either.
> >
> > Is there a problem with this script?
>
> Yep, the RETURN is wrong...
>
> Try this: ... with filter "Armbase Database File,*.abd" ...

I tried this Klaus but no luck

the only one I now get to work is

answer file "Select a database file:" \
         with filter "*.abd"
         --with filter "Armbase Database File" & return & "*.abd"
          --with filter "Armbase Database File" & "*.abd"
   if it is empty then exit to top
  put it into tFileName
  toplevel stack it
end doFileOpen

I get a dialogue box but when I click on "open" I dont get a stack. It may
be a stack corrupt problem since I can open one with a different name from
the default, however, even if I delete the previous default mydatabase.abd
and resave a new one I still can't open it?? Weird



All the best
Bob

>
> > I cant see any
>
> Regards
>
> Klaus Major [hidden email] http://www.major-k.de
>
> _______________________________________________ use-revolution mailing
> list [hidden email] Please visit this url to subscribe,
> unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: open stack problem

Sarah Reichelt
In reply to this post by Bob Hartley
> I have a button with this script
>
> on mouseUp
>   doFileOpen
> end mouseUp
>
> And in the stack script
>
> on doFileOpen
>     answer file "Select a database file:" \
>         with filter "Armbase Database File" & return & "*.abd"
>   if it is empty then exit to top
>   toplevel stack it
> end doFileOpen
>
Hi Bob,

A couple of suggestions:

Are you using Rev 2.6? If so, there have been changes in the answer  
file filtering. They are detailed in the What's New text file.

What happens if you use no filtering and allow any file type to be  
selected?

Get your routine to "put" the file path before trying to open it and  
see if that looks correct.

Cheers,
Sarah

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: open stack problem

Robert Brenstein
In reply to this post by Bob Hartley
>
>I tried this Klaus but no luck
>
>the only one I now get to work is
>
>answer file "Select a database file:" \
>          with filter "*.abd"
>          --with filter "Armbase Database File" & return & "*.abd"
>           --with filter "Armbase Database File" & "*.abd"
>    if it is empty then exit to top
>   put it into tFileName
>   toplevel stack it
>end doFileOpen
>
>I get a dialogue box but when I click on "open" I dont get a stack. It may
>be a stack corrupt problem since I can open one with a different name from
>the default, however, even if I delete the previous default mydatabase.abd
>and resave a new one I still can't open it?? Weird

The problem might be with your using extension "abd" instead of "rev"
for a stack.

It is safer to check after answer file with

  if the result is "cancel" or it is empty then exit ...

Robert
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution