Strange Icon Behavior

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

matgarage
Posts: 64
Joined: Sat Apr 20, 2013 11:39 am
Location: France

Strange Icon Behavior

Post by matgarage » Mon Jul 02, 2018 3:29 pm

Hello ,
I don't know if i'm in the correct section for this question...

I've correctly set icons for both MAC and PC version of my app. The document are saved with .dvi extension.
When I generate document from the app on windows environnement, the document icon is correctly displayed. But on Mac environment , the icon is not displayed. It's a generic blank document icon instead.
The strange things is when I drag a .dvi document from Parallel Destop PC to Mac desktop , the icon is correctly displayed.

An idea ?

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Strange Icon Behavior

Post by richmond62 » Mon Jul 02, 2018 5:55 pm

The document are saved with .dvi extension.
Which document is that?

matgarage
Posts: 64
Joined: Sat Apr 20, 2013 11:39 am
Location: France

Re: Strange Icon Behavior

Post by matgarage » Mon Jul 02, 2018 6:18 pm

It's a simple text (csv) document of settings data.

Code: Select all

put tFileContents2 into URL ("file:" & tFileName & ".dvi")
I'm using the .dvi extension only to control the validity of the document before importing it again in the app.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Strange Icon Behavior

Post by richmond62 » Mon Jul 02, 2018 6:51 pm

I honestly don't see what that has to do with icons not showing up in standalones.

I regularly save standalones of my Devawriter Pro for
Windows and Macintosh on a Macintosh computer and set the icons via the standalone builder,
and the "magic just happens".

Aaaaah . . . wait a moment (been a bit 'thick" over here) . . .
you are writing about exporting documents from a LiveCode standalone.

The funny thing is that I have exported many, many documents from a variety of standalones,
but always as RTF, HTML, PNG, GIF or JPG documents, at which point they have always
appeared on my desktop with the icons of whichever is my dominant app fro dealing with
documents of that format.

I have NEVER tried exporting what we could term "species-specific documents" with a proprietary icon.

I wonder who has?

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Strange Icon Behavior

Post by richmond62 » Mon Jul 02, 2018 7:04 pm

HOWEVER, one thing that does occur to me is that the suffix .dvi is a suffix that most computer systems
will associate with something other than a LiveCode standalone:

https://ccm.net/faq/2292-how-to-open-re ... on-windows
DVIis the acronym for the Device Independent file format, which is the output file format for documents written in LaTeX. These files are essentially binary files. LaTeX file.Tex creates this file. To see the .DVI file on the Windows platform, the download and installation of MiKTex is a must.
Now I don't know if, for the sake of argument, your Windows system associated documents with various suffixes with various applications (err, isn't that the point of those suffixes?), but if it does then it will either assign a predetermined icon to a .dvi document, or a generic thing.

http://filext.com/file-extension/DVI

Presumably you document exported from your LiveCode standalone is NOT something containing digital video?

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Strange Icon Behavior

Post by jacque » Tue Jul 03, 2018 8:05 pm

Is your document icon an .icns file? Have you entered the document type and extension in standalone settings?

I agree you should create a different extension. They can now be longer than three characters, which narrows the chance of other apps using the same document type. LiveCode stacks have an extension of ".livecode" for example.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

matgarage
Posts: 64
Joined: Sat Apr 20, 2013 11:39 am
Location: France

Re: Strange Icon Behavior

Post by matgarage » Wed Jul 04, 2018 9:15 am

Ok,
I've tried with a different suffix : .dvinc and I've got the same result.
@jacque : for the document type in standalone settings, I have to put "txt,cvs" ?

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Strange Icon Behavior

Post by richmond62 » Wed Jul 04, 2018 11:01 am

I'm not jacque (something I'm sure both she and I are glad about 8) ),
but here's a few thoughts anyway:

http://lessons.livecode.com/m/4603/l/68 ... n-settings

which, oddly enough, doesn't say anything re document types.

HOWEVER, I'm sure putting two suffixes divided by a comma is going to result in something odd.

txt,cvs > document.txt,cvs

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Strange Icon Behavior

Post by richmond62 » Wed Jul 04, 2018 11:13 am

I know that a txt suffix will result in the document to whose name it is appended will end up being treated as a PLAIN TEXT document,

and a cvs suffix will result in a document being treated as a Canvas 3 image file.

https://fileinfo.com/extension/cvs

What a "hybrid" txt,cvs file would be is anyone's guess.

It "just might be" that you are being a "bit silly" and what you are trying to do is make a
comma delimited text file which is described as a CSV file.

Check out the Wikipedia article on this quickly before the European Parliament throw a spanner in the works:

https://en.wikipedia.org/wiki/Comma-separated_values
-
Screen Shot 2018-07-04 at 1.09.01 pm.png
-
What is clear is that a CSV text file is still "just" a text file, so messing around in the LiveCode standalone builder with "txt,csv" won't do you any good at all.

As you are trying to export comma delimited text files I really wonder why you are bothering
with "icons-N-stuff" in the standalone builder. Over "here" on my antiquated Macintosh any
text file ends up with a generic text-file icon assigned to it by part of the operating system
(on a Mac that bit is called the 'Finder') regardless of its origin.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Strange Icon Behavior

Post by richmond62 » Wed Jul 04, 2018 11:17 am

As a Comma-separated value text file is NOT standardised just save your data into a standard text file, making sure that the items you want separated are separated by commas.

Then, when your standalone imports those text files it earlier exported you just make sure your code "chops things up" the way you want it by using the commas as item-delimiters.

As a comma is the default item delimiter in LiveCode this should be easy-peasy.

matgarage
Posts: 64
Joined: Sat Apr 20, 2013 11:39 am
Location: France

Re: Strange Icon Behavior

Post by matgarage » Wed Jul 04, 2018 1:20 pm

richmond62 wrote:
Wed Jul 04, 2018 11:13 am

It "just might be" that you are being a "bit silly" and what you are trying to do is make a
comma delimited text file which is described as a CSV file.
You're right, it's the result of a dyslexic or "fat fingers" syndrome, sorry :)
The data exported in the file are an hybrid between cvs, in the first part, and tabulated text for the rest.

I would want my exported file in a special format to be sure that only the exported data from the standalone could be imported later.

The strange thing : an exported file generated on windows version of the standalone got a blank icon. When I drag it from Parallels Desktop PC to the OS X desktop, the correct icon is displayed (???)

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Strange Icon Behavior

Post by jacque » Wed Jul 04, 2018 9:22 pm

matgarage wrote:
Wed Jul 04, 2018 9:15 am
Ok,
I've tried with a different suffix : .dvinc and I've got the same result.
@jacque : for the document type in standalone settings, I have to put "txt,cvs" ?
The document type is the old 4-character OS 9 type, registered with Apple and not much used any more; in LC it is "RSTK". OS X will fall back to using this if the extension isn't available. Apple still allows you to register a document type although the place to do that is deeply hidden and no longer supported. The signature is similar, a 4-character registered signature; in LC it is "Revo". I believe you can now enter anything you want without registering but if your string matches another installed app there can be conflicts. You should be able use "????" for both the document and signature types without any issues, it's the wildcard entry. OS X will almost always just use the extension for identification anyway.

The document extension should be "dvinc" (no period.) The document icon must be an .icns file containing several specified sizes of the image.

Windows uses a different type of icon file, and I'm guessing Parallels is converting it to a Mac-style icon and making the translation for you when you copy the app to the Mac.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

matgarage
Posts: 64
Joined: Sat Apr 20, 2013 11:39 am
Location: France

Re: Strange Icon Behavior

Post by matgarage » Thu Jul 05, 2018 9:10 am

Ok Jacque, I will set document type and signature with "????" and use "dvinc" as extension.
I think you just solved my "mysterious icon displaying behavior" case = parallels Desktop do the job.

This problem of icon is cosmetic, so if the "????" don't do it, I will keek, this wonderful, neutral, elegant, standard icon. :wink:

Thank you

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Strange Icon Behavior

Post by richmond62 » Thu Jul 05, 2018 10:51 am

I will keek
That's really odd as it looks like a hybrid between Scots "keek" and Nederlaans "kijk",
but here it is not clear what it means.

matgarage
Posts: 64
Joined: Sat Apr 20, 2013 11:39 am
Location: France

Re: Strange Icon Behavior

Post by matgarage » Thu Jul 05, 2018 4:34 pm

i will keep :oops:

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”