some icon difficulty

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

some icon difficulty

Smalltalkiano
Hi OA team,

    if I'm not misinformed, the information that the view composer generates
for a presenter, is saved serialized.

    When you want some icon for the main shell, you select it like a file
open to get the path, but this have a limitation when you want to deploy
your application and want happy experiences with different languages windows
versions.

    We use the registry to store some defaultPath, resourcePath, etc. those
paths are defined at installation time by a third party installer. So... we
have all resources well except the main window application icon which path
is harcoded.

    any suggestion?

best regards,

Seb


Reply | Threaded
Open this post in threaded view
|

Re: some icon difficulty

Ian Bartholomew-5
Seb,

>     any suggestion?

I'm not quite sure which icons you mean here but if it's the #largeIcon and
#smallIcon aspects of your main Shell then rather than using the VC you can
set them programmatically -

onViewOpened
    super onViewOpened.
    self view largeIcon: (Icon fromId: 'whatever.ico')

The filename can actually be obtained from the registry or wherever.  For a
deployed app the deployment method would have to be "package class based" so
that the shell is initialised, and it's #onViewOpened method called, every
time the app is opened.

You may also want to have a look at the FileLocator class, which could be
another, simpler,  solution - see the FileLocator class comment.  Setting
the default file locator to one of your choice (that gets it's base path
from the registry) might work but only if the folders used by your app have
a regular structure.

Regards
    Ian


Reply | Threaded
Open this post in threaded view
|

Re: some icon difficulty

Smalltalkiano
Thanks again Ian,

    I think thats the way...


Seb

"Ian Bartholomew" <[hidden email]> escribió en el mensaje
news:yisL7.7133$ur6.395229@wards...
> Seb,
>
> >     any suggestion?
>
> I'm not quite sure which icons you mean here but if it's the #largeIcon
and
> #smallIcon aspects of your main Shell then rather than using the VC you
can
> set them programmatically -
>
> onViewOpened
>     super onViewOpened.
>     self view largeIcon: (Icon fromId: 'whatever.ico')
>
> The filename can actually be obtained from the registry or wherever.  For
a
> deployed app the deployment method would have to be "package class based"
so
> that the shell is initialised, and it's #onViewOpened method called, every
> time the app is opened.
>
> You may also want to have a look at the FileLocator class, which could be
> another, simpler,  solution - see the FileLocator class comment.  Setting
> the default file locator to one of your choice (that gets it's base path
> from the registry) might work but only if the folders used by your app
have
> a regular structure.
>
> Regards
>     Ian
>
>
>
>