logo       

nested LiveCallbacks: msg#00115

Subject: nested LiveCallbacks

Hello,

I have a problem with 3 nested LiveCallbacks. For example, I have 3 selects (drop lists), and when the first one is selected, the LiveCallback of the second stop working. My question is: am I working correctly with LiveCallback or I am doing something wrong? What's the errror?. I attach an example.

 

Thanks in advance and I look forward for your help.

Best wishes,

Juan M. Burella

 

I am working with  Seaside2.5/Squeak3.7.

'From Squeak3.7 of ''4 September 2004'' [latest update: #5989] on 27 October 2005 at 11:47:15 am'!
WAComponent subclass: #NestedLiveCallbackExample
 instanceVariableNames: ''
 classVariableNames: ''
 poolDictionaries: ''
 category: 'SeaComp-Example'!

!NestedLiveCallbackExample methodsFor: 'callback' stamp: 'jmb 10/27/2005 11:46'!
countrySelected: anObject on: aRenderer

| provincesName citiesName |
(anObject = 'Aruba')
    ifTrue: [
      provincesName := #().
      citiesName  := #( 'Aruba') 
    ]
    ifFalse: [
      provincesName := #( 'Buenos Aires' 'Cordoba').
      citiesName  := #(' Ciudad Aut—noma de Buenos AiresCiudad' )
     ].

aRenderer spanNamed: 'provinceSelector' with: [
  aRenderer
    selectFromList: provincesName
    selected: nil
    callback:[:f | ]
    labels: [:ea |  ea ]
    liveCallback:  [:anObj :h | self provinceSelected: anObject on: h].
     
  aRenderer spanNamed: 'citySelector' with: [
    aRenderer
      selectFromList: citiesName
      selected: nil
      callback:[:f | ]
      labels: [:ea | ea  ]. 
    ]  
 ].
! !

!NestedLiveCallbackExample methodsFor: 'callback' stamp: 'jmb 10/27/2005 11:46'!
provinceSelected: anObject on: aRenderer

  | aNameCities |

 aNameCities := (anObject = 'Buenos Aires') ifTrue: [ #('La Plata' 'Azul')] ifFalse: [ #('Alta Gracia' 'La Falda ')].  

 aRenderer spanNamed: 'citySelector' with: [
   aRenderer
     selectFromList: aNameCities 
     selected: nil
     callback:[:f | ]
     labels: [:ea | ea ]. 
   ] 

 

 

! !


!NestedLiveCallbackExample methodsFor: 'rendering' stamp: 'jmb 10/27/2005 11:43'!
renderContentOn: aRenderer

aRenderer
 selectFromList: #( 'Argentina' 'Aruba' )
 selected: 'Argentina'
 callback:[:f | ]
 labels: [:ea |  ea ]
 liveCallback: [:anObject :h | self countrySelected: anObject on: h].

self renderNestedSelectOn: aRenderer.! !

!NestedLiveCallbackExample methodsFor: 'rendering' stamp: 'jmb 10/27/2005 11:46'!
renderNestedSelectOn: aRenderer

aRenderer spanNamed: 'provinceSelector' with: [
  aRenderer
    selectFromList:  #( 'Buenos Aires' 'Cordoba')
    selected: nil
    callback:[:f | ]
    labels: [:ea |  ea ]
    liveCallback:  [:anObject :h | self provinceSelected: anObject on: h].
     
  aRenderer spanNamed: 'citySelector' with: [
    aRenderer
      selectFromList: #( 'Ciudad Aut—noma de Buenos AiresCiudad' )
      selected: nil
      callback:[:f | ]      
      labels: [:ea |  ea ]      
    ]  
 ].! !

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

NestedLiveCallbackExample class
 instanceVariableNames: ''!

!NestedLiveCallbackExample class methodsFor: 'as yet unclassified' stamp: 'jmb 10/27/2005 11:34'!
canBeRoot

^true! !


Attachment: NestedLiveCallbackExample.st
Description: Binary data

_______________________________________________
Seaside mailing list
Seaside@xxxxxxxxxxxxxxxxxxxxxxxxxx
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.arklinux....    user-groups.lin...    kde.usability/2...    ietf.ipp/2002-0...    mail.spam.spamc...    os.netbsd.devel...    audio.cd-record...    text.unicode.de...    php.documentati...    games.fps.halfl...    window-managers...    suse.oracle.gen...    bug-tracking.gn...    video.dvdrip.us...    xfree86.cvs/200...    java.netbeans.m...    network.argus/2...    culture.sf.kill...    debian.ports.al...    freebsd.questio...    qplus.devel/200...    handhelds.palm....   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe