filechooser questions and possible bugs

Hi,

this is what I need to do when saving a file (triggered by a button push):
1 - if the current toename is “untitled.toe” then I assume it’s never been saved (QUESTION1: unless Derivative can suggest another way to figure out whether or not a file has been previously saved)
2 - so I call the filechooser (QUESTION2: How do I set the name of the fchooser window to say “Save As…” ?) passing it “.toe" as file filter
3 - QUESTION3: when the toename is E:/untitled.toe, then toename only returns /untitled.toe, not E:/untitled.toe. Is that correct?
4 - QUESTION4: I have (by accident) a toename returning /untitled.toe (the above, E:/untitled.toe). But when I type filechooser -s / -f "
.toe” it still shows me the $TOUCH window - why?

I have more weird behaviors but may post them later.
d

  • Can’t think of a way right now, seems like PREV_TOENAME should be blank in this case, but it isn’t yet.
  • Can’t be done yet. I’ll add a -t option that allows you to set the title of the dialog.
  • Do you mean $TOENAME has been set at /untitled.toe? Or is the path returned by the file dialog is /untitled.toe? Both seem wrong to me. Let me know which is the case.

-s / wouldn’t resolve to anything, so it must be defaulting to $TOUCH.

I can’t remember how I got there now… darn.

But I just tried Save As… (from the regular menu), browsed to C:/ and saved dcjnk.toe

now toename prints:

C:\dcjnk.toe

so there seems to be two behaviors:

when I load the file, toename returns forward slashes.

if I save as, then toename will start to return backslashes (even if I save as where touch should find an env variable matching that path, with fwd slashes).

that inconsistency is probably something to be avoided.

Yup you’re right.
Here’s what I’ve done:
toename should always have /.
toename will always return the full path of the toe file. It used to only return ‘untitled.toe’ on startup. It will always return the full path now.
toename will automatically expand a path you give it, so if you do
toename blah.toe
It’ll expand the path to be the full path.
I noticed that toename and $TOENAME have different behaviors. toename will return the filename with the sequence number (untitled.10.toe),
while $TOENAME always returns just the base name. I’ll need to ask around and see how we want to resolve the inconsistency.

great thanks.

I’m leaving further work on that section until I get my hands on the next release, because right now there’s too many little issues (also see the toefile I’ve sent you guys yesterday - different issue, same area - drop down menu problems).

BTW, is there a way y’all can email to the list when a new version is on the web site for download? It’ll help us to avoid having to check every now and then or bug you about “when’s the next release coming out? Are we there yet? Are we there yet??” :slight_smile:

tx
d

If you subscribe to the News And Annoucement’s forum, you’ll get an email each time we post a new build. Just go to that forum and at the bottom of the page (way at the bottom) there is a ‘Subscribe Forum’ link.

Probably the easiest way until we decide if we want to emails users with new version annoucements.