rejetto forum

macro 'set item'

Mars · 3 · 3705

0 Members and 1 Guest are viewing this topic.

Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
there is nothing to remove those flags:
Quote
  if cmd = 'hide' then
    include(f.flags, FA_HIDDEN);
  if cmd = 'hide tree' then
    include(f.flags, FA_HIDDENTREE);
  if cmd = 'no log' then
    include(f.flags, FA_DONT_LOG);
  if cmd = 'not as download' then
    if f.isFile() then include(f.flags, FA_DONT_COUNT_AS_DL)

and with the last 'if' when 'not f.isfile' , has a link a download mask?
 else f.dontCountAsDownloadMask:=first(par(2), '*');


Quote
  if cmd = 'hide' then
    include(f.flags, FA_HIDDEN);
  if cmd = 'hide tree' and f.isfolder() then
    include(f.flags, FA_HIDDENTREE);
  if cmd = 'no log' then
    include(f.flags, FA_DONT_LOG);
  if cmd = 'not as download' then
    if not f.isFolder() then include(f.flags, FA_DONT_COUNT_AS_DL)


why not have the possibility to use all commands in a one line?    cmd:=par(1);
{.set item|%item%|hide=[0,1]|hide tree=[0,1]|no log=[0,1]|not as download=[0,1,mask]|access=liste|delete=liste|upload=liste| .....  .}

0= reset flag , 1= set flag
not as download=[0,1,mask] 
 0=remove this flag (files) or reset the download mask (folders)
 1=set this flag (files)
 mask= set the download mask (folders)


one way for the three first flags?

Quote
  try if isTrue(parEx('hide')) then include(f.flags, FA_HIDDEN)
      else exclude(f.flags, FA_HIDDEN);
  except end;
  if f.isfolder then
    try if isTrue(parEx('hide tree')) then include(f.flags, FA_HIDDENTREE)
         else exclude(f.flags, FA_HIDDENTREE);
  except end;
  try if isTrue(parEx('no log')) then include(f.flags, FA_DONT_LOG)
      else exclude(f.flags, FA_DONT_LOG);
  except end;




Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
at the time there was no "named parameters" feature.
thanks for suggesting, time to update. ;)


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
translation from Topic (Italiano) : + new {.set item.}

Quote from: FRENCH CAN CAN
To understand, with this new {.set item.} should you/he/she be all right as I write under for not making the download of the contained fileses in the briefcase "video?" I have tried in this way and it seems that you work, if possible confirm me the thing and if you/he/she will be maintained {.set item.} in this way, I must modify the Template because with the old way it tells me that the macros are deprecate. Hi, French. ;)

[special:import]
{.add folder|real|..}
{.set item|/video|hide=1.}
{.set item|/video|no log=1.}
{.set item|/video|not as download=*.}

Quote from: rejetto
yes, it seems ok but you can so more synthetically write also

{.set item|/video|hide=1.|no log=1.|not as download=*.}

Quote from: FRENCH CAN CAN
You also to me OK seems and works, does he/she know me that I must modify the Template, you have also thought for resolving the problem that the briefcase is not adjourned if the virtual file system contains a precedent briefcase of peer name?