How to reuse code with file include (code preprocessor)?

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;
Post Reply
mjjones
Posts: 2
Joined: Fri Apr 28, 2006 3:36 pm

How to reuse code with file include (code preprocessor)?

Post by mjjones »

I'm tryring out WeBuilder and looking into how code can be reused.

Tried the file include with the code preprocessor. It worked. But the code of the included file was inserted straight away into the receiving file and if I change the included file, the new version is not updated in the receiving file.

Did I miss something?

Is there another way to reuse code and have this code updated in the files which use these snippets? :?:
User avatar
Karlis
Site Admin
Posts: 3605
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe
Contact:

Post by Karlis »

The code preprocessor works (updates the included contents) on save. So if you have changed the file to be included, you should click Save for the file thet includes it.
Karlis Blumentals
Blumentals Software
www.blumentals.net
mjjones
Posts: 2
Joined: Fri Apr 28, 2006 3:36 pm

File include--it works (bis?)

Post by mjjones »

Can't see my reply so repost. Sorry if it shows up twice.

Thanks a lot, Karlis, did a new test and it works. Provided one fiddles a bit with the preview to have it refreshed.

Main thing: code can be reused. Wonderful. :D

Guess I should learn to do it in PHP. Next step...
User avatar
Karlis
Site Admin
Posts: 3605
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe
Contact:

Post by Karlis »

:D
Karlis Blumentals
Blumentals Software
www.blumentals.net
Post Reply