Some questions

Jan Schenkel janschenkel at yahoo.com
Sat Dec 6 06:41:09 EST 2003


--- On Sat, 06 Dec 2003, shishilite at hotpop.com wrote:
> Hi Jan,
> 
> I sent the following 2 questions to the Runrev
> mailing list but I have not
> received any response so far.
> 
> You seem like an RR expert :) based on your answers
> in the mailing list, as
> well as very helpful, so I was hoping you can shed
> some light on these
> problems:
> 
> 1. I'm currently using the fontNames() to show a
> list of fonts in the
> system. How do I display the font face previews
> within the option menu? i.e.
> In Microsoft Word, when you click on the Font
> pulldown, you will see the
> word "Arial" in Arial font face, "Verdana" in
> Verdana font face, etc.
> 
> 2. I would like to show a list of files in a
> directory and display the
> correct icon next to each file (in both Windows and
> Mac).
> 
> So, how do I do this? I know how to show the file
> listing, but I don't know
> how to obtain the appropriate icon for each file.
> 
> Thanks in advance for your help and looking forward
> to hearing from you.
> 
> Shishi
> 

Hi Sishi,

Thanks for the compliments regarding my technical
knowledge ; however, the fact that I happen to know a
few things about a particular domain (databases/report
builder) doesn't make me an overall expert, I'm afraid
(for example, I know little to nothing about the
animation manager).

While it is true that it may take the list some time
to pick up on certain questions (especially
non-trivial ones), someone will step up to offer some
sort of assistance in the next two or three days.

If you want individual assistance, I'm sure one of the
consultants on the Revolution webpage will be more
than happy to collaborate with you on your project as
contract work for a reasonable price. Direct link :
<http://www.runrev.com/revolution/developers/links/consultants.html>

Now, to get back to your questions :

1) An option menu can only have one font. As Ken
suggested, you could use a menu-stack, but this
particular case is very complicated. It might be
better to provide a Font settings dialog.
Here's a little script that fills up a field named
"FontNames" with the names of all the installed fonts,
and allows a limited preview :
--
  put the fontNames into tFontNames
  put tFontNames into fld "FontNames"
  put the number of lines of tFontNames into tTotal
  repeat with i = 1 to tTotal
    set the textFont of line i of fld "FontNames" \
        to line i of tFontNames
  end repeat
--

2) Retrieving the correct icons for files on Windows
as well as MacOS pre-X, and MacOS X is a different
task for each platform, and a quick search through the
archives shows no one that has accomplished it so far.
Direct link for searching the archives :
<http://mindlube.com/cgi-bin/search-use-rev.cgi>
Would it suffice to just use the standard 'Open file'
dialog box ? That can be achieved by using the 'answer
file' command. Here's an example :
--
  answer file "Please select a file to open"
  # first check if the user canceled
  if it is empty then exit to top
  # otherwise copy the file path into a variable
  put it into tFilePath
--

Best regards,

Jan Schenkel.

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree


More information about the use-livecode mailing list