[ENH] SMLoader search pane
Daniel Vainsencher
danielv at netvision.net.il
Mon Jun 16 18:43:56 UTC 2003
The latest version of SM-Loader integrates this code - I got tired of
the same exercise. It also disables by default the much-hated
same-squeak-version-filter.
Now up on SM.
Daniel
Andreas Raab <andreas.raab at gmx.de> wrote:
> This is a multi-part message in MIME format.
>
> --Boundary_(ID_ilzRiytRTZ1IHZLAKk/Abg)
> Content-type: text/plain; charset=us-ascii
> Content-transfer-encoding: 7BIT
>
> Hi Guys,
>
> I got tired of scrolling through SMLoader's list endlessly so I added a
> little search pane which will get you to the package you're looking for much
> more quickly if you happen to know a bit about it's name. E.g., for finding
> StarBrowser type in "star" and hit return. In addition, it'll tell you if
> there's no package by that name - typically a good indicator for turning off
> "show only packages for the current version" without having to read through
> all the entries.
>
> Enjoy,
> - Andreas
>
> --Boundary_(ID_ilzRiytRTZ1IHZLAKk/Abg)
> Content-type: application/octet-stream; name=SMLoader-SearchPane.1.cs
> Content-transfer-encoding: quoted-printable
> Content-disposition: attachment; filename=SMLoader-SearchPane.1.cs
>
> 'From Squeak3.5 of ''11 April 2003'' [latest update: #5180] on 15 June =
> 2003 at 9:16:33 pm'!=0D"Change Set: SMLoader-SearchPane=0DDate: 15 =
> June 2003=0DAuthor: Andreas Raab=0D=0DAdds a small search pane to =
> SMLoader for finding packages by name. Just type in a fragment of the =
> name and hit return."!=0D=0D=0D!SMLoader methodsFor: 'gui building' =
> stamp: 'ar 6/15/2003 21:12'!=0DbuildSearchPane=0D | typeInView |=0D =
> typeInView _ PluggableTextMorph on: self =0D text: nil accept: =
> #findPackage:notifying:=0D readSelection: nil menu: nil.=0D typeInView =
> setBalloonText:'To find a package type in a fragment of its name and hit =
> return'.=0D typeInView acceptOnCR: true.=0D typeInView =
> hideScrollBarIndefinitely.=0D ^typeInView! !=0D=0D!SMLoader methodsFor: =
> 'gui building' stamp: 'ar 6/15/2003 21:11'!=0DcreateWindow=0D self =
> addMorph: (self buildSearchPane borderWidth: 0)=0D frame: (0 at 0 corner: =
> 0.4 at 0.07).
> self addMorph: (self buildMorphicPackagesList borderWidth: 0)
> frame: (0 @ 0.07 corner: 0.4 @ 1).
> self addMorph: (self buildPackagePane borderWidth: 0)
> frame: (0.4 @ 0 corner: 1.0 @ 1.0).
> self=20
> on: #mouseEnter
> send: #paneTransition:
> to: self.
> self=20
> on: #mouseLeave
> send: #paneTransition:
> to: self.
> self setUpdatablePanesFrom: #(#packageNameList #selectedPackagesList).
> self setLabel: 'SM Package Loader'! !=0D=0D!SMLoader methodsFor: =
> 'model' stamp: 'ar 6/15/2003 21:15'!=0DfindPackage: aString notifying: =
> aView=0D "search and select a package with the given (sub) string"=0D | =
> index list match |=0D match :=3D aString asString asLowercase.=0D index =
> :=3D self packagesListIndex.=0D list :=3D self packageNameList.=0D =
> index+1 to: list size do:[:i|=0D ((list at: i) asLowercase =
> includesSubString: match) =0D ifTrue:[^self packagesListIndex: i].=0D =
> ].=0D "wrap around"=0D 1 to: index do:[:i|=0D ((list at: i) asLowercase =
> includesSubString: match) =0D ifTrue:[^self packagesListIndex: i].=0D =
> ].=0D self inform: 'No package matching ', aString asString.! !=0D=0D=
>
> --Boundary_(ID_ilzRiytRTZ1IHZLAKk/Abg)
> MIME-version: 1.0
> Content-type: text/plain; charset=us-ascii
> Content-transfer-encoding: 7BIT
>
>
>
> --Boundary_(ID_ilzRiytRTZ1IHZLAKk/Abg)--
More information about the Squeak-dev
mailing list
|