Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Problem with Activate

  1. #11
    Join Date
    Feb 2009
    Posts
    1,173

    Default Re: Problem with Activate

    Yes, Request_Tab_Display will do the job as well. I almost suggested that.
    In certain ways it has the advantage of activate that the programmer's
    intent is clearer, which makes it less likely that someone else will remove
    the code years later thinking it is not needed. And, yes, you have to be
    careful where you put "Set Current_Radio" in the RadioGroup - you normally
    want it at the bottom of your object.

    -John

    "Anders Öhrt" <Anders.Ohrt@berendsen.se> wrote in message
    news:zD9DvhjcJHA.2072@dacmail.dataaccess.com...
    >
    >> Garret, I think this is a different issue and my guess is that it has
    >> always
    >> been in the product.

    >
    > I think so too, we've run into this occasionally for as long as I can
    > remember (meaning at least VDF7) and worked around it on a case by case
    > basis.
    >
    >
    >> You should not send activate to a control or an inner container that is
    >> not yet paged. If you do this, it is an error and things just won't work
    >> right. For example, you should not send activate to a button if the view
    >> itself is not yet activated. Normally this is a non-issue because it not
    >> something you are likely to do. Tab dialogs are an exception to this is a
    >> design flaw with tab pages.

    >
    > Another case I just ran into yesterday, which is semi-similar, is if you
    > do things in Notify_Select_State in a RadioGroup, and then directly after
    > the code for the procedure does a Set Current_Radio to 0, then
    > Notify_Select_State will be called very early (End_Construct_Object of the
    > RadioGroup), and there other objects might not even be created yet, much
    > less paged.
    >
    >
    >> When tab dialogs are created we don't activate all of the child table
    >> pages. We only activate them as needed. We did this for performance
    >> reasons. So when you send activate to the control in the second tab page,
    >> it is not yet paged and it just does wrong things. It appears non-visible
    >> and internally it is really messed up.

    >
    > When ever we do something like this, we do a Request_Tab_Display first.
    > This makes sure the other tab and any child objects are created and paged.
    >
    > // Anders
    >



  2. #12
    Rafael Guest

    Default Re: Problem with Activate

    Hi Dennis, I'm sorry too.
    I understant your point. Release the version 14.1 is very very important.

    Thanks,

    Rafael



    "Dennis Piccioni" <dennis@dataaccess.com> escreveu na mensagem
    news:k6bcm4d0keae88i13145p9nnq6p2t2c7hr@4ax.com...
    > Hi Rafael,
    >
    > I'm sorry, I have not looked further into your report. We are trying
    > to release 14.1 ASAP and I just wanted to make sure that you are not
    > reporting something that was a new issue to 14.1.
    >
    >
    > On Thu, 8 Jan 2009 14:38:43 -0200, "Rafael" <rafael@softdata.com.br>
    > wrote:
    >
    >>Ok, but it's works in VDF 14.1?
    >>
    >>I will do the same thing in VDF14.1, nearly.
    >>
    >>Rafael
    >>
    >>"Dennis Piccioni" <dennis@dataaccess.com> escreveu na mensagem
    >>news:haacm4hqq6jpo0i18ab7vgsps5gcqkcigb@4ax.com. ..
    >>> Hi Rafael,
    >>>
    >>> ok, thank you. This newsgroup is intended for reports about the Visual
    >>> DataFlex revision currently in open testing (currently Visual DataFlex
    >>> 14.1 RC2).
    >>>
    >>> Please use the visual-dataflex newsgroup for future questions about
    >>> released VDF revisions.
    >>>
    >>>
    >>> On Thu, 8 Jan 2009 13:59:23 -0200, "Rafael" <rafael@softdata.com.br>
    >>> wrote:
    >>>
    >>>>Hi Dennis.
    >>>>
    >>>>No, isn't. I'm using VDF 10.0.10.0 and the object disappears too.
    >>>>I never saw that before. I made some changes in my source, and I noted
    >>>>that
    >>>>just now.
    >>>>But I'm using 14.0.37.0, not 14.1.
    >>>>
    >>>>Thanks
    >>>>
    >>>>Rafael
    >>>>
    >>>>"Dennis Piccioni" <dennis@dataaccess.com> escreveu na mensagem
    >>>>news:3t6cm45ev9e0rnoh0g94kh7cajspn3fk8h@4ax.co m...
    >>>>> Hi Rafael,
    >>>>>
    >>>>> is this behavior new to VDF 14.1.?
    >>>>>
    >>>>>
    >>>>> On Thu, 8 Jan 2009 09:03:53 -0200, "Rafael" <rafael@softdata.com.br>
    >>>>> wrote:
    >>>>>
    >>>>>>If I send the "activate" method to some object that is not visible,
    >>>>>>the
    >>>>>>object disappear.
    >>>>>>
    >>>>>>Plese, refer the attached file. Compile the view and fire the button,
    >>>>>>but
    >>>>>>don't look the second tab before.
    >>>>>>
    >>>>>>Regards,
    >>>>>>Rafael
    >>>>>>
    >>>>>
    >>>>> Regards,
    >>>>> Dennis
    >>>>
    >>>
    >>> Regards,
    >>> Dennis

    >>

    >
    > Regards,
    > Dennis




  3. #13
    Rafael Guest

    Default Re: Problem with Activate

    Ok, I undestant the point. I need "page" the object first, to call the
    activate method.
    But I think that the activate method don't make the object disappear. I
    guess that just don't activate the object, if isn't paged. Am I thinking
    wrong?

    Rafael

    "John Tuohy" <john-t@dataaccess.com> escreveu na mensagem
    news:61m%239AocJHA.2076@dacmail.dataaccess.com...
    > Yes, Request_Tab_Display will do the job as well. I almost suggested that.
    > In certain ways it has the advantage of activate that the programmer's
    > intent is clearer, which makes it less likely that someone else will
    > remove the code years later thinking it is not needed. And, yes, you have
    > to be careful where you put "Set Current_Radio" in the RadioGroup - you
    > normally want it at the bottom of your object.
    >
    > -John
    >
    > "Anders Öhrt" <Anders.Ohrt@berendsen.se> wrote in message
    > news:zD9DvhjcJHA.2072@dacmail.dataaccess.com...
    >>
    >>> Garret, I think this is a different issue and my guess is that it has
    >>> always
    >>> been in the product.

    >>
    >> I think so too, we've run into this occasionally for as long as I can
    >> remember (meaning at least VDF7) and worked around it on a case by case
    >> basis.
    >>
    >>
    >>> You should not send activate to a control or an inner container that is
    >>> not yet paged. If you do this, it is an error and things just won't work
    >>> right. For example, you should not send activate to a button if the view
    >>> itself is not yet activated. Normally this is a non-issue because it not
    >>> something you are likely to do. Tab dialogs are an exception to this is
    >>> a design flaw with tab pages.

    >>
    >> Another case I just ran into yesterday, which is semi-similar, is if you
    >> do things in Notify_Select_State in a RadioGroup, and then directly after
    >> the code for the procedure does a Set Current_Radio to 0, then
    >> Notify_Select_State will be called very early (End_Construct_Object of
    >> the RadioGroup), and there other objects might not even be created yet,
    >> much less paged.
    >>
    >>
    >>> When tab dialogs are created we don't activate all of the child table
    >>> pages. We only activate them as needed. We did this for performance
    >>> reasons. So when you send activate to the control in the second tab
    >>> page, it is not yet paged and it just does wrong things. It appears
    >>> non-visible and internally it is really messed up.

    >>
    >> When ever we do something like this, we do a Request_Tab_Display first.
    >> This makes sure the other tab and any child objects are created and
    >> paged.
    >>
    >> // Anders
    >>

    >




  4. #14
    Join Date
    Feb 2009
    Location
    Sweden
    Posts
    1,681

    Default Re: Problem with Activate


    > But I think that the activate method don't make the object disappear. I
    > guess that just don't activate the object, if isn't paged. Am I thinking
    > wrong?


    You are thinking wrong. We've also had that problem, and it's the Active
    that makes the object disappear.

    // Anders



  5. #15
    Rafael Guest

    Default Re: Problem with Activate

    I know that everybody had this problem.
    But the Activate method makes the object disappear because isn't paged and
    appears only when the user reopen the application...
    Well... Very very inconceivable for me. Sorry.

    Rafael

    "Anders Öhrt" <Anders.Ohrt@berendsen.se> escreveu na mensagem
    news:UGUNo7LdJHA.2504@dacmail.dataaccess.com...
    >
    >> But I think that the activate method don't make the object disappear. I
    >> guess that just don't activate the object, if isn't paged. Am I thinking
    >> wrong?

    >
    > You are thinking wrong. We've also had that problem, and it's the Active
    > that makes the object disappear.
    >
    > // Anders
    >




  6. #16
    Join Date
    Feb 2009
    Posts
    1,173

    Default Re: Problem with Activate

    You will notice that I very carefully stated:

    "You should not send activate to a control or an inner container that is not
    yet paged. If you do this, it is an error and things just won't work right."

    What we probably should have done in this case was to raise an error, but we
    didn't think of that those many years ago. Instead it just doesn't work
    right. The control doesn't really disappear because it never appeared in the
    first place. At this point the windows control and the DataFlex object are
    no longer working together. I am not really sure if the windows control gets
    created and if it does, where it is. I am not sure if the DataFlex object
    thinks it is active or not. I don't know because it really doesn't matter -
    it's wrong and once this happens, it will never be right. The only solution
    is "don't do it". Hopefully one of the three solutions presented (two by me,
    one by Anders) will let you solve this issue in your code.

    -John


    "Rafael" <rafael@softdata.com.br> wrote in message
    newsO$0BOKdJHA.2072@dacmail.dataaccess.com...
    > Ok, I undestant the point. I need "page" the object first, to call the
    > activate method.
    > But I think that the activate method don't make the object disappear. I
    > guess that just don't activate the object, if isn't paged. Am I thinking
    > wrong?
    >
    > Rafael
    >
    > "John Tuohy" <john-t@dataaccess.com> escreveu na mensagem
    > news:61m%239AocJHA.2076@dacmail.dataaccess.com...
    >> Yes, Request_Tab_Display will do the job as well. I almost suggested
    >> that. In certain ways it has the advantage of activate that the
    >> programmer's intent is clearer, which makes it less likely that someone
    >> else will remove the code years later thinking it is not needed. And,
    >> yes, you have to be careful where you put "Set Current_Radio" in the
    >> RadioGroup - you normally want it at the bottom of your object.
    >>
    >> -John
    >>
    >> "Anders Öhrt" <Anders.Ohrt@berendsen.se> wrote in message
    >> news:zD9DvhjcJHA.2072@dacmail.dataaccess.com...
    >>>
    >>>> Garret, I think this is a different issue and my guess is that it has
    >>>> always
    >>>> been in the product.
    >>>
    >>> I think so too, we've run into this occasionally for as long as I can
    >>> remember (meaning at least VDF7) and worked around it on a case by case
    >>> basis.
    >>>
    >>>
    >>>> You should not send activate to a control or an inner container that is
    >>>> not yet paged. If you do this, it is an error and things just won't
    >>>> work right. For example, you should not send activate to a button if
    >>>> the view itself is not yet activated. Normally this is a non-issue
    >>>> because it not something you are likely to do. Tab dialogs are an
    >>>> exception to this is a design flaw with tab pages.
    >>>
    >>> Another case I just ran into yesterday, which is semi-similar, is if you
    >>> do things in Notify_Select_State in a RadioGroup, and then directly
    >>> after the code for the procedure does a Set Current_Radio to 0, then
    >>> Notify_Select_State will be called very early (End_Construct_Object of
    >>> the RadioGroup), and there other objects might not even be created yet,
    >>> much less paged.
    >>>
    >>>
    >>>> When tab dialogs are created we don't activate all of the child table
    >>>> pages. We only activate them as needed. We did this for performance
    >>>> reasons. So when you send activate to the control in the second tab
    >>>> page, it is not yet paged and it just does wrong things. It appears
    >>>> non-visible and internally it is really messed up.
    >>>
    >>> When ever we do something like this, we do a Request_Tab_Display first.
    >>> This makes sure the other tab and any child objects are created and
    >>> paged.
    >>>
    >>> // Anders
    >>>

    >>

    >
    >



  7. #17
    Rafael Guest

    Default Re: Problem with Activate

    Absolutely.
    Actually, I create a Mixin class that implements a behaviour using the
    Activate_Area method and Activate_State property. So, as I have my own
    classes, I implements my own Activate, using the Mixin class that I created.
    So, when is necessary, I call the Activate_Area method, or, I just call the
    Activate.

    Rafael


    "John Tuohy" <john-t@dataaccess.com> escreveu na mensagem
    news:2AGDClNdJHA.5868@dacmail.dataaccess.com...
    > You will notice that I very carefully stated:
    >
    > "You should not send activate to a control or an inner container that is
    > not yet paged. If you do this, it is an error and things just won't work
    > right."
    >
    > What we probably should have done in this case was to raise an error, but
    > we didn't think of that those many years ago. Instead it just doesn't work
    > right. The control doesn't really disappear because it never appeared in
    > the first place. At this point the windows control and the DataFlex object
    > are no longer working together. I am not really sure if the windows
    > control gets created and if it does, where it is. I am not sure if the
    > DataFlex object thinks it is active or not. I don't know because it really
    > doesn't matter - it's wrong and once this happens, it will never be right.
    > The only solution is "don't do it". Hopefully one of the three solutions
    > presented (two by me, one by Anders) will let you solve this issue in your
    > code.
    >
    > -John
    >
    >
    > "Rafael" <rafael@softdata.com.br> wrote in message
    > newsO$0BOKdJHA.2072@dacmail.dataaccess.com...
    >> Ok, I undestant the point. I need "page" the object first, to call the
    >> activate method.
    >> But I think that the activate method don't make the object disappear. I
    >> guess that just don't activate the object, if isn't paged. Am I thinking
    >> wrong?
    >>
    >> Rafael
    >>
    >> "John Tuohy" <john-t@dataaccess.com> escreveu na mensagem
    >> news:61m%239AocJHA.2076@dacmail.dataaccess.com...
    >>> Yes, Request_Tab_Display will do the job as well. I almost suggested
    >>> that. In certain ways it has the advantage of activate that the
    >>> programmer's intent is clearer, which makes it less likely that someone
    >>> else will remove the code years later thinking it is not needed. And,
    >>> yes, you have to be careful where you put "Set Current_Radio" in the
    >>> RadioGroup - you normally want it at the bottom of your object.
    >>>
    >>> -John
    >>>
    >>> "Anders Öhrt" <Anders.Ohrt@berendsen.se> wrote in message
    >>> news:zD9DvhjcJHA.2072@dacmail.dataaccess.com...
    >>>>
    >>>>> Garret, I think this is a different issue and my guess is that it has
    >>>>> always
    >>>>> been in the product.
    >>>>
    >>>> I think so too, we've run into this occasionally for as long as I can
    >>>> remember (meaning at least VDF7) and worked around it on a case by case
    >>>> basis.
    >>>>
    >>>>
    >>>>> You should not send activate to a control or an inner container that
    >>>>> is not yet paged. If you do this, it is an error and things just won't
    >>>>> work right. For example, you should not send activate to a button if
    >>>>> the view itself is not yet activated. Normally this is a non-issue
    >>>>> because it not something you are likely to do. Tab dialogs are an
    >>>>> exception to this is a design flaw with tab pages.
    >>>>
    >>>> Another case I just ran into yesterday, which is semi-similar, is if
    >>>> you do things in Notify_Select_State in a RadioGroup, and then directly
    >>>> after the code for the procedure does a Set Current_Radio to 0, then
    >>>> Notify_Select_State will be called very early (End_Construct_Object of
    >>>> the RadioGroup), and there other objects might not even be created yet,
    >>>> much less paged.
    >>>>
    >>>>
    >>>>> When tab dialogs are created we don't activate all of the child table
    >>>>> pages. We only activate them as needed. We did this for performance
    >>>>> reasons. So when you send activate to the control in the second tab
    >>>>> page, it is not yet paged and it just does wrong things. It appears
    >>>>> non-visible and internally it is really messed up.
    >>>>
    >>>> When ever we do something like this, we do a Request_Tab_Display first.
    >>>> This makes sure the other tab and any child objects are created and
    >>>> paged.
    >>>>
    >>>> // Anders
    >>>>
    >>>

    >>
    >>

    >




Similar Threads

  1. Activate problem
    By Bengt in forum Windows Applications
    Replies: 10
    Last Post: 4-Aug-2010, 07:09 PM
  2. Problems to activate
    By Rafael M Heise in forum Reports
    Replies: 7
    Last Post: 24-Jun-2010, 01:30 PM
  3. Activate MenuItem
    By Denis in forum Windows Applications
    Replies: 6
    Last Post: 4-Aug-2009, 11:23 AM
  4. How to Activate Lookup
    By Unmesh in forum Windows Applications
    Replies: 3
    Last Post: 19-Dec-2006, 02:59 PM
  5. Problem with activate
    By Jeroen Temperville in forum Windows Applications
    Replies: 3
    Last Post: 7-Dec-2006, 03:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •