I created a simple listbox. It looks like this: https://s3.amazonaws.com/steverstuff/items.png If I hit a specific selection, say "Item B", how can I make smalltalk run an arbitrary piece of code? (ie: "Transcript show: 'got here'"). Method "whenSelectedItemChanged" should, in theory, do this. It is mentioned in the [[ https://benjamin.vanryseghem.com/projects/spec/docs/example/#protocolList][spec]] tutorial, but for some reason it's not executing. Did a new verion of spec change things since the documentation was written? There doesn't seem to be a spec community where I can ask the question.
Hi, You need to use - whenActivatedDo: or - whenSelectionChangedDo: Both are conceptually different but depending on your selection of activateOnSingleClick or activateOnDoubleClick you can control what to do. (Which reminds me we still need a forced double click action inclusive when activated in single click: sometimes you have one action on single click and a different one on double click). Esteban
On 23 May 2019, at 05:34, Steve Quezadas <steveeq1@gmail.com> wrote:
I created a simple listbox. It looks like this: https://s3.amazonaws.com/steverstuff/items.png <https://s3.amazonaws.com/steverstuff/items.png>
If I hit a specific selection, say "Item B", how can I make smalltalk run an arbitrary piece of code? (ie: "Transcript show: 'got here'").
Method "whenSelectedItemChanged" should, in theory, do this. It is mentioned in the [[https://benjamin.vanryseghem.com/projects/spec/docs/example/#protocolList][spec <https://benjamin.vanryseghem.com/projects/spec/docs/example/#protocolList][spec>]] tutorial, but for some reason it's not executing.
Did a new verion of spec change things since the documentation was written? There doesn't seem to be a spec community where I can ask the question.
I just found this marvel: https://github.com/apiorno/ODBCDriver. But when I try to | con | con := ODBCConnection dsn:'myDSN' user:'usr' password:'pwd'. it responds with an error "Instance of ODBCLibrary class did not understand #sqlAllocEnv": running on Win 10 and Pharo 7.0.3. I'd appreciate any help. Best wishes, Tomaz
As far as I know, he just started porting it to Pharo 7. On Sun, Jun 2, 2019, 13:51 Tomaž Turk <tomaz.turk@ef.uni-lj.si> wrote:
I just found this marvel: https://github.com/apiorno/ODBCDriver.
But when I try to
| con | con := ODBCConnection dsn:'myDSN' user:'usr' password:'pwd'.
it responds with an error "Instance of ODBCLibrary class did not understand #sqlAllocEnv":
running on Win 10 and Pharo 7.0.3. I'd appreciate any help.
Best wishes, Tomaz
I see - thanks! Best wishes, Tomaz ------ Original Message ------ From: "Julián Maestri" <serpi90@gmail.com> To: "Tomaž Turk" <tomaz.turk@ef.uni-lj.si>; "Any question about pharo is welcome" <pharo-users@lists.pharo.org> Sent: 3.6.2019 16:03:25 Subject: Re: [Pharo-users] ODBCDriver
As far as I know, he just started porting it to Pharo 7.
On Sun, Jun 2, 2019, 13:51 Tomaž Turk <tomaz.turk@ef.uni-lj.si> wrote:
I just found this marvel: https://github.com/apiorno/ODBCDriver.
But when I try to
| con | con := ODBCConnection dsn:'myDSN' user:'usr' password:'pwd'.
it responds with an error "Instance of ODBCLibrary class did not understand #sqlAllocEnv":
running on Win 10 and Pharo 7.0.3. I'd appreciate any help.
Best wishes, Tomaz
participants (4)
-
Esteban Lorenzano -
Julián Maestri -
Steve Quezadas -
Tomaž Turk