SPONSORS:






User Tag List

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Senior Member
    Join Date
    Jan 2003
    Location
    Portland, ME USA
    Posts
    603
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Window Instantiation

    Why would one type of instantiation work over another???

    // THIS ONE WORKS....
    public window CNewPassword NewPassword
    {

    }

    // THIS ONE DOES NOT WORK...
    public window NewPassword = CNewPassword ();

    Any one have any idead this would be so??


    ------------------
    N+ CNA
    N+ CNA

  2. #2
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Window Instantiation

    For the code-fragment supplied, the first example will not compile.

    For the second example to work, CNewPassword must be of type winclass.


    John



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

  3. #3
    Senior Member
    Join Date
    Jan 2003
    Location
    Portland, ME USA
    Posts
    603
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Window Instantiation

    I i know that the first one does indeed compile because that is what i am currently using i want to be able to you the second type of instantiation. And yes i know that it must be from a Winclass, that is what i am trying to instatiate from. Any other suggestion?

    ------------------
    N+ CNA
    N+ CNA

  4. #4
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Window Instantiation

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by RCyr:
    I i know that the first one does indeed compile because that is what i am currently using i want to be able to you the second type of instantiation. And yes i know that it must be from a Winclass, that is what i am trying to instatiate from. Any other suggestion?
    <HR></BLOCKQUOTE>

    OK, you're right, I've added a missing class stub for CNewPassword and it now compiles. And by prefixing the second instance name with "x" to avoid an "already defined" error I can get both versions to respond to a dummy method call.

    Working with what we know:

    1. The first instance represents a static definition like you might receive from a Record/Declarations.

    2. The second instance is dynamic in that it doesn't exist until run time.

    3. The first instance most-likely already has a tag.

    4. The second instance does not have a tag because one has not been passed in by the example code.

    So, unless the unsupplied class has defined a tag you will not be able to communicate with a real instance of this dialog or window.

    Hit? Or Miss?

    :-)

    John


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

  5. #5
    Senior Member
    Join Date
    Jan 2003
    Location
    Portland, ME USA
    Posts
    603
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Window Instantiation

    Tag in supplied in the winclass.. the class is as shown:


    // THIS WAY WORKS....
    public window CNewPassword NewPassword
    {
    // EMPTY ...
    }

    //THIS WAY DOES NOT WORK...
    //public window NewPassword = CNewPassword ();

    public winclass CNewPassword : VBForm
    {
    tag "New Password";

    // Declare the NEW PASSWORD text box...
    VBTextBox txtNewPasword
    {
    multitag "Don't show me this message again."
    {
    "$txtInput1"
    }
    }

    // Declare the OK command button...
    VBCommandButton cmdOK
    {
    multitag "OK"
    {
    "$cmdButton1"
    }
    }

    // Declare th CANCEL command button...
    VBCommandButton cmdCancel
    {
    multitag "Cancel"
    {
    "$cmdButton2"
    }
    }
    }


    ------------------
    N+ CNA
    N+ CNA

  6. #6
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Window Instantiation

    OK, I imported that code too - no difference. I can successfully get a response from both declarations.

    What do you mean by "does not work"? Do you get an error message from Silk?


    John




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

  7. #7
    Senior Member
    Join Date
    Jan 2003
    Location
    Portland, ME USA
    Posts
    603
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Window Instantiation

    John,

    Sorry about that what i mean by "not working" is in the one way that it works i get window reconigition and i can manipulate the window, the other way of instanstiation the window is never reconized, and i keep getting window not found, both ways compile but only one has window recongition.

    Hope that clears things up for you.

    ------------------
    N+ CNA
    N+ CNA

  8. #8
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Window Instantiation

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by RCyr:
    John,

    Sorry about that what i mean by "not working" is in the one way that it works i get window reconigition and i can manipulate the window, the other way of instanstiation the window is never reconized, and i keep getting window not found, both ways compile but only one has window recongition.

    Hope that clears things up for you.

    <HR></BLOCKQUOTE>
    Aha! Clear as glass, finally.

    The recognition problem you describe is what I was suspecting.

    Most likely you have a problem with the tag that identifies NewPassword. To expose it insert a:

    Print(Desktop.GetActive().Wndtag) ;

    immediately after that dialog is opened. Then run the test in both forms and carefully compare the tag print outs in the results file. If the change to obtain equivalence isn't obvious, post both tags here and we'll likely be able to suggest a final solution.


    John


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

  9. #9
    Senior Member
    Join Date
    Jan 2003
    Location
    Portland, ME USA
    Posts
    603
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Window Instantiation

    With this instantiation:
    public window CNewPassword NewPassword
    {

    }

    the tag = /New Password"

    And with this instantiation

    public window NewPassword = CNewPassword ();

    the tag = "/[VBForm]New Password"



    ------------------
    N+ CNA
    N+ CNA

  10. #10
    Senior Member
    Join Date
    Jan 2003
    Location
    Portland, ME USA
    Posts
    603
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Window Instantiation

    OK i see the big picture now, i have changed my tag to "~ActiveApp/New Password" everything works fine when the window instantiation is public, but now i want to move the instantiation to it's proper parent class inc file, now when it the instantiation is public the window recongition is there, but when i move into another existsing class the window is not reconized, could this be because the parent class parent tag is overriding the CNewPassword winclass parent??

    ------------------
    N+ CNA
    N+ CNA

 

 
Page 1 of 2 12 LastLast

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 08:53 AM.

Copyright BetaSoft Inc.