` Printed Icetips Article

Icetips Article



ABC: Assigning filenames to Alias files
2002-04-02 -- Maurice L. Pilotte
 
Newsgroups: TopSpeed.Topic.Suggestions

Hello Trevor:

> Would it be possible to have a NAME parameter for alias files. Clarion
> already maintains a separate buffer for aliases, if we had the choice of
> having the alias inherit its NAME from the parent file, or have its own
> aulified file & pathame,
>
> Thus the alias could (at times) be looking at one & the same file as thr
> parent, and (at other times) be looking at a completely separate file.
>
> The Appgen already codes the alias file with the same NAME parameter as
the
> parent, why not have it's own?
>
> This would be good for file transfer, archiving, file comparison, notebook
> docking & backup programs, and should be file driver independant.

I have not tried this in C5.5, but this works in C5. The problem with simply
allowing you to enter a global variable in a NAME parameter for an alias
file is that the code generated assigns the file I/O to the FileManager
class of the aliased file.

Like I said, the following works in C5 and I don't know if there have been
any code changes in C5.5.

Hide:Access:.Open PROCEDURE

In the root app, in the global embeds for the FileManager objects (before
parent call) I added the following code:

  SELF.FileName    &= 
  SELF.AliasedFile &= NULL

Maybe this will point you in the right direction.

Maurice



Printed May 5, 2024, 8:09 pm
This article has been viewed/printed 35124 times.
Google search has resulted in 12 hits on this article since January 25, 2004.