This repository has been archived by the owner on Aug 31, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto-merge pull request #3044 from montegoulding/feature/represented_…
…filename [[ DocumentFilename ]] Add documentFilename property As discussed on the engine forums I have implemented a documentFilename property which sets the represented filename of the window on mac. I'm happy to look at other platforms if they support anything like this but I haven't found anything thus far.
- Loading branch information
Showing
18 changed files
with
214 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
Name: documentFilename | ||
|
||
Type: property | ||
|
||
Syntax: set the documentFilename of <stack> to <filename> | ||
|
||
Summary: Specifies the file path to the file that the stack represents. | ||
|
||
Associations: stack | ||
|
||
Introduced: 8.0.0 | ||
|
||
OS: mac,windows,linux,ios,android | ||
|
||
Platforms: desktop | ||
|
||
Example: | ||
answer file "Open document" | ||
if it is not empty then | ||
put it into theFilename | ||
set the documentFilename of stack "Template Document Editor" to theFilename | ||
clone stack "Template Document Editor" | ||
end if | ||
|
||
Example: | ||
put the documentFilename of this stack into theFilename | ||
if theFilename is not empty then | ||
# load data from file | ||
try | ||
put arrayDecode(url ("binfile:" & theFilename)) into theDataA | ||
# load the data into the UI | ||
UpdateWithData theDataA | ||
catch error | ||
# file corrupted | ||
end try | ||
end if | ||
|
||
Parameters: | ||
Stack: The name or ID of the stack. | ||
Filename: The full or relative path to the document. | ||
|
||
Description: | ||
Use the <documentFilename> property to associate a stack being presented to the | ||
user with a document on disk. | ||
|
||
On mac setting the <documentFilename> property will set the represented filename | ||
of the window. The window will show an icon for the file next to the window | ||
title. | ||
|
||
On other platforms there is no visual representation of the association between | ||
the stack and the document filename but the property may still be used to manage | ||
the association. | ||
|
||
>*Note:* The <documentFilename> property is not persistent (not saved into the stackfile). | ||
|
||
Tags: windowing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# documentFilename property | ||
|
||
A new property has been added to specify the file path to the file that a stack | ||
represents. | ||
|
||
On mac setting the documentFilename property will set the represented filename | ||
of the window. The window will show an icon for the file next to the window | ||
title. | ||
|
||
On other platforms there is no visual representation of the association between | ||
the stack and the document file but the property may still be used to manage | ||
the association. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.