Using ILFormula saveAction:

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

Using ILFormula saveAction:

hernanmd
Hi guys,
I am trying the Iliad framework with Formulas. This is my main problem right now:

MyILApplicationSubclass>>contents

    | form |
    form := ILFormula on: BioDictionaryOptions new.
    self buildFormOptions: form.
    form saveAction: [ : m |
        form answer: nil.
        self halt.
        form commit.
        self doWriteOptions: m ].
      form cancelAction: [ form answer: nil ].   
    ^ form

The halt never executes when I click "Save"... I guess I should be using the ILFormula in another context but I cannot figure out. What I am doing wrong?

I don't need a model, just a property collector. That's why I subclassed Dictionary (BioDictionaryOptions) to handle any selector through #doesNotUnderstand:

If you just want to try the application. I am testing with Pharo 1.4 and latest Iliad. Please load the following to reproduce:
 Gofer new
   url: 'http://smalltalkhub.com/mc/hernan/IGEVET/main';
   package: 'IC';
   load.
Hernán



--
You received this message because you are subscribed to the Google Groups "Iliad project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Using ILFormula saveAction:

Bernat Romagosa
Hi Hernán!

I'm not 100% sure cos I'm talking over the top of my head, but I think I recall #answer: is the last thing you should do from within a formula save block, and anything after #answer: is not gonna be executed. Can someone please confirm that?

Cheers,
Bernat.


2013/9/29 Hernán Morales Durand <[hidden email]>
Hi guys,
I am trying the Iliad framework with Formulas. This is my main problem right now:

MyILApplicationSubclass>>contents

    | form |
    form := ILFormula on: BioDictionaryOptions new.
    self buildFormOptions: form.
    form saveAction: [ : m |
        form answer: nil.
        self halt.
        form commit.
        self doWriteOptions: m ].
      form cancelAction: [ form answer: nil ].   
    ^ form

The halt never executes when I click "Save"... I guess I should be using the ILFormula in another context but I cannot figure out. What I am doing wrong?

I don't need a model, just a property collector. That's why I subclassed Dictionary (BioDictionaryOptions) to handle any selector through #doesNotUnderstand:

If you just want to try the application. I am testing with Pharo 1.4 and latest Iliad. Please load the following to reproduce:
 Gofer new
   url: 'http://smalltalkhub.com/mc/hernan/IGEVET/main';
   package: 'IC';
   load.
Hernán



--
You received this message because you are subscribed to the Google Groups "Iliad project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.



--
Bernat Romagosa.

--
You received this message because you are subscribed to the Google Groups "Iliad project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Using ILFormula saveAction:

sebastien audier
Yes Bernat, you're right. Just commit formula and markDirty...

Cheers,


2013/9/30 Bernat Romagosa <[hidden email]>
Hi Hernán!

I'm not 100% sure cos I'm talking over the top of my head, but I think I recall #answer: is the last thing you should do from within a formula save block, and anything after #answer: is not gonna be executed. Can someone please confirm that?

Cheers,
Bernat.


2013/9/29 Hernán Morales Durand <[hidden email]>
Hi guys,
I am trying the Iliad framework with Formulas. This is my main problem right now:

MyILApplicationSubclass>>contents

    | form |
    form := ILFormula on: BioDictionaryOptions new.
    self buildFormOptions: form.
    form saveAction: [ : m |
        form answer: nil.
        self halt.
        form commit.
        self doWriteOptions: m ].
      form cancelAction: [ form answer: nil ].   
    ^ form

The halt never executes when I click "Save"... I guess I should be using the ILFormula in another context but I cannot figure out. What I am doing wrong?

I don't need a model, just a property collector. That's why I subclassed Dictionary (BioDictionaryOptions) to handle any selector through #doesNotUnderstand:

If you just want to try the application. I am testing with Pharo 1.4 and latest Iliad. Please load the following to reproduce:
 Gofer new
   url: 'http://smalltalkhub.com/mc/hernan/IGEVET/main';
   package: 'IC';
   load.
Hernán



--
You received this message because you are subscribed to the Google Groups "Iliad project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.



--
Bernat Romagosa.

--
You received this message because you are subscribed to the Google Groups "Iliad project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.



--
Sébastien AUDIER

S.A.R.L Objectfusion,
Applications web, consulting,
Smalltalk developpement

--
You received this message because you are subscribed to the Google Groups "Iliad project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Using ILFormula saveAction:

hernanmd
Hi Bernat and Sebastien.
I think my problem is that the saveAction block is never evaluated. I
have tried reordering the halt to be the first statement but behavior
stills the same, nothing happens.
Any other clue?

Cheers,

Hernán

El 30/09/2013 5:30, Sebastien Audier escribió:

> Yes Bernat, you're right. Just commit formula and markDirty...
>
> Cheers,
>
>
> 2013/9/30 Bernat Romagosa <[hidden email]
> <mailto:[hidden email]>>
>
>     Hi Hernán!
>
>     I'm not 100% sure cos I'm talking over the top of my head, but I
>     think I recall #answer: is the last thing you should do from within
>     a formula save block, and anything after #answer: is not gonna be
>     executed. Can someone please confirm that?
>
>     Cheers,
>     Bernat.
>
>
>     2013/9/29 Hernán Morales Durand <[hidden email]
>     <mailto:[hidden email]>>
>
>         Hi guys,
>         I am trying the Iliad framework with Formulas. This is my main
>         problem right now:
>
>         MyILApplicationSubclass>>contents
>
>              | form |
>              form := ILFormula on: BioDictionaryOptions new.
>              self buildFormOptions: form.
>              form saveAction: [ : m |
>                  form answer: nil.
>                  self halt.
>                  form commit.
>                  self doWriteOptions: m ].
>                form cancelAction: [ form answer: nil ].
>              ^ form
>
>         The halt never executes when I click "Save"... I guess I should
>         be using the ILFormula in another context but I cannot figure
>         out. What I am doing wrong?
>
>         I don't need a model, just a property collector. That's why I
>         subclassed Dictionary (BioDictionaryOptions) to handle any
>         selector through #doesNotUnderstand:
>
>         If you just want to try the application. I am testing with Pharo
>         1.4 and latest Iliad. Please load the following to reproduce:
>
>           Gofer new
>             url: 'http://smalltalkhub.com/mc/hernan/IGEVET/main'  <http://smalltalkhub.com/mc/hernan/IGEVET/main%27>;
>             package: 'IC';
>             load.
>
>         Hernán
>
>
>
>         --
>         You received this message because you are subscribed to the
>         Google Groups "Iliad project" group.
>         To unsubscribe from this group and stop receiving emails from
>         it, send an email to [hidden email]
>         <mailto:iliad%[hidden email]>.
>         For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
>
>     --
>     Bernat Romagosa.
>
>     --
>     You received this message because you are subscribed to the Google
>     Groups "Iliad project" group.
>     To unsubscribe from this group and stop receiving emails from it,
>     send an email to [hidden email]
>     <mailto:iliad%[hidden email]>.
>     For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
>
> --
> Sébastien AUDIER
>
> S.A.R.L Objectfusion,
> Applications web, consulting,
> Smalltalk developpement
>
> <http://www.objectfusion.fr/>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Iliad project" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [hidden email].
> For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Iliad project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Using ILFormula saveAction:

sebastien audier
Ok, I see you have a subclass of ILApplication. And you use the  "contents" method as a rendering method. But Application have to call index method first as a route controller method. And put this method in "controllers" category. 

Maybe this will help...

Cheers,


2013/10/1 Hernán Morales Durand <[hidden email]>
Hi Bernat and Sebastien.
I think my problem is that the saveAction block is never evaluated. I have tried reordering the halt to be the first statement but behavior stills the same, nothing happens.
Any other clue?

Cheers,

Hernán

El 30/09/2013 5:30, Sebastien Audier escribió:
Yes Bernat, you're right. Just commit formula and markDirty...

Cheers,


2013/9/30 Bernat Romagosa <[hidden email]
<mailto:[hidden email]>>


    Hi Hernán!

    I'm not 100% sure cos I'm talking over the top of my head, but I
    think I recall #answer: is the last thing you should do from within
    a formula save block, and anything after #answer: is not gonna be
    executed. Can someone please confirm that?

    Cheers,
    Bernat.


    2013/9/29 Hernán Morales Durand <[hidden email]
    <mailto:[hidden email]>>


        Hi guys,
        I am trying the Iliad framework with Formulas. This is my main
        problem right now:

        MyILApplicationSubclass>>contents

             | form |
             form := ILFormula on: BioDictionaryOptions new.
             self buildFormOptions: form.
             form saveAction: [ : m |
                 form answer: nil.
                 self halt.
                 form commit.
                 self doWriteOptions: m ].
               form cancelAction: [ form answer: nil ].
             ^ form

        The halt never executes when I click "Save"... I guess I should
        be using the ILFormula in another context but I cannot figure
        out. What I am doing wrong?

        I don't need a model, just a property collector. That's why I
        subclassed Dictionary (BioDictionaryOptions) to handle any
        selector through #doesNotUnderstand:

        If you just want to try the application. I am testing with Pharo
        1.4 and latest Iliad. Please load the following to reproduce:

          Gofer new
            url: 'http://smalltalkhub.com/mc/hernan/IGEVET/main'  <http://smalltalkhub.com/mc/hernan/IGEVET/main%27>;

            package: 'IC';
            load.

        Hernán



        --
        You received this message because you are subscribed to the
        Google Groups "Iliad project" group.
        To unsubscribe from this group and stop receiving emails from
        it, send an email to [hidden email]
        <mailto:[hidden email]>.

        For more options, visit https://groups.google.com/groups/opt_out.




    --
    Bernat Romagosa.

    --
    You received this message because you are subscribed to the Google
    Groups "Iliad project" group.
    To unsubscribe from this group and stop receiving emails from it,
    send an email to [hidden email]
    <mailto:[hidden email]>.

    For more options, visit https://groups.google.com/groups/opt_out.




--
Sébastien AUDIER

S.A.R.L Objectfusion,
Applications web, consulting,
Smalltalk developpement

<http://www.objectfusion.fr/>


--
You received this message because you are subscribed to the Google
Groups "Iliad project" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Iliad project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.



--
Sébastien AUDIER

S.A.R.L Objectfusion,
Applications web, consulting,
Smalltalk developpement

--
You received this message because you are subscribed to the Google Groups "Iliad project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.