Seaside XUL - Question about Toolbars

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

Seaside XUL - Question about Toolbars

Milan Zimmermann-2
Hi Pavel

I have a question about a toolbar code in Seaside XUL. I created a test file
(below) that I run as a Seaside Application (using  XULRenderContinuation and
XULSession). It's #renderContentOn is pretty much borrowed (simplified) from
your XUL Periodic table application.

The toolbarButton with the yellow button shows, but When clicked, the callback
(self halt in it etc) is never invoked. It looks like the XULAjax created
there is not registered in the right place, I tried to debug it and compare
behaviour with the XUL Periodic table but so far could not figure out why the
two behave differently. Is there anything obvious why that is?

Thanks Milan
===============================  TATestMenuComp
'From Squeak3.9.1 of 2 March 2008 [latest update: #7075] on 4 June 2008 at
6:41:42 pm'!
XULComponent subclass: #TATestMenuComp
        instanceVariableNames: ''
        classVariableNames: ''
        poolDictionaries: ''
        category: 'TA-Component'!

!TATestMenuComp methodsFor: 'as yet unclassified' stamp: 'mz 6/4/2008 15:29'!
initialize

        super initialize.
! !

!TATestMenuComp methodsFor: 'as yet unclassified' stamp: 'mz 6/4/2008 18:40'!
renderContentOn: xml
        xml vBox flex: 1; style: 'overflow: auto'; with: [
                xml description with: [xml heading: 'XUL Toolbar'.].
                xml groupBox flex: 1; with: [
                        xml caption label: 'tool bar'.
                        xml toolBox with: [
                                xml toolBar with: [
                                        xml toolBarButton
                                                type: 'radio';
                                                name: 'color';
                                                image: 'http://www.hevanet.com/acorbin/xul/images/yellow_apple.png'; 
                                                onCommand: (xml ajax callback: [self halt. Transcript show: 'In
Callback...'.]).
                                        ].
                                ].
                        ].
                ].
! !

"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!

TATestMenuComp class
        instanceVariableNames: ''!

!TATestMenuComp class methodsFor: 'as yet unclassified' stamp: 'mz 6/4/2008
15:28'!
canBeRoot
        "Overriden from parent </WAComponent class/>, allows this component to be
used to define Seaside application name.
        This component will present itself at the Seaside admin screen as an
Application."
        ^true.! !
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Seaside XUL - Question about Toolbars

Pavel Krivanek-2
HI Milan,

copy&paste the class method #initialize from the XULPeriodicTable
class, change the application name and invoke it. I did it and the
callback works well. So your problem should be in the application
configuration.

Cheers,
-- Pavel

On Mon, Jun 2, 2008 at 1:56 AM, Milan Zimmermann
<[hidden email]> wrote:

> Hi Pavel
>
> I have a question about a toolbar code in Seaside XUL. I created a test file
> (below) that I run as a Seaside Application (using  XULRenderContinuation and
> XULSession). It's #renderContentOn is pretty much borrowed (simplified) from
> your XUL Periodic table application.
>
> The toolbarButton with the yellow button shows, but When clicked, the callback
> (self halt in it etc) is never invoked. It looks like the XULAjax created
> there is not registered in the right place, I tried to debug it and compare
> behaviour with the XUL Periodic table but so far could not figure out why the
> two behave differently. Is there anything obvious why that is?
>
> Thanks Milan
> ===============================  TATestMenuComp
> 'From Squeak3.9.1 of 2 March 2008 [latest update: #7075] on 4 June 2008 at
> 6:41:42 pm'!
> XULComponent subclass: #TATestMenuComp
>        instanceVariableNames: ''
>        classVariableNames: ''
>        poolDictionaries: ''
>        category: 'TA-Component'!
>
> !TATestMenuComp methodsFor: 'as yet unclassified' stamp: 'mz 6/4/2008 15:29'!
> initialize
>
>        super initialize.
> ! !
>
> !TATestMenuComp methodsFor: 'as yet unclassified' stamp: 'mz 6/4/2008 18:40'!
> renderContentOn: xml
>        xml vBox flex: 1; style: 'overflow: auto'; with: [
>                xml description with: [xml heading: 'XUL Toolbar'.].
>                xml groupBox flex: 1; with: [
>                        xml caption label: 'tool bar'.
>                        xml toolBox with: [
>                                xml toolBar with: [
>                                        xml toolBarButton
>                                                type: 'radio';
>                                                name: 'color';
>                                                image: 'http://www.hevanet.com/acorbin/xul/images/yellow_apple.png';
>                                                onCommand:      (xml ajax callback: [self halt. Transcript show: 'In
> Callback...'.]).
>                                        ].
>                                ].
>                        ].
>                ].
> ! !
>
> "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!
>
> TATestMenuComp class
>        instanceVariableNames: ''!
>
> !TATestMenuComp class methodsFor: 'as yet unclassified' stamp: 'mz 6/4/2008
> 15:28'!
> canBeRoot
>        "Overriden from parent </WAComponent class/>, allows this component to be
> used to define Seaside application name.
>        This component will present itself at the Seaside admin screen as an
> Application."
>        ^true.! !
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Seaside XUL - Question about Toolbars

Milan Zimmermann-2
Pavel,

You are right - I was missing the XULScriptLibrary from configuration.

Thanks very much, Milan

On 2008 June 2, Pavel Krivanek wrote:

> HI Milan,
>
> copy&paste the class method #initialize from the XULPeriodicTable
> class, change the application name and invoke it. I did it and the
> callback works well. So your problem should be in the application
> configuration.
>
> Cheers,
> -- Pavel
>
> On Mon, Jun 2, 2008 at 1:56 AM, Milan Zimmermann
>
> <[hidden email]> wrote:
> > Hi Pavel
> >
> > I have a question about a toolbar code in Seaside XUL. I created a test
> > file (below) that I run as a Seaside Application (using
> > XULRenderContinuation and XULSession). It's #renderContentOn is pretty
> > much borrowed (simplified) from your XUL Periodic table application.
> >
> > The toolbarButton with the yellow button shows, but When clicked, the
> > callback (self halt in it etc) is never invoked. It looks like the
> > XULAjax created there is not registered in the right place, I tried to
> > debug it and compare behaviour with the XUL Periodic table but so far
> > could not figure out why the two behave differently. Is there anything
> > obvious why that is?
> >
> > Thanks Milan
> > ===============================  TATestMenuComp
> > 'From Squeak3.9.1 of 2 March 2008 [latest update: #7075] on 4 June 2008
> > at 6:41:42 pm'!
> > XULComponent subclass: #TATestMenuComp
> >        instanceVariableNames: ''
> >        classVariableNames: ''
> >        poolDictionaries: ''
> >        category: 'TA-Component'!
> >
> > !TATestMenuComp methodsFor: 'as yet unclassified' stamp: 'mz 6/4/2008
> > 15:29'! initialize
> >
> >        super initialize.
> > ! !
> >
> > !TATestMenuComp methodsFor: 'as yet unclassified' stamp: 'mz 6/4/2008
> > 18:40'! renderContentOn: xml
> >        xml vBox flex: 1; style: 'overflow: auto'; with: [
> >                xml description with: [xml heading: 'XUL Toolbar'.].
> >                xml groupBox flex: 1; with: [
> >                        xml caption label: 'tool bar'.
> >                        xml toolBox with: [
> >                                xml toolBar with: [
> >                                        xml toolBarButton
> >                                                type: 'radio';
> >                                                name: 'color';
> >                                                image:
> > 'http://www.hevanet.com/acorbin/xul/images/yellow_apple.png'; onCommand:
> >     (xml ajax callback: [self halt. Transcript show: 'In Callback...'.]).
> >                                        ].
> >                                ].
> >                        ].
> >                ].
> > ! !
> >
> > "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!
> >
> > TATestMenuComp class
> >        instanceVariableNames: ''!
> >
> > !TATestMenuComp class methodsFor: 'as yet unclassified' stamp: 'mz
> > 6/4/2008 15:28'!
> > canBeRoot
> >        "Overriden from parent </WAComponent class/>, allows this
> > component to be used to define Seaside application name.
> >        This component will present itself at the Seaside admin screen as
> > an Application."
> >        ^true.! !
> > _______________________________________________
> > seaside mailing list
> > [hidden email]
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside