SPONSORS:






User Tag List

Results 1 to 6 of 6
  1. #1
    Senior Member
    Join Date
    Dec 2000
    Location
    Phoenix, AZ
    Posts
    371
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Build a pick window

    I am trying to build a string for what window I want to pick from a menu. This is what I have:

    I want to take
    OrgMain.Detail.LocDetailMain.Pick()

    and do something like
    string sMenuItem = "LocDetailMain"
    OrgMain.Detail.+sMenuItem+.Pick()

    However, when I do this I get a syntax error. Is there any other way I can accomplish this?


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

  2. #2
    Member
    Join Date
    Aug 2001
    Location
    Ireland
    Posts
    64
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Build a pick window

    Hi there,

    Replace the +menuitem+ with {menuitem}. This should then work.

    Cheers,
    Conor

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

  3. #3
    Senior Member
    Join Date
    Dec 2000
    Location
    Phoenix, AZ
    Posts
    371
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Build a pick window

    I'm still having some problems. I now have:

    OrgMain.Detail.{sMenuItem}.Pick()

    but I get a syntax error on {

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

  4. #4
    Senior Member
    Join Date
    Jun 2000
    Location
    Chicago, IL USA
    Posts
    383
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Build a pick window

    The correct syntax is:

    OrgMain.Detail.MenuItem(sMenuItem).Pick()

    or for Java

    OrgMain.Detail.JavaJFCMenuItem(sMenuItem).Pick()



    ------------------
    Rob Kapteyn
    Rob Kapteyn, CSTE
    RobKapteyn@gmail.com

  5. #5
    Senior Member
    Join Date
    Dec 2000
    Location
    Phoenix, AZ
    Posts
    371
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Build a pick window

    I cannot get the code to compile by just using (). I just want to replace part of my object for the Pick method with a variable. This particular part of the object would be the sMenuItem string.

    Perhaps I am missing something somewhere else or there is another way to accomplish this?

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

  6. #6
    Senior Member
    Join Date
    Dec 2000
    Location
    Phoenix, AZ
    Posts
    371
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Build a pick window

    OK my bad. It works. I just have to make sure I use MenuItem(sMenuItem).Pick()

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

 

 

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 06:02 PM.

Copyright BetaSoft Inc.