Store Question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Store Question

Mark Pirogovsky-3
Hello All,

I know the class name and the method selector.  Is there any UI in the
current Store Tools which would allow me to query the Store db to find
out the Package  this method was first defined in?
  Or to allow me to browse the Store implementation of unloaded method
if I know the Class and selector ?

Any pointers would be greatly appreciated.

TIA,

--Mark

Reply | Threaded
Open this post in threaded view
|

Re: Store Question

Holger Kleinsorgen-4
Mark Pirogovsky wrote:
> Hello All,
>
> I know the class name and the method selector.  Is there any UI in the
> current Store Tools which would allow me to query the Store db to find
> out the Package  this method was first defined in?
>  Or to allow me to browse the Store implementation of unloaded method if
> I know the Class and selector ?

I don't know an UI that does what you want, but you can call some code
in a workspace:

   ((( Store.Method allMethodVersionsNamed: 'nameOfSelector' inClass:
'Root.Smalltalk.NameOfClass' meta: false )
         asSortedCollection: [: m1 : m2 | m1 timeStamp <= m2 timeStamp ])
     first containingPackages
         asSortedCollection: [: m1 : m2 | m1 timeStamp <= m2 timeStamp ])
     last displayString.

For class methods #meta must be set to true. And yeah, it looks ugly ;)

Regards, Holger

Reply | Threaded
Open this post in threaded view
|

Re: Store Question

Holger Kleinsorgen-4
Holger Kleinsorgen wrote:
>   ((( Store.Method allMethodVersionsNamed: 'nameOfSelector' inClass:
> 'Root.Smalltalk.NameOfClass' meta: false )
>         asSortedCollection: [: m1 : m2 | m1 timeStamp <= m2 timeStamp ])
>     first containingPackages
>         asSortedCollection: [: m1 : m2 | m1 timeStamp <= m2 timeStamp ])
>     last displayString.


Bugfix: last line should be "first displayString", not "last displayString."

Reply | Threaded
Open this post in threaded view
|

Re: Store Question

Mark Pirogovsky-3
Thanks Holger,
it was very helpful.

Here is the Workspace script to show all of the versions of the methods
for he class  available in store:

|inst |
( inst := TabApplicationSystemBrowser new )
                        tabApplication: ( TabApplicationSystemBrowser
defaultVersionBrowserTab newOnBrowser: inst );
                        browseMethodsOrStatics: ((( Store.Method allMethodVersionsNamed:
'nameOfSelector' inClass: 'Root.Smalltalk.NameOfClass' meta: true /false )
         asSortedCollection: [: m1 : m2 | m1 timeStamp <= m2 timeStamp ]));
                        open.

                inst builder window label: 'nameOfSelector',  ' Version Browser'



--Mark


Holger Kleinsorgen wrote:

> Holger Kleinsorgen wrote:
>
>>   ((( Store.Method allMethodVersionsNamed: 'nameOfSelector' inClass:
>> 'Root.Smalltalk.NameOfClass' meta: false )
>>         asSortedCollection: [: m1 : m2 | m1 timeStamp <= m2 timeStamp ])
>>     first containingPackages
>>         asSortedCollection: [: m1 : m2 | m1 timeStamp <= m2 timeStamp ])
>>     last displayString.
>
>
>
> Bugfix: last line should be "first displayString", not "last
> displayString."
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Store Question

Alan Knight-2
In reply to this post by Mark Pirogovsky-3
At 10:03 AM 3/14/2006, Mark Pirogovsky wrote:
>Hello All,
>
>I know the class name and the method selector.  Is there any UI in the current Store Tools which would allow me to query the Store db to find out the Package  this method was first defined in?
> Or to allow me to browse the Store implementation of unloaded method if I know the Class and selector ?
>
>Any pointers would be greatly appreciated.

If you have the method in your image, then you can easily bring up a version list on it. And if you select a particular version of that method you can ask for containing package versions, the first of which is presumably the first one it was defined in.

If you don't have it loaded, from the Class pane, Store->Browse Removed Methods will give you a list of methods in that class but not in the image, and allow you to get a version browser on it. From there, you can ask for containing versions.

Or if you have StoreForGlorpVWUI loaded, while it's not a UI, you could open a StoreWorkspace, and run the following expression
packages := session read: StorePackage where: [:each |
        each methods anySatisfy: [:eachMethod |
                eachMethod definition name = 'yourself']].
(packages asSortedCollection: [:a :b | a timestamp <= b timestamp]) first.

But that's not a fast query on a large database, as it's full-scanning all methods. Also, this is one of the predefined ones in the workspace, but I notice it's wrong there - hasn't kept up to date with some changes in the model.

--
Alan Knight [|], Cincom Smalltalk Development
[hidden email]
[hidden email]
http://www.cincom.com/smalltalk

"The Static Typing Philosophy: Make it fast. Make it right. Make it run." - Niall Ross

Reply | Threaded
Open this post in threaded view
|

Re: Store Question

Diane Savereide
In reply to this post by Holger Kleinsorgen-4
From the Transcript, Store>>Browse Definitions>>Selector. This accepts
wildcards. Select the class and it will show you all the definitions of that
method regardless of package.

In the RB, class menu, Store>>Browse Removed Methods will show you methods
for a class that are in the database, but not your image.



> Mark Pirogovsky wrote:
>> Hello All,
>>
>> I know the class name and the method selector.  Is there any UI in the
>> current Store Tools which would allow me to query the Store db to find
>> out the Package  this method was first defined in?
>>  Or to allow me to browse the Store implementation of unloaded method if
>> I know the Class and selector ?
>
> I don't know an UI that does what you want, but you can call some code in
> a workspace:
>
>   ((( Store.Method allMethodVersionsNamed: 'nameOfSelector' inClass:
> 'Root.Smalltalk.NameOfClass' meta: false )
>         asSortedCollection: [: m1 : m2 | m1 timeStamp <= m2 timeStamp ])
>     first containingPackages
>         asSortedCollection: [: m1 : m2 | m1 timeStamp <= m2 timeStamp ])
>     last displayString.
>
> For class methods #meta must be set to true. And yeah, it looks ugly ;)
>
> Regards, Holger
>
>

Reply | Threaded
Open this post in threaded view
|

Universal (i.e., Intel) VM for the Mac?

Stephen Travis Pope

Hello all,

Does anyone know of the ETA of an Intel VM for the Mac?

stp

--
  Stephen Travis Pope -- Santa Barbara, California, USA


Reply | Threaded
Open this post in threaded view
|

Re: Universal (i.e., Intel) VM for the Mac?

Samuel S. Shuster <sames@interaccess.com>
Stephen,

>Does anyone know of the ETA of an Intel VM for the Mac?

It is being worked on as we speak. By 7.5 for sure, maybe (MAYBE!) sooner.

                                And So It Goes
                                     Sames
______________________________________________________________________

Samuel S. Shuster [|]
VisualWorks Engineering, GUI Project
Smalltalk Enables Success -- What Are YOU Using?

Reply | Threaded
Open this post in threaded view
|

Re: Universal (i.e., Intel) VM for the Mac?

Stephen Travis Pope

Is there an ETA for VW 7.5?

stp

--
    Stephen Travis Pope -- Santa Barbara, California, USA



Begin forwarded message:

Resent-From: [hidden email]

From: "Samuel S. Shuster <[hidden email]>" <[hidden email]>

Date: March 15, 2006 9:34:33 AM PST

To: Stephen Travis Pope <[hidden email]>

Resent-Cc: recipient list not shown: ;

Cc: vwnc <[hidden email]>, Stephen Pope <[hidden email]>

Subject: Re: Universal (i.e., Intel) VM for the Mac?

Reply-To: [hidden email]


Stephen,


Does anyone know of the ETA of an Intel VM for the Mac?


It is being worked on as we speak. By 7.5 for sure, maybe (MAYBE!) sooner.


                                And So It Goes

                                     Sames

______________________________________________________________________


Samuel S. Shuster [|]

VisualWorks Engineering, GUI Project

Smalltalk Enables Success -- What Are YOU Using?