SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7

Thread: FUNCTION

  1. #1
    Junior Member
    Join Date
    Dec 2008
    Posts
    24
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    FUNCTION

    Hi,

    I Wrote a function which has 3 parts(For 3 different tabs in the application).. Now I want to use the function in a manner such that i can call the different parts individually. Is it possible??

    Thanks in advance.

  2. #2
    Advanced Member KishoreApplabs's Avatar
    Join Date
    Oct 2006
    Posts
    965
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: FUNCTION

    You can split the function based on 3 tabs, then you can call same function when were you required.

    Regards,
    Kishore

  3. #3
    Member
    Join Date
    Aug 2006
    Posts
    152
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: FUNCTION

    Alternatively, you can make that function parametrize. Pass the tab number as a parameter & modify the function to address each tab work flow accordingly.

    2lz

  4. #4
    Junior Member
    Join Date
    Aug 2007
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: FUNCTION

    you can use switch statement and send a string parameter in method and based on which you write cases inside the method
    Thanks,
    Silklearner

  5. #5
    Advanced Member
    Join Date
    Oct 1999
    Location
    Chicago, IL
    Posts
    652
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: FUNCTION

    What is the function doing? If it's just interacting with the controls on the already selected tabs, you could make the function dynamic and determine at run-time what tab is currently visible and act accordingly by executing that block of code.

    Otherwise, if the function itself needs to pick the tab for you, this won't work.

  6. #6
    Senior Member
    Join Date
    Feb 2009
    Posts
    126
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: FUNCTION

    another way is to use GoTo.
    HelloWorld

  7. #7
    Senior Member
    Join Date
    Nov 2006
    Posts
    312
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: FUNCTION

    [ QUOTE ]
    another way is to use GoTo.

    [/ QUOTE ]
    I would strongly recommend as a generic programming practice - DO NOT USE GOTO.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 8.33%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin 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 09:53 AM.

Copyright BetaSoft Inc.