asFilename does not work?

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

asFilename does not work?

Prashanth Hebbar
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

_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: asFilename does not work?

Prashanth Hebbar
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 <[hidden email]> 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

_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: asFilename does not work?

Prashanth Hebbar
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 <[hidden email]> 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
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: asFilename does not work?

Nicolas Petton
Hi,
are you using VisualWorks?

Cheers!

Nico

2009/1/17 Prashanth Hebbar <[hidden email]>
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 <[hidden email]> 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
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida




--
Nicolas Petton

http://nico.bioskop.fr

_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: asFilename does not work?

Prashanth Hebbar
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 <[hidden email]> wrote:
Hi,
are you using VisualWorks?

Cheers!

Nico

2009/1/17 Prashanth Hebbar <[hidden email]>
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 <[hidden email]> 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
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida




--
Nicolas Petton

http://nico.bioskop.fr

_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida




--
Prashanth Hebbar
Bangalore

_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: asFilename does not work?

Janko Mivšek
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
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     Hi,
>     are you using VisualWorks?
>
>     Cheers!
>
>     Nico
>
>     2009/1/17 Prashanth Hebbar <[hidden email]
>     <mailto:[hidden email]>>
>
>         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
>         <[hidden email] <mailto:[hidden email]>> 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
>         [hidden email] <mailto:[hidden email]>
>         http://lists.aidaweb.si/mailman/listinfo/aida
>
>
>
>
>     --
>     Nicolas Petton
>
>     http://nico.bioskop.fr <http://nico.bioskop.fr/>
>
>     _______________________________________________
>     Aida mailing list
>     [hidden email] <mailto:[hidden email]>
>     http://lists.aidaweb.si/mailman/listinfo/aida
>
>
>
>
> --
> Prashanth Hebbar
> Bangalore
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Aida mailing list
> [hidden email]
> http://lists.aidaweb.si/mailman/listinfo/aida

--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: asFilename does not work?

Prashanth Hebbar
HI Janko:
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.
 
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.
 
Sorry to bug you, I couldn't resolve this reading the tutorial.
 
is this confusion contributing to the "addLinkTo:" issue I am facing?
 
Please help me resolve this.
 
 regards.
 
On Sun, Jan 18, 2009 at 2:45 PM, Janko Mivšek <[hidden email]> 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
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     Hi,
>     are you using VisualWorks?
>
>     Cheers!
>
>     Nico
>
>     2009/1/17 Prashanth Hebbar <[hidden email]
>     <mailto:[hidden email]>>
>
>         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
>         <[hidden email] <mailto:[hidden email]>> 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
>         [hidden email] <mailto:[hidden email]>
>         http://lists.aidaweb.si/mailman/listinfo/aida
>
>
>
>
>     --
>     Nicolas Petton
>
>     http://nico.bioskop.fr <http://nico.bioskop.fr/>
>
>     _______________________________________________
>     Aida mailing list
>     [hidden email] <mailto:[hidden email]>
>     http://lists.aidaweb.si/mailman/listinfo/aida
>
>
>
>
> --
> Prashanth Hebbar
> Bangalore
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Aida mailing list
> [hidden email]
> http://lists.aidaweb.si/mailman/listinfo/aida

--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida



--
Prashanth Hebbar
Bangalore

_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: asFilename does not work?

Janko Mivšek
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 <[hidden email]
> <mailto:[hidden email]>> 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
>      > <[hidden email] <mailto:[hidden email]>
>     <mailto:[hidden email] <mailto:[hidden email]>>>
>     wrote:
>      >
>      >     Hi,
>      >     are you using VisualWorks?
>      >
>      >     Cheers!
>      >
>      >     Nico
>      >
>      >     2009/1/17 Prashanth Hebbar <[hidden email]
>     <mailto:[hidden email]>
>      >     <mailto:[hidden email] <mailto:[hidden email]>>>
>      >
>      >         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
>      >         <[hidden email] <mailto:[hidden email]>
>     <mailto:[hidden email] <mailto:[hidden email]>>> 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
>      >         [hidden email] <mailto:[hidden email]>
>     <mailto:[hidden email] <mailto:[hidden email]>>
>      >         http://lists.aidaweb.si/mailman/listinfo/aida
>      >
>      >
>      >
>      >
>      >     --
>      >     Nicolas Petton
>      >
>      >     http://nico.bioskop.fr <http://nico.bioskop.fr/>
>     <http://nico.bioskop.fr/>
>      >
>      >     _______________________________________________
>      >     Aida mailing list
>      >     [hidden email] <mailto:[hidden email]>
>     <mailto:[hidden email] <mailto:[hidden email]>>
>      >     http://lists.aidaweb.si/mailman/listinfo/aida
>      >
>      >
>      >
>      >
>      > --
>      > Prashanth Hebbar
>      > Bangalore
>      >
>      >
>      >
>     ------------------------------------------------------------------------
>      >
>      > _______________________________________________
>      > Aida mailing list
>      > [hidden email] <mailto:[hidden email]>
>      > 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
>     [hidden email] <mailto:[hidden email]>
>     http://lists.aidaweb.si/mailman/listinfo/aida
>
>
>
>
> --
> Prashanth Hebbar
> Bangalore
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Aida mailing list
> [hidden email]
> http://lists.aidaweb.si/mailman/listinfo/aida

--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: asFilename does not work?

Prashanth Hebbar
Hi Janko:

On Mon, Jan 19, 2009 at 5:27 PM, Janko Mivšek <[hidden email]> wrote:
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.
 
 
Prashanth: inspect throws up a frighteningly huge list. 'Site' shows an AidaSite

> 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.
 
Prashanth: Yes it is. I am able to open http://localhost:8888/aidademo.html and get my viewMain. However, trouble is when I am trying to link one of the items on the left nav bar with addLinkTo: site aidademo text: 'Mission' view: #mission. Here "aidademo" is not recognized.
 

> 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.
 
Prashanth: thanks for explaining these so patiently. This is what makes this list so warm.
--
Prashanth Hebbar
Bangalore

_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: asFilename does not work?

Janko Mivšek
Prashanth Hebbar wrote:

>     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.
>
>  
> Prashanth: Yes it is. I am able to open
> http://localhost:8888/aidademo.html and get my viewMain. However,
> trouble is when I am trying to link one of the items on the left nav bar
> with addLinkTo: site aidademo text: 'Mission' view: #mission.
> Here "aidademo" is not recognized.

site aidademo? Do you have a method #aidademo implemented somewhere? in
AIDASite?

> Prashanth: thanks for explaining these so patiently. This is what makes
> this list so warm.

Nice to hear that. That's what communities are supposed to be for!

Janko

--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida