need info about containing package info in class metadata in Matlab

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

need info about containing package info in class metadata in Matlab

John W. Eaton
Administrator
Could someone run the following test in a recent version of Matlab and
report the result here?

Unpack the attached tar file.  It will create a directory tree
tst/+apkg/+bpkg/+cpkg containing a simple classdef file cls.m.  Then in
Matlab, cd to the tst directory and execute the following commands:

   x = ?apkg.bpkg.cpkg.cls
   x.ContainingPackage
   x.ContainingPackage.Name
   x.ContainingPackage.ContainingPackage
   x.ContainingPackage.ContainingPackage.Name

In Octave, the third line shows "apkg.bpkg.cpkg" but the fifth line
shows just "apkg" when I would expect it would show "apkg.bpkg", which I
think should be the containing package of "cpkg".

Thanks,

jwe


tst.tar.gz (286 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: need info about containing package info in class metadata in Matlab

nrjank


On Tue, Feb 19, 2019 at 2:36 PM John W. Eaton <[hidden email]> wrote:
Could someone run the following test in a recent version of Matlab and
report the result here?


v2018b

>> pwd
ans =
    'C:\Users\nicholas.jankowski\Desktop\test\mltest\tst'

>>  x = ?apkg.bpkg.cpkg.cls
x =
  class with properties:
                     Name: 'apkg.bpkg.cpkg.cls'
              Description: ''
      DetailedDescription: ''
                   Hidden: 0
                   Sealed: 0
                 Abstract: 0
              Enumeration: 0
          ConstructOnLoad: 0
         HandleCompatible: 0
          InferiorClasses: {0×1 cell}
        ContainingPackage: [1×1 meta.package]
     RestrictsSubclassing: 0
             PropertyList: [0×1 meta.property]
               MethodList: [3×1 meta.method]
                EventList: [0×1 meta.event]
    EnumerationMemberList: [0×1 meta.EnumeratedValue]
           SuperclassList: [0×1 meta.class]

>> x.ContainingPackage
ans =
  package with properties:
                   Name: 'apkg.bpkg.cpkg'
            Description: ''
    DetailedDescription: ''
              ClassList: [1×1 meta.class]
           FunctionList: [0×1 meta.method]
            PackageList: [0×1 meta.package]
      ContainingPackage: [1×1 meta.package]

>>  x.ContainingPackage.Name
ans =
    'apkg.bpkg.cpkg'

>> x.ContainingPackage.ContainingPackage
ans =
  package with properties:
                   Name: 'apkg.bpkg'
            Description: ''
    DetailedDescription: ''
              ClassList: [0×1 meta.class]
           FunctionList: [0×1 meta.method]
            PackageList: [1×1 meta.package]
      ContainingPackage: [1×1 meta.package]

>> x.ContainingPackage.ContainingPackage.Name
ans =
    'apkg.bpkg' 
Reply | Threaded
Open this post in threaded view
|

Re: need info about containing package info in class metadata in Matlab

John W. Eaton
Administrator
On 2/19/19 3:17 PM, Nicholas Jankowski wrote:

>  >> x.ContainingPackage.ContainingPackage
> ans =
>    package with properties:
>                     Name: 'apkg.bpkg'
>              Description: ''
>      DetailedDescription: ''
>                ClassList: [0×1 meta.class]
>             FunctionList: [0×1 meta.method]
>              PackageList: [1×1 meta.package]
>        ContainingPackage: [1×1 meta.package]
>
>  >> x.ContainingPackage.ContainingPackage.Name
> <http://x.ContainingPackage.ContainingPackage.Name>
> ans =
>      'apkg.bpkg'

Thanks, I will try to fix Octave to match these results.

jwe

Reply | Threaded
Open this post in threaded view
|

Re: need info about containing package info in class metadata in Matlab

John W. Eaton
Administrator
On 2/19/19 3:53 PM, John W. Eaton wrote:

> On 2/19/19 3:17 PM, Nicholas Jankowski wrote:
>
>>  >> x.ContainingPackage.ContainingPackage
>> ans =
>>    package with properties:
>>                     Name: 'apkg.bpkg'
>>              Description: ''
>>      DetailedDescription: ''
>>                ClassList: [0×1 meta.class]
>>             FunctionList: [0×1 meta.method]
>>              PackageList: [1×1 meta.package]
>>        ContainingPackage: [1×1 meta.package]
>>
>>  >> x.ContainingPackage.ContainingPackage.Name
>> <http://x.ContainingPackage.ContainingPackage.Name>
>> ans =
>>      'apkg.bpkg'
>
> Thanks, I will try to fix Octave to match these results.

I pushed the following changesets to print property info by default for
classdef objects and to fix the containing package info:

   http://hg.savannah.gnu.org/hgweb/octave/rev/2c4ad1958cab
   http://hg.savannah.gnu.org/hgweb/octave/rev/f3523eb55791

jwe