Resources for a deployed application

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

Resources for a deployed application

Smalltalkiano-4
Hi all,

    I was thinking to improve the way of storing resources for the
applications one could deploy. There are some matters that I want to share
here with you all (writting here always helped me to think :)

    Almost every application needs to have some resources stored in some
way. Lets call it the application 'resource bank'. I would like to know your
experiences delpoying applications and they 'resource bank'. For example, as
far as I know one can use a dll that could hold a lot of icons, bmp's etc.
but I haven't used it ever. Anybody knows how to build your own dll that
acts as this 'resource bank'? or a tool that can help yu to make this and
access then from your dolphin code?

    About those little arrows indicating the sort way in the headers of the
fields of a list:     I saw that those icons are stored in a OA dll and then
they are stripped in the exe so I'll have to include them in my own
'resource bank'.

    Right now I have the icons in a folder but I'm not too happy with this
solution because is a little to open to a final application.

    By the way... in an app that I've made I have a large list and it take a
couple of seconds to be ordered clicking in the header. But when you click
again to make reverse order it takes a couple of tens of seconds. Could I be
doing doning something wrong?

    best regards,

Seb


Reply | Threaded
Open this post in threaded view
|

Re: Resources for a deployed application

rush
"Smalltalkiano" <[hidden email]> wrote in message
news:b0ubnp$t8b7d$[hidden email]...
>     Right now I have the icons in a folder but I'm not too happy with this
> solution because is a little to open to a final application.

it is possible to have your icons and bitmaps stored in the deployed exe.
More information how to do it can be found on the wiki, I think the page
name is IconsToGo .

>     By the way... in an app that I've made I have a large list and it take
a
> couple of seconds to be ordered clicking in the header. But when you click
> again to make reverse order it takes a couple of tens of seconds. Could I
be
> doing doning something wrong?

hmm, default SortedCollection used to be very inefficient for collection
with very large number of same keys, since it would reswap those items more
than necessary. What you are expiriencing may be related to it?

rush
--
http://www.templatetamer.org/


Reply | Threaded
Open this post in threaded view
|

Re: Resources for a deployed application

Smalltalkiano-4
"rush" <[hidden email]> escribió en el mensaje
news:b0uc55$5h3v$[hidden email]...
> "Smalltalkiano" <[hidden email]> wrote in message
> news:b0ubnp$t8b7d$[hidden email]...
> >     Right now I have the icons in a folder but I'm not too happy with
this
> > solution because is a little to open to a final application.
>
> it is possible to have your icons and bitmaps stored in the deployed exe.
> More information how to do it can be found on the wiki, I think the page
> name is IconsToGo .
>
> >     By the way... in an app that I've made I have a large list and it
take
> a
> > couple of seconds to be ordered clicking in the header. But when you
click
> > again to make reverse order it takes a couple of tens of seconds. Could
I
> be
> > doing doning something wrong?
>
> hmm, default SortedCollection used to be very inefficient for collection
> with very large number of same keys, since it would reswap those items
more
> than necessary. What you are expiriencing may be related to it?

    Yes, I think it is. You know a way to improve this? May be taking a look
at the flipper inspector design could be inspiring. I mean... did you see
how it manages the collections showing only 200 items by time until you ask
for more?



> rush
> --
> http://www.templatetamer.org/
>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Resources for a deployed application

rush
"Smalltalkiano" <[hidden email]> wrote in message
news:b0v7ni$tsbu9$[hidden email]...
>     Yes, I think it is. You know a way to improve this? May be taking a
look
> at the flipper inspector design could be inspiring. I mean... did you see
> how it manages the collections showing only 200 items by time until you
ask
> for more?

It has been quite some time since I have looked into it, but I think that
the problem is that default order function returns true when compared
objects are the equal, but the sort implementation is more efficient if it
does not. (or it is other way around). So one possibility is maybe to
provide SortedCollection with sortblock other form default which does not
return true for equal objects. But you would need to look by yourself if
this is completely correct.

rush
--
http://www.templatetamer.org/


Reply | Threaded
Open this post in threaded view
|

Re: Resources for a deployed application

Chris Uppal-3
rush wrote:

> It has been quite some time since I have looked into it, but I think
> that the problem is that default order function returns true when
> compared objects are the equal, but the sort implementation is more
> efficient if it does not. (or it is other way around).

That's the right way around.  The sort implementation works better (when there
are equal values) if you give it a sort block that is like #<, rather than like
#<=.

Unfortunately, the default selector used by sorting is #<= so there's an
uneccesary inefficiency there that you can avoid by setting up a #<-style sort
block.

The reason that ListView collumns sort quickly in one direction and slowly in
the other is that ListViewColumn>>rowSortBlock implements reversing the column
sort order by sending #not to the result of the comparison set by the
#sortBlock aspect.  That effectively converts a #< into a #>=, and vice verca,
so that sorting the column in one direction will use SortedCollection in its
more efficient way, and the other will use it in the inefficient way.

If you change it (as I've finally just got around to doing in my image after
it's been annoying me for months) so that it implements reverse sorting by
swapping the order of the parameters to the sort block, rather than #not-ing
the answer, then the column will sort at the same speed (either quickly or
slowly) in both directions.

Blair/Andy, if you're reading, is there any chance of such a change making it
into the next patch level ?

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: Resources for a deployed application

Blair McGlashan
In reply to this post by rush
"rush" <[hidden email]> wrote in message
news:b0uc55$5h3v$[hidden email]...
> "Smalltalkiano" <[hidden email]> wrote in message
> news:b0ubnp$t8b7d$[hidden email]...
> >     Right now I have the icons in a folder but I'm not too happy with
this
> > solution because is a little to open to a final application.
> ...
> >     By the way... in an app that I've made I have a large list and it
take
> a
> > couple of seconds to be ordered clicking in the header. But when you
click
> > again to make reverse order it takes a couple of tens of seconds. Could
I
> be
> > doing doning something wrong?
>
> hmm, default SortedCollection used to be very inefficient for collection
> with very large number of same keys, since it would reswap those items
more
> than necessary. What you are expiriencing may be related to it?

There is an enhancement in PL2 which improves the issue of the sort
algorithm (quick sort) being very slow when sorting a list which is already
sorted.
http://object-arts.com/Lib/Downloads/5.0/266.st

Regards

Blair


Reply | Threaded
Open this post in threaded view
|

Re: Resources for a deployed application

Blair McGlashan
In reply to this post by Chris Uppal-3
"Chris Uppal" <[hidden email]> wrote in message
news:3e33f02d$0$167$[hidden email]...
> rush wrote:
> ...
> If you change it (as I've finally just got around to doing in my image
after
> it's been annoying me for months) so that it implements reverse sorting by
> swapping the order of the parameters to the sort block, rather than
#not-ing
> the answer, then the column will sort at the same speed (either quickly or
> slowly) in both directions.
>
> Blair/Andy, if you're reading, is there any chance of such a change making
it
> into the next patch level ?

Certainly, although it is more likely if you reduce the effort to zero by
sending us your patch :-).

Regards

Blair


Reply | Threaded
Open this post in threaded view
|

Re: Resources for a deployed application

John Brant
In reply to this post by Blair McGlashan
"Blair McGlashan" <[hidden email]> wrote in message
news:b1613i$vrh38$[hidden email]...
>
> There is an enhancement in PL2 which improves the issue of the sort
> algorithm (quick sort) being very slow when sorting a list which is
already
> sorted.
> http://object-arts.com/Lib/Downloads/5.0/266.st

I also posted a change to the insertsortFrom:to: method that you might want
to include
(http://groups.google.com/groups?q=insertion+sort+group:*dolphin*+author:Joh
n+author:Brant&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=FHy69.17377%24983.20967%40rw
crnsc53&rnum=1). The current method prefers a #< message, but if you change
the whileTrue: to a whileFalse:, you can make it prefer a #<= message.


John Brant


Reply | Threaded
Open this post in threaded view
|

Re: Resources for a deployed application

Chris Uppal-3
In reply to this post by Blair McGlashan
Blair,

> Certainly, although it is more likely if you reduce the effort to
> zero by sending us your patch :-).

NSSTD

    -- chris

!ListViewColumn methodsFor!

rowSortBlock
 "Private - Answer a two argument block that can be used to compare
 two rows based on this column, or nil if the column is not sortable.
 Note that the first time the sort block is accessed, it is returned as
originally
 set up. On the next access it is inverted, and on the next it is inverted
again
 (i.e. back to the original). This effectively toggles the sort order between
 ascending (or whatever it was originally) and descending, each time
 the sort block is accessed."

 ^self isSortable
  ifTrue:
   [self isSortOrderInverted
    ifTrue:
     [[:a :b | (getSortValueBlock value: (self contentFromRow: b) value: (self
contentFromRow: a))]]
    ifFalse:
     [[:a :b | getSortValueBlock value: (self contentFromRow: a) value: (self
contentFromRow: b)]]]! !
!ListViewColumn categoriesFor: #rowSortBlock!adapters!private! !


Reply | Threaded
Open this post in threaded view
|

Re: Resources for a deployed application

Blair McGlashan
In reply to this post by John Brant
"John Brant" <[hidden email]> wrote in message
news:IgyZ9.67278$_s4.37026@rwcrnsc54...

> "Blair McGlashan" <[hidden email]> wrote in message
> news:b1613i$vrh38$[hidden email]...
> >
> > There is an enhancement in PL2 which improves the issue of the sort
> > algorithm (quick sort) being very slow when sorting a list which is
> already
> > sorted.
> > http://object-arts.com/Lib/Downloads/5.0/266.st
>
> I also posted a change to the insertsortFrom:to: method that you might
want
> to include
>
(http://groups.google.com/groups?q=insertion+sort+group:*dolphin*+author:Joh
>
n+author:Brant&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=FHy69.17377%24983.20967%40rw
> crnsc53&rnum=1). The current method prefers a #< message, but if you
change
> the whileTrue: to a whileFalse:, you can make it prefer a #<= message.
>

Thanks John, I 'd forgotten about that one.

Regards

Blair