SPONSORS:






User Tag List

Results 1 to 8 of 8
  1. #1
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    After overriding HtmlPopupList class;how to get the object tag?

    After overriding the HtmlPopupList class.

    I want to grab the tag of the HtmlPopupList
    ex: when I use this class, it looks like:
    BrowserPage.HtmlPopupList("GodKnows").Select()

    I would like to know how within my HtmlPopupList class, I would grab 'GodKnows' tag????


    Thanks in advance

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

  2. #2
    Junior Member
    Join Date
    Jun 2001
    Posts
    29
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: After overriding HtmlPopupList class;how to get the object tag?

    One thing I have read in SilkTest Help Topic 'tag statement' is that you can't use the tag in your scripts to refer to an object; you always use the object's identifier.

    If you want to find out the tag for the HtmlPopupList, you can do this manually. And if you don't know how, you can either do Record/Window Declations or Record/Window Identifiers and move the mouse pointer to the object in the window that you want to know that tag of.

    It may not be efficient to use tags in the script to manipulate objects as they vary on occasions unlike if you identifiers or dynamic references. Just my 2 cents.

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

  3. #3
    Member
    Join Date
    Dec 2000
    Location
    San Francisco, CA
    Posts
    51
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: After overriding HtmlPopupList class;how to get the object tag?

    In my understanding this statement

    BrowserPage.HtmlPopupList("GodKnows")

    is instantiating an HtmlPopupList with the tag "GodKnows" and I am just wondering why would you wanna get the tag of the object while in the first place you do know what it contains. Not unless of course you do it like this

    BrowserPage.HtmlPopupList("GodKnows*DoesHeReallyDo *")

    then you might wanna use BrowserPage.HtmlPopupList("GodKnows*DoesHeReallyDo *").GetTag()

    Thanks.


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


    oopssss... haven't noticed that the subject of this is about overriding a class...

    actually, your example is not overidding but instantiating.

    and if you really wanna get the tag after instantiating (overriding in your case)it you can do it like.

    window wObj = BrowserPage.HtmlPopupList("GodKnows*DoesHeReallyDo *")

    string sTag = wObj.GetTag()

    just to let you know!


    [This message has been edited by kalabog (edited 06-28-2001).]

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

    Re: After overriding HtmlPopupList class;how to get the object tag?

    What I want is to use the tag to be used within my class.

    When someone uses the HtmlPopupList class, they pass in a tag.
    i.e.:BrowserPage.HtmlPopupList("GodKnows").Select( "Beer")

    HtmlPopupList then make use of the tag string to reference to the control with such name. I want to do that too, but how would I grab the tag string within my class.

    Anyhow. I don't want to get the tag after I instantiate a class. I want to know the tag string within my class, so I can handle it.

    I hope I made my problem clear-er

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

  5. #5
    Member
    Join Date
    Dec 2000
    Location
    San Francisco, CA
    Posts
    51
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: After overriding HtmlPopupList class;how to get the object tag?

    ...how would I grab the tag string within my class.

    How about this.WndTag or WindowTag(this)


    ...my problem clear-er.

    Well, that helps... but the topic confused me a lot. I understand that you don't override a class but inherit it. You override class members/functions. Maybe I'm wrong... well, you're the guru here.

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


    [This message has been edited by kalabog (edited 06-28-2001).]

    [This message has been edited by kalabog (edited 06-28-2001).]

  6. #6
    Senior Member
    Join Date
    Jul 2001
    Location
    Westford, MA, USA
    Posts
    160
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: After overriding HtmlPopupList class;how to get the object tag?

    Hi GodKnows -- I keep thinking there must be more to your question than we're understanding, otherwise you wouldn't be asking it. If this doesn't answer your question, please send us a code sample further illustrating your problem:

    [-] winclass HtmlPopupList : HtmlPopupList
    [-] STRING GetTagString()
    [ ] INTEGER iNumDollars, iCtr
    [ ] // get into iNumDollars the number of $ chars in the long tag
    [-] for(iNumDollars = 0, iCtr = 1; iCtr <= Len(this.WndTag); iCtr++)
    [-] if MatchStr("$", "{this.WndTag[iCtr]}")
    [ ] iNumDollars++
    [ ] // return the substring following the last $ char in the long tag
    [ ] return GetField(this.WndTag, "$", iNumDollars+1)
    [ ]
    [-] window HtmlPopupList MyPopup
    [ ] tag "[BrowserChild]Calendar Entry/[HtmlTable]Schedule/[HtmlColumn]Invite:?Optional:?FYI:Request Response?Room:?Resource:??Subject:? Confidential??Location:?Date:?Time:?Duration:????E nd Date*/[HtmlPopupList]$AlarmTiming"
    [ ] parent BrowserPage
    [ ]
    [-] main ()
    [ ] // this is just to prove that it works within the class:
    [ ] Print(MyPopup.GetTagString())

    You can run toss this into a .t file and run it -- or you could if only I could get tab or spacebar indenting to work in this posting!

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


    [This message has been edited by agroves (edited 08-02-2001).]

    [This message has been edited by agroves (edited 08-02-2001).]

  7. #7
    Senior Member
    Join Date
    Jul 1999
    Location
    New York, NY, USA
    Posts
    137
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: After overriding HtmlPopupList class;how to get the object tag?

    agroves,

    Off subject, but click on the link to the left of the reply textbox (after selecting reply) and you will see a help file for UBB Code. you can use the CODE and /CODE formatting to preserve indentations. just surround them with "[" and "]" I can't figure out the escape character to get them to display without turning CODE on and Off.


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

  8. #8
    Senior Member
    Join Date
    Jul 2001
    Location
    Westford, MA, USA
    Posts
    160
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: After overriding HtmlPopupList class;how to get the object tag?

    Thanks for the indenting tip!

    [This message has been edited by agroves (edited 08-07-2001).]

 

 

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:27 AM.

Copyright BetaSoft Inc.