SPONSORS:






User Tag List

Results 1 to 7 of 7
  1. #1
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Dynamic tagging???

    I have a Dialog that is Captioned based on what is entered into a text field of a previous dialog. I need to tag the window based on that entry. Is such a thing possible?

    I can do something like:

    window JavaDialogBox ThisDialogBox
    String sValue = OtherDialogBox.TextField.GetText()
    tag "{sValue}"

    The problem is that the OtherDialogBox doesn't exist at compile time so there is a compile error. There must be some way to do this, but right now I'm just a little 'mush-brained' about it.

  2. #2
    Member
    Join Date
    Jun 2000
    Location
    Derby, UK
    Posts
    37
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dynamic tagging???

    Use dynamice tagging instead of static. get the caption from the previous dialog somehow and then use this to refer to the object. As in:

    string TmpString

    TmpString=SomeSortaControlHere.GetText()
    DialogBox(TmpString).SetActive()

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

  3. #3
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dynamic tagging???

    James,

    Thanks for the reply. It looks like the proposed code you posted is almost identical to what I originally asked about. The problem here is that the code won't compile because the preceeding dialog box doesn't exist at compile time so there is no way for the call to GetText() can complete its mission. This is why I wanted to do some sort of boolean, but that is not allowed in the include file.

    There has to be some way to put a "placeholder" in that tag that can be filled when the preceding dialog appears and the textfield is populated. I'll keep working on it and if I find a solution I'll post it here.

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

    Re: Dynamic tagging???

    Why doesn't the other textfield exist at compile time? Are you working without a window declaration?

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

  5. #5
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dynamic tagging???

    can you clarify your context.

    Is it like this:

    1)you are trying to do something dynamic in your class?? Or

    2)You want to change the caption of ThisDialogBox base on OtherDialogBox's TextField. You can't have that to work if none of them exists.

    I think your problem reside in 1) since making a TYPE dynamic makes more sense.

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

  6. #6
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dynamic tagging???

    The reason it doesn't exist at compile time is that the script and include file compile each time the script is run. The script is what calls the application that contains the Dialogs, one of which has dynamic text based on what the user types into the preceding dialog.

    I need to grab what is typed in the textfield on dialog1 and pass that as "tag" information to dialog2.

    Another user has pointed out in private mail that this can be done by having the tag in the include file filled by a function call. It looks something like:

    DialogBox MyDialog
    tag "{theFunction()}"

    I'm experimenting with this right now, and have not made it work, but it does compile, adn the script runs. I'm just not getting the dynamic informaton passed in because dialog2 is now active and I can't set dialog1 active in order to get the information from the text field. I may have to get it as it is typed in and store that until dialog2 comes up.

    Nonetheless, it looks like using the function as the tag will work.

    Thanks for the input.

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

  7. #7
    Junior Member
    Join Date
    Jul 2000
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dynamic tagging???

    Do it like this:

    window DialogBox whatever
    tag Gentag ()

    String Gentag ()
    //code to resolve your tag

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

 

 

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 02:04 AM.

Copyright BetaSoft Inc.