Messaggio di errore

Access denied. You may need to login below or register to access this page.

Access Denied / User log in

Please let our ADS show!

This sites offers only FREE software and it's supported by a few advertisement boxes (no intrusive popups).
Please:

  • disable your AdBlocker by adding CoolSoft website to whitelist
  • give the proper cookie consent
  • enable JavaScript for this website

This seconds wait is to let you update your browser configuration...

Ok, I've done the required changes... now show me your content!
!!! Please enable JavaScript !!!

Login rapido

Usa il tuo social account esistente ed accedi senza bisogno di registrazione: nessuna conferma, nessuna nuova password da ricordare, veloce, facile e sicuro.

...oppure usa un account CoolSoft

Inserisci il tuo nome utente CoolSoft.
Inserisci la password associata al tuo nome utente.
Add reply | CoolSoft

Add reply

Please let our ADS show!

This sites offers only FREE software and it's supported by a few advertisement boxes (no intrusive popups).
Please:

  • disable your AdBlocker by adding CoolSoft website to whitelist
  • give the proper cookie consent
  • enable JavaScript for this website

This seconds wait is to let you update your browser configuration...

Ok, I've done the required changes... now show me your content!
!!! Please enable JavaScript !!!
(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.

Warning!

You're posting your message as anonymous user.

By registering you'll be allowed to receive notifications of post replies and new threads.
Registration is really quick and only requires you to choose an username and provide a valid email address.

Click here to to register.

A confirmation mail will be sent to this address.
Your email address won't be published.

Altre informazioni sui formati del testo

Filtered HTML

  • Elementi HTML permessi: <a> <blockquote> <br> <cite> <code> <dd> <del> <dl> <dt> <em> <img> <li> <ol> <p> <pre> <s> <span> <strike> <strong> <ul>
    Allowed Style properties: background-color, color, font-size, font-style, height, text-align, text-decoration, text-transform, width
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <pre>, <c>, <cpp>, <csharp>, <drupal5>, <drupal6>, <javascript>, <php>. The supported tag styles are: <foo>, [foo].
  • Indirizzi web o e-mail vengono trasformati in link automaticamente
  • Linee e paragrafi vanno a capo automaticamente.

Plain text

  • Nessun tag HTML consentito.
  • Indirizzi web o e-mail vengono trasformati in link automaticamente
  • Linee e paragrafi vanno a capo automaticamente.
CAPTCHA
Questa domanda serve a prevenire lo spam e gli accessi non autorizzati.
Annulla
Posts: 1972
Joined: 25 Mar 2012 - 01:19
Re: Change or Add new Script Location

Yes, sort of.

And you should keep your show/abort logic outside the dialog files.

Posts: 5
Joined: 3 Ott 2018 - 15:39
Re: Change or Add new Script Location

That workaround is working great. Saving a ton of time not having to redo that everytime I adjust the page.

Thanks for that!

I am curious though if there is a better way to do it.

I think what you are referring to would be to either use Page or PageEx to specify a different function that will determine if the page will display or not.

Page fnc_CustomPage_Pre fncCustomPage_Leave
 
...
 
 
Function fnc_CustomPage_Pre
 
  ;Skip Page if first InstallType
  GetCurInstType $1
  ${If} $1 == 0
    Abort
  ${EndIf}
 
  Call fnc_CustomPage_Show
 
FunctionEnd
 
 
or 
 
 
PageEx custom
 
fnc_CustomPage_Pre fnc_CustomPage_Show fnc_CustomPage_Leave
 
PageExEnd
 
 
Function fnc_CustomPage_Pre
 
  ;Skip Page if first InstallType
  GetCurInstType $1
 
  ${If} $1 == 0
    Abort
  ${EndIf}
 
FunctionEnd
Posts: 1972
Joined: 25 Mar 2012 - 01:19
Re: Change or Add new Script Location

PS: the GenerateShowFunction dialog property will be available in next 1.4.3 version.

UPDATE: version 1.4.3 released.

Posts: 1972
Joined: 25 Mar 2012 - 01:19
Re: Change or Add new Script Location

I think that the show/skip logic for a page should stay outside the page itself, i.e. in your main script.
The page script should contain everything related to the page itself but it's the caller that's in charge of deciding if that page should be include in setup flow or not.
Beware to not mix roles: the if clause that decides if the page should be shown should be outside the object itself; of course a page should be able to decide which of its controls must be visible but should not decide of its whole existance.

If you still want to go that way you could use this workaround:

  • set GenerateShowFunction property to False (this will not generate the default fnc_xxx_Show function)
  • create your own fnc_xxx_Show function (with the Abort logic) by using the HeaderCustomScript property
Posts: 5
Joined: 3 Ott 2018 - 15:39
Change or Add new Script Location

A big thing that I'm sure a lot of people are doing is skipping pages or showing pages conditionally.

The way it is currently setup you have to manually edit the .nsdinc file

Which is a pain since everything you save the dialog it overrides that file.

To skip a page you call Abort before the page is created. (nsDialogs::Create)

ControlCustomScript comes close but it is inserted right after the nsdialogs call.

Also it would be nice to have an area after the the page is shown (nsDialogs::Show)

I usually have to do some memory clean up after the page is shown. (System.dll calls)

Another area where I have to edit the nsdinc manually.

Personally I feel like the HeaderCustomScript/FooterCustomScript could be what is used for this.

As their current purpose is easily replaced by just adding code before/after the !include Pagename.ndsinc