• Self:Delete() causes a processor stack error

    From David Linda@21:1/5 to All on Thu Jan 19 10:44:38 2023
    I find this error to be very curious, I have a data window. My intention is to create a basic add, edit, delete app and the code in my delete button contains the following code:

    Self:Delete()

    I get a processor stack error. While debugging I see the delete code execute over and over until I get the error. I don't understand why the code executes over nd over, and the delete never occurs!

    Any ideas...thank you,

    David

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From JohnMartens@21:1/5 to All on Thu Jan 19 19:52:48 2023
    Whats pahhens when you do a lokc() before the delete()
    John


    Op 19-1-2023 om 19:44 schreef David Linda:
    I find this error to be very curious, I have a data window. My intention is to create a basic add, edit, delete app and the code in my delete button contains the following code:

    Self:Delete()

    I get a processor stack error. While debugging I see the delete code execute over and over until I get the error. I don't understand why the code executes over nd over, and the delete never occurs!

    Any ideas...thank you,

    David

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jamal@21:1/5 to David Linda on Thu Jan 19 22:41:14 2023
    Most likely you are calling the method in a **recursive loop**.

    Need better help?

    Go the X# forum at www.xsharp.eu and upload and a complete minimal AEF,
    with all related files, which duplicates the issue.

    I suggest you always provide the VO version, Window version, etc.

    Also, if a post helps you, then say so. It's a good for others to see if
    the issue is resolved in case they run into the same problem.


    Jamal

    On 1/19/2023 1:44 PM, David Linda wrote:
    I find this error to be very curious, I have a data window. My intention is to create a basic add, edit, delete app and the code in my delete button contains the following code:

    Self:Delete()

    I get a processor stack error. While debugging I see the delete code execute over and over until I get the error. I don't understand why the code executes over nd over, and the delete never occurs!

    Any ideas...thank you,

    David

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Robert van der Hulst@21:1/5 to All on Fri Jan 20 08:00:16 2023
    David,
    Is the method that contains this code also called Delete ?
    In that case:
    - you do not need that method at all
    - or you change the code to SUPER:Delete()

    Robert

    On Thursday, January 19, 2023 at 10:41:16 PM UTC-5, Jamal wrote:
    Most likely you are calling the method in a **recursive loop**.

    Need better help?

    Go the X# forum at www.xsharp.eu and upload and a complete minimal AEF, with all related files, which duplicates the issue.

    I suggest you always provide the VO version, Window version, etc.

    Also, if a post helps you, then say so. It's a good for others to see if the issue is resolved in case they run into the same problem.


    Jamal
    On 1/19/2023 1:44 PM, David Linda wrote:
    I find this error to be very curious, I have a data window. My intention is to create a basic add, edit, delete app and the code in my delete button contains the following code:

    Self:Delete()

    I get a processor stack error. While debugging I see the delete code execute over and over until I get the error. I don't understand why the code executes over nd over, and the delete never occurs!

    Any ideas...thank you,

    David
    I have a Delete button that contains this code:

    Self:Delete()

    I am using Virtalbox
    windows 3.1
    V.O. 1.0

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Linda@21:1/5 to Jamal on Fri Jan 20 07:35:04 2023
    On Thursday, January 19, 2023 at 10:41:16 PM UTC-5, Jamal wrote:
    Most likely you are calling the method in a **recursive loop**.

    Need better help?

    Go the X# forum at www.xsharp.eu and upload and a complete minimal AEF,
    with all related files, which duplicates the issue.

    I suggest you always provide the VO version, Window version, etc.

    Also, if a post helps you, then say so. It's a good for others to see if
    the issue is resolved in case they run into the same problem.


    Jamal
    On 1/19/2023 1:44 PM, David Linda wrote:
    I find this error to be very curious, I have a data window. My intention is to create a basic add, edit, delete app and the code in my delete button contains the following code:

    Self:Delete()

    I get a processor stack error. While debugging I see the delete code execute over and over until I get the error. I don't understand why the code executes over nd over, and the delete never occurs!

    Any ideas...thank you,

    David

    I have a Delete button that contains this code:

    Self:Delete()

    I am using Virtalbox
    windows 3.1
    V.O. 1.0

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Robert van der Hulst@21:1/5 to All on Fri Jan 20 08:53:57 2023
    David,

    You are confusing SUPER with OWNER

    SUPER is the DataWindow class from which your class inherits.
    OWNER is the Shellwindow class (if your window is inside a shellwindow)

    Robert

    On Friday, January 20, 2023 at 11:00:21 AM UTC-5, Robert van der Hulst wrote:
    David,
    Is the method that contains this code also called Delete ?
    In that case:
    - you do not need that method at all
    - or you change the code to SUPER:Delete()

    Robert
    On Thursday, January 19, 2023 at 10:41:16 PM UTC-5, Jamal wrote:
    Most likely you are calling the method in a **recursive loop**.

    Need better help?

    Go the X# forum at www.xsharp.eu and upload and a complete minimal AEF, with all related files, which duplicates the issue.

    I suggest you always provide the VO version, Window version, etc.

    Also, if a post helps you, then say so. It's a good for others to see if
    the issue is resolved in case they run into the same problem.


    Jamal
    On 1/19/2023 1:44 PM, David Linda wrote:
    I find this error to be very curious, I have a data window. My intention is to create a basic add, edit, delete app and the code in my delete button contains the following code:

    Self:Delete()

    I get a processor stack error. While debugging I see the delete code execute over and over until I get the error. I don't understand why the code executes over nd over, and the delete never occurs!

    Any ideas...thank you,

    David
    I have a Delete button that contains this code:

    Self:Delete()

    I am using Virtalbox
    windows 3.1
    V.O. 1.0
    Holy Crap!

    Robert it worked, But I don't understand...Self is my datawindow, super gets me to the app level, as I under stand this, which is why I don't understand. A more detailed explanation would be GREATLY appreciated.

    Many thanks,

    David

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Linda@21:1/5 to Robert van der Hulst on Fri Jan 20 08:23:31 2023
    On Friday, January 20, 2023 at 11:00:21 AM UTC-5, Robert van der Hulst wrote:
    David,
    Is the method that contains this code also called Delete ?
    In that case:
    - you do not need that method at all
    - or you change the code to SUPER:Delete()

    Robert
    On Thursday, January 19, 2023 at 10:41:16 PM UTC-5, Jamal wrote:
    Most likely you are calling the method in a **recursive loop**.

    Need better help?

    Go the X# forum at www.xsharp.eu and upload and a complete minimal AEF, with all related files, which duplicates the issue.

    I suggest you always provide the VO version, Window version, etc.

    Also, if a post helps you, then say so. It's a good for others to see if the issue is resolved in case they run into the same problem.


    Jamal
    On 1/19/2023 1:44 PM, David Linda wrote:
    I find this error to be very curious, I have a data window. My intention is to create a basic add, edit, delete app and the code in my delete button contains the following code:

    Self:Delete()

    I get a processor stack error. While debugging I see the delete code execute over and over until I get the error. I don't understand why the code executes over nd over, and the delete never occurs!

    Any ideas...thank you,

    David
    I have a Delete button that contains this code:

    Self:Delete()

    I am using Virtalbox
    windows 3.1
    V.O. 1.0


    Holy Crap!

    Robert it worked, But I don't understand...Self is my datawindow, super gets me to the app level, as I under stand this, which is why I don't understand. A more detailed explanation would be GREATLY appreciated.

    Many thanks,

    David

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Linda@21:1/5 to Robert van der Hulst on Fri Jan 20 09:15:13 2023
    On Friday, January 20, 2023 at 11:53:58 AM UTC-5, Robert van der Hulst wrote:
    David,

    You are confusing SUPER with OWNER

    SUPER is the DataWindow class from which your class inherits.
    OWNER is the Shellwindow class (if your window is inside a shellwindow)

    Robert
    On Friday, January 20, 2023 at 11:00:21 AM UTC-5, Robert van der Hulst wrote:
    David,
    Is the method that contains this code also called Delete ?
    In that case:
    - you do not need that method at all
    - or you change the code to SUPER:Delete()

    Robert
    On Thursday, January 19, 2023 at 10:41:16 PM UTC-5, Jamal wrote:
    Most likely you are calling the method in a **recursive loop**.

    Need better help?

    Go the X# forum at www.xsharp.eu and upload and a complete minimal AEF,
    with all related files, which duplicates the issue.

    I suggest you always provide the VO version, Window version, etc.

    Also, if a post helps you, then say so. It's a good for others to see if
    the issue is resolved in case they run into the same problem.


    Jamal
    On 1/19/2023 1:44 PM, David Linda wrote:
    I find this error to be very curious, I have a data window. My intention is to create a basic add, edit, delete app and the code in my delete button contains the following code:

    Self:Delete()

    I get a processor stack error. While debugging I see the delete code execute over and over until I get the error. I don't understand why the code executes over nd over, and the delete never occurs!

    Any ideas...thank you,

    David
    I have a Delete button that contains this code:

    Self:Delete()

    I am using Virtalbox
    windows 3.1
    V.O. 1.0
    Holy Crap!

    Robert it worked, But I don't understand...Self is my datawindow, super gets me to the app level, as I under stand this, which is why I don't understand. A more detailed explanation would be GREATLY appreciated.

    Many thanks,

    David
    Oh yes...So then similarly my add code should be IF super:Append() = TRUE instead of IF Self:Append() = TRUE which is what I have now
    This was also confusing because Self:Append() worked and Self:Delete did not. Thanks again

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Chris Pyrgas <"chris (at@21:1/5 to All on Sat Jan 21 10:45:40 2023
    Hi David,

    On Friday, January 20, 2023 at 11:53:58 AM UTC-5, Robert van der Hulst wrote:
    David,

    You are confusing SUPER with OWNER

    SUPER is the DataWindow class from which your class inherits.
    OWNER is the Shellwindow class (if your window is inside a shellwindow)

    Robert
    On Friday, January 20, 2023 at 11:00:21 AM UTC-5, Robert van der Hulst wrote:
    David,
    Is the method that contains this code also called Delete ?
    In that case:
    - you do not need that method at all
    - or you change the code to SUPER:Delete()

    Robert
    On Thursday, January 19, 2023 at 10:41:16 PM UTC-5, Jamal wrote:
    Most likely you are calling the method in a **recursive loop**.

    Need better help?

    Go the X# forum at www.xsharp.eu and upload and a complete minimal AEF, >>>>>> with all related files, which duplicates the issue.

    I suggest you always provide the VO version, Window version, etc.

    Also, if a post helps you, then say so. It's a good for others to see if >>>>>> the issue is resolved in case they run into the same problem.


    Jamal
    On 1/19/2023 1:44 PM, David Linda wrote:
    I find this error to be very curious, I have a data window. My intention is to create a basic add, edit, delete app and the code in my delete button contains the following code:

    Self:Delete()

    I get a processor stack error. While debugging I see the delete code execute over and over until I get the error. I don't understand why the code executes over nd over, and the delete never occurs!

    Any ideas...thank you,

    David
    I have a Delete button that contains this code:

    Self:Delete()

    I am using Virtalbox
    windows 3.1
    V.O. 1.0
    Holy Crap!

    Robert it worked, But I don't understand...Self is my datawindow, super gets me to the app level, as I under stand this, which is why I don't understand. A more detailed explanation would be GREATLY appreciated.

    Many thanks,

    David
    Oh yes...So then similarly my add code should be IF super:Append() = TRUE instead of IF Self:Append() = TRUE which is what I have now
    This was also confusing because Self:Append() worked and Self:Delete did not. Thanks again

    The problem with the Delete() method was that you named the method that
    was calling Delete(), also "Delete", something like that:

    METHOD Delete() CLASS ...
    SELF:Delete()

    so that code in line 2 was calling the same method itself again and
    again. Using SUPER instead of SELF, you tell the compiler that you want
    to call the same named method that is called one level lower in the
    class hierarchy, so there's no recursive call anymore.

    It's the same with Append(), if you were calling it from a same named
    method like this:

    METHOD Append() CLASS ...
    SELF:Delete() // recursive call

    then you woudl have again the same problem.

    Btw, are you really using VO 1.0 and Win 3.1 (in a virtual machine) as
    you mentioned in one of your previous posts?

    Chris

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Karl Faller@21:1/5 to Chris Pyrgas on Sun Jan 22 11:18:43 2023
    On Sat, 21 Jan 2023 10:45:40 +0200, Chris Pyrgas wrote:

    METHOD Append() CLASS ...
    SELF:Delete() // recursive call

    then you woudl have again the same problem.
    FTR, Chris, this should be:

    METHOD Append() CLASS ...
    SELF:Append() // recursive call

    Regards

    Karl

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Chris Pyrgas <"chris (at@21:1/5 to Karl Faller on Mon Jan 23 11:00:33 2023
    Thanks Karl :)

    On 22/01/2023 12:18, Karl Faller wrote:
    On Sat, 21 Jan 2023 10:45:40 +0200, Chris Pyrgas wrote:

    METHOD Append() CLASS ...
    SELF:Delete() // recursive call

    then you woudl have again the same problem.
    FTR, Chris, this should be:

    METHOD Append() CLASS ...
    SELF:Append() // recursive call

    Regards

    Karl


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)