Iliad in Pharo 1.3

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

Iliad in Pharo 1.3

Bernat Romagosa
Hi lists,

I don't know whether this issue is Pharo's or Iliad's, so I'm writing to both lists.

I've just tried to pull Iliad 0.9.1 from the repos into a fresh Pharo 1.3 image and I keep getting the error "receiver of session is nil" every time I execute an action. If I click proceed in the debugger and manually refresh the page, it works as it should.

So I tried to install 0.9.2 instead, and now no actions work and nothing happens when clicking an anchor. I tried the examples (counter, todo, etc) and they're not working either. ILErrorHandler is in debugMode but I'm not getting any error walkbacks either.

Here's a 30 second demo of the problem: http://screenr.com/DCNs

Any clues?

Cheers!

--
Bernat Romagosa.
Reply | Threaded
Open this post in threaded view
|

Re: Iliad in Pharo 1.3

sebastien audier
Hi Bernat, if you have the latest versions, you can do in a workspace:

Compiler recompileAll

it seems to solve the problem.

Cheers!

--
Sébastien AUDIER

ObjectFusion S.A.R.L.
Applications web, consulting, design
http://www.objectfusion.fr
Reply | Threaded
Open this post in threaded view
|

Re: Iliad in Pharo 1.3

Bernat Romagosa
Thanks Sebastien,

It fixed the "not doing anything" problem, but I still get the MessageNotUnderstood: receiver of "sender" is nil error.

It seems it happens whenever I use an announcement... did anything change?

2011/6/28 sebastien audier <[hidden email]>
Hi Bernat, if you have the latest versions, you can do in a workspace:

Compiler recompileAll

it seems to solve the problem.

Cheers!

--
Sébastien AUDIER

ObjectFusion S.A.R.L.
Applications web, consulting, design
http://www.objectfusion.fr



--
Bernat Romagosa.
Reply | Threaded
Open this post in threaded view
|

Re: Iliad in Pharo 1.3

Bernat Romagosa
Actually, I traced the problem back to when I call self session from a widget.

2011/6/28 Bernat Romagosa <[hidden email]>
Thanks Sebastien,

It fixed the "not doing anything" problem, but I still get the MessageNotUnderstood: receiver of "sender" is nil error.

It seems it happens whenever I use an announcement... did anything change?


2011/6/28 sebastien audier <[hidden email]>
Hi Bernat, if you have the latest versions, you can do in a workspace:

Compiler recompileAll

it seems to solve the problem.

Cheers!

--
Sébastien AUDIER

ObjectFusion S.A.R.L.
Applications web, consulting, design
http://www.objectfusion.fr



--
Bernat Romagosa.



--
Bernat Romagosa.
Reply | Threaded
Open this post in threaded view
|

Re: Iliad in Pharo 1.3

Bernat Romagosa
Sorry for the mail flood, but I just found out it only happens when I call self session from an initialize method in a widget, which is when I have to use announcements, as in:

SomeWidget >> initialize
super initialize.
self session announcer "<--- It never goes past self session"
  on: WhateverAnnouncement do: [:it | it doWhatever]


2011/6/28 Bernat Romagosa <[hidden email]>
Actually, I traced the problem back to when I call self session from a widget.


2011/6/28 Bernat Romagosa <[hidden email]>
Thanks Sebastien,

It fixed the "not doing anything" problem, but I still get the MessageNotUnderstood: receiver of "sender" is nil error.

It seems it happens whenever I use an announcement... did anything change?


2011/6/28 sebastien audier <[hidden email]>
Hi Bernat, if you have the latest versions, you can do in a workspace:

Compiler recompileAll

it seems to solve the problem.

Cheers!

--
Sébastien AUDIER

ObjectFusion S.A.R.L.
Applications web, consulting, design
http://www.objectfusion.fr



--
Bernat Romagosa.



--
Bernat Romagosa.



--
Bernat Romagosa.
Reply | Threaded
Open this post in threaded view
|

Re: Iliad in Pharo 1.3

Stefan Schmiedl
In reply to this post by Bernat Romagosa
On Tue, 28 Jun 2011 17:15:52 +0200
Bernat Romagosa <[hidden email]> wrote:

> Hi lists,
>
> I don't know whether this issue is Pharo's or Iliad's, so I'm writing to
> both lists.
>
> I've just tried to pull Iliad 0.9.1 from the repos into a fresh Pharo 1.3
> image and I keep getting the error "receiver of session is nil" every time I
> execute an action. If I click proceed in the debugger and manually refresh
> the page, it works as it should.

There were a few messages about that on the iliad list recently.

> So I tried to install 0.9.2 instead, and now no actions work and nothing
> happens when clicking an anchor. I tried the examples (counter, todo, etc)
> and they're not working either. ILErrorHandler is in debugMode but I'm not
> getting any error walkbacks either.

When I tried this, I noticed that anchor URLS were missing a value
for some parameter in their key. I followed the advice in Comment #2
of http://code.google.com/p/iliadproject/issues/detail?id=19

It took me a while to find out some nitty-gritty details on what
goes with what, but here is what I _just now_ ended up as a reliable
load script starting from PharoCore 1.3:



Gofer new
        squeaksource: 'rb';
        package: 'AST-Core';
        package: 'AST-Semantic';
        package: 'Refactoring-Core';
        package: 'Refactoring-Environment';
        package: 'Refactoring-Changes';
        package: 'Refactoring-Critics';
        package: 'Refactoring-Spelling';
        package: 'Refactoring-Tests-Environment';
        load.
Gofer new
        squeaksource: 'PharoOB';
        package: 'ConfigurationOfOmniBrowser';
        package: 'ConfigurationOfShout';
        package: 'ConfigurationOfOCompletion';
        load.
((Smalltalk at: #ConfigurationOfOmniBrowser) project version: #stable) load.
((Smalltalk at: #ConfigurationOfShout) project version: #stable) load.
((Smalltalk at: #ConfigurationOfOCompletion) project version: #stable) load.


Gofer new
  squeaksource: 'MetacelloRepository';
  package: 'ConfigurationOfSandstoneDb';
  load.
(Smalltalk at: #ConfigurationOfSandstoneDb) project latestVersion load.
Gofer new
        squeaksource: 'Fuel';
        package: 'Fuel';
        package: 'FuelTests';
        package: 'FuelBenchmarks';
        load.
Gofer new
        squeaksource: 'SandstoneDb';
        package: 'SandstoneDb';
        package: 'SandstoneDbFuel';
        package: 'SandstoneDbTests';
        load.

(Smalltalk at: #SDFileStore) serializer: (Smalltalk at: #SDFuelSerializer) new.


Gofer new
        squeaksource: 'XMLSupport';
        package: 'ConfigurationOfXMLSupport';
        load.
(Smalltalk at: #ConfigurationOfXMLSupport) perform: #loadDefault.
Gofer new
  squeaksource: 'IliadDev';
  package: 'ConfigurationOfIliad';
  load.
((Smalltalk at: #ConfigurationOfIliad) project version: '0.9.1.2') load.


Gofer new
  directory: '/home/stefan/work/agweb/repo';
  package: 'AgWeb';
  package: 'Sport';
  load.

Workspace openFile: '/home/stefan/work/agweb/PharoCore-1.3/scratch.ws'




In case you wonder about my local Sport package, it just contains a patch
enabling Swazoo to run only on 127.0.0.1 instead on 0.0.0.0. The only thing
that is missing here to make it perfect, is a patch in

        ILJsonHandler>>updateHead

where you need to replace

        headElement := ILElement new.

with

        headElement := ILHeadElement new.

HTH,
s.
Reply | Threaded
Open this post in threaded view
|

Re: Iliad in Pharo 1.3

Bernat Romagosa
Hi Stefan,

Thanks a lot, your script fails upon trying to load ConfigurationOfOmniBrowser, ConfigurationOfShout and ConfigurationOfOCompletion though, I tried using the metacello repo but loading fails as follows:

 'Could not resolve: OB-Standard [OB-Standard-lr.541] in /home/nabax/Downloads/PharoCore-1.3/package-cache http://www.squeaksource.com/PharoOB'

Of cource it couldn't resolve it cos it's not there, why is it looking at my local cache instead of squeaksource? o_O

Cheers!

2011/6/28 Stefan Schmiedl <[hidden email]>
On Tue, 28 Jun 2011 17:15:52 +0200
Bernat Romagosa <[hidden email]> wrote:

> Hi lists,
>
> I don't know whether this issue is Pharo's or Iliad's, so I'm writing to
> both lists.
>
> I've just tried to pull Iliad 0.9.1 from the repos into a fresh Pharo 1.3
> image and I keep getting the error "receiver of session is nil" every time I
> execute an action. If I click proceed in the debugger and manually refresh
> the page, it works as it should.

There were a few messages about that on the iliad list recently.

> So I tried to install 0.9.2 instead, and now no actions work and nothing
> happens when clicking an anchor. I tried the examples (counter, todo, etc)
> and they're not working either. ILErrorHandler is in debugMode but I'm not
> getting any error walkbacks either.

When I tried this, I noticed that anchor URLS were missing a value
for some parameter in their key. I followed the advice in Comment #2
of http://code.google.com/p/iliadproject/issues/detail?id=19

It took me a while to find out some nitty-gritty details on what
goes with what, but here is what I _just now_ ended up as a reliable
load script starting from PharoCore 1.3:



Gofer new
       squeaksource: 'rb';
       package: 'AST-Core';
       package: 'AST-Semantic';
       package: 'Refactoring-Core';
       package: 'Refactoring-Environment';
       package: 'Refactoring-Changes';
       package: 'Refactoring-Critics';
       package: 'Refactoring-Spelling';
       package: 'Refactoring-Tests-Environment';
       load.
Gofer new
       squeaksource: 'PharoOB';
       package: 'ConfigurationOfOmniBrowser';
       package: 'ConfigurationOfShout';
       package: 'ConfigurationOfOCompletion';
       load.
((Smalltalk at: #ConfigurationOfOmniBrowser) project version: #stable) load.
((Smalltalk at: #ConfigurationOfShout) project version: #stable) load.
((Smalltalk at: #ConfigurationOfOCompletion) project version: #stable) load.


Gofer new
 squeaksource: 'MetacelloRepository';
 package: 'ConfigurationOfSandstoneDb';
 load.
(Smalltalk at: #ConfigurationOfSandstoneDb) project latestVersion load.
Gofer new
       squeaksource: 'Fuel';
       package: 'Fuel';
       package: 'FuelTests';
       package: 'FuelBenchmarks';
       load.
Gofer new
       squeaksource: 'SandstoneDb';
       package: 'SandstoneDb';
       package: 'SandstoneDbFuel';
       package: 'SandstoneDbTests';
       load.

(Smalltalk at: #SDFileStore) serializer: (Smalltalk at: #SDFuelSerializer) new.


Gofer new
       squeaksource: 'XMLSupport';
       package: 'ConfigurationOfXMLSupport';
       load.
(Smalltalk at: #ConfigurationOfXMLSupport) perform: #loadDefault.
Gofer new
 squeaksource: 'IliadDev';
 package: 'ConfigurationOfIliad';
 load.
((Smalltalk at: #ConfigurationOfIliad) project version: '0.9.1.2') load.


Gofer new
 directory: '/home/stefan/work/agweb/repo';
 package: 'AgWeb';
 package: 'Sport';
 load.

Workspace openFile: '/home/stefan/work/agweb/PharoCore-1.3/scratch.ws'




In case you wonder about my local Sport package, it just contains a patch
enabling Swazoo to run only on 127.0.0.1 instead on 0.0.0.0. The only thing
that is missing here to make it perfect, is a patch in

       ILJsonHandler>>updateHead

where you need to replace

       headElement := ILElement new.

with

       headElement := ILHeadElement new.

HTH,
s.



--
Bernat Romagosa.
Reply | Threaded
Open this post in threaded view
|

Re: Iliad in Pharo 1.3

Darius Clarke
>ConfigurationOfShout and >ConfigurationOfOCompletion

I just skipped those two lines (commented them out) and the rest
proceeded as expected.

- Darius
Reply | Threaded
Open this post in threaded view
|

Re: Iliad in Pharo 1.3

Bernat Romagosa
Did it all but Iliad's still not behaving as it was in 1.2.1 or 1.1.1, still getting the "receiver of session is nil" error...

Here's the stack trace: http://pastie.org/2140294

2011/6/29 Darius Clarke <[hidden email]>
>ConfigurationOfShout and >ConfigurationOfOCompletion

I just skipped those two lines (commented them out) and the rest
proceeded as expected.

- Darius



--
Bernat Romagosa.
Reply | Threaded
Open this post in threaded view
|

Re: Iliad in Pharo 1.3

Stefan Schmiedl
On Wed, 29 Jun 2011 17:32:31 +0200
Bernat Romagosa <[hidden email]> wrote:

> Did it all but Iliad's still not behaving as it was in 1.2.1 or 1.1.1, still
> getting the "receiver of session is nil" error...
>
> Here's the stack trace: http://pastie.org/2140294

I'm running the same PharoCore as you and with the code base
collected through my load script, the session problem is gone.

What are you doing in STGradeViewerWidget methods
grade:, new, initialize and session?

s.
Reply | Threaded
Open this post in threaded view
|

Re: Iliad in Pharo 1.3

Darius Clarke
I've loaded via the script and have no session problem either. 
Running on Win XP. 

- Darius

Reply | Threaded
Open this post in threaded view
|

Re: Iliad in Pharo 1.3

Bernat Romagosa
Hi,

I've tried it with a different app and I'm still getting the same error :(

Stefan, #grade: is just an accessor for an instVar, #session is not overriden, so the #session method being called is actually ILWidget's. As for the #initialize method, here's a bit of what it looks like:

initialize
super initialize.
(self session announcer)
on: STALessonChosen
do: [ :it | self jumpToLesson: it lesson]].

It's just registering to some announcements.

I'm not sure what's going on... I'll keep digging into this.

Thanks! :)

2011/6/29 Darius Clarke <[hidden email]>
I've loaded via the script and have no session problem either. 
Running on Win XP. 

- Darius




--
Bernat Romagosa.
Reply | Threaded
Open this post in threaded view
|

Re: Iliad in Pharo 1.3

Stefan Schmiedl
On Thu, 30 Jun 2011 09:48:26 +0200
Bernat Romagosa <[hidden email]> wrote:

> Hi,
>
> I've tried it with a different app and I'm still getting the same error :(
>
> Stefan, #grade: is just an accessor for an instVar, #session is not
> overriden, so the #session method being called is actually ILWidget's. As
> for the #initialize method, here's a bit of what it looks like:
>
> initialize
> super initialize.
> (self session announcer)
>  on: STALessonChosen
> do: [ :it | self jumpToLesson: it lesson]].
>
> It's just registering to some announcements.
>
> I'm not sure what's going on... I'll keep digging into this.

Actually, that's one thing that I'm doing different:
I am not using the session during object initialization.

My widget creating announcements (AWFilterPaginator) goes like:

        initialize
                super initialize.
                announcer := Announcer new.

        currentFilter: anObject
                currentFilter := anObject.
                self markDirty.
                announcer announce: (AWFilterChanged with: currentFilter value)

and the one listening to this (AWPage) reads:

        initialize
                super initialize.
                self paginator announcer
                        on: AWFilterChanged
                        do: [ :ann | self setFilterBlock: ann filter].
                filterBlock := [:each | false]

        paginator
                ^paginator ifNil: [paginator := AWFilterPaginator firstLetterFilter]

s.

Reply | Threaded
Open this post in threaded view
|

Re: Iliad in Pharo 1.3

Bernat Romagosa
Wow that makes it tough! Does this mean I should have a different announcer for each group of interconnected widgets? At this point of development this would kill me... there are very entangled behaviours that become very simple when using a single common announcer, like announcements that fire up other announcements that are listened by model objects.

I appreciate your solution, but I'm afraid I'll have to keep digging a bit more... something must have changed, as in Pharo 1.2.1 this never happened to me.

Thanks! :)

2011/6/30 Stefan Schmiedl <[hidden email]>
On Thu, 30 Jun 2011 09:48:26 +0200
Bernat Romagosa <[hidden email]> wrote:

> Hi,
>
> I've tried it with a different app and I'm still getting the same error :(
>
> Stefan, #grade: is just an accessor for an instVar, #session is not
> overriden, so the #session method being called is actually ILWidget's. As
> for the #initialize method, here's a bit of what it looks like:
>
> initialize
> super initialize.
> (self session announcer)
>  on: STALessonChosen
> do: [ :it | self jumpToLesson: it lesson]].
>
> It's just registering to some announcements.
>
> I'm not sure what's going on... I'll keep digging into this.

Actually, that's one thing that I'm doing different:
I am not using the session during object initialization.

My widget creating announcements (AWFilterPaginator) goes like:

       initialize
               super initialize.
               announcer := Announcer new.

       currentFilter: anObject
               currentFilter := anObject.
               self markDirty.
               announcer announce: (AWFilterChanged with: currentFilter value)

and the one listening to this (AWPage) reads:

       initialize
               super initialize.
               self paginator announcer
                       on: AWFilterChanged
                       do: [ :ann | self setFilterBlock: ann filter].
               filterBlock := [:each | false]

       paginator
               ^paginator ifNil: [paginator := AWFilterPaginator firstLetterFilter]

s.




--
Bernat Romagosa.
Reply | Threaded
Open this post in threaded view
|

Re: Iliad in Pharo 1.3

Stefan Schmiedl
On Thu, 30 Jun 2011 14:00:27 +0200
Bernat Romagosa <[hidden email]> wrote:

> Wow that makes it tough! Does this mean I should have a different announcer
> for each group of interconnected widgets? At this point of development this
> would kill me... there are very entangled behaviours that become very simple
> when using a single common announcer, like announcements that fire up other
> announcements that are listened by model objects.

I have to admit that I never thought of using a single central announcer,
it tastes too much like an all-pervasive global variable to me. I might
be doing things totally wrong, it would not be the first time :-)

> I appreciate your solution, but I'm afraid I'll have to keep digging a bit
> more... something must have changed, as in Pharo 1.2.1 this never happened
> to me.

Yep, something weird has been happening before 1.3. Now if I only knew
if it was the introduction of a new bug or the uncovering of an old one
or even just a change in behaviour we were not expecting ...

Oh, the fun of using bleeding-edge software for development :-)

s.
Reply | Threaded
Open this post in threaded view
|

Re: Iliad in Pharo 1.3

Stefan Schmiedl
In reply to this post by Bernat Romagosa
On Thu, 30 Jun 2011 14:00:27 +0200
Bernat Romagosa <[hidden email]> wrote:

> Wow that makes it tough! Does this mean I should have a different announcer
> for each group of interconnected widgets? At this point of development this
> would kill me... there are very entangled behaviours that become very simple
> when using a single common announcer, like announcements that fire up other
> announcements that are listened by model objects.
>
> I appreciate your solution, but I'm afraid I'll have to keep digging a bit
> more... something must have changed, as in Pharo 1.2.1 this never happened
> to me.

I tried the following in Pharo 1.2.1:
- start with clean PharoCore-1.2.1-12345.image
- file in some stuff (1)
- run Iliad-Tests -> 412 run, 412 passes
- make widget refer to session in initialize (2)
- run Iliad-Tests again -> 412 run, 405 passes, 7 errors

(1) some stuff is:

Gofer new
        squeaksource: 'rb';
        package: 'AST-Core';
        package: 'AST-Semantic';
        package: 'Refactoring-Core';
        package: 'Refactoring-Environment';
        package: 'Refactoring-Changes';
        package: 'Refactoring-Critics';
        package: 'Refactoring-Spelling';
        package: 'Refactoring-Tests-Environment';
        load.
Gofer new
        squeaksource: 'PharoOB';
        package: 'ConfigurationOfOmniBrowser';
        load.
((Smalltalk at: #ConfigurationOfOmniBrowser) project version: #stable) load.

Gofer new
  squeaksource: 'IliadDev';
  package: 'ConfigurationOfIliad';
  load.
((Smalltalk at: #ConfigurationOfIliad) project version: '0.9.1.2') load.


(2) add one single method

'From Pharo1.2.1 of 29 March 2011 [Latest update: #12345] on 1 July 2011 at 2:59:04 pm'!

!ILWidgetMock1 methodsFor: 'as yet unclassified' stamp: 'StefanSchmiedl 7/1/2011 14:57'!
initialize
        super initialize.
        self session announcer on: Announcement do: [:it | it inspect ]! !


Next I tried the same setting, only with the "official" metacello configuration (3)
and ended up with the same results.

(3) now some stuff is:

Gofer new
        squeaksource: 'rb';
        package: 'AST-Core';
        package: 'AST-Semantic';
        package: 'Refactoring-Core';
        package: 'Refactoring-Environment';
        package: 'Refactoring-Changes';
        package: 'Refactoring-Critics';
        package: 'Refactoring-Spelling';
        package: 'Refactoring-Tests-Environment';
        load.
Gofer new
        squeaksource: 'PharoOB';
        package: 'ConfigurationOfOmniBrowser';
        load.
((Smalltalk at: #ConfigurationOfOmniBrowser) project version: #stable) load.

Gofer new
  squeaksource: 'MetacelloRepository';
  package: 'ConfigurationOfIliad';
  load.
((Smalltalk at: #ConfigurationOfIliad) project version: '0.9.1') load.


The good news is that the behavior is consistent over recent Pharo and Iliad releases,
the bad news is that your approach does not seem to work in either one.

Confused,
s.
Reply | Threaded
Open this post in threaded view
|

Re: Iliad in Pharo 1.3

Stefan Schmiedl
On Fri, 1 Jul 2011 15:22:01 +0200
Stefan Schmiedl <[hidden email]> wrote:

> 'From Pharo1.2.1 of 29 March 2011 [Latest update: #12345] on 1 July 2011 at 2:59:04 pm'!
>
> !ILWidgetMock1 methodsFor: 'as yet unclassified' stamp: 'StefanSchmiedl 7/1/2011 14:57'!
> initialize
> super initialize.
> self session announcer on: Announcement do: [:it | it inspect ]! !
>
>
> The good news is that the behavior is consistent over recent Pharo and Iliad releases,
> the bad news is that your approach does not seem to work in either one.

Assuming that the tests are mirroring real use cases, this actually
makes sense:

ILWidgetTest>>setUp causes ILWidgetMock1>>initialize to be called
before the wrapper ILWidgetTest>>withSessionDo: has a chance to
plug a session-carrying context into ILCurrentContext.

If I understand this correctly (and I might as well be wrong), you
just don't have a session during widget creation, but only in the
building phase.

Heh ... maybe that's the other, long forgotten reason why I didn't put
my announcer into session :-)

s.
Reply | Threaded
Open this post in threaded view
|

Re: Iliad in Pharo 1.3

Nicolas Petton
Le vendredi 01 juillet 2011 à 16:45 +0200, Stefan Schmiedl a écrit :

> On Fri, 1 Jul 2011 15:22:01 +0200
> Stefan Schmiedl <[hidden email]> wrote:
>
> > 'From Pharo1.2.1 of 29 March 2011 [Latest update: #12345] on 1 July 2011 at 2:59:04 pm'!
> >
> > !ILWidgetMock1 methodsFor: 'as yet unclassified' stamp: 'StefanSchmiedl 7/1/2011 14:57'!
> > initialize
> > super initialize.
> > self session announcer on: Announcement do: [:it | it inspect ]! !
> >
> >
> > The good news is that the behavior is consistent over recent Pharo and Iliad releases,
> > the bad news is that your approach does not seem to work in either one.
>
> Assuming that the tests are mirroring real use cases, this actually
> makes sense:
>
> ILWidgetTest>>setUp causes ILWidgetMock1>>initialize to be called
> before the wrapper ILWidgetTest>>withSessionDo: has a chance to
> plug a session-carrying context into ILCurrentContext.
>
> If I understand this correctly (and I might as well be wrong), you
> just don't have a session during widget creation, but only in the
> building phase.
>
> Heh ... maybe that's the other, long forgotten reason why I didn't put
> my announcer into session :-)

I'll add a unit test for that and a fix if needed. Downloading pharo 1.3
right now...


Cheers,
Nico
>
> s.

--
Nicolas Petton
http://www.nicolas-petton.fr

Reply | Threaded
Open this post in threaded view
|

Re: Iliad in Pharo 1.3

Nicolas Petton
Hi guys,

Bernat, after running some tests, I couldn't find the issue. Calling
"self session" on widget initialization works fine with me. This is how
I tested it:

- start a fresh Pharo1.3 image
- load the latest dev packages of Iliad
- change ILCounter>>initialize to:

initialize
        super initialize.
        self session inspect

works fine for me.

does the modified ILCounter>>initialize method work for you?

Cheers,
Nico

Le vendredi 01 juillet 2011 à 18:30 +0200, Nicolas Petton a écrit :

> Le vendredi 01 juillet 2011 à 16:45 +0200, Stefan Schmiedl a écrit :
> > On Fri, 1 Jul 2011 15:22:01 +0200
> > Stefan Schmiedl <[hidden email]> wrote:
> >
> > > 'From Pharo1.2.1 of 29 March 2011 [Latest update: #12345] on 1 July 2011 at 2:59:04 pm'!
> > >
> > > !ILWidgetMock1 methodsFor: 'as yet unclassified' stamp: 'StefanSchmiedl 7/1/2011 14:57'!
> > > initialize
> > > super initialize.
> > > self session announcer on: Announcement do: [:it | it inspect ]! !
> > >
> > >
> > > The good news is that the behavior is consistent over recent Pharo and Iliad releases,
> > > the bad news is that your approach does not seem to work in either one.
> >
> > Assuming that the tests are mirroring real use cases, this actually
> > makes sense:
> >
> > ILWidgetTest>>setUp causes ILWidgetMock1>>initialize to be called
> > before the wrapper ILWidgetTest>>withSessionDo: has a chance to
> > plug a session-carrying context into ILCurrentContext.
> >
> > If I understand this correctly (and I might as well be wrong), you
> > just don't have a session during widget creation, but only in the
> > building phase.
> >
> > Heh ... maybe that's the other, long forgotten reason why I didn't put
> > my announcer into session :-)
>
> I'll add a unit test for that and a fix if needed. Downloading pharo 1.3
> right now...
>
>
> Cheers,
> Nico
> >
> > s.
>

--
Nicolas Petton
http://www.nicolas-petton.fr

Reply | Threaded
Open this post in threaded view
|

Re: Iliad in Pharo 1.3

Bernat Romagosa
Hi Nico,

Your test is working for me too, I'm going to try to install my application in this Pharo build and see what happens...

Thanks!

Bernat.

2011/7/6 Nicolas Petton <[hidden email]>
Hi guys,

Bernat, after running some tests, I couldn't find the issue. Calling
"self session" on widget initialization works fine with me. This is how
I tested it:

- start a fresh Pharo1.3 image
- load the latest dev packages of Iliad
- change ILCounter>>initialize to:

initialize
       super initialize.
       self session inspect

works fine for me.

does the modified ILCounter>>initialize method work for you?

Cheers,
Nico

Le vendredi 01 juillet 2011 à 18:30 +0200, Nicolas Petton a écrit :
> Le vendredi 01 juillet 2011 à 16:45 +0200, Stefan Schmiedl a écrit :
> > On Fri, 1 Jul 2011 15:22:01 +0200
> > Stefan Schmiedl <[hidden email]> wrote:
> >
> > > 'From Pharo1.2.1 of 29 March 2011 [Latest update: #12345] on 1 July 2011 at 2:59:04 pm'!
> > >
> > > !ILWidgetMock1 methodsFor: 'as yet unclassified' stamp: 'StefanSchmiedl 7/1/2011 14:57'!
> > > initialize
> > >   super initialize.
> > >   self session announcer on: Announcement do: [:it | it inspect ]! !
> > >
> > >
> > > The good news is that the behavior is consistent over recent Pharo and Iliad releases,
> > > the bad news is that your approach does not seem to work in either one.
> >
> > Assuming that the tests are mirroring real use cases, this actually
> > makes sense:
> >
> > ILWidgetTest>>setUp causes ILWidgetMock1>>initialize to be called
> > before the wrapper ILWidgetTest>>withSessionDo: has a chance to
> > plug a session-carrying context into ILCurrentContext.
> >
> > If I understand this correctly (and I might as well be wrong), you
> > just don't have a session during widget creation, but only in the
> > building phase.
> >
> > Heh ... maybe that's the other, long forgotten reason why I didn't put
> > my announcer into session :-)
>
> I'll add a unit test for that and a fix if needed. Downloading pharo 1.3
> right now...
>
>
> Cheers,
> Nico
> >
> > s.
>

--
Nicolas Petton
http://www.nicolas-petton.fr




--
Bernat Romagosa.
12