Re: O$6x: crashing
Thank you for checking.
As usual, the problem was caused by something else, I finally got to the bottom of this.
As mentioned before, somebody used table class name as subtype for the instance var of type row, this was part of window method.
When doing some refactoring I have copied method into table class which unfortunately also created instance var of same name inside of the table class, I didn’t notice this initially. Since the table class is subclassed from underlying super class the $construct() method during instanciation runs also following code:
Do $schemas.[$cinst().$sqlclassname()].$objs.$makelist($ref.$name,$ref.$primarykey) Returns vLst
The above code is perfectly OK but in this case it was causing crashing.
After I have removed the copied instance var from my table class everything runs as expected.
I typically avoid putting table class name as subtype, rather use $definefromsqlclass() explicitly.
For the similar reason I avoid using object class names as subtypes for object variables using instead $objects.myObject.$new().
Greg
On Dec 28, 2017, at 5:04 PM, Mayada Al-Kishtini <malkishtini@gmail.com> wrote:
> I assumed you meant to add a public method and call it from the table class
> construct..
> So this is what I did:
> Created the public method $test in my TC and then added this line as a
> first line in its $construct method
> Do $cinst.$test
>
> Nothing happened.
> Then I removed the call to the public method and juts left the method and
> same thing. No crash.
>
> HTH,
> Mayada
>
> —–Original Message—–
> From: omnisdev-en [mailto:omnisdev-en-bounces@lists.omnis-dev.com] On Behalf
> Of Grzegorz (Greg) Pasternak
> Sent: Thursday, December 28, 2017 4:44 PM
> To: OmnisDev List – English
> Subject: Re: O$6x: crashing
>
> Mayada;
>
> Can you add public method to the table class (doesn’t need to do anything
> nor be used) and try again?
> I have discovered just now that the problem occurs after I create the public
> method on the table class.
>
> When I revert the code to the original copy then I don’t see the crash.
>
> Greg
>
> On Dec 28, 2017, at 4:34 PM, Mayada Al-Kishtini <malkishtini@gmail.com>
> wrote:
>
>> Hi Greg,
>> I just tested it in OS6.1.3 and it didn’t crash. Is there any code in
>> your table class $construct that could be causing the crash?
>>
>> Mayada
>>
>> —–Original Message—–
>> From: omnisdev-en [mailto:omnisdev-en-bounces@lists.omnis-dev.com] On
>> Behalf Of Grzegorz (Greg) Pasternak
>> Sent: Thursday, December 28, 2017 4:21 PM
>> To: OmnisDev List – English
>> Subject: O$6x: crashing
>>
>> I have discovered following situation that is causing crash.
>> Instance row variable defined from table class (by setting subtype to
>> table
>> class) is used with $define() (probably an attempt to clear the row
>> definition).
>>
>> Have anybody of you encountered this?
>>
>>
>>
>> ======================
>> Grzegorz (Greg) Pasternak
>> grzegorz@myfastcom.ca
>>
>> “Facta non verba”
>>
>>
>>
>>
>> _____________________________________________________________
>> Manage your list subscriptions at lists.omnis-dev.com
>>
>> _____________________________________________________________
>> Manage your list subscriptions at lists.omnis-dev.com
>>
>
>
>
>
> ======================
> Grzegorz (Greg) Pasternak
> grzegorz@myfastcom.ca
>
> “Facta non verba”
>
>
>
>
> _____________________________________________________________
> Manage your list subscriptions at lists.omnis-dev.com
>
> _____________________________________________________________
> Manage your list subscriptions at lists.omnis-dev.com
>
======================
Grzegorz (Greg) Pasternak
grzegorz@myfastcom.ca
“Facta non verba”
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com