SPONSORS:






User Tag List

Results 1 to 9 of 9
  1. #1
    Junior Member
    Join Date
    Jul 2002
    Location
    Bangalore,karnataka,India
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how to include inc files in runtime

    hi,
    i've 2 files file1.inc and file2.inc.
    based on the Os.i've to include either file1.inc or file2.inc.
    based on the Os,how can i include the inc files during runtime?
    i'm copying the required file(file1/file2)to a file.inc based on the Os thru the script.but the changes are not being reflected.
    can anyone help me.
    thanks in advance



    ------------------

  2. #2
    Senior Member
    Join Date
    Aug 1999
    Location
    Cambridge, UK
    Posts
    470
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: how to include inc files in runtime

    Can't be done I'm afraid; inc files are included at compile time, and it's not possible to find out the OS you're running on until compile time.

    I have had this kind of problem before, and have got round it by adjusting my window declarations - in particular, putting switch statements in various methods, to deal with the different variations required for different OSes.

    Hope this helps.

    ------------------

  3. #3
    Senior Member
    Join Date
    Nov 1999
    Location
    Eagle, ID,USA
    Posts
    1,035
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: how to include inc files in runtime

    Not knowing exactly why you're trying to do what you're trying to do, you may want to look into using gui specifiers if it's declarations that are different based on o/s's.

    ------------------
    Have you ever noticed? Anybody going slower than you is an idiot, and anyone going faster than you is a maniac.

  4. #4
    Senior Member
    Join Date
    Nov 2001
    Posts
    375
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: how to include inc files in runtime

    ....another very "lazy" way of doing it is...to make seperate option sets for the 2 OS's




    ------------------

  5. #5
    Junior Member
    Join Date
    Jul 2002
    Location
    Bangalore,karnataka,India
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: how to include inc files in runtime

    hi,
    Can the same problem be tackled if it(inc file) depends on the browser version(and not on the Os).Is there any option to find browser version and include the inc file during the runtime.

    vincebowdren,can u send an attachment explaining the switch statement usage to solve my problem.

    thanks.


    ------------------

  6. #6
    Senior Member
    Join Date
    Aug 1999
    Location
    Cambridge, UK
    Posts
    470
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: how to include inc files in runtime

    Here is an example of an include file which has been constructed to work on OSes where the window declaration varies. The Save File dialog has a textfield to enter the filename on W9x and NT4, but that has been replaced by a combobox for W2K. I have included both fields in the window declaration, and have designed the appropriate method to check which OS it is running under in order to decide which control it should be looking for.
    I hope this is helpful.

    ------------------

  7. #7
    Junior Member
    Join Date
    Jul 2002
    Location
    Bangalore,karnataka,India
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: how to include inc files in runtime

    make 2 separate inc files

    ------------------
    vinayaka
    vinayaka

  8. #8
    Super Member
    Join Date
    Jul 2001
    Location
    Earth
    Posts
    1,882
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: how to include inc files in runtime

    You can also use compiler constants to handle this kind of thing.....

    ------------------
    James Soderborg
    http://www.ameliortech.com
    jamesso@ameliortech.com

  9. #9
    Junior Member
    Join Date
    Jul 2002
    Location
    Bangalore,karnataka,India
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: how to include inc files in runtime

    hi jamesso,

    i tried to use the compiler constants but i think i'm going wrong in assigning the value to the compiler contant. Could u Plz help me in this regard.

    let me brief my problem. i have to include file1, if my browser version is less than 5.5 else file2 (if browser version is >=5.5) in runtime

    The soln what i'm using is

    1. i'm creating a dummy file by name file3(say)

    2. i'm getting the browser version and based on the condition specified above i'm copying either file1 or file2 to file3.

    problem: This works fine, but fails sometime.

    could u plz give some example for using compiler constants.

    thanks

    usersilk



    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 10:49 AM.

Copyright BetaSoft Inc.