TreeView example

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

TreeView example

Michael Klein
Can't seem to get this to work...
Trying to have a simple workspace similar to
        SequenceView example3

================
root := Object.

hierarchyHolder := IndentedTreeSelectionInList
                listObjectHierarchy: root
                childBlock: [:thing | thing subclasses]
                childNameBlock: [:thing | thing name ].

view := TreeView openOn: hierarchyHolder.
================-

Cheers,
        Mike Klein
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: TreeView example

Maarten Mostert

Well I didn't spot your out of context email adress "javasucksman" and actually can't believe such an adress made it through my firewall.


I offended you right by suggesting you're probably mixed up right ?  I am really sorry but from a first sight a TreeView should be openend on a kind of tree (like MultiSelectionInTree) with a Treemodel not on Object.

TreeView certainly is a kind of SequenceView but has not necessarily much to do with the example 3 you mentioned where the SéquenceView is opened on a collection and not on Object.

 

I can imagine that any reply upsets and mixes you up only further right ?

 

@+Maarten,

 

 

-----Original Message-----
From: "Michael Klein" <[hidden email]>
Sent: Sunday, 20 January, 2013 02:14
To: [hidden email]
Subject: Re: [vwnc] TreeView example



On Sat, Jan 19, 2013 at 4:34 PM, <[hidden email]> wrote:

Well a TreeView is not the same thing as a SequenceView right.

Not so far apart.. it is a direct subclass.

Seems to me that you're mixing things up ..

I'm not mixed up... if you don't want to think about the problem,
don't post.  Did you even look at example3?

-----Original Message-----
From: [hidden email]
Sent: Saturday, 19 January, 2013 22:34
To: "Mike Klein" <[hidden email]>
Subject: RE: [vwnc] TreeView example

Well a TreeView is not the same thing as a SequenceView right.

Seems to me that you're mixing things up ..

 

Regards,

 

@+Maarten,

 

-----Original Message-----
From: "Mike Klein" <[hidden email]>
Sent: Friday, 18 January, 2013 22:37
To: [hidden email]
Subject: [vwnc] TreeView example

Can't seem to get this to work...
Trying to have a simple workspace similar to 
SequenceView example3

================
root := Object.

hierarchyHolder := IndentedTreeSelectionInList
listObjectHierarchy: root
childBlock: [:thing | thing subclasses]
childNameBlock: [:thing | thing name ].

view := TreeView openOn: hierarchyHolder.
================-

Cheers,
Mike Klein
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: TreeView example

Andres Valloud-6
Double technical, 5 minute timeout to both for quarreling! :)

On 1/19/13 11:59 PM, [hidden email] wrote:

> Well I didn't spot your out of context email adress "javasucksman" and
> actually can't believe such an adress made it through my firewall.
>
>
> I offended you right by suggesting you're probably mixed up right ?  I
> am really sorry but from a first sight aTreeView should be openend on a
> kind of tree (like MultiSelectionInTree) with a Treemodel not on Object.
>
> TreeView certainly is a kind of SequenceView but has
> not necessarily much to do with the example 3 you mentioned where the
> SéquenceView is opened on a collection and not on Object.
>
> I can imagine that any reply upsets and mixes you up only further right ?
>
> @+Maarten,
>
> -----Original Message-----
> From: "Michael Klein" <[hidden email]>
> Sent: Sunday, 20 January, 2013 02:14
> To: [hidden email]
> Subject: Re: [vwnc] TreeView example
>
>
>
> On Sat, Jan 19, 2013 at 4:34 PM, <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Well a TreeView is not the same thing as a SequenceView right.
>
> Not so far apart.. it is a direct subclass.
>
>     Seems to me that you're mixing things up ..
>
> I'm not mixed up... if you don't want to think about the problem,
> don't post.  Did you even look at example3?
>
>     -----Original Message-----
>     From: [hidden email]
>     Sent: Saturday, 19 January, 2013 22:34
>     To: "Mike Klein" <[hidden email]>
>     Subject: RE: [vwnc] TreeView example
>
>     Well a TreeView is not the same thing as a SequenceView right.
>
>     Seems to me that you're mixing things up ..
>
>     Regards,
>
>     @+Maarten,
>
>     -----Original Message-----
>     From: "Mike Klein" <[hidden email]>
>     Sent: Friday, 18 January, 2013 22:37
>     To: [hidden email]
>     Subject: [vwnc] TreeView example
>
>     Can't seem to get this to work...
>     Trying to have a simple workspace similar to
>     SequenceView example3
>
>     ================
>     root := Object.
>
>     hierarchyHolder := IndentedTreeSelectionInList
>     listObjectHierarchy: root
>     childBlock: [:thing | thing subclasses]
>     childNameBlock: [:thing | thing name ].
>
>     view := TreeView openOn: hierarchyHolder.
>     ================-
>
>     Cheers,
>     Mike Klein
>     _______________________________________________
>     vwnc mailing list
>     [hidden email]
>     http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: TreeView example

Michael Klein
On Sun, Jan 20, 2013 at 3:10 AM, Andres Valloud <[hidden email]> wrote:
Double technical, 5 minute timeout to both for quarreling! :)

Five minutes?!?!?!?
I thought ten was a good number. 
 

On 1/19/13 11:59 PM, [hidden email] wrote:
Well I didn't spot your out of context email adress "javasucksman" and
actually can't believe such an adress made it through my firewall.

I have my ways
 
 I offended you right by suggesting you're probably mixed up right ?

Right.
 
 I am really sorry but from a first sight aTreeView should be openend on a

kind of tree (like MultiSelectionInTree) with a Treemodel not on Object.

I was using the class hierarchy as a convenient and familiar tree, with Object being the root.
 
TreeView certainly is a kind of SequenceView but has
not necessarily much to do with the example 3 you mentioned where the
SéquenceView is opened on a collection and not on Object.

Yes.. I wanted an example in the spirit of example3.... 
not to make (1 to: 500 by: 10)  look like a tree.

I can imagine that any reply upsets and mixes you up only further right ?

Wrong.. well consider replies are good... your not likely to mix me up in either case.
None the less, sorry I was snippy, but I didn't do it on the list.
Alas, I wish I could just buy you a beer.

Enough fun, back to work....

The following does what I want... 
BUT
now make it work in a workspace without the Painter 
(preferably without the UIBuilder) 
in the spirit of [ SequenceView class >># example3 ]

=======
From VisualWorks® Personal Use Edition, 7.8 of March 30, 2011 on January 20, 2013 at 4:56:44 PM

Class Smalltalk.TreeSample

Superclass: UI.ApplicationModel
Type: none
Instance variables: tree 
Attributes: #(#(#package '(none)'))

 -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -   
TreeSample class methods for 'interface specs'

windowSpec
"Tools.UIPainter new openOnClass: self andSelector: #windowSpec"

<resource: #canvas>
^#(#{UI.FullSpec} 
#window: 
#(#{UI.WindowSpec} 
#label: 'Unlabeled Canvas' 
#bounds: #(#{Graphics.Rectangle} 540 173 958 489 ) ) 
#component: 
#(#{UI.SpecCollection} 
#collection: #(
#(#{UI.TreeViewSpec} 
#layout: #(#{Graphics.LayoutFrame} 38 0 28 0 -27 1 -86 1 ) 
#name: #TreeView1 
#model: #tree 
#useModifierKeys: true 
#selectionType: #highlight ) 
#(#{UI.ActionButtonSpec} 
#layout: #(#{Graphics.LayoutFrame} 69 0 -63 1 156 0 -19 1 ) 
#name: #ActionButton1 
#model: #inspect 
#label: 'Inspect' 
#defaultable: true ) ) ) )

 -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -   
TreeSample methods for 'aspects'

tree


| treeModel |
tree notNil ifTrue: [^tree].
tree := SelectionInTree new.
treeModel := TreeModel 
on: Object
displayRoot: true
childrenWith: [:each | each subclasses asSortedCollection: [ :a :b | a name <= b name]  ].

tree treeHolder value: treeModel.
^tree

=======

 

@+Maarten,

-----Original Message-----
From: "Michael Klein" <[hidden email]>
Sent: Sunday, 20 January, 2013 02:14
To: [hidden email]
Subject: Re: [vwnc] TreeView example



On Sat, Jan 19, 2013 at 4:34 PM, <[hidden email]
<mailto:[hidden email]>> wrote:

    Well a TreeView is not the same thing as a SequenceView right.

Not so far apart.. it is a direct subclass.

    Seems to me that you're mixing things up ..

I'm not mixed up... if you don't want to think about the problem,
don't post.  Did you even look at example3?

    -----Original Message-----
    From: [hidden email]
    Sent: Saturday, 19 January, 2013 22:34
    To: "Mike Klein" <[hidden email]>
    Subject: RE: [vwnc] TreeView example

    Well a TreeView is not the same thing as a SequenceView right.

    Seems to me that you're mixing things up ..

    Regards,

    @+Maarten,

    -----Original Message-----
    From: "Mike Klein" <[hidden email]>
    Sent: Friday, 18 January, 2013 22:37
    To: [hidden email]
    Subject: [vwnc] TreeView example

    Can't seem to get this to work...
    Trying to have a simple workspace similar to
    SequenceView example3

    ================
    root := Object.

    hierarchyHolder := IndentedTreeSelectionInList
    listObjectHierarchy: root
    childBlock: [:thing | thing subclasses]
    childNameBlock: [:thing | thing name ].

    view := TreeView openOn: hierarchyHolder.
    ================-

    Cheers,
    Mike Klein
    _______________________________________________
    vwnc mailing list
    [hidden email]
    http://lists.cs.uiuc.edu/mailman/listinfo/vwnc



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: TreeView example

Andres Valloud-6
On 1/20/13 2:04 PM, Michael Klein wrote:
> On Sun, Jan 20, 2013 at 3:10 AM, Andres Valloud <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Double technical, 5 minute timeout to both for quarreling! :)
>
>
> Five minutes?!?!?!?
> I thought ten was a good number.

... well you're right...

TEN MINUTES!!! :D

Andres.
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc