Is there a way to display the "Untitled" string in ask file

Deploying to Mac OS? Ask Mac OS specific questions here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Is there a way to display the "Untitled" string in ask file

Post by Mag » Wed Aug 13, 2014 10:12 pm

Hi all,

lot of OS X applications when you create a new document set its suggested name as "Untitled" by default (for example Apple Pages). I noticed that this is not possibile in LiveCode. Somebody know if there is some workaround?

Code: Select all

    ask file "Save as" with "Untitled" -- don't show the string "Untitled"
    ask file "Save as" with "Untitled 2" -- works

Axel-Erfurt
Posts: 2
Joined: Wed Jul 30, 2014 2:30 pm
Location: Erfurt, Germany
Contact:

Re: Is there a way to display the "Untitled" string in ask f

Post by Axel-Erfurt » Wed Aug 13, 2014 11:01 pm

if you add a file extension it works

for example

Code: Select all

ask file "Save as" with "Untitled.txt" as sheet

WaltBrown
Posts: 466
Joined: Mon May 11, 2009 9:12 pm
Location: NE USA

Re: Is there a way to display the "Untitled" string in ask f

Post by WaltBrown » Thu Aug 14, 2014 2:37 am

FYI, on Win7 it does put the word "Untitled" in the standard file dialog when I use your code. Anyone have a Linux report?

Interesting note in the Dictionary entry on "ask file":
Cross-platform note: On Mac OS systems where Navigation Services is in use, if you don't specify a default file name, the file name box contains "untitled". On Unix and Windows systems, the file name box is empty when the dialog box appears. Unix systems currently use LiveCode's built-in dialog box.
Maybe it's a Mac specific issue? What does the Mac display when you leave it empty, or use

Code: Select all

ask file "Save as" with empty
The Dictionary implies the Mac should then report the word "untitled" (which I cannot test right now) but Win7 still presents an empty path in the dialog box.
Walt Brown
Omnis traductor traditor

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6518
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Is there a way to display the "Untitled" string in ask f

Post by dunbarx » Thu Aug 14, 2014 3:51 am

Hi.

This works for me, either case. OSX 10.6.8, MacBook Air.

You are saying that the addition of the "2" makes the default text appear, but it is empty without it?

Craig Newman

Post Reply

Return to “Mac OS”