[aida] asFilename does not work?

Janko Mivšek janko.mivsek at eranova.si
Mon Jan 19 12:57:02 CET 2009


Hi Prashanth,

Prashanth Hebbar wrote:

> Thanks a lot for pointing SpFilename. I haven't tried it but will try soon.
>  
> I have another question more critical: when I add the line to register 
> my url, it remains in "red" colour in the workspace which means there's 
> something wrong (right?) but the url opens without issue. However, I saw 
> that the sitename is not recognized in the addLinkTo: anObject text: 
> aString view: #view.

So you registered an Url of your ANewsPortal and it now open in web 
browser without a problem? If so, then everything is ok. Try to inspect 
(AIDASite named: 'aidademo') urlResolver and its instvars #allWebPages 
and #allURLLinks to see, what you actually registered.

> Here's a description of my  app (modeled on the tutorial):
> 1. I have model domains ANewsPortal (holds references to all news) and 
> ANews (defines news parts). I have ANewsPortalApp and ANewsApp.
>  
> 2. I have viewMain under ANewsPortalApp
>  
> 3. I know i have to add a viewMain for ANewsApp and here is my 
> confusion: what view do I implement here.

Your model is almost a replica of that from Aida tutorial, so you should 
made it working without a problem if you followed and understood the 
tutorial well. So, in ANewsApp implement the same view methods as they 
are in ADemoAddressApp.

> Sorry to bug you, I couldn't resolve this reading the tutorial.
>  
> is this confusion contributing to the "addLinkTo:" issue I am facing?

addLinkTo: aDomainObject will make an Url link automatically if not done 
and registered in urlResolver before yet. So, for a link to a root 
object (which you should register at the start) it will use already 
registered one, while for all new objects (like new news in your case) 
Urls will be  created and registered at the time you call addLinkTo: . 
And as in tutorial, you can control the look of the generated Url by 
#preferedUrl methon in your domain objects.

> Please help me resolve this.

I hope above will help you a bit

Best regards
Janko



>  
>  regards.
>  
> On Sun, Jan 18, 2009 at 2:45 PM, Janko Mivšek <janko.mivsek na eranova.si 
> <mailto:janko.mivsek na eranova.si>> wrote:
> 
>     Hi Prashanth,
> 
>     Use SpFilename named: 'my.file' instead of 'my.file' asFilename.
> 
>     Former is a portable implementation of file support based on Sport
>     portability library, while later works on VisualWorks, not on Squeak.
> 
>     Janko
> 
>     Prashanth Hebbar wrote:
>      > Hi Nico:
>      > ah sorry to omit that info. I am using Squeak-dev 3.10 (Damien
>     C's image).
>      > regards.
>      > On Sun, Jan 18, 2009 at 4:46 AM, nicolas petton
>      > <petton.nicolas na gmail.com <mailto:petton.nicolas na gmail.com>
>     <mailto:petton.nicolas na gmail.com <mailto:petton.nicolas na gmail.com>>>
>     wrote:
>      >
>      >     Hi,
>      >     are you using VisualWorks?
>      >
>      >     Cheers!
>      >
>      >     Nico
>      >
>      >     2009/1/17 Prashanth Hebbar <hebbarp na gmail.com
>     <mailto:hebbarp na gmail.com>
>      >     <mailto:hebbarp na gmail.com <mailto:hebbarp na gmail.com>>>
>      >
>      >         Hi:
>      >         I solved this for the time being by saving my header
>     "logo" in
>      >         './img/' folder. My immediate problem is solved but still
>     like
>      >         to understand why asFilename did not work.
>      >
>      >         Thanks in advance and request all to tolerate me a little
>     more
>      >         till I get the basics right.
>      >
>      >         regards.
>      >
>      >         On Sun, Jan 18, 2009 at 12:11 AM, Prashanth Hebbar
>      >         <hebbarp na gmail.com <mailto:hebbarp na gmail.com>
>     <mailto:hebbarp na gmail.com <mailto:hebbarp na gmail.com>>> wrote:
>      >
>      >             Hi:
>      >
>      >             I am at a crucial stage of my app development and got
>     stuck
>      >             at this point. I am trying to change my page header by
>      >             importing my image into the Imaging method as given in
>      >             the FAQs:
>      >
>      >             NewsPortalWebStyle new importImage: 'aidaBannerGif' from:
>      >             'd:\capslogo.gif'
>      >
>      >             (a small error in the tutorial: it says, "import:from:",
>      >             shouldn't it be: "importImage:from:" ?)
>      >
>      >             However, "asFilename" doesn't seem to be working. I
>      >             downloaded Swazoo 2.2Beta1 and tried but with no success.
>      >
>      >             am I doing the right thing?
>      >
>      >             --
>      >             Prashanth Hebbar
>      >             Bangalore
>      >
>      >
>      >
>      >
>      >         --
>      >         Prashanth Hebbar
>      >         Bangalore
>      >
>      >
>      >
>      >         --
>      >         Prashanth Hebbar
>      >         Bangalore
>      >
>      >         _______________________________________________
>      >         Aida mailing list
>      >         Aida na aidaweb.si <mailto:Aida na aidaweb.si>
>     <mailto:Aida na aidaweb.si <mailto:Aida na aidaweb.si>>
>      >         http://lists.aidaweb.si/mailman/listinfo/aida
>      >
>      >
>      >
>      >
>      >     --
>      >     Nicolas Petton
>      >
>      >     http://nico.bioskop.fr <http://nico.bioskop.fr/>
>     <http://nico.bioskop.fr/>
>      >
>      >     _______________________________________________
>      >     Aida mailing list
>      >     Aida na aidaweb.si <mailto:Aida na aidaweb.si>
>     <mailto:Aida na aidaweb.si <mailto:Aida na aidaweb.si>>
>      >     http://lists.aidaweb.si/mailman/listinfo/aida
>      >
>      >
>      >
>      >
>      > --
>      > Prashanth Hebbar
>      > Bangalore
>      >
>      >
>      >
>     ------------------------------------------------------------------------
>      >
>      > _______________________________________________
>      > Aida mailing list
>      > Aida na aidaweb.si <mailto:Aida na aidaweb.si>
>      > http://lists.aidaweb.si/mailman/listinfo/aida
> 
>     --
>     Janko Mivšek
>     AIDA/Web
>     Smalltalk Web Application Server
>     http://www.aidaweb.si <http://www.aidaweb.si/>
>     _______________________________________________
>     Aida mailing list
>     Aida na aidaweb.si <mailto:Aida na aidaweb.si>
>     http://lists.aidaweb.si/mailman/listinfo/aida
> 
> 
> 
> 
> -- 
> Prashanth Hebbar
> Bangalore
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Aida mailing list
> Aida na aidaweb.si
> http://lists.aidaweb.si/mailman/listinfo/aida

-- 
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si


More information about the Aida mailing list